Browse Source

员工管理修改

zhangxin 6 days ago
parent
commit
c7bcf9bc65
14 changed files with 238 additions and 56 deletions
  1. 78 14
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppInstructorController.java
  2. 4 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppInstructor.java
  3. 5 2
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppInstructorMapper.java
  4. 78 3
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppInstructorMapper.xml
  5. 4 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppInstructorService.java
  6. 18 21
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppInstructorServiceImpl.java
  7. 15 12
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/staff/StaffVO.java
  8. 11 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java
  9. 1 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDepartMapper.java
  10. 4 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
  11. 2 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml
  12. 4 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
  13. 4 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/service/ISysUserService.java
  14. 10 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java

+ 78 - 14
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppInstructorController.java

@@ -24,8 +24,10 @@ import org.jeecg.modules.system.app.vo.staff.StaffResponseVO;
 import org.jeecg.modules.system.app.vo.staff.StaffSaveVO;
 import org.jeecg.modules.system.app.vo.staff.StaffVO;
 import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.entity.SysRole;
 import org.jeecg.modules.system.entity.SysUser;
 import org.jeecg.modules.system.service.ISysDepartService;
+import org.jeecg.modules.system.service.ISysRoleService;
 import org.jeecg.modules.system.service.ISysUserService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeansException;
@@ -57,6 +59,8 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 	private BaseCommonService baseCommonService;
 	@Autowired
 	private ISysDepartService sysDepartService;
+	@Autowired
+	private ISysRoleService iSysRoleService;
 
 	/**
 	 * 分页列表查询
@@ -76,7 +80,7 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 													  HttpServletRequest req) {
 
 		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-		Page<AppInstructor> page = new Page<AppInstructor>(pageNo, pageSize);
+		Page<StaffResponseVO> page = new Page<StaffResponseVO>(pageNo, pageSize);
 		IPage<StaffResponseVO> pageList = appInstructorService.findPage(page, staffRequestVO,loginUser.getOrgCode());
 		return Result.OK(pageList);
 	}
@@ -102,8 +106,18 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 			if (StringUtils.isEmpty(staffSaveVO.getSelecteddeparts())){
 				return Result.error("所属部门为空");
 			}
+
+			SysUser sysUser =	sysUserService.findByUserName(staffSaveVO.getUsername());
+			if (sysUser!=null){
+				return Result.error("该登录账号已存在");
+			}
+			SysRole sysRole = iSysRoleService.getById(staffSaveVO.getSelectedroles());
+			if (sysRole==null||StringUtils.isEmpty(sysRole.getRoleCode())){
+				return Result.error("未查询到角色信息");
+			}
 			SysDepart departById =null;
-			if (staffSaveVO.getSelectedroles().indexOf("instructor")==0){
+
+			if (sysRole.getRoleCode().indexOf("instructor")==0){
 				if (staffSaveVO.getSelecteddeparts().contains(",")){
 					return Result.error("该角色涉及教练,不允许多部门");
 				}
@@ -117,6 +131,9 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 				}
 				departById = sysDepartService.getDepartById(dept);
 			}
+			if (departById==null){
+				return Result.error("未查询到部门信息");
+			}
 			LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 			try {
 				BeanUtils.copyProperties(staffSaveVO,user);
@@ -139,11 +156,20 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 				log.error(e.getMessage(), e);
 				return Result.error("添加失败!");
 			}
-			BeanUtils.copyProperties(staffSaveVO,appInstructor);
-			appInstructor.setId(UuidUtils.getUUID());
-			appInstructor.setUserId(user.getId());
-			appInstructor.setDelFlag(CommonConstant.DEL_FLAG_0);
-			appInstructorService.save(appInstructor);
+			if (sysRole.getRoleCode().indexOf("instructor")==0){
+				BeanUtils.copyProperties(staffSaveVO,appInstructor);
+				if (appInstructor.getStatus().equals(1)){
+					appInstructor.setStatus(0);
+				}else {
+					appInstructor.setStatus(1);
+				}
+				appInstructor.setId(UuidUtils.getUUID());
+				appInstructor.setUserId(user.getId());
+				appInstructor.setOrgCode(departById.getOrgCode());
+				appInstructor.setDelFlag(CommonConstant.DEL_FLAG_0);
+				appInstructorService.save(appInstructor);
+			}
+
 		} catch (BeansException e) {
 			e.getMessage();
 			return Result.error("添加失败!");
@@ -171,6 +197,13 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 			if (staffVO==null){
 				return Result.error("编辑失败!未查询到需要编辑的员工信息。");
 			}
+
+			if (!(StringUtils.isNotEmpty(staffVO.getUsername())&&staffVO.getUsername().equals(staffSaveVO.getUsername()))){
+				SysUser sysUserO =	sysUserService.findByUserName(staffSaveVO.getUsername());
+				if (sysUserO!=null){
+					return Result.error("该登录账号已存在");
+				}
+			}
 			if (StringUtils.isEmpty(staffVO.getStaffId())){
 				return Result.error("编辑失败!未知员工信息");
 			}
@@ -180,8 +213,12 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 			if (StringUtils.isEmpty(staffSaveVO.getSelecteddeparts())){
 				return Result.error("所属部门为空");
 			}
+			SysRole sysRole = iSysRoleService.getById(staffSaveVO.getSelectedroles());
+			if (sysRole==null||StringUtils.isEmpty(sysRole.getRoleCode())){
+				return Result.error("未查询到角色信息");
+			}
 			SysDepart departById =null;
-			if (staffSaveVO.getSelectedroles().indexOf("instructor")==0){
+			if (sysRole.getRoleCode().indexOf("instructor")==0){
 				if (staffSaveVO.getSelecteddeparts().contains(",")){
 					return Result.error("该角色涉及教练,不允许多部门");
 				}
@@ -195,6 +232,9 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 				}
 				departById = sysDepartService.getDepartById(dept);
 			}
+			if (departById==null){
+				return Result.error("未查询到部门信息");
+			}
 			LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 			SysUser sysUser = new SysUser();
 			BeanUtils.copyProperties(staffSaveVO,sysUser);
@@ -206,21 +246,39 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 			boolean fal=StringUtils.isNotEmpty(staffVO.getInstructorId());
 			AppInstructor appInstructor = new AppInstructor();
 			BeanUtils.copyProperties(staffSaveVO,appInstructor);
-			if (staffSaveVO.getSelectedroles().indexOf("instructor")==0&&fal){
+			if (sysRole.getRoleCode().indexOf("instructor")==0&&fal){
 				appInstructor.setId(staffVO.getInstructorId());
 				appInstructor.setUpdateBy(loginUser.getUsername());
 				appInstructor.setUpdateTime(new Date());
+				if (staffSaveVO.getStatus().equals(1)){
+					appInstructor.setStatus(0);
+				}else {
+					appInstructor.setStatus(1);
+				}
+				appInstructor.setOrgCode(departById.getOrgCode());
 				appInstructorService.updateById(appInstructor);
-			}else if (staffSaveVO.getSelectedroles().indexOf("instructor")==0&&!fal){
+			}else if (sysRole.getRoleCode().indexOf("instructor")==0&&!fal){
 				appInstructor.setId(UuidUtils.getUUID());
 				appInstructor.setUserId(sysUser.getId());
 				appInstructor.setDelFlag(CommonConstant.DEL_FLAG_0);
+				if (staffSaveVO.getStatus().equals(1)){
+					appInstructor.setStatus(0);
+				}else {
+					appInstructor.setStatus(1);
+				}
+				appInstructor.setOrgCode(departById.getOrgCode());
 				appInstructorService.save(appInstructor);
-			}else if (staffSaveVO.getSelectedroles().indexOf("instructor")!=0&&fal){
+			}else if (sysRole.getRoleCode().indexOf("instructor")!=0&&fal){
 				appInstructor.setId(staffVO.getInstructorId());
 				appInstructor.setDelFlag(CommonConstant.DEL_FLAG_1);
 				appInstructor.setUpdateBy(loginUser.getUsername());
 				appInstructor.setUpdateTime(new Date());
+				if (staffSaveVO.getStatus().equals(1)){
+					appInstructor.setStatus(0);
+				}else {
+					appInstructor.setStatus(1);
+				}
+				appInstructor.setOrgCode(departById.getOrgCode());
 				appInstructorService.updateById(appInstructor);
 			}
 		} catch (BeansException e) {
@@ -245,7 +303,7 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 		try {
 			StaffVO staffVO =sysUserService.findByUserIdStaff(id);
 			if (staffVO==null){
-				return Result.OK("删除失败!未查询到信息");
+				return Result.error("删除失败!未查询到信息");
 			}
 			LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 			SysUser sysUser = new SysUser();
@@ -253,14 +311,20 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 			sysUser.setDelFlag(CommonConstant.DEL_FLAG_1);
 			sysUser.setUpdateBy(loginUser.getUsername());
 			sysUser.setUpdateTime(new Date());
-			sysUserService.updateById(sysUser);
+			Integer i=sysUserService.updateDelStatus(sysUser);
+			if (i<1){
+				return Result.error("删除失败!");
+			}
 			if (StringUtils.isNotEmpty(staffVO.getInstructorId())){
 				AppInstructor appInstructor = new AppInstructor();
 				appInstructor.setId(staffVO.getInstructorId());
 				appInstructor.setDelFlag(CommonConstant.DEL_FLAG_1);
 				appInstructor.setUpdateBy(loginUser.getUsername());
 				appInstructor.setUpdateTime(new Date());
-				appInstructorService.updateById(appInstructor);
+				i=appInstructorService.updateDelStatus(appInstructor);
+				if (i<1){
+					return Result.error("删除失败!");
+				}
 			}
 		} catch (Exception e) {
 			e.getMessage();

+ 4 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppInstructor.java

@@ -87,4 +87,8 @@ public class AppInstructor implements Serializable {
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @Schema(description = "更新时间;更新时间")
     private Date updateTime;
+
+    /**名称*/
+    @Schema(description = "背景图")
+    private String backgroundImg;
 }

+ 5 - 2
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppInstructorMapper.java

@@ -40,7 +40,10 @@ public interface AppInstructorMapper extends BaseMapper<AppInstructor> {
 
     AppCoachDetailsVO findById(@Param("id")String id);
 
-    IPage<StaffResponseVO> findPage(@Param("page") Page<AppInstructor> page,@Param("staffRequestVO") StaffRequestVO staffRequestVO,@Param("orgCode") String orgCode);
+    IPage<StaffResponseVO> findPage(@Param("page") Page<StaffResponseVO> page,@Param("staffRequestVO") StaffRequestVO staffRequestVO,@Param("orgCode") String orgCode);
+
+    StaffVO findByStaffId(@Param("id") String id);
+
+    Integer updateDelStatus(@Param("appInstructor")  AppInstructor appInstructor);
 
-    StaffVO findByStaffId(String id);
 }

+ 78 - 3
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppInstructorMapper.xml

@@ -21,6 +21,44 @@
             <result property="price" column="selling_price" javaType="java.math.BigDecimal"/>
         </collection>
     </resultMap>
+
+    <resultMap id="staffVOResult" type="org.jeecg.modules.system.app.vo.staff.StaffVO">
+        <result property="staffId" column="staffId"/>
+        <result property="instructorId" column="instructorId"/>
+        <result property="backgroundImg" column="background_img"/>
+        <result property="username" column="username"/>
+        <result property="realname" column="realname"/>
+        <result property="status" column="status"/>
+        <result property="password" column="password"/>
+        <result property="trainingProgramsList" column="training_programs"/>
+        <result property="teachingPhilosophy" column="teaching_philosophy"/>
+        <result property="excelMsg" column="excel_msg"/>
+        <result property="certificateInnocence" column="certificate_innocence"/>
+        <result property="healthy" column="healthy"/>
+        <result property="honorList" column="honor"/>
+        <collection property="selecteddeparts" ofType="java.lang.String" javaType="java.util.List">
+            <result column="deptId" />
+        </collection>
+        <collection property="selectedroles" ofType="java.lang.String" javaType="java.util.List">
+            <result  column="roleId" />
+        </collection>
+<!--        <collection property="selecteddepartsList"-->
+<!--                column="staffId"-->
+<!--        select="selectDeptIdsByUserId"-->
+<!--        ofType="java.lang.String"-->
+<!--         javaType="java.util.List"/>-->
+
+<!--        &lt;!&ndash; 通过子查询加载角色ID列表 &ndash;&gt;-->
+<!--        <collection-->
+<!--                property="selectedrolesList"-->
+<!--                column="staffId"-->
+<!--                select="selectRoleIdsByUserId"-->
+<!--                ofType="java.lang.String"-->
+<!--                javaType="java.util.List" />-->
+    </resultMap>
+    <update id="updateDelStatus">
+        UPDATE nm_instructor SET update_by = #{appInstructor.updateBy}, update_time =  #{appInstructor.updateTime} ,del_flag = 1 WHERE id = #{appInstructor.id}  AND del_flag = 0
+    </update>
     <select id="convertSearchInstructorVOPage" resultType="org.jeecg.modules.app.vo.SearchVO$SearchInstructorVO">
         SELECT
             a.id,
@@ -70,7 +108,7 @@
         left join  sys_user_depart b on a.id = b.user_id
         left join sys_depart c on b.dep_id  = c.id and c.id in (select id from sys_depart where org_code LIKE CONCAT('',#{orgCode},'%'))
         left join nm_instructor d on a.id =d.user_id and d.del_flag=0
-        where 1=1
+        where 1=1 and a.del_flag=0 and c.id in (select id from sys_depart where org_code LIKE CONCAT('',#{orgCode},'%'))
         <if test="staffRequestVO!=null and staffRequestVO!=''">
             <if test="staffRequestVO.deptId!=null and staffRequestVO.deptId!=''">
                 AND c.id = #{staffRequestVO.deptId}
@@ -91,11 +129,48 @@
                 <![CDATA[   AND DATE_FORMAT(a.create_time, '%Y-%m-%d')<=  DATE_FORMAT(#{staffRequestVO.startTime}, '%Y-%m-%d') ]]>
             </if>
         </if>
+        order by a.create_time desc
     </select>
-    <select id="findByStaffId" resultType="org.jeecg.modules.system.app.vo.staff.StaffVO">
-        select a.id as staffId,b.id as instructorId,a.username,b.realname,a.status,a.password,b.training_programs,b.teaching_philosophy,b.excel_msg,a.certificate_innocence,a.healthy,a.honor,b.background_img from from sys_user a
+    <select id="findByStaffId"  resultMap="staffVOResult">
+        select a.id as staffId,b.id as instructorId,a.username,a.realname,a.status,null as password,b.training_programs,b.teaching_philosophy,b.excel_msg,a.certificate_innocence,a.healthy,a.honor,b.background_img
+        ,c.dep_id as deptId,d.role_id as roleId
+        from sys_user a
         left join nm_instructor b on a.id =b.user_id and b.del_flag=0
+        left join sys_user_depart c on a.id = c.user_id
+        left join sys_user_role d on a.id = d.user_id
         where a.id=#{id} and a.del_flag=0
     </select>
 
+<!--    <select id="findByStaffId" resultMap="staffVOResult">-->
+<!--        SELECT-->
+<!--            a.id AS staffId,-->
+<!--            b.id AS instructorId,-->
+<!--            a.username,-->
+<!--            a.realname,-->
+<!--            a.status,-->
+<!--            a.password,-->
+<!--            b.training_programs,-->
+<!--            b.teaching_philosophy,-->
+<!--            b.excel_msg,-->
+<!--            a.certificate_innocence,-->
+<!--            a.healthy,-->
+<!--            a.honor,-->
+<!--            b.background_img-->
+<!--        FROM sys_user a-->
+<!--                 LEFT JOIN nm_instructor b ON a.id = b.user_id AND b.del_flag = 0-->
+<!--        WHERE a.id = #{id} AND a.del_flag = 0-->
+<!--    </select>-->
+
+<!--    &lt;!&ndash; 单独查询部门ID列表 &ndash;&gt;-->
+<!--    <select id="selectDeptIdsByUserId" resultType="string">-->
+<!--        SELECT c.id FROM sys_user_depart c-->
+<!--        WHERE c.user_id = #{userId}-->
+<!--    </select>-->
+
+<!--    &lt;!&ndash; 单独查询角色ID列表 &ndash;&gt;-->
+<!--    <select id="selectRoleIdsByUserId" resultType="string">-->
+<!--        SELECT d.id FROM sys_user_role d-->
+<!--        WHERE d.user_id = #{userId}-->
+<!--    </select>-->
+
 </mapper>

+ 4 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppInstructorService.java

@@ -16,7 +16,10 @@ import org.jeecg.modules.system.app.vo.staff.StaffVO;
  */
 public interface IAppInstructorService extends IService<AppInstructor> {
 
-    IPage<StaffResponseVO> findPage(Page<AppInstructor> page, StaffRequestVO staffRequestVO,String orgCode);
+    IPage<StaffResponseVO> findPage(Page<StaffResponseVO> page, StaffRequestVO staffRequestVO,String orgCode);
 
     StaffVO findById(String id);
+
+    Integer updateDelStatus(AppInstructor appInstructor);
+
 }

+ 18 - 21
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppInstructorServiceImpl.java

@@ -33,44 +33,41 @@ public class AppInstructorServiceImpl extends ServiceImpl<AppInstructorMapper, A
 
 
     @Override
-    public IPage<StaffResponseVO> findPage(Page<AppInstructor> page, StaffRequestVO staffRequestVO,String orgCode) {
+    public IPage<StaffResponseVO> findPage(Page<StaffResponseVO> page, StaffRequestVO staffRequestVO,String orgCode) {
         return appInstructorMapper.findPage(page,staffRequestVO,orgCode);
     }
 
     @Override
     public StaffVO findById(String id) {
         StaffVO staffVO = appInstructorMapper.findByStaffId(id);
-        //处理部门
-        List<String> selecteddeparts = new ArrayList<>();
+        //图片
         List<String> trainingPrograms = new ArrayList<>();
         List<String> honor = new ArrayList<>();
         if (staffVO!=null){
-            if (StringUtils.isNotEmpty(staffVO.getSelecteddeparts())){
-                if (staffVO.getSelecteddeparts().contains(",")){
-                    selecteddeparts = Arrays.asList(staffVO.getSelecteddeparts().split(","));
-                }else {
-                    selecteddeparts.add(staffVO.getSelecteddeparts());
-                }
-            }
-            if (StringUtils.isNotEmpty(staffVO.getTrainingPrograms())){
-                if (staffVO.getTrainingPrograms().contains(",")){
-                    trainingPrograms = Arrays.asList(staffVO.getTrainingPrograms().split(","));
+
+            if (StringUtils.isNotEmpty(staffVO.getTrainingProgramsList())){
+                if (staffVO.getTrainingProgramsList().contains(",")){
+                    trainingPrograms = Arrays.asList(staffVO.getTrainingProgramsList().split(","));
                 }else {
-                    trainingPrograms.add(staffVO.getTrainingPrograms());
+                    trainingPrograms.add(staffVO.getTrainingProgramsList());
                 }
             }
-            if (StringUtils.isNotEmpty(staffVO.getHonor())){
-                if (staffVO.getHonor().contains(",")){
-                    honor = Arrays.asList(staffVO.getHonor().split(","));
+            if (StringUtils.isNotEmpty(staffVO.getHonorList())){
+                if (staffVO.getHonorList().contains(",")){
+                    honor = Arrays.asList(staffVO.getHonorList().split(","));
                 }else {
-                    honor.add(staffVO.getHonor());
+                    honor.add(staffVO.getHonorList());
                 }
             }
-            staffVO.setSelecteddepartsList(selecteddeparts);
-            staffVO.setTrainingProgramsList(trainingPrograms);
-            staffVO.setHonorList(honor);
+            staffVO.setTrainingPrograms(trainingPrograms);
+            staffVO.setHonor(honor);
         }
 
         return staffVO;
     }
+
+    @Override
+    public Integer updateDelStatus(AppInstructor appInstructor) {
+        return appInstructorMapper.updateDelStatus(appInstructor);
+    }
 }

+ 15 - 12
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/staff/StaffVO.java

@@ -24,7 +24,6 @@ import java.util.List;
 public class StaffVO {
 
 
-
     @Schema(description = "员工id")
     private String staffId;
 
@@ -45,12 +44,12 @@ public class StaffVO {
     /**密码*/
     @Schema(description = "密码")
     private String password;
-
-    @Schema(description = "所属角色")
-    private String  selectedroles;
-
-    @Schema(description = "所属部门")
-    private String  selecteddeparts;
+//
+//    @Schema(description = "所属角色")
+//    private String  selectedroles;
+//
+//    @Schema(description = "所属部门")
+//    private String  selecteddeparts;
     /**部门编号*/
     @Excel(name = "部门编号", width = 15)
     @Schema(description = "部门编号")
@@ -58,7 +57,7 @@ public class StaffVO {
     /**培训项目*/
     @Excel(name = "培训项目", width = 15)
     @Schema(description = "培训项目,使用,分割")
-    private String trainingPrograms;
+    private List<String> trainingPrograms;
     /**教学理念*/
     @Excel(name = "教学理念", width = 15)
     @Schema(description = "教学理念")
@@ -78,16 +77,20 @@ public class StaffVO {
     /**荣誉证书多个逗号分隔*/
     @Excel(name = "荣誉证书多个逗号分隔", width = 15)
     @Schema(description = "荣誉证书多个逗号分隔")
-    private String honor;
+    private  List<String> honor;
 
     @Schema(description = "所属部门")
-    private List<String> selecteddepartsList;
+    private List<String> selecteddeparts;
+
+
+    @Schema(description = "所属角色")
+    private List<String> selectedroles;
     /**培训项目*/
     @Excel(name = "培训项目", width = 15)
     @Schema(description = "培训项目,使用,分割")
-    private List<String> trainingProgramsList;
+    private String trainingProgramsList;
     /**荣誉证书多个逗号分隔*/
     @Excel(name = "荣誉证书多个逗号分隔", width = 15)
     @Schema(description = "荣誉证书多个逗号分隔")
-    private List<String> honorList;
+    private String honorList;
 }

+ 11 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -212,4 +213,14 @@ public class SysUser implements Serializable {
      * 小程序openId
      */
     private String openid;
+
+    /**无犯罪证明*/
+    @Schema(description = "无犯罪证明")
+    private String certificateInnocence;
+    /**健康证*/
+    @Schema(description = "健康证")
+    private String healthy;
+    /**荣誉证书多个逗号分隔*/
+    @Schema(description = "荣誉证书多个逗号分隔")
+    private String honor;
 }

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDepartMapper.java

@@ -205,5 +205,5 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> {
 
 	FindByMerchantIdResponseDTO findByMerchntId(@Param("id")  String id);
 
-    String findByDeptList(@Param("orgCode") String orgCode);
+	List<SysDepart> findByDeptList(@Param("orgCode") String orgCode);
 }

+ 4 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java

@@ -241,4 +241,8 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
 	SysUser findByDepartIds(@Param("departIds") String departIds);
 
     StaffVO findByUserIdStaff(@Param("id") String id);
+	@Select("select * from sys_user where  username =#{username}")
+	SysUser findByUserName(@Param("username") String username);
+
+	Integer updateDelStatus(@Param("sysUser") SysUser sysUser);
 }

+ 2 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml

@@ -243,7 +243,8 @@
         where sd.del_flag=0 and sd.id= #{id};
 
     </select>
-    <select id="findByDeptList" resultType="java.lang.String">
+    <select id="findByDeptList" resultType="org.jeecg.modules.system.entity.SysDepart">
         select * from sys_depart where del_flag=0 and org_code like CONCAT('',#{orgCode},'%')
     </select>
+
 </mapper>

+ 4 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml

@@ -281,6 +281,9 @@
       #{userId}
     </foreach>
   </update>
+	<update id="updateDelStatus">
+		UPDATE sys_user SET update_by = #{sysUser.updateBy}, update_time =  #{sysUser.updateTime},del_flag =  1 WHERE id = #{sysUser.id} AND del_flag = 0
+	</update>
 
 	<!--根据部门id获取用户数据-->
 	<select id="getUserByDepartsTenantId" resultType="org.jeecg.modules.system.entity.SysUser">
@@ -323,6 +326,6 @@
 		select a.id as staffId,a.username,a.realname,a.status,b.id as instructorId,b.training_programs,b.teaching_philosophy,b.excel_msg
 		from sys_user a
 		left join  nm_instructor b on a.id = b.user_id and b.del_flag =0
-		where a.del_flag =0 and a.user_identity=1
+		where a.del_flag =0 and a.user_identity=1 and a.id =#{id}
 	</select>
 </mapper>

+ 4 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/service/ISysUserService.java

@@ -488,4 +488,8 @@ public interface ISysUserService extends IService<SysUser> {
     IPage<FindPageCUserInfoResponseDTO> findByCUserInfo(Integer pageNo, Integer pageSize, FindPageCUserInfoRequestDTO findPageCUserInfoRequestDTO);
 
     StaffVO findByUserIdStaff(String id);
+
+    SysUser findByUserName(String username);
+
+	Integer updateDelStatus(SysUser sysUser);
 }

+ 10 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java

@@ -2375,4 +2375,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 	public StaffVO findByUserIdStaff(String id) {
 		return userMapper.findByUserIdStaff(id);
 	}
+
+	@Override
+	public SysUser findByUserName(String username) {
+		return userMapper.findByUserName(username);
+	}
+
+	@Override
+	public Integer updateDelStatus(SysUser sysUser) {
+		return  userMapper.updateDelStatus(sysUser);
+	}
 }