Browse Source

人力资源管理 人员信息登记暂存数据不保存bug代码提交

徐滕 6 days ago
parent
commit
487ea51cde
26 changed files with 992 additions and 84 deletions
  1. 4 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureOldMessageDisposeController.java
  2. 38 0
      src/main/java/com/jeeplus/modules/sys/utils/UserUtils.java
  3. 17 0
      src/main/java/com/jeeplus/modules/workcalendar/service/WorkCalendarTaskService.java
  4. 7 0
      src/main/java/com/jeeplus/modules/workstaff/dao/WorkStaffAchivesDao.java
  5. 7 0
      src/main/java/com/jeeplus/modules/workstaff/dao/WorkStaffBasicInfoDao.java
  6. 51 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffAchievementService.java
  7. 28 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java
  8. 64 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffCertificateService.java
  9. 87 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffEducationService.java
  10. 51 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffExperienceService.java
  11. 50 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffFamilyService.java
  12. 68 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffLaborContractService.java
  13. 70 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffLanguagesService.java
  14. 61 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffRecordService.java
  15. 51 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffRewardsService.java
  16. 49 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffSocialPositionService.java
  17. 74 18
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffTitleService.java
  18. 63 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffTrainingService.java
  19. 18 9
      src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoController.java
  20. 69 1
      src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoEmploymentInController.java
  21. 6 0
      src/main/resources/mappings/modules/workstaff/WorkStaffAchivesDao.xml
  22. 7 0
      src/main/resources/mappings/modules/workstaff/WorkStaffBasicInfoDao.xml
  23. 27 27
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailAudit.jsp
  24. 2 1
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoEmploymentInForm.jsp
  25. 6 18
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoEmploymentInList.jsp
  26. 17 9
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp

+ 4 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureOldMessageDisposeController.java

@@ -41,6 +41,7 @@ import com.jeeplus.modules.workinvoice.entity.TemporaryInvoiceInfo;
 import com.jeeplus.modules.workinvoice.service.WorkInvoiceService;
 import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementService;
+import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
 import freemarker.template.Configuration;
 import freemarker.template.Template;
 import org.activiti.engine.HistoryService;
@@ -117,6 +118,8 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
     private WorkReimbursementService workReimbursementService;
     @Autowired
     private MilitaryIndustryConfidentialityService militaryIndustryConfidentialityService;
+    @Autowired
+    private WorkStaffBasicInfoService workStaffBasicInfoService;
 
     private static final String HTTPTOP = Global.getConfig("signature_http_top");
 
@@ -214,7 +217,7 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
         Map<String,Object> map = new HashMap<>();
 
         logger.info("-----------军工证书到期时间开始提醒------------------");
-        militaryIndustryConfidentialityService.timedTask();
+        workStaffBasicInfoService.updateAgeByIdCard();
 
         logger.info("------------军工证书到期时间结束提醒------------------");
         long l2 = System.currentTimeMillis();

+ 38 - 0
src/main/java/com/jeeplus/modules/sys/utils/UserUtils.java

@@ -40,6 +40,9 @@ import org.springframework.transaction.annotation.Transactional;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
+import java.time.LocalDate;
+import java.time.Period;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.regex.Pattern;
 
@@ -1981,4 +1984,39 @@ public class UserUtils {
 	public static List<User> getCompanyUserList(){
 		return userDao.getCompanyUserList(UserUtils.getUser().getCompany().getId());
 	}
+
+	/**
+	 * 根据身份证号获取年龄
+	 * @return
+	 */
+	public static Integer getAgeByIdCard(String idCard) {
+		if (idCard == null || !(idCard.length() == 15 || idCard.length() == 18)) {
+			throw new IllegalArgumentException("身份证号无效");
+		}
+
+		String birthStr;
+
+		if (idCard.length() == 18) {
+			// 18位:直接取7~14位
+			birthStr = idCard.substring(6, 14); // yyyyMMdd
+		} else {
+			// 15位:取7~12位并补齐年份
+			String year = "19" + idCard.substring(6, 8);
+			String month = idCard.substring(8, 10);
+			String day = idCard.substring(10, 12);
+			birthStr = year + month + day; // 转换为 yyyyMMdd
+		}
+
+		// 解析出生日期
+		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
+		LocalDate birthDate = LocalDate.parse(birthStr, formatter);
+
+		// 当前日期
+		LocalDate now = LocalDate.now();
+
+		// 计算年龄
+		int years = Period.between(birthDate, now).getYears();
+		return years;
+	}
+
 }

+ 17 - 0
src/main/java/com/jeeplus/modules/workcalendar/service/WorkCalendarTaskService.java

@@ -14,6 +14,7 @@ import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workcalendar.entity.WorkCalendar;
 import com.jeeplus.modules.workinvoice.entity.WorkInvoice;
 import com.jeeplus.modules.workinvoice.service.WorkInvoiceService;
+import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -56,6 +57,8 @@ public class WorkCalendarTaskService  {
     @Autowired
     private UserService userService;
     @Autowired
+    private WorkStaffBasicInfoService workStaffBasicInfoService;
+    @Autowired
     private MilitaryIndustryConfidentialityService militaryIndustryConfidentialityService;
 
     //@Scheduled(cron= "0 0/1 * * * ?")
@@ -398,4 +401,18 @@ public class WorkCalendarTaskService  {
         logger.info("------------军工证书到期时间结束提醒------------------");
     }
 
+
+    /**
+     * 根据身份证号更新人员年龄
+     */
+    //设置每日凌晨50分调用通知方法
+    @Scheduled(cron= "0 50 0 * * ?")
+    //@Scheduled(cron= "0 0/2 * * * ?")
+    @Transactional(readOnly = false)
+    public void updateAgeByIdCard() {
+        logger.info("-----------用户修改密码通知开始------------------");
+        workStaffBasicInfoService.updateAgeByIdCard();
+        logger.info("-----------用户修改密码通知结束------------------");
+    }
+
 }

+ 7 - 0
src/main/java/com/jeeplus/modules/workstaff/dao/WorkStaffAchivesDao.java

@@ -61,4 +61,11 @@ public interface WorkStaffAchivesDao extends CrudDao<WorkStaffBasicInfo> {
     void updateAuditStatus(@Param("id")String id, @Param("status")String status);
 
     public String getHightEduByAchiveId(String achiveId);
+
+    /**
+     * 修改员工年龄
+     * @param workStaffBasicInfo
+     * @return
+     */
+    void updateAge(WorkStaffBasicInfo workStaffBasicInfo);
 }

+ 7 - 0
src/main/java/com/jeeplus/modules/workstaff/dao/WorkStaffBasicInfoDao.java

@@ -120,4 +120,11 @@ public interface WorkStaffBasicInfoDao extends CrudDao<WorkStaffBasicInfo> {
      */
     void updatePictureUrlOnBasicByUserId(@Param("userId") String userId, @Param("url") String url);
 
+    /**
+     * 修改员工年龄
+     * @param workStaffBasicInfo
+     * @return
+     */
+    void updateAge(WorkStaffBasicInfo workStaffBasicInfo);
+
 }

+ 51 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffAchievementService.java

@@ -631,6 +631,57 @@ public class WorkStaffAchievementService extends CrudService<WorkStaffAchievemen
                             }
                         }
 
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("工作业绩");
+                            oldWorkStaffAchivesLog.setSonId(newAchievement.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newAchievement.getId();
+                            }
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("projName".equals(name)||"projClient".equals(name)||"category".equals(name)||"unitNumber".equals(name)||"duty".equals(name)
+                                        || "content".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("工作业绩");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newAchievement);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "工作业绩",describes,name,
+                                                    "",newInvoke.toString(),
+                                                    "",newInvoke.toString(),newId,"新增");
+
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "工作业绩",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newAchievement.getId()==null||"".equals(newAchievement.getId()))&&"0".equals(newAchievement.getDelFlag())){//新增
                     String newId=IdGen.uuid();

+ 28 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java

@@ -417,6 +417,7 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
             user.setOtherServiceFlag(workStaffBasicInfo.getOtherServiceFlag());
             user.setAreaRemark(workStaffBasicInfo.getAreaRemark());
             user.setAreaPrincipal(workStaffBasicInfo.getAreaPrincipal());
+            user.setPhoto(workStaffBasicInfo.getPicture());
             userService.updateUser(user);
             //userService.updateRole(workStaffBasicInfo);
         } else {
@@ -2195,4 +2196,31 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         dao.updatePictureUrlOnBasicByUserId(userId,url);
     }
 
+
+    /**
+     * 遍历人员信息,修改所有人员信息的年龄
+     */
+    @Transactional(readOnly = false)
+    public void updateAgeByIdCard() {
+        WorkStaffBasicInfo user = new WorkStaffBasicInfo();
+        user.setDelFlag("0");
+        List<WorkStaffBasicInfo> list = workStaffBasicInfoDao.findList(user);
+        for (WorkStaffBasicInfo staffBasicInfo : list) {
+            //身份证和年龄信息存储在work_staff_achives 和 work_staff_basic_info两张表中,需要将这两张表中的所有数据均进行调整
+            if(StringUtils.isNotBlank(staffBasicInfo.getIdCard())){
+                Integer age = UserUtils.getAgeByIdCard(staffBasicInfo.getIdCard());
+                staffBasicInfo.setAge(age);
+                workStaffBasicInfoDao.updateAge(staffBasicInfo);
+            }
+        }
+        List<WorkStaffBasicInfo> achivesList = workStaffAchivesDao.findList(user);
+        for (WorkStaffBasicInfo staffBasicInfo : achivesList) {
+            if(StringUtils.isNotBlank(staffBasicInfo.getIdCard())){
+                Integer age = UserUtils.getAgeByIdCard(staffBasicInfo.getIdCard());
+                staffBasicInfo.setAge(age);
+                workStaffAchivesDao.updateAge(staffBasicInfo);
+            }
+        }
+    }
+
 }

+ 64 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffCertificateService.java

@@ -866,6 +866,7 @@ public class WorkStaffCertificateService extends CrudService<WorkStaffCertificat
                         newCertificate.setFilePath(this.uploadFile(file,newCertificate.getFilePath()));
                     }
                     WorkStaffCertificate oldCertificate=this.get(newCertificate.getId());
+                    //查询暂存的数据中是否存在
                     if(oldCertificate!=null){
                         Class<? extends WorkStaffCertificate> oldClass = oldCertificate.getClass();
                         for (Field field : declaredFields) {
@@ -929,6 +930,69 @@ public class WorkStaffCertificateService extends CrudService<WorkStaffCertificat
                                 }
                             }
                         }
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            if(newCertificate.getFile()!=null&&!newCertificate.getFile().isEmpty()&&newCertificate.getFile().getSize()>0){
+                                MultipartFile file = newCertificate.getFile();
+                                newCertificate.setFilePath(this.uploadFile(file,newCertificate.getFilePath()));
+                            }
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("执业资格证书");
+                            oldWorkStaffAchivesLog.setSonId(newCertificate.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newCertificate.getId();
+                            }
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("name".equals(name)||"num".equals(name)||"issuingAuthority".equals(name)||"issuingDate".equals(name)||"registDate".equals(name)
+                                        || "registNum".equals(name)||"major".equals(name)||"grade".equals(name)
+                                        ||"issType".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("执业资格证书");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newCertificate);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            if("name".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "执业资格证书",describes,name,
+                                                        "",
+                                                        DictUtils.getMainDictLabel(newValue,"certificate_type",""),
+                                                        "",newValue,newId,"新增");
+                                            }else{
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "执业资格证书",describes,name,
+                                                        "",newInvoke.toString(),
+                                                        "",newInvoke.toString(),newId,"新增");
+                                            }
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "执业资格证书",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newCertificate.getId()==null||"".equals(newCertificate.getId()))&&"0".equals(newCertificate.getDelFlag())){//新增
                     if(newCertificate.getFile()!=null&&!newCertificate.getFile().isEmpty()&&newCertificate.getFile().getSize()>0){

+ 87 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffEducationService.java

@@ -901,6 +901,93 @@ public class WorkStaffEducationService extends CrudService<WorkStaffEducationDao
                             }
                         }
 
+                    }else{
+                        ////判定审核状态。审核状态为1(暂存),则对暂存的数据进行删除
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            if(newEducation.getDegreePhotoFile()!=null&&!newEducation.getDegreePhotoFile().isEmpty()&&newEducation.getDegreePhotoFile().getSize()>0){
+                                MultipartFile file = newEducation.getDegreePhotoFile();
+                                newEducation.setDegreePhoto(this.uploadFile(file,newEducation.getDegreePhoto()));
+                            }
+                            if(newEducation.getEduPhotoFile()!=null&&!newEducation.getEduPhotoFile().isEmpty()&&newEducation.getEduPhotoFile().getSize()>0){
+                                MultipartFile file = newEducation.getEduPhotoFile();
+                                newEducation.setEduPhoto(this.uploadFile(file,newEducation.getEduPhoto()));
+                            }
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("教育经历");
+                            oldWorkStaffAchivesLog.setSonId(newEducation.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newEducation.getId();
+                            }
+
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("school".equals(name)||"major".equals(name)||"edu".equals(name)||"degree".equals(name)||"eduType".equals(name)
+                                        || "startDate".equals(name)||"endDate".equals(name)||"eduPhoto".equals(name)||"degreePhoto".equals(name) || "heightEdu".equals(name)
+                                        ||"degreePhotoFile".equals(name)||"eduPhotoFile".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("教育经历");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newEducation);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            if("edu".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "教育经历",describes,name,
+                                                        "",
+                                                        DictUtils.getDictLabel(newValue,"education_level",""),
+                                                        "",newValue,newId,"新增");
+                                            }else if("degree".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "教育经历",describes,name,
+                                                        "",
+                                                        DictUtils.getDictLabel(newValue,"degree_level",""),
+                                                        "",newValue,newId,"新增");
+                                            }else if("eduType".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "教育经历",describes,name,
+                                                        "",
+                                                        DictUtils.getDictLabel(newValue,"edu_type",""),
+                                                        "",newValue,newId,"新增");
+                                            }else if("heightEdu".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "教育经历",describes,name,
+                                                        "",
+                                                        DictUtils.getDictLabel(newValue,"yes_no",""),
+                                                        "",newValue,newId,"新增");
+                                            }else{
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "教育经历",describes,name,
+                                                        "",newInvoke.toString(),
+                                                        "",newInvoke.toString(),newId,"新增");
+                                            }
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "教育经历",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newEducation.getId()==null||"".equals(newEducation.getId()))&&"0".equals(newEducation.getDelFlag())){//新增
                     if(newEducation.getDegreePhotoFile()!=null&&!newEducation.getDegreePhotoFile().isEmpty()&&newEducation.getDegreePhotoFile().getSize()>0){

+ 51 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffExperienceService.java

@@ -654,6 +654,57 @@ public class WorkStaffExperienceService extends CrudService<WorkStaffExperienceD
                             }
                         }
 
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("工作经历");
+                            oldWorkStaffAchivesLog.setSonId(newExperience.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newExperience.getId();
+                            }
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("company".equals(name)||"dept".equals(name)||"duty".equals(name)||"startDate".equals(name)||"endDate".equals(name)
+                                        || "certifier".equals(name)||"certifierTel".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("工作经历");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newExperience);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "工作经历",describes,name,
+                                                    "",newInvoke.toString(),
+                                                    "",newInvoke.toString(),newId,"新增");
+
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "工作经历",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newExperience.getId()==null||"".equals(newExperience.getId()))&&"0".equals(newExperience.getDelFlag())){//新增
                     String newId=IdGen.uuid();

+ 50 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffFamilyService.java

@@ -625,6 +625,56 @@ public class WorkStaffFamilyService extends CrudService<WorkStaffFamilyDao, Work
                             }
                         }
 
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("家庭情况");
+                            oldWorkStaffAchivesLog.setSonId(newFamily.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newFamily.getId();
+                            }
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("relation".equals(name)||"name".equals(name)||"idCard".equals(name)||"gender".equals(name)||"contact".equals(name)
+                                ){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("家庭情况");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newFamily);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "家庭情况",describes,name,
+                                                    "",newInvoke.toString(),
+                                                    "",newInvoke.toString(),newId,"新增");
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "家庭情况",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newFamily.getId()==null||"".equals(newFamily.getId()))&&"0".equals(newFamily.getDelFlag())){//新增
                     String newId=IdGen.uuid();

+ 68 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffLaborContractService.java

@@ -795,6 +795,74 @@ public class WorkStaffLaborContractService extends CrudService<WorkStaffLaborCon
                                 }
                             }
                         }
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            if(newCertificate.getFile()!=null&&!newCertificate.getFile().isEmpty()&&newCertificate.getFile().getSize()>0){
+                                MultipartFile file = newCertificate.getFile();
+                                newCertificate.setFilePath(this.uploadFile(file,newCertificate.getFilePath()));
+                            }
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("劳动合同");
+                            oldWorkStaffAchivesLog.setSonId(newCertificate.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newCertificate.getId();
+                            }
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("contractType".equals(name)||"contractNum".equals(name)||"contractLimit".equals(name)||"contractStartTime".equals(name)||"contractEndTime".equals(name)
+                                        || "tryEndTime".equals(name)||"transactTime".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("劳动合同");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newCertificate);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            if("contractType".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "劳动合同",describes,name,
+                                                        "",
+                                                        DictUtils.getMainDictLabel(newValue,"relsp_cType",""),
+                                                        "",newValue,newId,"新增");
+                                            }else if("contractLimit".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "劳动合同",describes,name,
+                                                        "",
+                                                        DictUtils.getMainDictLabel(newValue,"contract_limit",""),
+                                                        "",newValue,newId,"新增");
+                                            }else{
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "劳动合同",describes,name,
+                                                        "",newInvoke.toString(),
+                                                        "",newInvoke.toString(),newId,"新增");
+                                            }
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "劳动合同",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newCertificate.getId()==null||"".equals(newCertificate.getId()))&&"0".equals(newCertificate.getDelFlag())){//新增
                     if(newCertificate.getFile()!=null&&!newCertificate.getFile().isEmpty()&&newCertificate.getFile().getSize()>0){

+ 70 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffLanguagesService.java

@@ -799,6 +799,76 @@ public class WorkStaffLanguagesService extends CrudService<WorkStaffLanguagesDao
                             }
                         }
 
+                    }else{
+                        ////判定审核状态。审核状态为1(暂存),则对暂存的数据进行删除
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            if(newLanguages.getFile()!=null&&!newLanguages.getFile().isEmpty()&&newLanguages.getFile().getSize()>0){
+                                MultipartFile file = newLanguages.getFile();
+                                newLanguages.setFilePath(this.uploadFile(file,newLanguages.getFilePath()));
+                            }
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("外语语种");
+                            oldWorkStaffAchivesLog.setSonId(newLanguages.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newLanguages.getId();
+                            }
+
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("language".equals(name)||"proficiency".equals(name)||"certificate".equals(name)||"certifDate".equals(name)||"filePath".equals(name)
+                                        || "fileName".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("外语语种");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newLanguages);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            if("language".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "外语语种",describes,name,
+                                                        "",
+                                                        DictUtils.getMainDictLabel(newValue,"language",""),
+                                                        "",newValue,newId,"新增");
+                                            }else if("proficiency".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "外语语种",describes,name,
+                                                        "",
+                                                        DictUtils.getDictLabel(newValue,"proficiency",""),
+                                                        "",newValue,newId,"新增");
+                                            }else{
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "外语语种",describes,name,
+                                                        "",newInvoke.toString(),
+                                                        "",newInvoke.toString(),newId,"新增");
+                                            }
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "外语语种",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newLanguages.getId()==null||"".equals(newLanguages.getId()))&&"0".equals(newLanguages.getDelFlag())){//新增
                     if(newLanguages.getFile()!=null&&!newLanguages.getFile().isEmpty()&&newLanguages.getFile().getSize()>0){

+ 61 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffRecordService.java

@@ -750,6 +750,67 @@ public class WorkStaffRecordService extends CrudService<WorkStaffRecordDao, Work
                             }
                         }
 
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            if(newRecord.getFile()!=null&&!newRecord.getFile().isEmpty()&&newRecord.getFile().getSize()>0){
+                                MultipartFile file = newRecord.getFile();
+                                newRecord.setFilePath(this.uploadFile(file,newRecord.getFilePath()));
+                            }
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("电子档案");
+                            oldWorkStaffAchivesLog.setSonId(newRecord.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newRecord.getId();
+                            }
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("name".equals(name)||"num".equals(name)||"filePath".equals(name)||"status".equals(name)||"fileName".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("电子档案");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newRecord);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            if("name".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "电子档案",describes,name,
+                                                        "",
+                                                        newValue,
+                                                        "",newValue,newId,"新增");
+                                            }else{
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "电子档案",describes,name,
+                                                        "",newInvoke.toString(),
+                                                        "",newInvoke.toString(),newId,"新增");
+                                            }
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "电子档案",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newRecord.getId()==null||"".equals(newRecord.getId()))&&"0".equals(newRecord.getDelFlag())){//新增
                     if(newRecord.getFile()!=null&&!newRecord.getFile().isEmpty()&&newRecord.getFile().getSize()>0){

+ 51 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffRewardsService.java

@@ -633,6 +633,57 @@ public class WorkStaffRewardsService extends CrudService<WorkStaffRewardsDao, Wo
                             }
                         }
 
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("表彰与奖励");
+                            oldWorkStaffAchivesLog.setSonId(newRewards.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newRewards.getId();
+                            }
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("type".equals(name)||"name".equals(name)||"atTime".equals(name)||"grade".equals(name)||"reason".equals(name)
+                                        || "organization".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("表彰与奖励");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newRewards);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "表彰与奖励",describes,name,
+                                                    "",newInvoke.toString(),
+                                                    "",newInvoke.toString(),newId,"新增");
+
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "表彰与奖励",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newRewards.getId()==null||"".equals(newRewards.getId()))&&"0".equals(newRewards.getDelFlag())){//新增
                     String newId=IdGen.uuid();

+ 49 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffSocialPositionService.java

@@ -634,6 +634,55 @@ public class WorkStaffSocialPositionService extends CrudService<WorkStaffSocialP
                                 }
                             }
                         }
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("社会及行业职务");
+                            oldWorkStaffAchivesLog.setSonId(newSocialPosition.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newSocialPosition.getId();
+                            }
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("name".equals(name)||"startDate".equals(name)||"endDate".equals(name)||"organization".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("社会及行业职务");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newSocialPosition);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "社会及行业职务",describes,name,
+                                                    "",newInvoke.toString(),
+                                                    "",newInvoke.toString(),newId,"新增");
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "社会及行业职务",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newSocialPosition.getId()==null||"".equals(newSocialPosition.getId()))&&"0".equals(newSocialPosition.getDelFlag())){//新增
                     String newId=IdGen.uuid();

+ 74 - 18
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffTitleService.java

@@ -200,8 +200,8 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                 Field[] declaredFields = newClass.getDeclaredFields();
                 for (Field field : declaredFields) {
                     String name = field.getName();
-                    if("name".equals(name)||"grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
-                            || "startDate".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                    if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                            ||"filePath".equals(name)||"fileName".equals(name)){
                         String setMethod = "set"+name.substring(0,1).toUpperCase()+name.substring(1);
                         String getMethod = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                         WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
@@ -283,8 +283,8 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                 Field[] declaredFields = newClass.getDeclaredFields();
                 for (Field field : declaredFields) {
                     String name = field.getName();
-                    if("name".equals(name)||"grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
-                            || "startDate".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                    if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                            ||"filePath".equals(name)||"fileName".equals(name)){
                         String setMethod = "set"+name.substring(0,1).toUpperCase()+name.substring(1);
                         String getMethod = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                         workStaffAchivesLog.setFields(name);
@@ -349,8 +349,8 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                 Field[] declaredFields = newClass.getDeclaredFields();
                 for (Field field : declaredFields) {
                     String name = field.getName();
-                    if("name".equals(name)||"grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
-                            || "startDate".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                    if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                            ||"filePath".equals(name)||"fileName".equals(name)){
                         String setMethod = "set"+name.substring(0,1).toUpperCase()+name.substring(1);
                         String getMethod = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                         WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
@@ -432,8 +432,8 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                 Field[] declaredFields = newClass.getDeclaredFields();
                 for (Field field : declaredFields) {
                     String name = field.getName();
-                    if("name".equals(name)||"grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
-                            || "startDate".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                    if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                            ||"filePath".equals(name)||"fileName".equals(name)){
                         String setMethod = "set"+name.substring(0,1).toUpperCase()+name.substring(1);
                         String getMethod = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                         workStaffAchivesLog.setFields(name);
@@ -517,8 +517,8 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                         Class<? extends WorkStaffTitle> oldClass = oldTitle.getClass();
                         for (Field field : declaredFields) {
                             String name = field.getName();
-                            if("name".equals(name)||"grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
-                                    || "startDate".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                            if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                                    ||"filePath".equals(name)||"fileName".equals(name)){
                                 String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                                 WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
                                 workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
@@ -575,8 +575,8 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                             String newId=IdGen.uuid();
                             for (Field field : declaredFields) {
                                 String name = field.getName();
-                                if("name".equals(name)||"grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
-                                        || "startDate".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                                if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                                        ||"filePath".equals(name)||"fileName".equals(name)){
                                     String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                                     WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
                                     workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
@@ -620,8 +620,8 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                     String newId=IdGen.uuid();
                     for (Field field : declaredFields) {
                         String name = field.getName();
-                        if("name".equals(name)||"grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
-                                || "startDate".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                        if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                                ||"filePath".equals(name)||"fileName".equals(name)){
                             String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                             WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
                             workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
@@ -695,8 +695,8 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                         Class<? extends WorkStaffTitle> oldClass = oldTitle.getClass();
                         for (Field field : declaredFields) {
                             String name = field.getName();
-                            if("name".equals(name)||"grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
-                                    || "startDate".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                            if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                                    ||"filePath".equals(name)||"fileName".equals(name)){
                                 String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                                 WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
                                 workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
@@ -744,6 +744,62 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                             }
                         }
 
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            if(newTitle.getFile()!=null&&!newTitle.getFile().isEmpty()&&newTitle.getFile().getSize()>0){
+                                MultipartFile file = newTitle.getFile();
+                                newTitle.setFilePath(this.uploadFile(file,newTitle.getFilePath()));
+                            }
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("职称");
+                            oldWorkStaffAchivesLog.setSonId(newTitle.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newTitle.getId();
+                            }
+
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                                        ||"filePath".equals(name)||"fileName".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("职称");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newTitle);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "职称",describes,name,
+                                                    "",newInvoke.toString(),
+                                                    "",newInvoke.toString(),newId,"新增");
+
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "职称",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newTitle.getId()==null||"".equals(newTitle.getId()))&&"0".equals(newTitle.getDelFlag())){//新增
                     if(newTitle.getFile()!=null&&!newTitle.getFile().isEmpty()&&newTitle.getFile().getSize()>0){
@@ -753,8 +809,8 @@ public class WorkStaffTitleService extends CrudService<WorkStaffTitleDao, WorkSt
                     String newId=IdGen.uuid();
                     for (Field field : declaredFields) {
                         String name = field.getName();
-                        if("name".equals(name)||"grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
-                                || "startDate".equals(name)||"filePath".equals(name)||"fileName".equals(name)){
+                        if("name".equals(name)|| "grade".equals(name)||"startDate".equals(name)||"pathway".equals(name)||"approvalAuthority".equals(name)
+                                ||"filePath".equals(name)||"fileName".equals(name)){
                             String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                             WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
                             workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());

+ 63 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffTrainingService.java

@@ -777,6 +777,69 @@ public class WorkStaffTrainingService extends CrudService<WorkStaffTrainingDao,
                             }
                         }
 
+                    }else{
+                        if(!"2".equals(workStaffBasicInfo.getAuditStatus())){
+                            if(newTraining.getFile()!=null&&!newTraining.getFile().isEmpty()&&newTraining.getFile().getSize()>0){
+                                MultipartFile file = newTraining.getFile();
+                                newTraining.setFilePath(this.uploadFile(file,newTraining.getFilePath()));
+                            }
+                            String newId=IdGen.uuid();
+                            WorkStaffAchivesLog oldWorkStaffAchivesLog=new WorkStaffAchivesLog();
+                            oldWorkStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                            oldWorkStaffAchivesLog.setModule("培训经历");
+                            oldWorkStaffAchivesLog.setSonId(newTraining.getId());
+                            oldWorkStaffAchivesLog.setState("3");
+                            //查询是否存在数据,若存在 直接修改元数据,不存在 则进行新增
+                            List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(oldWorkStaffAchivesLog);
+                            if (logs!=null&&logs.size()>0) {
+                                newId = newTraining.getId();
+                            }
+                            for (Field field : declaredFields) {
+                                String name = field.getName();
+                                if("name".equals(name)||"agency".equals(name)||"address".equals(name)||"startDate".equals(name)||"endDate".equals(name)
+                                        || "type".equals(name)||"hours".equals(name)||"certificate".equals(name)||"filePath".equals(name)
+                                        ||"fileName".equals(name)||"remarks".equals(name)){
+                                    String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                                    workStaffAchivesLog.setModule("培训经历");
+                                    workStaffAchivesLog.setSonId(newId);
+                                    workStaffAchivesLog.setFields(name);
+                                    workStaffAchivesLog.setState("3");
+                                    try {
+                                        Object newInvoke = newClass.getMethod(methodName).invoke(newTraining);//修改后
+                                        String describes=EDU_MAP.get(name);
+                                        if(newInvoke instanceof String){
+                                            String newValue=newInvoke.toString();
+                                            if("type".equals(name)){
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "培训经历",describes,name,
+                                                        "",
+                                                        DictUtils.getMainDictLabel(newValue,"training_type",""),
+                                                        "",newValue,newId,"新增");
+                                            }else{
+                                                workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "培训经历",describes,name,
+                                                        "",newInvoke.toString(),
+                                                        "",newInvoke.toString(),newId,"新增");
+                                            }
+                                        }
+                                        if(newInvoke instanceof Date){//日期
+                                            String newDate=sdf.format(newInvoke);
+                                            workStaffAchivesLogService.storeStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "培训经历",describes,name,
+                                                    "",newDate,"",newDate,newId,"新增");
+                                        };
+                                    } catch (NoSuchMethodException e) {
+                                        e.printStackTrace();
+                                    } catch (IllegalAccessException e) {
+                                        e.printStackTrace();
+                                    } catch (InvocationTargetException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+                            }
+                        }
                     }
                 }else if((newTraining.getId()==null||"".equals(newTraining.getId()))&&"0".equals(newTraining.getDelFlag())){//新增
                     if(newTraining.getFile()!=null&&!newTraining.getFile().isEmpty()&&newTraining.getFile().getSize()>0){

+ 18 - 9
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoController.java

@@ -159,6 +159,7 @@ public class WorkStaffBasicInfoController extends BaseController {
         }else {
 		    workStaffBasicInfo.setTs("0");
 		    workStaffBasicInfo.setPolitics("普通居民");
+		    workStaffBasicInfo.setStatus("正式");
 		    workStaffBasicInfo.setExSoldier("0");
 		    workStaffBasicInfo.setMarriage("未婚");
 		    workStaffBasicInfo.setNation(DictUtils.getDictValue("汉族","nation_type",""));
@@ -167,6 +168,11 @@ public class WorkStaffBasicInfoController extends BaseController {
 		if(StringUtils.isNotBlank(workStaffBasicInfo.getId())){
 			model.addAttribute("updateFlag","1");
 		}
+
+		if(StringUtils.isNotBlank(workStaffBasicInfo.getPicture())){
+			String urlManage = WorkattachmentService.fileUrlManage(workStaffBasicInfo.getPicture());
+			workStaffBasicInfo.setPictureStr(urlManage);
+		}
         model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
         String view = "modules/workstaff/workStaffBasicInfoForm";
 		return view;
@@ -319,12 +325,17 @@ public class WorkStaffBasicInfoController extends BaseController {
 		}
 		MultipartFile pictureFile = workStaffBasicInfo.getPictureFile();
 		if(pictureFile != null && pictureFile.getSize()>0){
-			String path = new StringBuilder("/employeeImg/")
-			.append(workStaffBasicInfo.getName()+System.currentTimeMillis()).append(".png").toString();
-			InputStream inputStream = pictureFile.getInputStream();
-            BOSClientUtil bosClientUtil = new BOSClientUtil();
-			String url = bosClientUtil.upload(path, inputStream);
-            workStaffBasicInfo.setPicture(url);
+
+			OSSClientUtil ossClientUtil = new OSSClientUtil();
+			if (pictureFile != null && !pictureFile.isEmpty() && pictureFile.getSize() > 0) {
+				try {
+					String url = ossClientUtil.uploadFile2OSS(pictureFile, "certificate");
+					workStaffBasicInfo.setPicture(url);
+				} catch (Exception e) {
+					logger.error("oss上传文件失败!");
+				}
+			}
+
 		}else{
 			workStaffBasicInfo.setPicture("");
 		}
@@ -753,8 +764,6 @@ public class WorkStaffBasicInfoController extends BaseController {
 			String urlManage = WorkattachmentService.fileUrlManage(workStaffBasicInfo.getPicture());
 			workStaffBasicInfo.setPictureStr(urlManage);
 		}
-		System.out.println(workStaffBasicInfo.getPictureStr());
-		model.addAttribute("pictureStr", workStaffBasicInfo.getPictureStr());
 		model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
 		return "modules/workstaff/workStaffBasicDetailModify";
 	}
@@ -919,8 +928,8 @@ public class WorkStaffBasicInfoController extends BaseController {
 				workStaffBasicInfo.setBirthday(birthDate);
 			}
 		}
-		workStaffBasicInfoService.updateAuditStatus(workStaffBasicInfo.getId(), "1");
 		workStaffBasicInfoService.storeLog(workStaffBasicInfo);
+		workStaffBasicInfoService.updateAuditStatus(workStaffBasicInfo.getId(), "1");
 		addMessage(redirectAttributes, "暂存员工档案信息成功");
 		if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())){
 			return "redirect:" + Global.getAdminPath() + "/home/?repage";

+ 69 - 1
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoEmploymentInController.java

@@ -1,8 +1,10 @@
 package com.jeeplus.modules.workstaff.web;
 
 import com.jeeplus.common.config.Global;
+import com.jeeplus.common.oss.OSSClientUtil;
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.utils.excel.ExportExcel;
 import com.jeeplus.common.web.BaseController;
@@ -21,6 +23,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
@@ -103,6 +106,7 @@ public class WorkStaffBasicInfoEmploymentInController extends BaseController {
             workStaffBasicInfo.setPolitics("普通居民");
             workStaffBasicInfo.setExSoldier("0");
             workStaffBasicInfo.setMarriage("未婚");
+            workStaffBasicInfo.setStatus("返聘");
             workStaffBasicInfo.setNation(DictUtils.getDictValue("汉族","nation_type",""));
         }
         workStaffBasicInfo.setRoleId(roleService.getRoleIdByUserId(workStaffBasicInfo.getUserId()));
@@ -110,7 +114,47 @@ public class WorkStaffBasicInfoEmploymentInController extends BaseController {
             model.addAttribute("updateFlag","1");
         }
         model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
-        return "modules/workstaff/workStaffBasicInfoForm";
+        return "modules/workstaff/workStaffBasicInfoEmploymentInForm";
+    }
+
+    /**
+     * 保存员工信息
+     */
+    @RequestMapping(value = "save")
+    public String save(WorkStaffBasicInfo workStaffBasicInfo, Model model, RedirectAttributes redirectAttributes,HttpServletRequest request) throws Exception{
+        if (!beanValidator(model, workStaffBasicInfo)){
+            return form(workStaffBasicInfo, model,false);
+        }
+        MultipartFile pictureFile = workStaffBasicInfo.getPictureFile();
+        if(pictureFile != null && pictureFile.getSize()>0){
+
+            OSSClientUtil ossClientUtil = new OSSClientUtil();
+            if (pictureFile != null && !pictureFile.isEmpty() && pictureFile.getSize() > 0) {
+                try {
+                    String url = ossClientUtil.uploadFile2OSS(pictureFile, "certificate");
+                    workStaffBasicInfo.setPicture(url);
+                } catch (Exception e) {
+                    logger.error("oss上传文件失败!");
+                }
+            }
+
+        }else{
+            workStaffBasicInfo.setPicture("");
+        }
+
+        if(!workStaffBasicInfo.getIsNewRecord()){//编辑表单保存
+            WorkStaffBasicInfo t = workStaffBasicInfoService.get(workStaffBasicInfo.getId());//从数据库取出记录的值
+            MyBeanUtils.copyBeanNotNull2Bean(workStaffBasicInfo, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+            workStaffBasicInfoService.save(t,request);//保存
+        }else{//新增表单保存
+
+            workStaffBasicInfoService.save(workStaffBasicInfo,request);//保存
+        }
+        addMessage(redirectAttributes, "保存员工信息成功");
+        if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }
+        return "redirect:"+Global.getAdminPath()+"/workstaff/workStaffBasicInfoEmploymentIn/?repage";
     }
 
 
@@ -134,4 +178,28 @@ public class WorkStaffBasicInfoEmploymentInController extends BaseController {
         return "redirect:"+ Global.getAdminPath()+"/workstaff/workStaffBasicInfoEmploymentIn/?repage";
     }
 
+
+
+    /**
+     * 员工信息冻结或激活
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfo:freeze")
+    @RequestMapping(value = "freeze")
+    public String freeze(WorkStaffBasicInfo workStaffBasicInfo, RedirectAttributes redirectAttributes) throws Exception {
+        workStaffBasicInfoService.freeze(workStaffBasicInfo);
+        addMessage(redirectAttributes, "员工登录权限更新成功");
+        return "redirect:"+Global.getAdminPath()+"/workstaff/workStaffBasicInfoEmploymentIn/?repage";
+    }
+
+    /**
+     * 删除员工信息
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfo:del")
+    @RequestMapping(value = "delete")
+    public String delete(WorkStaffBasicInfo workStaffBasicInfo, RedirectAttributes redirectAttributes) {
+        workStaffBasicInfoService.delete(workStaffBasicInfo);
+        addMessage(redirectAttributes, "删除员工信息成功");
+        return "redirect:"+Global.getAdminPath()+"/workstaff/workStaffBasicInfoEmploymentIn/?repage";
+    }
+
 }

+ 6 - 0
src/main/resources/mappings/modules/workstaff/WorkStaffAchivesDao.xml

@@ -882,4 +882,10 @@
 	 	order by a.create_date asc,a.school asc
 		limit 1
 	</select>
+
+	<update id="updateAge">
+		update work_staff_achives
+		set age = #{age}
+		where id = #{id}
+	</update>
 </mapper>

+ 7 - 0
src/main/resources/mappings/modules/workstaff/WorkStaffBasicInfoDao.xml

@@ -820,4 +820,11 @@
 	</update>
 
 
+	<update id="updateAge">
+		update work_staff_basic_info
+		set age = #{age}
+		where id = #{id}
+	</update>
+
+
 </mapper>

+ 27 - 27
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailAudit.jsp

@@ -461,7 +461,7 @@
                         <div class="layui-item layui-col-sm12">
                             <label class="layui-form-label"><span class="require-item">*</span>身份证号码:</label>
                             <div class="layui-input-block">
-                                <form:input path="idCard" htmlEscape="false" onchange="caculateAge(this.value);" readonly="true" class="form-control idCard basicInfo layui-input required"/>
+                                <form:input path="idCard" htmlEscape="false" onchange="caculateAge(this.value);" readonly="true" class="form-control idCard basicInfo layui-input "/>
                             </div>
                         </div>
                     </div>
@@ -470,7 +470,7 @@
                             <div class="layui-item layui-col-sm12">
                                 <label class="layui-form-label"><span class="require-item">*</span>姓    名:</label>
                                 <div class="layui-input-block">
-                                    <form:input path="name" htmlEscape="false" readonly="true" class="form-control layui-input basicInfo required"/>
+                                    <form:input path="name" htmlEscape="false" readonly="true" class="form-control layui-input basicInfo "/>
                                 </div>
                             </div>
                             <div class="layui-item layui-col-sm12">
@@ -483,7 +483,7 @@
                             <div class="layui-item layui-col-sm12">
                                 <label class="layui-form-label"><span class="require-item">*</span>年    龄:</label>
                                 <div class="layui-input-block">
-                                    <form:input path="age" htmlEscape="false" readonly="true" class="form-control basicInfo layui-input required"/>
+                                    <form:input path="age" htmlEscape="false" readonly="true" class="form-control basicInfo layui-input "/>
                                 </div>
                             </div>
                         </div>
@@ -700,7 +700,7 @@
                     <%--<div class="layui-item layui-col-sm6 lw7">
                         <label class="layui-form-label double-line"><span class="require-item">*</span>从事本行业日期:</label>
                         <div class="layui-input-block">
-                            <input id="industryDate" name="industryDate" type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon required basicInfo"
+                            <input id="industryDate" name="industryDate" type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon  basicInfo"
                                    value="<fmt:formatDate value="${workStaffBasicInfo.industryDate}" pattern="yyyy-MM"/>"/>
                         </div>
                     </div>
@@ -755,7 +755,7 @@
                                         <input id="educationList${varStatus.index}_eduPhoto" name="educationList[${varStatus.index}].eduPhoto" type="hidden" value="${education.eduPhoto}"/>
                                     </td>
                                     <td style="text-align:center;">
-                                        <input id="educationList${varStatus.index}_school" name="educationList[${varStatus.index}].school" readonly="true" htmlEscape="false" value="${education.school}" class="form-control required"/>
+                                        <input id="educationList${varStatus.index}_school" name="educationList[${varStatus.index}].school" readonly="true" htmlEscape="false" value="${education.school}" class="form-control "/>
                                     </td>
                                     <td style="text-align:center;">
                                         <input id="educationList${varStatus.index}_major" name="educationList[${varStatus.index}].major" readonly="true" htmlEscape="false" value="${education.major}" class="form-control"/>
@@ -871,16 +871,16 @@
                                         <input id="experienceList${varStatus.index}_delFlag" name="experienceList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                     </td>
                                     <td style="text-align:center;">
-                                        <input id="experienceList${varStatus.index}_company" name="experienceList[${varStatus.index}].company" readonly="true" class="form-control required" value="${experience.company}"/>
+                                        <input id="experienceList${varStatus.index}_company" name="experienceList[${varStatus.index}].company" readonly="true" class="form-control " value="${experience.company}"/>
                                     </td>
                                     <td style="text-align:center;">
-                                        <input id="experienceList${varStatus.index}_dept" name="experienceList[${varStatus.index}].dept" readonly="true" class="form-control required" value="${experience.dept}"/>
+                                        <input id="experienceList${varStatus.index}_dept" name="experienceList[${varStatus.index}].dept" readonly="true" class="form-control " value="${experience.dept}"/>
                                     </td>
                                     <td style="text-align:center;">
-                                        <input id="experienceList${varStatus.index}_duty" name="experienceList[${varStatus.index}].duty" readonly="true" class="form-control required" value="${experience.duty}"/>
+                                        <input id="experienceList${varStatus.index}_duty" name="experienceList[${varStatus.index}].duty" readonly="true" class="form-control " value="${experience.duty}"/>
                                     </td>
                                     <td style="text-align:center;">
-                                        <input id="experienceList${varStatus.index}_startDate" name="experienceList[${varStatus.index}].startDate"  type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
+                                        <input id="experienceList${varStatus.index}_startDate" name="experienceList[${varStatus.index}].startDate"  type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate "
                                                value="<fmt:formatDate value="${experience.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                     </td>
                                     <td style="text-align:center;">
@@ -1038,20 +1038,20 @@
                                         <input id="titleList${varStatus.index}_filePath" name="titleList[${varStatus.index}].filePath" type="hidden" value="${title.filePath}"/>
                                     </td>
                                     <td>
-                                        <input id="titleList${varStatus.index}_name" name="titleList[${varStatus.index}].name" readonly="true" class="form-control required" value="${title.name}"/>
+                                        <input id="titleList${varStatus.index}_name" name="titleList[${varStatus.index}].name" readonly="true" class="form-control " value="${title.name}"/>
                                     </td>
                                     <td>
-                                        <input id="titleList${varStatus.index}_grade" name="titleList[${varStatus.index}].grade" readonly="true" class="form-control required" value="${title.grade}"/>
+                                        <input id="titleList${varStatus.index}_grade" name="titleList[${varStatus.index}].grade" readonly="true" class="form-control " value="${title.grade}"/>
                                     </td>
                                     <td>
-                                        <input id="titleList${varStatus.index}_startDate" name="titleList[${varStatus.index}].startDate" type="text" readonly="true" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
+                                        <input id="titleList${varStatus.index}_startDate" name="titleList[${varStatus.index}].startDate" type="text" readonly="true" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate "
                                                value="<fmt:formatDate value="${title.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                     </td>
                                     <td>
-                                        <input id="titleList${varStatus.index}_pathway" name="titleList[${varStatus.index}].pathway" readonly="true" class="form-control required" value="${title.pathway}"/>
+                                        <input id="titleList${varStatus.index}_pathway" name="titleList[${varStatus.index}].pathway" readonly="true" class="form-control " value="${title.pathway}"/>
                                     </td>
                                     <td>
-                                        <input id="titleList${varStatus.index}_approvalAuthority" name="titleList[${varStatus.index}].approvalAuthority" readonly="true" class="form-control required" value="${title.approvalAuthority}"/>
+                                        <input id="titleList${varStatus.index}_approvalAuthority" name="titleList[${varStatus.index}].approvalAuthority" readonly="true" class="form-control " value="${title.approvalAuthority}"/>
                                     </td>
                                     <td class="text-left op-td">
                                         <!-- 文件或图片展示区域 -->
@@ -1125,19 +1125,19 @@
                                         <input id="familyList${varStatus.index}_delFlag" name="familyList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                     </td>
                                     <td>
-                                        <input id="familyList${varStatus.index}_relation" name="familyList[${varStatus.index}].relation" readOnly="true" class="form-control required" value="${family.relation}"/>
+                                        <input id="familyList${varStatus.index}_relation" name="familyList[${varStatus.index}].relation" readOnly="true" class="form-control " value="${family.relation}"/>
                                     </td>
                                     <td>
-                                        <input id="familyList${varStatus.index}_name" name="familyList[${varStatus.index}].name" readOnly="true" class="form-control required" value="${family.name}"/>
+                                        <input id="familyList${varStatus.index}_name" name="familyList[${varStatus.index}].name" readOnly="true" class="form-control " value="${family.name}"/>
                                     </td>
                                     <td>
-                                        <input id="familyList${varStatus.index}_idCard" name="familyList[${varStatus.index}].idCard" readOnly="true" class="form-control required idCard" value="${family.idCard}"/>
+                                        <input id="familyList${varStatus.index}_idCard" name="familyList[${varStatus.index}].idCard" readOnly="true" class="form-control  idCard" value="${family.idCard}"/>
                                     </td>
                                     <td>
-                                        <input id="familyList${varStatus.index}_gender" name="familyList[${varStatus.index}].gender" readOnly="true" class="form-control required" value="${family.gender}"/>
+                                        <input id="familyList${varStatus.index}_gender" name="familyList[${varStatus.index}].gender" readOnly="true" class="form-control " value="${family.gender}"/>
                                     </td>
                                     <td>
-                                        <input id="familyList${varStatus.index}_contact" name="familyList[${varStatus.index}].contact" readOnly="true" class="form-control required" value="${family.contact}"/>
+                                        <input id="familyList${varStatus.index}_contact" name="familyList[${varStatus.index}].contact" readOnly="true" class="form-control " value="${family.contact}"/>
                                     </td>
                                 </tr>
                             </c:forEach>
@@ -1174,7 +1174,7 @@
                                         <input id="trainingList${varStatus.index}_filePath" name="trainingList[${varStatus.index}].filePath" type="hidden" value="${training.filePath}"/>
                                     </td>
                                     <td>
-                                        <input id="trainingList${varStatus.index}_name" name="trainingList[${varStatus.index}].name" readonly="true" class="form-control required" value="${training.name}"/>
+                                        <input id="trainingList${varStatus.index}_name" name="trainingList[${varStatus.index}].name" readonly="true" class="form-control " value="${training.name}"/>
                                     </td>
                                     <td>
                                         <input id="trainingList${varStatus.index}_agency" name="trainingList[${varStatus.index}].agency" readonly="true" class="form-control" value="${training.agency}"/>
@@ -1197,7 +1197,7 @@
                                         <input id="trainingList${varStatus.index}_hours" name="trainingList[${varStatus.index}].hours" readonly="true" class="form-control" value="${training.hours}"/>
                                     </td>
                                     <td>
-                                        <input id="trainingList${varStatus.index}_certificate" name="trainingList[${varStatus.index}].certificate" readonly="true" class="form-control required" value="${training.certificate}"/>
+                                        <input id="trainingList${varStatus.index}_certificate" name="trainingList[${varStatus.index}].certificate" readonly="true" class="form-control " value="${training.certificate}"/>
                                     </td>
                                     <td class="text-left op-td">
                                         <span id="trainingList${varStatus.index}_fileName1"><c:if test="${not empty training.filePathThumbnailStr}"><img src="${training.filePathThumbnailStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${training.filePathStr}','90%','90%')" alt=""></c:if></span>
@@ -1233,7 +1233,7 @@
                                     <input id="socialPositionList${varStatus.index}_delFlag" name="socialPositionList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                 </td>
                                 <td>
-                                    <input id="socialPositionList${varStatus.index}_name" name="socialPositionList[${varStatus.index}].name" readonly="true" class="form-control required" value="${socialPosition.name}"/>
+                                    <input id="socialPositionList${varStatus.index}_name" name="socialPositionList[${varStatus.index}].name" readonly="true" class="form-control " value="${socialPosition.name}"/>
                                 </td>
                                 <td>
                                     <input id="socialPositionList${varStatus.index}_startDate" name="socialPositionList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
@@ -1275,22 +1275,22 @@
                                         <input id="rewardsList${varStatus.index}_delFlag" name="rewardsList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                     </td>
                                     <td>
-                                        <input id="rewardsList${varStatus.index}_type" name="rewardsList[${varStatus.index}].type" readOnly="true" class="form-control required" value="${rewards.type}"/>
+                                        <input id="rewardsList${varStatus.index}_type" name="rewardsList[${varStatus.index}].type" readOnly="true" class="form-control " value="${rewards.type}"/>
                                     </td>
                                     <td>
-                                        <input id="rewardsList${varStatus.index}_name" name="rewardsList[${varStatus.index}].name" readOnly="true" class="form-control required" value="${rewards.name}"/>
+                                        <input id="rewardsList${varStatus.index}_name" name="rewardsList[${varStatus.index}].name" readOnly="true" class="form-control " value="${rewards.name}"/>
                                     </td>
                                     <td>
-                                        <input id="rewardsList${varStatus.index}_atTime" name="rewardsList[${varStatus.index}].atTime" readOnly="true" class="form-control required" value="${rewards.atTime}"/>
+                                        <input id="rewardsList${varStatus.index}_atTime" name="rewardsList[${varStatus.index}].atTime" readOnly="true" class="form-control " value="${rewards.atTime}"/>
                                     </td>
                                     <td>
                                         <input id="rewardsList${varStatus.index}_grade" name="rewardsList[${varStatus.index}].grade" readOnly="true" class="form-control" value="${rewards.grade}"/>
                                     </td>
                                     <td>
-                                        <input id="rewardsList${varStatus.index}_reason" name="rewardsList[${varStatus.index}].reason" readOnly="true" class="form-control required" value="${rewards.reason}"/>
+                                        <input id="rewardsList${varStatus.index}_reason" name="rewardsList[${varStatus.index}].reason" readOnly="true" class="form-control " value="${rewards.reason}"/>
                                     </td>
                                     <td>
-                                        <input id="rewardsList${varStatus.index}_organization" name="rewardsList[${varStatus.index}].organization" readOnly="true" class="form-control required" value="${rewards.organization}"/>
+                                        <input id="rewardsList${varStatus.index}_organization" name="rewardsList[${varStatus.index}].organization" readOnly="true" class="form-control " value="${rewards.organization}"/>
                                     </td>
                                 </tr>
                             </c:forEach>

+ 2 - 1
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoEmploymentInForm.jsp

@@ -606,11 +606,12 @@
 <body>
 <div class="single-form">
     <div class="container">
-        <form:form id="inputForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/save" enctype="multipart/form-data" method="post" class="form-horizontal">
+        <form:form id="inputForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfoEmploymentIn/save" enctype="multipart/form-data" method="post" class="form-horizontal">
             <form:hidden path="id"/>
             <form:hidden path="notifyFlag"/>
             <form:hidden path="userId"/>
             <form:hidden path="handSignature"/>
+            <form:hidden path="status"/>
             <input id="updateFlag" value="${updateFlag}" style="display:none;">
 
             <form:hidden path="roleIdShow"/>

+ 6 - 18
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoEmploymentInList.jsp

@@ -170,7 +170,7 @@
     <div class="layui-row">
         <div class="full-width fl">
             <div class="contentShadow layui-row" id="queryDiv">
-            <form:form id="searchForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/" method="post" class="form-inline">
+            <form:form id="searchForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfoEmploymentIn/" method="post" class="form-inline">
                 <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                 <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                 <input type="hidden" input="params" value="">
@@ -252,7 +252,7 @@
                 <div class="nav-btns">
                     <div class="layui-btn-group">
                         <shiro:hasPermission name="workstaff:workStaffBasicInfo:add">
-                            <table:addRow url="${ctx}/workstaff/workStaffBasicInfo/form" title="员工信息"></table:addRow><!-- 增加按钮 -->
+                            <table:addRow url="${ctx}/workstaff/workStaffBasicInfoEmploymentIn/form" title="员工信息"></table:addRow><!-- 增加按钮 -->
                         </shiro:hasPermission>
                         <shiro:hasPermission name="workstaff:workStaffBasicInfo:export">
                             <table:exportExcel url="${ctx}/workstaff/workStaffBasicInfoEmploymentIn/exportAchive"></table:exportExcel><!-- 导出按钮 -->
@@ -276,15 +276,6 @@
 <script>
     $(document).ready(function() {
 
-        window.params;
-        $.ajax({
-            url:"${ctx}/workstaff/workStaffBasicInfo/getAuditUserList",
-            type:"post",
-            success:function(data){
-                params = data;
-            }
-        });
-
     });
     layui.use(['table','tableEdit','layer'], function () {
         var table = layui.table,tableEdit = layui.tableEdit,$ = layui.$;
@@ -319,23 +310,20 @@
                         var xml = "<div class=\"layui-btn-group\">";
 
                         if(d.canedit != undefined && d.canedit == "1"){
-                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改', '${ctx}/workstaff/workStaffBasicInfo/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改', '${ctx}/workstaff/workStaffBasicInfoEmploymentIn/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
                         }
 
                         if(d.freeze != undefined && d.freeze == "1"){
                             if(d.userLoginFlag == 1){
-                                xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfo/freeze?userId=" + d.userId + "\" onclick=\"return confirmx('确认要禁用该人员信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-btn-warm\"> 禁用</a>";
+                                xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfoEmploymentIn/freeze?userId=" + d.userId + "\" onclick=\"return confirmx('确认要禁用该人员信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-btn-warm\"> 禁用</a>";
                             }else{
-                                xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfo/freeze?userId=" + d.userId + "\" onclick=\"return confirmx('确认要激活该人员信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-btn-normal\"> 激活</a>";
+                                xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfoEmploymentIn/freeze?userId=" + d.userId + "\" onclick=\"return confirmx('确认要激活该人员信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-btn-normal\"> 激活</a>";
                             }
                         }
 
                         if(d.candelete != undefined && d.candelete == "1")
-                            xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfo/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
+                            xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfoEmploymentIn/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
 
-                        if(d.canedit != undefined && d.canedit == "1"){
-                            xml +="<a href=\"${ctx}/sys/user/removeRedis?userId=" + d.userId + "\" onclick=\"return confirmx('确认要清除登录缓存吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-green\"> 清除登录缓存</a>";
-                        }
                             xml+="</div>"
                         return xml;
                     }}

+ 17 - 9
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp

@@ -35,13 +35,21 @@
                     return false;
                 }
                 if(!existMobile){
+
+                    var  status = $("#status").val();
+                    if(!status){
+                        parent.layer.msg("请选择员工状态!", {icon: 5});
+                        return false;
+                    }
+
+                    var roleIdStr = $("#roleIdStr").val();
+                    console.log(roleIdStr)
+                    if (!roleIdStr) {
+                        parent.layer.msg("请选择岗位信息!", {icon: 5});
+                        return false;
+                    }
                     var  flag = $("#updateFlag").val();
                     if(flag === '1'){
-                        var roleIdStr = $("#roleIdStr").val();
-                        if (roleIdStr == null || "" == roleIdStr) {
-                            parent.layer.msg("请选择岗位信息!", {icon: 5});
-                            return false;
-                        }
                         // $("#notifyFlag").val("1");
                         $("#inputForm").submit();
                         parent.layer.closeAll();
@@ -293,7 +301,7 @@
             });*/
 
             //第一次,验证手机号
-           checkMobile();
+           //checkMobile();
 
             $("#mobile").on('keyup',function(){
                 $("#ph").html("");
@@ -980,10 +988,10 @@
                 </div>
 
                 <div class="layui-item layui-col-sm6 lw7">
-                    <label class="layui-form-label">归属部门:</label>
+                    <label class="layui-form-label"><span class="require-item">*</span>归属部门:</label>
                     <div class="layui-input-block with-icon">
                         <sys:treeselect id="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"
-                                       cssStyle="background-color:#fff" title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input"/>
+                                       cssStyle="background-color:#fff" title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input required"/>
                     </div>
                 </div>
                 <%--<div class="layui-item layui-col-sm6 lw7">
@@ -995,7 +1003,7 @@
                 </div>--%>
 
                 <div class="layui-item layui-col-sm6 lw7">
-                    <label class="layui-form-label">岗   位:</label>
+                    <label class="layui-form-label"><span class="require-item">*</span>岗   位:</label>
                     <div class="layui-input-block">
                         <div id="roleId" class="xm-select-demo" tabindex="0" contenteditable="true"></div>
                     </div>