Bladeren bron

解决缺陷 (人员扩展信息)

zhulu 1 jaar geleden
bovenliggende
commit
ca0dd0d045

+ 37 - 12
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysUserServiceImpl.java

@@ -729,6 +729,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     }
 
     public String calculateWorkExperience(Date workStartDate) {
+        if(workStartDate==null)
+        {
+            return "";
+        }
         LocalDate startDate = workStartDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
         LocalDate currentDate = LocalDate.now();
 
@@ -779,23 +783,44 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 //            if (null != sysOrg1) {
 //                s.setCity(sysOrg1.getShortName().indexOf("地区行社") == -1 ? sysOrg1.getShortName().substring(0, 2) : sysOrg1.getShortName().split("地区行社")[0]);
 //            }
+
             //部门名称
-            String departmentName = iSysDictDataService.selectDictLabel("department_name", s.getDepartmentName());
-            s.setDepartmentName(departmentName);
+            if(StringUtils.isNotEmpty(s.getDepartmentName())){
+                String departmentName = iSysDictDataService.selectDictLabel("department_name", s.getDepartmentName());
+                s.setDepartmentName(departmentName);
+            }
             //现任职务
-            String nowDuties = iSysDictDataService.selectDictLabel("current_position", s.getNowDuties());
-            s.setNowDuties(nowDuties);
+            if(StringUtils.isNotEmpty(s.getNowDuties())) {
+                String nowDuties = iSysDictDataService.selectDictLabel("current_position", s.getNowDuties());
+                s.setNowDuties(nowDuties);
+            }
             //用工形式
-            String workType = iSysDictDataService.selectDictLabel("sys_work_type", s.getWorkType());
-            s.setWorkType(workType);
+            if(StringUtils.isNotEmpty(s.getWorkType())) {
+                String workType = iSysDictDataService.selectDictLabel("sys_work_type", s.getWorkType());
+                s.setWorkType(workType);
+            }
             //最高学历
-            String sysHighestEducation = iSysDictDataService.selectDictLabel("sys_highest_education", s.getHighestEducation());
-            s.setHighestEducation(sysHighestEducation);
+            if(StringUtils.isNotEmpty(s.getHighestEducation())) {
+                String sysHighestEducation = iSysDictDataService.selectDictLabel("sys_highest_education", s.getHighestEducation());
+                s.setHighestEducation(sysHighestEducation);
+            }
             //取得方式
-            String sysEducationType = iSysDictDataService.selectDictLabel("sys_education_type", s.getEducationType());
-            s.setEducationType(sysEducationType);
-            String sysDuties = iSysDictDataService.selectDictLabel("sys_duties", s.getResponsibilitiesLeaderDuties());
-            s.setResponsibilitiesLeaderDuties(sysDuties);
+            if(StringUtils.isNotEmpty(s.getEducationType())) {
+                String sysEducationType = iSysDictDataService.selectDictLabel("sys_education_type", s.getEducationType());
+                s.setEducationType(sysEducationType);
+            }
+
+            if(StringUtils.isNotEmpty(s.getResponsibilitiesLeaderDuties())) {
+                String sysDuties = iSysDictDataService.selectDictLabel("sys_duties", s.getResponsibilitiesLeaderDuties());
+                s.setResponsibilitiesLeaderDuties(sysDuties);
+            }
+
+            //持证上岗考试未通过原因(按照下拉选项填列)
+            if(StringUtils.isNotEmpty(s.getCertificateFailReason())) {
+                String certificateFailReasonStr = iSysDictDataService.selectDictLabel("post_no_pass", s.getCertificateFailReason());
+                s.setCertificateFailReason(certificateFailReasonStr);
+            }
+
             //工作年限
             String workDuration = calculateWorkExperience(s.getWorkTime());
             s.setWorkDuration(workDuration);

+ 1 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/SecurityUserExport.java

@@ -67,5 +67,6 @@ public class SecurityUserExport {
     @ExcelProperty(value = "分管领导职务", index = 19)
     private String responsibilitiesLeaderDuties;
 
+    @ExcelIgnore
     private Date workTime;
 }

+ 3 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserInformationMapper.xml

@@ -254,6 +254,9 @@
                     <if test="qualificationCertificateUrl != null">qualification_certificate_url =
                         #{qualificationCertificateUrl},
                     </if>
+                    <if test="financialExperts != null">financial_experts =
+                        #{financialExperts},
+                    </if>
                     <if test="createBy != null">create_by =
                         #{createBy},
                     </if>

+ 11 - 6
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -409,12 +409,14 @@
     <select id="getPage" resultType="com.xunmei.system.api.domain.SysUser">
         select t.* from
         (
+        SELECT c.*,
+        GROUP_CONCAT(c.role_name) role_names,
+        CONCAT(",",GROUP_CONCAT( c.roleId ),",") as roleIds from (
         SELECT
+        DISTINCT
         h.user_id AS is_manager,
         <!--        ur. role_names,-->
         <!--        ur. roleIds,-->
-        GROUP_CONCAT(sr.role_name) role_names,
-        CONCAT(",",GROUP_CONCAT( sr.id ),",") as roleIds,
         u.id,
         u.dept_id,
         u.is_lock,
@@ -453,7 +455,9 @@
         u.CODE,
         u.source,
         u.original_org_id,
-        u.is_manage
+        u.is_manage,
+        sr.id as roleId,
+        sr.role_name
         FROM
         sys_user u
         LEFT JOIN sys_org o ON u.original_org_id = o.id
@@ -502,7 +506,8 @@
             <!-- 结束时间检索 -->
             AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{info.params.endTime},'%y%m%d')
         </if>
-        group by u.id
+        ) c
+        group by c.id
         ) t
         where 1=1
         <if test="info.roleId != null and info.roleId != ''">
@@ -747,8 +752,8 @@
                a.certificate_fail_reason                AS certificateFailReason,
                a.responsibilities_leader_name           AS responsibilitiesLeaderName,
                a.responsibilities_leader_duties         AS responsibilitiesLeaderDuties
-        FROM sys_user_information a
-                 LEFT JOIN sys_user b ON a.user_id = b.id
+        FROM sys_user b
+                 LEFT JOIN sys_user_information a ON a.user_id = b.id
                  LEFT JOIN sys_org c ON c.id = b.org_id
         WHERE b.deleted = 0
           AND b.is_manage='Y'