|
|
@@ -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);
|