Browse Source

人员信息调整

徐滕 4 weeks ago
parent
commit
d90eeba1e9
38 changed files with 4657 additions and 610 deletions
  1. 57 0
      src/main/java/com/jeeplus/common/oss/OSSClientUtil.java
  2. 44 0
      src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java
  3. 2 2
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  4. 3 0
      src/main/java/com/jeeplus/modules/workstaff/dao/WorkStaffBasicInfoDao.java
  5. 29 0
      src/main/java/com/jeeplus/modules/workstaff/dao/WorkStaffLaborContractDao.java
  6. 19 0
      src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffBasicInfo.java
  7. 211 0
      src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffLaborContract.java
  8. 103 5
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java
  9. 501 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffLaborContractService.java
  10. 161 2
      src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoController.java
  11. 2 0
      src/main/java/com/jeeplus/modules/workstaffachiveslog/dao/WorkStaffAchivesLogDao.java
  12. 15 5
      src/main/resources/mappings/modules/workprojectnotify/WorkProjectNotifyDao.xml
  13. 2 1
      src/main/resources/mappings/modules/workstaff/WorkStaffAchivesDao.xml
  14. 7 0
      src/main/resources/mappings/modules/workstaff/WorkStaffBasicInfoDao.xml
  15. 182 0
      src/main/resources/mappings/modules/workstaff/WorkStaffLaborContractDao.xml
  16. 12 0
      src/main/resources/mappings/modules/workstaffachiveslog/WorkStaffAchivesLogDao.xml
  17. 10 0
      src/main/webapp/static/oss/ossupload.js
  18. 3 3
      src/main/webapp/webpage/include/head.jsp
  19. 1 1
      src/main/webapp/webpage/include/ossTools.jsp
  20. 1 1
      src/main/webapp/webpage/modules/projectcontentinfo/achievementFileDataForm.jsp
  21. 1 1
      src/main/webapp/webpage/modules/projectcontentinfo/basedDataForm.jsp
  22. 3 0
      src/main/webapp/webpage/modules/sys/sysHome.jsp
  23. 352 63
      src/main/webapp/webpage/modules/sys/userInfo.jsp
  24. 1 1
      src/main/webapp/webpage/modules/workrelationship/workRelationshipList.jsp
  25. 1 1
      src/main/webapp/webpage/modules/workstaff/qualificationList.jsp
  26. 1 1
      src/main/webapp/webpage/modules/workstaff/workAddressBookView.jsp
  27. 64 63
      src/main/webapp/webpage/modules/workstaff/workStaffAchiveInfoForm.jsp
  28. 58 57
      src/main/webapp/webpage/modules/workstaff/workStaffAchiveInfoForms.jsp
  29. 641 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicCertificateModify.jsp
  30. 109 59
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailAudit.jsp
  31. 69 57
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailForm.jsp
  32. 109 62
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModify.jsp
  33. 58 57
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModifyDirectly.jsp
  34. 634 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDirectlyAudit.jsp
  35. 551 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDirectlyModify.jsp
  36. 325 85
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp
  37. 3 3
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoList.jsp
  38. 312 80
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoView.jsp

+ 57 - 0
src/main/java/com/jeeplus/common/oss/OSSClientUtil.java

@@ -630,6 +630,16 @@ public class OSSClientUtil {
      * @param key
      * @param fileName
      * @param response
+     */
+    public void downByStreamOnFileName(String key, String fileName, HttpServletResponse response,String agent){
+        downByStreamOnFileName(key,fileName,response,agent,null);
+    }
+
+    /**
+     * 附件下载
+     * @param key
+     * @param fileName
+     * @param response
      * @param agent
      * @param bucketName
      */
@@ -667,6 +677,53 @@ public class OSSClientUtil {
             e.printStackTrace();
         }
     }
+
+    /**
+     * 附件下载
+     * @param key
+     * @param fileName
+     * @param response
+     * @param agent
+     * @param bucketName
+     */
+    public void downByStreamOnFileName(String key, String fileName, HttpServletResponse response, String agent, String bucketName) {
+        try {
+            if (StringUtils.isEmpty(bucketName)) {
+                bucketName = this.bucketName;
+            }
+
+            // 统一 UTF-8 编码中文,确保中文在不同浏览器中显示正常
+            String encodedFileName = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20");
+
+            // 获取文件流
+            OSSObject ossObject = ossClient.getObject(bucketName, key);
+            BufferedInputStream in = new BufferedInputStream(ossObject.getObjectContent());
+            BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
+
+            // 根据不同浏览器设置 Content-Disposition
+            String contentDisposition;
+            if (agent != null && agent.toLowerCase().contains("firefox")) {
+                contentDisposition = "attachment; filename*=UTF-8''" + encodedFileName;
+            } else {
+                contentDisposition = "attachment; filename=" + encodedFileName;
+            }
+            response.setHeader("Content-Disposition", contentDisposition);
+            response.setContentType("application/octet-stream");
+
+            // 写文件内容
+            byte[] buffer = new byte[1024];
+            int len;
+            while ((len = in.read(buffer)) != -1) {
+                out.write(buffer, 0, len);
+            }
+
+            out.flush();
+            out.close();
+            in.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
     /**
      * 附件下载到本地指定文件夹
      * @param key

+ 44 - 0
src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java

@@ -712,6 +712,50 @@ public class WorkFullManageController extends BaseController {
 
 	}
 
+	/**
+	 * 下载附件
+	 */
+	@RequestMapping("/downLoadAttachOnFileName")
+	public String downLoadAttachOnFileName(String file, String fileName, HttpServletResponse response) throws IOException {
+		// URL 解码
+		file = URLDecoder.decode(file, "UTF-8");
+
+		String aliyunUrl = Global.getAliyunUrl();
+		String aliDownloadUrl = Global.getAliDownloadUrl();
+		String cons = "";
+		if (file.contains(aliyunUrl)) {
+			cons = aliyunUrl;
+		} else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")) {
+			cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
+		} else {
+			cons = aliDownloadUrl;
+		}
+
+		String key = null;
+		if (file.contains(cons + "/")) {
+			String[] parts = file.split(cons + "/");
+			if (parts.length > 1) {
+				key = parts[1];
+			} else {
+				logger.error("file格式异常,split结果长度小于2");
+				response.sendError(HttpServletResponse.SC_BAD_REQUEST, "文件路径格式错误");
+				return null;
+			}
+		} else {
+			logger.error("file不包含指定的cons字符串:" + cons + "/");
+			response.sendError(HttpServletResponse.SC_BAD_REQUEST, "文件路径格式错误");
+			return null;
+		}
+
+		logger.info("-----------------------------------------");
+		logger.info("fileName=" + fileName);
+		logger.info("key=" + key);
+		logger.info("-----------------------------------------");
+
+		new OSSClientUtil().downByStreamOnFileName(key, fileName, response, request.getHeader("USER-AGENT"));
+		return null;
+	}
+
 
 
 	/**

+ 2 - 2
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -11333,12 +11333,12 @@ public class WorkProjectNotifyController extends BaseController {
 		model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
 
 		if (workProjectNotify.getRemarks().contains("待处理") && !"1".equals(workProjectNotify.getStatus())) {
-			return "modules/workstaff/workStaffBasicDetailAudit";
+			return "modules/workstaff/workStaffBasicDirectlyAudit";
 		}else{
 			if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
 				User user=UserUtils.getUser();
 				model.addAttribute("user", user);
-				return "modules/workstaff/workStaffBasicDetailModify";
+				return "modules/workstaff/workStaffBasicDirectlyModify";
 			}else{
 				return "modules/workstaff/workStaffBasicInfoView";
 			}

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

@@ -103,4 +103,7 @@ public interface WorkStaffBasicInfoDao extends CrudDao<WorkStaffBasicInfo> {
      */
     void updateDdInfo(@Param("userId") String userId, @Param("ddId") String ddId, @Param("ddType") String ddType);
 
+
+    void updateActComment(WorkStaffBasicInfo workStaffBasicInfo);
+
 }

+ 29 - 0
src/main/java/com/jeeplus/modules/workstaff/dao/WorkStaffLaborContractDao.java

@@ -0,0 +1,29 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workstaff.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
+import com.jeeplus.modules.workstaff.entity.WorkStaffCertificateImport;
+import com.jeeplus.modules.workstaff.entity.WorkStaffLaborContract;
+
+import java.util.List;
+
+/**
+ * 执业资格证书DAO接口
+ * @author ssrh
+ * @version 2018-07-27
+ */
+@MyBatisDao
+public interface WorkStaffLaborContractDao extends CrudDao<WorkStaffLaborContract> {
+    int updateFalt(String id);
+
+    /**
+     * 根据用户id查询对应数据信息
+     * @param userId
+     * @return
+     */
+    List<WorkStaffLaborContract> getByUserId(String userId);
+}

+ 19 - 0
src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffBasicInfo.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.modules.workstaff.entity;
 
+import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.sys.entity.Office;
 
 import java.util.Date;
@@ -80,6 +81,7 @@ public class WorkStaffBasicInfo extends DataEntity<WorkStaffBasicInfo> {
     private List<WorkStaffTitle> titleList;//职称
     private List<WorkStaffTraining> trainingList;//培训经历
     private List<WorkStaffEducation> educationList;//教育经历
+    private List<WorkStaffLaborContract> laborContractList;//劳动合同
     private String achiveId;
     private String percent;
     private Date beginBirthdayDate;
@@ -128,6 +130,7 @@ public class WorkStaffBasicInfo extends DataEntity<WorkStaffBasicInfo> {
 
     //劳动关系临时属性
     private String relationshipStatus;
+    private Act act;
 
     public String getDdId() {
         return ddId;
@@ -964,4 +967,20 @@ public class WorkStaffBasicInfo extends DataEntity<WorkStaffBasicInfo> {
     public void setNotOfficeParentIdList(List<String> notOfficeParentIdList) {
         this.notOfficeParentIdList = notOfficeParentIdList;
     }
+
+    public List<WorkStaffLaborContract> getLaborContractList() {
+        return laborContractList;
+    }
+
+    public void setLaborContractList(List<WorkStaffLaborContract> laborContractList) {
+        this.laborContractList = laborContractList;
+    }
+
+    public Act getAct() {
+        return act;
+    }
+
+    public void setAct(Act act) {
+        this.act = act;
+    }
 }

+ 211 - 0
src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffLaborContract.java

@@ -0,0 +1,211 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workstaff.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.Date;
+
+/**
+ * 执业资格证书Entity
+ * @author ssrh
+ * @version 2018-07-27
+ */
+public class WorkStaffLaborContract extends DataEntity<WorkStaffLaborContract> {
+
+	private static final long serialVersionUID = 1L;
+	private String staffId;		// 员工ID
+	private String contractType;		// 合同类型relsp_cType总:1劳动合同2劳务合同3补充协议   relsp_cType1 :1劳动合同3补充协议 relsp_cType2 :2劳务3补充
+	private String contractNum;		// 合同编号
+	private String contractLimit;		// 合同期限  contract_limit 1固定 2无固定 3以任务为限
+	private Date contractStartTime;		// 合同起始日期
+	private Date contractEndTime;		// 合同终止日期
+	private Date tryEndTime;		// 试用期结束日期
+	private Date transactTime;		// 办理日期
+	private String renew;			//续签/不续签    0续签  1不续签
+	private String home;       //跳转首页标记
+	private Date beginContractDate;		// 开始
+	private Date endContractDate;		// 结束
+	private Date beginContractDates;		// 开始
+	private Date endContractDates;		// 结束
+
+	private String filePath;		// 文件
+	private String filePathStr;		// 文件
+    private String fileName;		// 文件名
+    private MultipartFile file;
+	private String zixunyuanId;		//咨询员id
+	private String zixunyuanName;		//咨询员name
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setFileName(String fileName) {
+        this.fileName = fileName;
+    }
+
+    public MultipartFile getFile() {
+        return file;
+    }
+
+    public void setFile(MultipartFile file) {
+        this.file = file;
+    }
+
+    public WorkStaffLaborContract() {
+		super();
+	}
+
+	public WorkStaffLaborContract(String id){
+		super(id);
+	}
+
+	@ExcelField(title="员工ID", align=2, sort=7)
+	public String getStaffId() {
+		return staffId;
+	}
+
+	public void setStaffId(String staffId) {
+		this.staffId = staffId;
+	}
+
+	public String getZixunyuanId() {
+		return zixunyuanId;
+	}
+
+	public void setZixunyuanId(String zixunyuanId) {
+		this.zixunyuanId = zixunyuanId;
+	}
+
+	public String getZixunyuanName() {
+		return zixunyuanName;
+	}
+
+	public void setZixunyuanName(String zixunyuanName) {
+		this.zixunyuanName = zixunyuanName;
+	}
+
+	public String getFilePathStr() {
+		return filePathStr;
+	}
+
+	public void setFilePathStr(String filePathStr) {
+		this.filePathStr = filePathStr;
+	}
+
+	public String getContractType() {
+		return contractType;
+	}
+
+	public void setContractType(String contractType) {
+		this.contractType = contractType;
+	}
+
+	public String getContractNum() {
+		return contractNum;
+	}
+
+	public void setContractNum(String contractNum) {
+		this.contractNum = contractNum;
+	}
+
+	public String getContractLimit() {
+		return contractLimit;
+	}
+
+	public void setContractLimit(String contractLimit) {
+		this.contractLimit = contractLimit;
+	}
+
+	public Date getContractStartTime() {
+		return contractStartTime;
+	}
+
+	public void setContractStartTime(Date contractStartTime) {
+		this.contractStartTime = contractStartTime;
+	}
+
+	public Date getContractEndTime() {
+		return contractEndTime;
+	}
+
+	public void setContractEndTime(Date contractEndTime) {
+		this.contractEndTime = contractEndTime;
+	}
+
+	public Date getTryEndTime() {
+		return tryEndTime;
+	}
+
+	public void setTryEndTime(Date tryEndTime) {
+		this.tryEndTime = tryEndTime;
+	}
+
+	public Date getTransactTime() {
+		return transactTime;
+	}
+
+	public void setTransactTime(Date transactTime) {
+		this.transactTime = transactTime;
+	}
+
+	public String getRenew() {
+		return renew;
+	}
+
+	public void setRenew(String renew) {
+		this.renew = renew;
+	}
+
+	public String getHome() {
+		return home;
+	}
+
+	public void setHome(String home) {
+		this.home = home;
+	}
+
+	public Date getBeginContractDate() {
+		return beginContractDate;
+	}
+
+	public void setBeginContractDate(Date beginContractDate) {
+		this.beginContractDate = beginContractDate;
+	}
+
+	public Date getEndContractDate() {
+		return endContractDate;
+	}
+
+	public void setEndContractDate(Date endContractDate) {
+		this.endContractDate = endContractDate;
+	}
+
+	public Date getBeginContractDates() {
+		return beginContractDates;
+	}
+
+	public void setBeginContractDates(Date beginContractDates) {
+		this.beginContractDates = beginContractDates;
+	}
+
+	public Date getEndContractDates() {
+		return endContractDates;
+	}
+
+	public void setEndContractDates(Date endContractDates) {
+		this.endContractDates = endContractDates;
+	}
+
+	public String getFilePath() {
+		return filePath;
+	}
+
+	public void setFilePath(String filePath) {
+		this.filePath = filePath;
+	}
+}

+ 103 - 5
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java

@@ -94,6 +94,8 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
     @Autowired
     private WorkStaffRecordService recordService;
     @Autowired
+    private WorkStaffLaborContractService labourContractService;
+    @Autowired
     private WorkStaffRewardsService rewardsService;
     @Autowired
     private WorkStaffSocialPositionService socialPositionService;
@@ -582,6 +584,21 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         UserUtils.pushIm(userIds, contentStr);
     }
 
+    private void sendCertificationDirectlyMessage(WorkStaffBasicInfo workStaffBasicInfo, String contentStr, String titleStr, String remark) {
+        if (workStaffBasicInfo == null || StringUtils.isBlank(workStaffBasicInfo.getId()) || StringUtils.isBlank(workStaffBasicInfo.getUserId())) {
+            return;
+        }
+        WorkProjectNotify workProjectNotify = UtilNotify.saveNotify(workStaffBasicInfo.getId(), null, workStaffBasicInfo.getCompany().getId(),
+                titleStr, contentStr, "186", "0", "重新申请", "");
+        List<String> userIds = new ArrayList<>();
+        userIds.add(workStaffBasicInfo.getUserId());
+        workProjectNotify.setUser(new User(workStaffBasicInfo.getUserId()));
+        workProjectNotify.setId("");
+        workProjectNotify.setNotifyRole("");
+        workProjectNotifyService.save(workProjectNotify);
+        UserUtils.pushIm(userIds, contentStr);
+    }
+
     private void sendCertificationMessage(WorkStaffBasicInfo workStaffBasicInfo, String contentStr, String titleStr, String remark) {
         if (workStaffBasicInfo == null || StringUtils.isBlank(workStaffBasicInfo.getId()) || StringUtils.isBlank(workStaffBasicInfo.getUserId())) {
             return;
@@ -647,6 +664,7 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         if (socialPositionService.save(workStaffBasicInfo, first)) count++;
         if (titleService.save(workStaffBasicInfo, first)) count++;
         if (trainingService.save(workStaffBasicInfo, first)) count++;
+        if (labourContractService.save(workStaffBasicInfo, first)) count++;
         return count;
     }
 
@@ -667,6 +685,7 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         socialPositionService.query(workStaffBasicInfo);
         titleService.query(workStaffBasicInfo);
         trainingService.query(workStaffBasicInfo);
+        labourContractService.query(workStaffBasicInfo);
         queryRelationShips(workStaffBasicInfo);
         workStaffBasicInfo.setId(id);
     }
@@ -811,6 +830,26 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
     }
 
     @Transactional(readOnly = false)
+    public void completeDirectly(String achiveIds) {
+        if (StringUtils.isBlank(achiveIds)) {
+            return;
+        }
+        String[] split = achiveIds.split(",");
+        String contentStr = "重新申请,请完善执业资格证书信息。";
+        String titleStr = "请完善执业资格证书信息,重新申请";
+        String remark = "重新申请";
+        for (String s : split) {
+            WorkStaffBasicInfo workStaffBasicInfo = workStaffAchivesDao.get(s);
+            this.sendCertificationDirectlyMessage(workStaffBasicInfo, contentStr, titleStr, remark);
+        }
+    }
+
+    @Transactional(readOnly = false)
+    public void updateActComment(WorkStaffBasicInfo workStaffBasicInfo) {
+        dao.updateActComment(workStaffBasicInfo);
+    }
+
+    @Transactional(readOnly = false)
     public void saveAchive(WorkStaffBasicInfo workStaffBasicInfo, HttpServletRequest request) throws IOException {
         Office branchOffice = officeService.get(workStaffBasicInfo.getOffice().getId());
         if (branchOffice != null && StringUtils.isNotBlank(branchOffice.getBranchOffice())) {
@@ -903,6 +942,7 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         socialPositionService.querys(workStaffBasicInfo);
         titleService.querys(workStaffBasicInfo);
         trainingService.querys(workStaffBasicInfo);
+        labourContractService.querys(workStaffBasicInfo);
         queryRelationShips(workStaffBasicInfo);
     }
 
@@ -997,6 +1037,13 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         if (socialPositionService.saveApply(workStaffBasicInfo, first)) count++;
         if (titleService.saveApply(workStaffBasicInfo, first)) count++;
         if (trainingService.saveApply(workStaffBasicInfo, first)) count++;
+        if (labourContractService.saveApply(workStaffBasicInfo, first)) count++;
+        return count;
+    }
+
+    private int saveDetailsDirectlyApply(WorkStaffBasicInfo workStaffBasicInfo, boolean first) {
+        int count = 0;
+        if (certificateService.saveApply(workStaffBasicInfo, first)) count++;
         return count;
     }
 
@@ -1005,16 +1052,41 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         if (StringUtils.isBlank(achiveIds)) {
             return "";
         }
-        String contentStr = "待处理,请及时审核修改档案信息申请。";
-        String titleStr = "修改档案信息申请,待处理";
-        String remark = "待处理";
         WorkStaffBasicInfo workStaffBasicInfo = workStaffAchivesDao.get(achiveIds);
+        String contentStr = workStaffBasicInfo.getName() + "提交修改档案信息申请,待处理";
+        String titleStr = workStaffBasicInfo.getName() + "提交修改档案信息申请,待处理";
+        String remark = "待处理";
         WorkProjectNotify workProjectNotify = UtilNotify.saveNotify(workStaffBasicInfo.getId(), null, workStaffBasicInfo.getCompany().getId(),
                 titleStr, contentStr, "86", "0", remark, "");
         List<String> userIds = new ArrayList<>();
         List<User> rlzyList = UserUtils.getByRoleActivityEnname("rlzy", 3, UserUtils.getSelectOffice().getId(), "22", UserUtils.getUser());
-        List<User> rszrList = UserUtils.findRszrList(UserUtils.getUser());
-        rlzyList.addAll(rszrList);
+        if (rlzyList.size() == 0) {
+            return "流程审批人不能为空,请联系管理员!";
+        }
+        for (User u : rlzyList) {
+            userIds.add(u.getId());
+            workProjectNotify.setUser(u);
+            workProjectNotify.setId("");
+            workProjectNotify.setNotifyRole("");
+            workProjectNotifyService.save(workProjectNotify);
+        }
+        UserUtils.pushIm(userIds, contentStr);
+        return "";
+    }
+
+    @Transactional(readOnly = false)
+    public String completeCertificateApply(String achiveIds) {
+        if (StringUtils.isBlank(achiveIds)) {
+            return "";
+        }
+        WorkStaffBasicInfo workStaffBasicInfo = workStaffAchivesDao.get(achiveIds);
+        String contentStr = workStaffBasicInfo.getName() + "提交修改执业资格证信息申请,待处理";
+        String titleStr = workStaffBasicInfo.getName() + "提交修改执业资格证信息申请,待处理";
+        String remark = "待处理";
+        WorkProjectNotify workProjectNotify = UtilNotify.saveNotify(workStaffBasicInfo.getId(), null, workStaffBasicInfo.getCompany().getId(),
+                titleStr, contentStr, "186", "0", remark, "");
+        List<String> userIds = new ArrayList<>();
+        List<User> rlzyList = UserUtils.getByRoleActivityEnname("ryzzgly", 3, UserUtils.getSelectOffice().getId(), "", UserUtils.getUser());
         if (rlzyList.size() == 0) {
             return "流程审批人不能为空,请联系管理员!";
         }
@@ -1041,6 +1113,31 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())) {
             WorkProjectNotify workProjectNotify = new WorkProjectNotify();
             workProjectNotify.setNotifyId(workStaffBasicInfo.getId());
+            workProjectNotify.setType("86");
+            workProjectNotifyService.readByNotifyId(workProjectNotify);
+            return;
+        }
+        if ("1".equals(workStaffBasicInfo.getNotifyFlag())) {
+            String contentStr = "待处理,请及时完善员工档案信息。";
+            String titleStr = "完善档案信息,待处理";
+            String remark = "待处理";
+            this.sendMessage(workStaffBasicInfo, contentStr, titleStr, remark);
+        }
+    }
+
+    @Transactional(readOnly = false)
+    public void saveAchiveDirectlyApply(WorkStaffBasicInfo workStaffBasicInfo, HttpServletRequest request) throws IOException {
+        this.saveAchive(workStaffBasicInfo);
+        workStaffBasicInfo.setAchiveId(workStaffBasicInfo.getId());
+        int cou = this.saveDetailsDirectlyApply(workStaffBasicInfo, true);
+        //计算信息完成度
+        cou += this.cacuField(workStaffBasicInfo);
+        workStaffAchivesDao.updatePercent(workStaffBasicInfo.getId(), this.cacuPercent(cou));
+        workStaffAchivesLogDao.updateDirectlyState("执业资格证书",workStaffBasicInfo.getId(), UserUtils.getUser().getId(), new Date());
+        if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())) {
+            WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+            workProjectNotify.setType("186");
+            workProjectNotify.setNotifyId(workStaffBasicInfo.getId());
             workProjectNotifyService.readByNotifyId(workProjectNotify);
             return;
         }
@@ -1194,6 +1291,7 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         socialPositionService.saveEdu(workStaffBasicInfo);//社会及行业职务
         titleService.saveEdu(workStaffBasicInfo);//职称
         trainingService.saveEdu(workStaffBasicInfo);//培训经历
+        labourContractService.saveEdu(workStaffBasicInfo);//劳动合同
     }
 
     /**

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

@@ -0,0 +1,501 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workstaff.service;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.oss.OSSClientUtil;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.IdGen;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.sys.dao.UserDao;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.WorkattachmentService;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.workstaff.dao.WorkStaffBasicInfoDao;
+import com.jeeplus.modules.workstaff.dao.WorkStaffCertificateDao;
+import com.jeeplus.modules.workstaff.dao.WorkStaffLaborContractDao;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
+import com.jeeplus.modules.workstaff.entity.WorkStaffCertificateImport;
+import com.jeeplus.modules.workstaff.entity.WorkStaffLaborContract;
+import com.jeeplus.modules.workstaffachiveslog.entity.WorkStaffAchivesLog;
+import com.jeeplus.modules.workstaffachiveslog.service.WorkStaffAchivesLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 劳动合同Service
+ * @author ssrh
+ * @version 2018-07-27
+ */
+@Service
+@Transactional(readOnly = true)
+public class WorkStaffLaborContractService extends CrudService<WorkStaffLaborContractDao, WorkStaffLaborContract> {
+    @Autowired
+    private WorkStaffAchivesLogService workStaffAchivesLogService;
+    @Autowired
+    private UserDao userDao;
+    @Autowired
+    private WorkStaffBasicInfoDao workStaffBasicInfoDao;
+	public WorkStaffLaborContract get(String id) {
+		return super.get(id);
+	}
+	
+	public List<WorkStaffLaborContract> findList(WorkStaffLaborContract workStaffLaborContract) {
+        List<WorkStaffLaborContract> list = super.findList(workStaffLaborContract);
+        for (WorkStaffLaborContract staffCertificate : list) {
+            if(StringUtils.isNotEmpty(staffCertificate.getFilePath())) {
+                staffCertificate.setFilePathStr(WorkattachmentService.fileUrlManage(staffCertificate.getFilePath()));
+            }
+        }
+        return super.findList(workStaffLaborContract);
+	}
+	
+	public Page<WorkStaffLaborContract> findPage(Page<WorkStaffLaborContract> page, WorkStaffLaborContract workStaffLaborContract) {
+		return super.findPage(page, workStaffLaborContract);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(WorkStaffLaborContract workStaffLaborContract) {
+		super.save(workStaffLaborContract);
+	}
+
+    @Transactional(readOnly = false)
+    public void saveAll(List<WorkStaffLaborContract> workStaffCertificates) {
+	    for (WorkStaffLaborContract certificate:workStaffCertificates){
+	        if("1".equals(certificate.getDelFlag())){
+                dao.deleteByLogic(certificate);
+                continue;
+            }else{
+                super.save(certificate);
+            }
+        }
+    }
+	
+	@Transactional(readOnly = false)
+	public void delete(WorkStaffLaborContract workStaffLaborContract) {
+		super.delete(workStaffLaborContract);
+	}
+
+
+    public boolean save(WorkStaffBasicInfo workStaffBasicInfo,boolean first) {
+        if(workStaffBasicInfo==null|| StringUtils.isBlank(workStaffBasicInfo.getId())){
+            return false;
+        }
+        if(workStaffBasicInfo.getLaborContractList()==null||workStaffBasicInfo.getLaborContractList().size()<=0){
+            return false;
+        }
+        boolean flag=false;
+        for (WorkStaffLaborContract entity : workStaffBasicInfo.getLaborContractList()) {
+            if(entity!=null&&"1".equals(entity.getDelFlag())&&StringUtils.isBlank(entity.getId())){
+                continue;
+            }
+            if(entity!=null&&"1".equals(entity.getDelFlag())){
+                dao.deleteByLogic(entity);
+                continue;
+            }
+            if(entity!=null){
+                if(entity.getFile()!=null&&!entity.getFile().isEmpty()&&entity.getFile().getSize()>0){
+                    MultipartFile file = entity.getFile();
+                    entity.setFileName(file.getOriginalFilename());
+                    entity.setFilePath(this.uploadFile(file,entity.getFilePath()));
+                }
+                entity.setStaffId(workStaffBasicInfo.getId());
+                this.save(entity);
+                if(first){
+                    entity.setId(null);
+                    entity.setFilePath("");
+                }
+                flag =true;
+            }
+        }
+        return flag;
+    }
+
+    public String uploadFile(MultipartFile file, String filePath){
+        String date = DateUtils.formatDate(new Date(),"yyMMddHHmm");
+        try {
+            if (file != null && file.getSize() > 0) {
+                String path = new StringBuilder("/employeeInfo/").append(date)
+                        .append(file.getOriginalFilename()).toString();
+                InputStream inputStream = file.getInputStream();
+                OSSClientUtil ossClientUtil = new OSSClientUtil();
+                String url = ossClientUtil.uploadFile2OSS(file, "certificate");
+                return url;
+            }
+        }catch (Exception e){
+            logger.error("上传文件失败!");
+        }
+        return null;
+    }
+
+    public void query(WorkStaffBasicInfo workStaffBasicInfo) {
+        if(workStaffBasicInfo==null|| StringUtils.isBlank(workStaffBasicInfo.getId())){
+            return;
+        }
+        WorkStaffLaborContract entity = new WorkStaffLaborContract();
+        entity.setStaffId(workStaffBasicInfo.getId());
+        workStaffBasicInfo.setLaborContractList(this.findList(entity));
+    }
+    private static Map<String,String> EDU_MAP = Maps.newHashMap();//劳动合同
+
+    static{//劳动合同
+        EDU_MAP.put("contractType", "合同类型");
+        EDU_MAP.put("contractNum", "合同编号");
+        EDU_MAP.put("contractLimit", "合同期限");
+        EDU_MAP.put("contractStartTime", "合同起始日期");
+        EDU_MAP.put("contractEndTime", "合同终止日期");
+        EDU_MAP.put("tryEndTime", "试用期结束日期");
+        EDU_MAP.put("transactTime", "办理日期");
+    }
+    public boolean saveApply(WorkStaffBasicInfo workStaffBasicInfo,boolean first) {
+        if(workStaffBasicInfo==null|| StringUtils.isBlank(workStaffBasicInfo.getId())){
+            return false;
+        }
+        List<WorkStaffLaborContract> list = workStaffBasicInfo.getLaborContractList();
+        if(list==null||list.size()<=0){
+            return false;
+        }
+        boolean flag = false;
+        User u=userDao.get(workStaffBasicInfo.getUserId());
+        for (WorkStaffLaborContract entity : list) {
+            entity.setStaffId(workStaffBasicInfo.getId());
+            WorkStaffLaborContract workStaffLaborContract=dao.get(entity.getId());
+            if(workStaffLaborContract==null){
+                entity.setCreateBy(u);
+                entity.setCreateDate(new Date());
+                entity.setUpdateBy(u);
+                entity.setUpdateDate(new Date());
+                dao.insert(entity);
+            }else{
+                this.save(entity);
+            }
+            if(entity!=null&&"1".equals(entity.getDelFlag())){
+                dao.deleteByLogic(entity);
+                continue;
+            }
+            flag =true;
+        }
+        dao.updateFalt(workStaffBasicInfo.getId());
+        return flag;
+    }
+
+    public void querys(WorkStaffBasicInfo workStaffBasicInfo) {
+        SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyy-MM-dd");
+        if(workStaffBasicInfo==null|| StringUtils.isBlank(workStaffBasicInfo.getId())){
+            return;
+        }
+        WorkStaffLaborContract entity = new WorkStaffLaborContract();
+        entity.setStaffId(workStaffBasicInfo.getId());
+        List<WorkStaffLaborContract> list=this.findList(entity);
+        List<WorkStaffLaborContract> newList=Lists.newArrayList();
+        if(list!=null&&list.size()>0){//修改
+            for(WorkStaffLaborContract workStaffLaborContract:list){
+                Class<? extends WorkStaffLaborContract> newClass = workStaffLaborContract.getClass();
+                Field[] declaredFields = newClass.getDeclaredFields();
+                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 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();
+                        workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                        workStaffAchivesLog.setModule("劳动合同");
+                        workStaffAchivesLog.setSonId(workStaffLaborContract.getId());
+                        workStaffAchivesLog.setFields(name);
+                        workStaffAchivesLog.setType("修改");
+                        workStaffAchivesLog.setState("1");
+                        List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(workStaffAchivesLog);
+                        try {
+                            Object newInvoke = newClass.getMethod(getMethod).invoke(workStaffLaborContract);//修改后
+                            if(newInvoke instanceof String){
+                                Method setReadOnly = workStaffLaborContract.getClass().getMethod(setMethod, String.class);
+                                if(logs!=null&&logs.size()>0){
+                                    setReadOnly.invoke(workStaffLaborContract,logs.get(0).getNewKey());
+                                }
+                            }
+                            if(newInvoke instanceof Date){//日期
+                                Method setReadOnly = workStaffLaborContract.getClass().getMethod(setMethod, Date.class);
+                                if(logs!=null&&logs.size()>0){
+                                    Date myDate = dateFormat1.parse(logs.get(0).getNewKey());
+                                    setReadOnly.invoke(workStaffLaborContract,myDate);
+                                }
+                            }
+                            if(null == newInvoke){
+                                try {
+                                    Method setReadOnly = workStaffLaborContract.getClass().getMethod(setMethod, String.class);
+                                    if(logs!=null&&logs.size()>0){
+                                        setReadOnly.invoke(workStaffLaborContract,logs.get(0).getNewKey());
+                                    }
+                                } catch (NoSuchMethodException e) {
+                                    Method setReadOnly = workStaffLaborContract.getClass().getMethod(setMethod, Date.class);
+                                    if(logs!=null&&logs.size()>0){
+                                        Date myDate = dateFormat1.parse(logs.get(0).getNewKey());
+                                        setReadOnly.invoke(workStaffLaborContract,myDate);
+                                    }
+                                }
+                            }
+                        } catch (NoSuchMethodException e) {
+                            e.printStackTrace();
+                        } catch (IllegalAccessException e) {
+                            e.printStackTrace();
+                        } catch (InvocationTargetException e) {
+                            e.printStackTrace();
+                        } catch (ParseException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+                if(StringUtils.isNotBlank(workStaffLaborContract.getFilePath())){
+                    workStaffLaborContract.setFilePathStr(WorkattachmentService.fileUrlManage(workStaffLaborContract.getFilePath()));
+                }
+                newList.add(workStaffLaborContract);
+                for (WorkStaffLaborContract staffCertificate : newList) {
+                    if(StringUtils.isNotEmpty(staffCertificate.getFilePath())) {
+                        staffCertificate.setFilePathStr(WorkattachmentService.fileUrlManage(staffCertificate.getFilePath()));
+                    }
+                }
+            }
+        }
+        //新增
+        WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+        workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+        workStaffAchivesLog.setModule("劳动合同");
+        workStaffAchivesLog.setType("新增");
+        workStaffAchivesLog.setState("1");
+        List<WorkStaffAchivesLog> sonIds=workStaffAchivesLogService.findSonId(workStaffAchivesLog);
+        if(sonIds!=null&&sonIds.size()>0){
+            for(WorkStaffAchivesLog w:sonIds){
+                workStaffAchivesLog.setSonId(w.getSonId());
+                WorkStaffLaborContract workStaffLaborContract = new WorkStaffLaborContract();
+                workStaffLaborContract.setId(w.getSonId());
+                workStaffLaborContract.setDelFlag("0");
+                workStaffLaborContract.setStaffId(workStaffBasicInfo.getId());
+                Class<? extends WorkStaffLaborContract> newClass = workStaffLaborContract.getClass();
+                Field[] declaredFields = newClass.getDeclaredFields();
+                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 setMethod = "set"+name.substring(0,1).toUpperCase()+name.substring(1);
+                        String getMethod = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
+                        workStaffAchivesLog.setFields(name);
+                        List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(workStaffAchivesLog);
+                        try {
+                            if("contractStartTime".equals(name)||"contractEndTime".equals(name)||"tryEndTime".equals(name)||"transactTime".equals(name)){//日期
+                                Method setReadOnly = workStaffLaborContract.getClass().getMethod(setMethod, Date.class);
+                                if(logs!=null&&logs.size()>0){
+                                    Date myDate = dateFormat1.parse(logs.get(0).getNewKey());
+                                    setReadOnly.invoke(workStaffLaborContract,myDate);
+                                }
+                            }else{
+                                Method setReadOnly = workStaffLaborContract.getClass().getMethod(setMethod, String.class);
+                                if(logs!=null&&logs.size()>0){
+                                    setReadOnly.invoke(workStaffLaborContract,logs.get(0).getNewKey());
+                                }
+                            }
+                        } catch (NoSuchMethodException e) {
+                            e.printStackTrace();
+                        } catch (IllegalAccessException e) {
+                            e.printStackTrace();
+                        } catch (InvocationTargetException e) {
+                            e.printStackTrace();
+                        } catch (ParseException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+                if(StringUtils.isNotBlank(workStaffLaborContract.getFilePath())){
+                    workStaffLaborContract.setFilePathStr(WorkattachmentService.fileUrlManage(workStaffLaborContract.getFilePath()));
+                }
+                newList.add(workStaffLaborContract);
+            }
+        }
+        //删除
+        WorkStaffAchivesLog delLog=new WorkStaffAchivesLog();
+        delLog.setStaffId(workStaffBasicInfo.getId());
+        delLog.setModule("劳动合同");
+        delLog.setType("删除");
+        workStaffAchivesLog.setState("1");
+        List<WorkStaffAchivesLog> dellogs=workStaffAchivesLogService.findList(delLog);
+        if(dellogs!=null&&dellogs.size()>0){
+            for(WorkStaffAchivesLog w:dellogs){
+                newList.remove(dao.get(w.getSonId()));
+            }
+        }
+        workStaffBasicInfo.setLaborContractList(newList);
+    }
+    @Transactional(readOnly = false)
+    public void saveEdu(WorkStaffBasicInfo workStaffBasicInfo) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        List<WorkStaffLaborContract> certificateList =workStaffBasicInfo.getLaborContractList();
+        if(certificateList!=null&&certificateList.size()>0){
+            for(WorkStaffLaborContract newCertificate:certificateList){
+                Class<? extends WorkStaffLaborContract> newClass = newCertificate.getClass();
+                Field[] declaredFields = newClass.getDeclaredFields();
+                if(newCertificate.getId()!=null&&!"1".equals(newCertificate.getDelFlag())&&!"".equals(newCertificate.getId())){
+                    if(newCertificate.getFile()!=null&&!newCertificate.getFile().isEmpty()&&newCertificate.getFile().getSize()>0){
+                        MultipartFile file = newCertificate.getFile();
+                        newCertificate.setFilePath(this.uploadFile(file,newCertificate.getFilePath()));
+                    }
+                    WorkStaffLaborContract oldCertificate=this.get(newCertificate.getId());
+                    if(oldCertificate!=null){
+                        Class<? extends WorkStaffLaborContract> oldClass = oldCertificate.getClass();
+                        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(newCertificate.getId());
+                                workStaffAchivesLog.setFields(name);
+                                workStaffAchivesLog.setState("1");
+                                try {
+                                    Object newInvoke = newClass.getMethod(methodName).invoke(newCertificate);//修改后
+                                    Object oldInvoke = oldClass.getMethod(methodName).invoke(oldCertificate);//修改前
+                                    if(null == oldInvoke){
+                                        oldInvoke = "";
+                                    }
+                                    String describes=EDU_MAP.get(name);
+                                    if(newInvoke instanceof String){
+                                        String newValue=newInvoke.toString();
+                                        String oldValue=oldInvoke.toString();
+                                        if(!newValue.equals(oldValue)){
+                                            if("contractType".equals(name)){
+                                                workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "劳动合同",describes,name,
+                                                        DictUtils.getMainDictLabel(oldValue,"relsp_cType",""),
+                                                        DictUtils.getMainDictLabel(newValue,"relsp_cType",""),
+                                                        oldValue,newValue,newCertificate.getId(),"修改");
+                                            }else if("contractLimit".equals(name)){
+                                                workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "劳动合同",describes,name,
+                                                        DictUtils.getMainDictLabel(oldValue,"contract_limit",""),
+                                                        DictUtils.getMainDictLabel(newValue,"contract_limit",""),
+                                                        oldValue,newValue,newCertificate.getId(),"修改");
+                                            }else{
+                                                workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "劳动合同",describes,name,
+                                                        oldInvoke.toString(),newInvoke.toString(),
+                                                        oldInvoke.toString(),newInvoke.toString(),newCertificate.getId(),"修改");
+                                            }
+                                        }
+                                    }
+                                    if(newInvoke instanceof Date){//日期
+                                        String newDate="";
+                                        String oldDate="";
+                                        if(newInvoke!=null){
+                                            newDate=sdf.format(newInvoke);
+                                        }
+                                        if (oldInvoke!=null && StringUtils.isNotBlank(oldInvoke.toString())){
+                                            oldDate=sdf.format(oldInvoke);
+                                        }
+                                        if(!newDate.equals(oldDate)){
+                                            workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                    "劳动合同",describes,name,
+                                                    oldDate,newDate,oldDate,newDate,newCertificate.getId(),"修改");
+                                        }
+                                    }
+                                } 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){
+                        MultipartFile file = newCertificate.getFile();
+                        newCertificate.setFilePath(this.uploadFile(file,newCertificate.getFilePath()));
+                    }
+                    String newId=IdGen.uuid();
+                    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("1");
+                            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.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                "劳动合同",describes,name,
+                                                "",
+                                                DictUtils.getMainDictLabel(newValue,"relsp_cType",""),
+                                                "",newValue,newId,"新增");
+                                    }else if("contractLimit".equals(name)){
+                                        workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                "劳动合同",describes,name,
+                                                "",
+                                                DictUtils.getMainDictLabel(newValue,"contract_limit",""),
+                                                "",newValue,newId,"新增");
+                                    }else{
+                                        workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                "劳动合同",describes,name,
+                                                "",newInvoke.toString(),
+                                                "",newInvoke.toString(),newId,"新增");
+                                    }
+                                }
+                                if(newInvoke instanceof Date){//日期
+                                    String newDate=sdf.format(newInvoke);
+                                    workStaffAchivesLogService.saveStaffLog(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&&"1".equals(newCertificate.getDelFlag())&&!"".equals(newCertificate.getId())){//删除
+                    WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+                    workStaffAchivesLog.setStaffId(workStaffBasicInfo.getId());
+                    workStaffAchivesLog.setModule("劳动合同");
+                    workStaffAchivesLog.setSonId(newCertificate.getId());
+                    workStaffAchivesLog.setType("删除");
+                    workStaffAchivesLog.setState("1");
+                    workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                            "劳动合同","","",
+                            "","",
+                            "","",newCertificate.getId(),"删除");
+                }
+            }
+        }
+    }
+}

+ 161 - 2
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoController.java

@@ -59,6 +59,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * 员工基本信息Controller
@@ -741,6 +742,63 @@ public class WorkStaffBasicInfoController extends BaseController {
 		return "modules/workstaff/workStaffBasicDetailModify";
 	}
 
+
+	@RequestMapping(value = "applyCertificateEdit")
+	public String applyCertificateEdit(Model model) {
+		WorkStaffBasicInfo workStaffBasicInfo=new WorkStaffBasicInfo();
+		workStaffBasicInfo.setAchiveId(UserUtils.getBasicInfo().getId());
+		workStaffBasicInfo = workStaffBasicInfoService.getAchive(workStaffBasicInfo);
+		workStaffBasicInfo.setAchiveId(workStaffBasicInfo.getId());
+
+		List<Role> roleList = Lists.newArrayList();
+		List<String> roleNameList = Lists.newArrayList();
+		List<String> roleIdList = Lists.newArrayList();
+		List<String> roleIdByUserIdList = roleService.getRoleIdByUserIdList(workStaffBasicInfo.getUserId());
+		for (String roleId : roleIdByUserIdList) {
+			Role role = roleService.get(roleId);
+			roleList.add(role);
+			roleNameList.add(role.getName());
+			roleIdList.add(role.getId());
+		}
+		String roleNameStr = StringUtils.join(roleNameList, ",");
+		String roleIdStr = StringUtils.join(roleIdList, ",");
+
+		workStaffBasicInfo.setRoleId(roleIdStr);
+		workStaffBasicInfo.setRoleName(roleNameStr);
+
+		if(StringUtils.isNotBlank(workStaffBasicInfo.getId())){
+			workStaffBasicInfoService.queryDetails(workStaffBasicInfo);
+		}
+		model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
+		return "modules/workstaff/workStaffBasicCertificateModify";
+	}
+
+
+
+	/**
+	 * 保存员工信息
+	 */
+	@RequestMapping(value = "saveAchiveCertificateModify")
+	public String saveAchiveCertificateModify(WorkStaffBasicInfo workStaffBasicInfo, Model model, RedirectAttributes redirectAttributes,HttpServletRequest request) throws Exception{
+		if (!beanValidator(model, workStaffBasicInfo)){
+			return form(workStaffBasicInfo, model,false);
+		}
+		if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && ("home".equals(workStaffBasicInfo.getHome()) || "notifyList".equals(workStaffBasicInfo.getHome()))) {
+			WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+			workProjectNotify.setNotifyId(workStaffBasicInfo.getId());
+			workProjectNotifyService.readByNotifyId(workProjectNotify);
+		}
+		workStaffBasicInfoService.completeCertificateApply(workStaffBasicInfo.getId());
+		workStaffBasicInfoService.saveLog(workStaffBasicInfo);
+		addMessage(redirectAttributes, "申请员工档案信息成功");
+		if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/home/?repage";
+		}else if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "notifyList".equals(workStaffBasicInfo.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+		}
+		return "redirect:"+Global.getAdminPath()+"/sys/user/info?repage";
+	}
+
 	@RequestMapping(value = "applyEditDirectly")
 	public String applyEditDirectly(Model model) {
 		WorkStaffBasicInfo workStaffBasicInfo=new WorkStaffBasicInfo();
@@ -800,6 +858,7 @@ public class WorkStaffBasicInfoController extends BaseController {
 		if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())){
 			WorkProjectNotify workProjectNotify = new WorkProjectNotify();
 			workProjectNotify.setNotifyId(workStaffBasicInfo.getId());
+			workProjectNotify.setType("69");
 			workProjectNotifyService.readByNotifyId(workProjectNotify);
 		}
 		if (workStaffBasicInfo.getPictureFile() == null || workStaffBasicInfo.getPictureFile().getSize() < 0) {
@@ -836,6 +895,31 @@ public class WorkStaffBasicInfoController extends BaseController {
 	}
 
 	/**
+	 * 保存员工信息
+	 */
+	@RequestMapping(value = "saveAchiveModifyDiretcly")
+	public String saveAchiveModifyDiretcly(WorkStaffBasicInfo workStaffBasicInfo, Model model, RedirectAttributes redirectAttributes,HttpServletRequest request) throws Exception{
+		if (!beanValidator(model, workStaffBasicInfo)){
+			return form(workStaffBasicInfo, model,false);
+		}
+		if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && ("home".equals(workStaffBasicInfo.getHome()) || "notifyList".equals(workStaffBasicInfo.getHome()))) {
+			WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+			workProjectNotify.setNotifyId(workStaffBasicInfo.getId());
+			workProjectNotify.setType("186");
+			workProjectNotifyService.readByNotifyId(workProjectNotify);
+		}
+		workStaffBasicInfoService.completeCertificateApply(workStaffBasicInfo.getId());
+		workStaffBasicInfoService.saveLog(workStaffBasicInfo);
+		addMessage(redirectAttributes, "申请执业资格证书信息成功");
+		if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/home/?repage";
+		}else if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "notifyList".equals(workStaffBasicInfo.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+		}
+		return "redirect:"+Global.getAdminPath()+"/sys/user/info?repage";
+	}
+
+	/**
 	 * 我的信息-直接修改员工信息
 	 */
 	@RequestMapping(value = "saveAchiveModifyDirectly")
@@ -907,16 +991,50 @@ public class WorkStaffBasicInfoController extends BaseController {
 	}
 	@RequestMapping("getApply")
 	@ResponseBody
-	public boolean getApply() throws ParseException {
+	public Map<String,Object> getApply() throws ParseException {
+		Map<String, Object> map = new HashMap<>();
 		boolean falt=false;
 		WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
 		workStaffAchivesLog.setStaffId(UserUtils.getBasicInfo().getId());
 		workStaffAchivesLog.setState("1");
 		List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(workStaffAchivesLog);
+
+		List<User> auditorList = UserUtils.getByRoleActivityEnname("rlzy", 3, UserUtils.getSelectOffice().getId(), "", UserUtils.getUser());
+		List auditorNameList = auditorList.stream().map(User::getName).collect(Collectors.toList());
+		String joinedNames = "";
+		if (!auditorNameList.isEmpty()) {
+			joinedNames = String.join(",", auditorNameList);
+		}
 		if(logs!=null&&logs.size()>0){
 			falt=true;
 		}
-		return  falt;
+		map.put("auditorName", joinedNames);
+		map.put("success", falt);
+		return  map;
+	}
+	@RequestMapping("getApplyCertificate")
+	@ResponseBody
+	public Map<String,Object> getApplyCertificate() throws ParseException {
+		Map<String, Object> map = new HashMap<>();
+		boolean falt=false;
+		WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
+		workStaffAchivesLog.setStaffId(UserUtils.getBasicInfo().getId());
+		workStaffAchivesLog.setState("1");
+		workStaffAchivesLog.setModule("执业资格证书");
+		List<WorkStaffAchivesLog> logs=workStaffAchivesLogService.findList(workStaffAchivesLog);
+
+		List<User> auditorList = UserUtils.getByRoleActivityEnname("ryzzgly", 3, UserUtils.getSelectOffice().getId(), "", UserUtils.getUser());
+		List auditorNameList = auditorList.stream().map(User::getName).collect(Collectors.toList());
+		String joinedNames = "";
+		if (!auditorNameList.isEmpty()) {
+			joinedNames = String.join(",", auditorNameList);
+		}
+		if(logs!=null&&logs.size()>0){
+			falt=true;
+		}
+		map.put("auditorName", joinedNames);
+		map.put("success", falt);
+		return  map;
 	}
 	/**
 	 * 保存员工信息
@@ -942,14 +1060,55 @@ public class WorkStaffBasicInfoController extends BaseController {
 		if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())){
 			WorkProjectNotify workProjectNotify = new WorkProjectNotify();
 			workProjectNotify.setNotifyId(workStaffBasicInfo.getId());
+			workProjectNotify.setType("86");
 			workProjectNotifyService.readByNotifyId(workProjectNotify);
 		}
 		workStaffBasicInfoService.complete(workStaffBasicInfo.getId());
+		if(null != workStaffBasicInfo.getAct() && StringUtils.isNotBlank(workStaffBasicInfo.getAct().getComment())){
+			workStaffBasicInfoService.updateActComment(workStaffBasicInfo);
+		}
 		workStaffAchivesLogDao.deleteBack(workStaffBasicInfo.getId());
 		addMessage(redirectAttributes, "驳回成功");
 		return "redirect:" + Global.getAdminPath() + "/home/?repage";
 	}
 
+	/**
+	 * 保存员工信息
+	 */
+	@RequestMapping(value = "passDirectly")
+	public String passDirectly(WorkStaffBasicInfo workStaffBasicInfo, Model model, RedirectAttributes redirectAttributes,HttpServletRequest request) throws Exception{
+		if (!beanValidator(model, workStaffBasicInfo)){
+			return form(workStaffBasicInfo, model,false);
+		}
+		WorkStaffBasicInfo basicInfo = workStaffBasicInfoService.getBasicInfoByAchiveId(workStaffBasicInfo.getId());
+		WorkStaffBasicInfo select = new WorkStaffBasicInfo();
+		select.setAchiveId(workStaffBasicInfo.getId());
+		WorkStaffBasicInfo t = workStaffBasicInfoService.getAchive(select);//从数据库取出记录的值
+		MyBeanUtils.copyBeanNotNull2Bean(workStaffBasicInfo, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+		workStaffBasicInfoService.saveAchiveDirectlyApply(t, request);//保存
+		t.setId(basicInfo.getId());
+		workStaffBasicInfoService.save(t);
+		addMessage(redirectAttributes, "保存员工档案信息成功");
+		return "redirect:" + Global.getAdminPath() + "/home/?repage";
+	}
+
+	@RequestMapping(value = "backDirectly")
+	public String backDirectly(WorkStaffBasicInfo workStaffBasicInfo, Model model, RedirectAttributes redirectAttributes,HttpServletRequest request) throws Exception{
+		if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())){
+			WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+			workProjectNotify.setNotifyId(workStaffBasicInfo.getId());
+			workProjectNotify.setType("186");
+			workProjectNotifyService.readByNotifyId(workProjectNotify);
+		}
+		workStaffBasicInfoService.completeDirectly(workStaffBasicInfo.getId());
+		if(null != workStaffBasicInfo.getAct() && StringUtils.isNotBlank(workStaffBasicInfo.getAct().getComment())){
+			workStaffBasicInfoService.updateActComment(workStaffBasicInfo);
+		}
+		workStaffAchivesLogDao.deleteDirectlyBack("执业资格证书",workStaffBasicInfo.getId());
+		addMessage(redirectAttributes, "驳成功");
+		return "redirect:" + Global.getAdminPath() + "/home/?repage";
+	}
+
     /**
      * 查看导入客户管理数据信息
      */

+ 2 - 0
src/main/java/com/jeeplus/modules/workstaffachiveslog/dao/WorkStaffAchivesLogDao.java

@@ -20,5 +20,7 @@ import java.util.List;
 public interface WorkStaffAchivesLogDao extends CrudDao<WorkStaffAchivesLog> {
     List<WorkStaffAchivesLog> findSonId(WorkStaffAchivesLog workStaffAchivesLog);
 	int updateState(@Param("staffId") String staffId, @Param("applyer") String applyer, @Param("applyDate") Date applyDate);
+	int updateDirectlyState(@Param("module") String module, @Param("staffId") String staffId, @Param("applyer") String applyer, @Param("applyDate") Date applyDate);
     int deleteBack(@Param("staffId") String staffId);
+    int deleteDirectlyBack(@Param("module") String module, @Param("staffId") String staffId);
 }

+ 15 - 5
src/main/resources/mappings/modules/workprojectnotify/WorkProjectNotifyDao.xml

@@ -663,14 +663,24 @@
 									   update_by = #{updateBy.id},
 									   update_date = #{updateDate},
 									   status = #{status}
-		WHERE notify_id = #{notifyId} AND status != '1'
+		<where>
+			notify_id = #{notifyId} AND status != '1'
+			<if test="type != null and type != ''">
+				and type = #{type}
+			</if>
+		</where>
 	</update>
 	<update id="updateNewReadStateByNotifyId">
 		UPDATE work_project_notify SET
-									   update_by = #{updateBy.id},
-									   update_date = #{updateDate},
-									   status = #{status}
-		WHERE notify_id = #{notifyId} AND status != '1' and notify_user = #{auditor}
+		   update_by = #{updateBy.id},
+		   update_date = #{updateDate},
+		   status = #{status}
+	   <where>
+		   notify_id = #{notifyId} AND status != '1' and notify_user = #{auditor}
+		   <if test="title != null and title != ''">
+			   and type = #{type}
+		   </if>
+	   </where>
 	</update>
 
 	<update id="updateReadStateByUserAndTitle">

+ 2 - 1
src/main/resources/mappings/modules/workstaff/WorkStaffAchivesDao.xml

@@ -59,7 +59,8 @@
 		a.qq_id AS "qqId",
 		a.try_out_job AS "tryOutJob",
 		a.trial_period AS "trialPeriod",
-		a.individual_resume AS "individualResume"
+		a.individual_resume AS "individualResume",
+		a.act_comment AS "act.comment"
 	</sql>
 	
 	<sql id="workStaffBasicInfoJoins">

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

@@ -766,4 +766,11 @@
 	</update>
 
 
+	<update id="updateActComment">
+		update work_staff_achives
+		set act_comment = #{act.comment}
+		where id = #{id}
+	</update>
+
+
 </mapper>

+ 182 - 0
src/main/resources/mappings/modules/workstaff/WorkStaffLaborContractDao.xml

@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.workstaff.dao.WorkStaffLaborContractDao">
+    
+	<sql id="workStaffCertificateColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.staff_id AS "staffId",
+		a.contract_type AS "contractType",
+		a.contract_num AS "contractNum",
+		a.contract_limit AS "contractLimit",
+		a.contract_start_time AS "contractStartTime",
+		a.contract_end_time AS "contractEndTime",
+		a.try_end_time AS "tryEndTime",
+		a.transact_time AS "transactTime",
+		a.file_path AS "filePath",
+		a.file_name AS "fileName"
+	</sql>
+	
+	<sql id="workStaffCertificateJoins">
+	</sql>
+	
+    
+	<select id="get" resultType="WorkStaffLaborContract" >
+		SELECT 
+			<include refid="workStaffCertificateColumns"/>
+		FROM work_staff_labor_contract a
+		<include refid="workStaffCertificateJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="WorkStaffLaborContract" >
+		SELECT 
+			<include refid="workStaffCertificateColumns"/>
+		FROM work_staff_labor_contract a
+		<include refid="workStaffCertificateJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="contractType != null and contractType != ''">
+				AND a.contract_type LIKE
+					<if test="dbName == 'oracle'">'%'||#{contractType}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{contractType}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{contractType},'%')</if>
+			</if>
+			<if test="contractLimit != null and contractLimit != ''">
+				AND a.contract_limit LIKE
+					<if test="dbName == 'oracle'">'%'||#{contractLimit}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{contractLimit}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{contractLimit},'%')</if>
+			</if>
+            <if test="staffId !=null and staffId !=''">
+                AND a.staff_id = #{staffId}
+            </if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="WorkStaffLaborContract" >
+		SELECT 
+			<include refid="workStaffCertificateColumns"/>
+		FROM work_staff_labor_contract a
+		<include refid="workStaffCertificateJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert">
+		INSERT INTO work_staff_labor_contract(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			staff_id,
+
+			contract_type,
+			contract_num,
+			contract_limit,
+			contract_start_time,
+			contract_end_time,
+			try_end_time,
+			transact_time,
+			file_path,
+			file_name
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{staffId},
+			#{contractType},
+			#{contractNum},
+			#{contractLimit},
+			#{contractStartTime},
+			#{contractEndTime},
+			#{tryEndTime},
+			#{transactTime},
+			#{filePath},
+			#{fileName}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE work_staff_labor_contract SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			staff_id = #{staffId},
+			contract_type = #{contractType},
+			contract_num = #{contractNum},
+			contract_limit = #{contractLimit},
+			contract_start_time = #{contractStartTime},
+			contract_end_time = #{contractEndTime},
+			try_end_time = #{tryEndTime},
+			transact_time = #{transactTime},
+			file_path = #{filePath},
+			file_name = #{fileName}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM work_staff_labor_contract
+		WHERE id = #{id}
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE work_staff_labor_contract SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="WorkStaffLaborContract" statementType="STATEMENT">
+		select * FROM work_staff_labor_contract  where ${propertyName} = '${value}'
+	</select>
+	<update id="updateFalt" parameterType="java.lang.String">
+		UPDATE work_staff_labor_contract SET
+			del_flag = '1'
+		WHERE id in (select l.son_id from work_staff_achives_log l
+		where l.staff_id=#{id} and l.module='劳动合同' and l.type='删除')
+	</update>
+
+	<select id="getByUserId" resultType="WorkStaffLaborContract" >
+		SELECT
+		<include refid="workStaffCertificateColumns"/>
+		FROM work_staff_labor_contract a
+		<include refid="workStaffCertificateJoins"/>
+		<where>
+			a.del_flag = 0 and a.staff_id = #{userId}
+		</where>
+	</select>
+</mapper>

+ 12 - 0
src/main/resources/mappings/modules/workstaffachiveslog/WorkStaffAchivesLogDao.xml

@@ -180,6 +180,14 @@
 			state = '2'
 		WHERE staff_id = #{staffId} and state='1'
 	</update>
+
+	<update id="updateDirectlyState">
+		UPDATE work_staff_achives_log SET
+			applyer = #{applyer},
+			apply_date = #{applyDate},
+			state = '2'
+		WHERE staff_id = #{staffId} and module=#{module} and state='1'
+	</update>
 	<!--物理删除-->
 	<update id="delete">
 		DELETE FROM work_staff_achives_log
@@ -189,6 +197,10 @@
 		DELETE FROM work_staff_achives_log
 		WHERE staff_id = #{staffId} and state='1'
 	</update>
+	<update id="deleteDirectlyBack">
+		DELETE FROM work_staff_achives_log
+		WHERE staff_id = #{staffId} and module=#{module} and state='1'
+	</update>
 	<!--逻辑删除-->
 	<update id="deleteByLogic">
 		UPDATE work_staff_achives_log SET 

+ 10 - 0
src/main/webapp/static/oss/ossupload.js

@@ -3436,6 +3436,16 @@ function invoiceReimbursementMultitests(ossClient, storeAs, file, attachmentId,
     });
 }
 
+function downloadFile(ctx, filePath, fileName) {
+    var url = ctx + "/workfullmanage/workFullManage/downLoadAttachOnFileName?file=" + encodeURIComponent(filePath) + "&fileName=" + encodeURIComponent(fileName);
+    var a = document.createElement('a');
+    a.href = url;
+    a.download = fileName; // 直接赋值
+    document.body.appendChild(a);
+    a.click();
+    document.body.removeChild(a);
+}
+
 
 
 

+ 3 - 3
src/main/webapp/webpage/include/head.jsp

@@ -93,13 +93,13 @@
             document.write('<script type="text/javascript" src="${ctxStatic}/oss/lib/crypto1/hmac/hmac.js"><\/script>');
             document.write('<script type="text/javascript" src="${ctxStatic}/oss/lib/crypto1/sha1/sha1.js"><\/script>');
             document.write('<script type="text/javascript" src="${ctxStatic}/oss/lib/base64.js"><\/script>');
-            document.write('<script type="text/javascript" src="${ctxStatic}/oss/ie-ossupload.js"><\/script>');
+            document.write('<script type="text/javascript" src="${ctxStatic}/oss/ie-ossupload.js?18"><\/script>');
         }
         else
         {
              document.write('<script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"><\/script>');
             document.write('<script src="${ctxStatic}/bos/node_modules/@baiducloud/sdk/dist/baidubce-sdk.bundle.min.js"><\/script>');
-            document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?17"><\/script>');
+            document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?18"><\/script>');
             /*document.write('<script type="text/javascript" src="${ctxStatic}/bos/bosupload.js"><\/script>');*/
         }
     }
@@ -107,7 +107,7 @@
     {
          document.write('<script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"><\/script>');
         document.write('<script src="${ctxStatic}/bos/node_modules/@baiducloud/sdk/dist/baidubce-sdk.bundle.min.js"><\/script>');
-        document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?17"><\/script>');
+        document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?18"><\/script>');
         /*document.write('<script type="text/javascript" src="${ctxStatic}/bos/bosupload.js"><\/script>');*/
     }
 

+ 1 - 1
src/main/webapp/webpage/include/ossTools.jsp

@@ -9,4 +9,4 @@
 <script type="text/javascript" src="${ctxStatic}/oss/lib/plupload-2.3.6/plupload-2.3.6/js/jquery.plupload.queue/jquery.plupload.queue.js"></script>
 <script type="text/javascript" src="${ctxStatic}/oss/lib/plupload-2.3.6/plupload-2.3.6/js/plupload.dev.js"></script>
 <script type="text/javascript" src="${ctxStatic}/oss/upload.js"></script>
-<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?17"></script>
+<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?18"></script>

+ 1 - 1
src/main/webapp/webpage/modules/projectcontentinfo/achievementFileDataForm.jsp

@@ -6,7 +6,7 @@
 	<meta name="decorator" content="default"/>
 	<link href="${ctxStatic}/bootstrap-select-1.12.4/css/bootstrap-select.min.css" rel="stylesheet" />
 	<script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
-	<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?17"></script>
+	<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?18"></script>
 	<style>
 		label.error{
 			top:40px;

+ 1 - 1
src/main/webapp/webpage/modules/projectcontentinfo/basedDataForm.jsp

@@ -6,7 +6,7 @@
 	<meta name="decorator" content="default"/>
 	<link href="${ctxStatic}/bootstrap-select-1.12.4/css/bootstrap-select.min.css" rel="stylesheet" />
 	<script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
-	<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?17"></script>
+	<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?18"></script>
 	<style>
 		label.error{
 			top:40px;

+ 3 - 0
src/main/webapp/webpage/modules/sys/sysHome.jsp

@@ -1105,6 +1105,9 @@
         <c:when test="${workProjectNotify.type eq 86}">
         xml = "<a href=\"javascript:void(0)\" onclick=\"openDialogre('档案信息修改申请', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
         </c:when>
+        <c:when test="${workProjectNotify.type eq 186}">
+        xml = "<a href=\"javascript:void(0)\" onclick=\"openDialogre('执业资格证信息修改申请', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
+        </c:when>
         <c:when test="${workProjectNotify.type eq 18}">
         xml = "<a href=\"javascript:void(0)\" onclick=\"openDialogre('企业申请', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
         </c:when>

+ 352 - 63
src/main/webapp/webpage/modules/sys/userInfo.jsp

@@ -159,8 +159,65 @@
                 type:'post',
                 url:'${ctx}/workstaff/workStaffBasicInfo/getApply',
                 success:function(data) {
-                    if(data){
-                        parent.layer.msg("修改申请正在审核中!", {icon: 5});
+                    if(data.success){
+                        var message = "修改申请正在审核中!"
+                        if(data.auditorName){
+                            message = "修改申请正在审核中!如需要请联系:" + data.auditorName
+                        }
+                        parent.layer.msg(message, {icon: 5});
+                        return false;
+
+                    }else{
+                        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                            width = 'auto';
+                            height = 'auto';
+                        } else {//如果是PC端,根据用户设置的width和height显示。
+
+                        }
+                        top.layer.open({
+                            type: 2,
+                            area: [width, height],
+                            title: title,
+                            maxmin: true, //开启最大化最小化按钮
+                            content: url,
+                            btn: ["提交","关闭"],
+                            btn1: function(index, layero){
+                                var body = top.layer.getChildFrame('body', index);
+                                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                                var inputForm = body.find('#inputForm');
+                                var top_iframe;
+                                if(target){
+                                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                                }else{
+                                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                                }
+                                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                                if(iframeWin.contentWindow.doSubmit(index) ){
+                                    // top.layer.close(index);//关闭对话框。
+                                    setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                                }
+                                return false;
+                            },
+                            btn2: function (index) {
+
+                            }
+                        });
+                    }
+                }
+            });
+        }
+        function openDialogCertificate(title,url,width,height,target) {
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstaff/workStaffBasicInfo/getApplyCertificate',
+                success:function(data) {
+                    if(data.success){
+                        var message = "修改申请正在审核中!"
+                        if(data.auditorName){
+                            message = "修改申请正在审核中!如需要请联系:" + data.auditorName
+                        }
+                        parent.layer.msg(message, {icon: 5});
                         return false;
 
                     }else{
@@ -441,6 +498,8 @@
                                     <ul class="dropdown-menu dropdown-user">
                                         <li><a id="userEdit" data-toggle="modal" onclick="openDialog('修改档案信息', '${ctx}/workstaff/workStaffBasicInfo/applyEdit','95%','95%')" data-target="#register">申请修改</a>
                                         </li>
+                                        <li><a id="userEditDirectly" data-toggle="modal" onclick="openDialogCertificate('修改执业资格证信息', '${ctx}/workstaff/workStaffBasicInfo/applyCertificateEdit','95%','95%')" data-target="#register">执业资格证修改</a>
+                                        </li>
                                         <%--<li><a id="userEditDirectly" data-toggle="modal" onclick="openDialog2('修改档案信息', '${ctx}/workstaff/workStaffBasicInfo/applyEditDirectly','95%','95%')" data-target="#register">申请修改</a>
                                         </li>--%>
                                     </ul>
@@ -716,10 +775,54 @@
                                                         <fmt:formatDate value="${education.endDate}" pattern="yyyy-MM-dd"/>
                                                     </td>
                                                     <td class="text-left op-td">
-                                                        <c:if test="${not empty education.eduPhotoStr}"><img src="${education.eduPhotoStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.eduPhotoStr}','90%','90%')" alt=""></c:if>
+                                                        <c:if test="${not empty education.eduPhotoStr}">
+                                                            <%-- 安全处理带签名链接中的 & 符号 --%>
+                                                            <c:set var="safePhotoUrl" value="${fn:replace(education.eduPhotoStr, '&', '&amp;')}" />
+
+                                                            <%-- 图片展示 --%>
+                                                            <img src="${safePhotoUrl}" width="24" height="24"
+                                                                 style="cursor:pointer; vertical-align:middle;"
+                                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safePhotoUrl}','90%','90%')"
+                                                                 alt="图片预览" title="点击预览图片" />
+
+                                                            <%-- 提取扩展名 --%>
+                                                            <c:set var="extArr" value="${fn:split(education.eduPhoto, '.')}" />
+                                                            <c:set var="ext" value="${fn:toLowerCase(extArr[fn:length(extArr) - 1])}" />
+                                                            <c:set var="downloadFileName" value="学历图片.${ext}" />
+                                                            <%-- 下载按钮 --%>
+                                                            <a href="javascript:void(0);"
+                                                               title="下载图片"
+                                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                                               onclick="downloadFile('${ctx}', '${education.eduPhoto}', '${downloadFileName}')">
+                                                                <i class="fa fa-download"></i>
+                                                            </a>
+                                                        </c:if>
                                                     </td>
+
                                                     <td class="text-left op-td">
-                                                        <c:if test="${not empty education.degreePhotoStr}"><img src="${education.degreePhotoStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.degreePhotoStr}','90%','90%')" alt=""></c:if>
+                                                        <c:if test="${not empty education.degreePhotoStr}">
+                                                            <%-- 安全处理带签名链接中的 & 符号 --%>
+                                                            <c:set var="safeDegreeUrl" value="${fn:replace(education.degreePhotoStr, '&', '&amp;')}" />
+
+                                                            <%-- 图片展示 --%>
+                                                            <img src="${safeDegreeUrl}" width="24" height="24"
+                                                                 style="cursor:pointer; vertical-align:middle;"
+                                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeDegreeUrl}','90%','90%')"
+                                                                 alt="图片预览" title="点击预览图片" />
+
+                                                            <%-- 提取扩展名 --%>
+                                                            <c:set var="degreeExtArr" value="${fn:split(education.degreePhoto, '.')}" />
+                                                            <c:set var="degreeExt" value="${fn:toLowerCase(degreeExtArr[fn:length(degreeExtArr) - 1])}" />
+                                                            <c:set var="degreeDownloadFileName" value="学位证书.${degreeExt}" />
+
+                                                            <%-- 下载按钮 --%>
+                                                            <a href="javascript:void(0);"
+                                                               title="下载学位证书"
+                                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                                               onclick="downloadFile('${ctx}', '${education.degreePhoto}', '${degreeDownloadFileName}')">
+                                                                <i class="fa fa-download"></i>
+                                                            </a>
+                                                        </c:if>
                                                     </td>
                                                 </tr>
                                             </c:forEach>
@@ -727,61 +830,7 @@
                                         </table>
                                     </div>
                                 </div>
-                                <div class="form-group layui-row">
-                                    <div class="form-group-label"><h2>劳动关系</h2></div>
-                                    <div class="layui-item layui-col-xs12 form-table-container">
-                                        <table id="labourTable" class="table table-bordered table-condensed details">
-                                            <thead>
-                                            <tr>
-                                                <th width="12%">合同类型</th>
-                                                <th width="12%">合同编号</th>
-                                                <th width="12%">合同期限</th>
-                                                <th width="11%">合同起始日期</th>
-                                                <th width="11%">合同终止日期</th>
-                                                <th width="11%">试用期结束日期</th>
-                                                <th width="11%">办理日期</th>
-                                                <th width="20%">文件</th>
-                                            </tr>
-                                            </thead>
-                                            <tbody id="labourList">
-                                            <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
-                                                <tr>
-                                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
-                                                    <td>${buyDetails.contractNum}</td>
-                                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
-                                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
-                                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
-                                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
-                                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
-                                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
 
-                                                    <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-                                                                <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:forEach>
-                                                </tr>
-                                            </c:forEach>
-                                            </tbody>
-                                        </table>
-                                    </div>
-                                </div>
                                 <div class="form-group layui-row">
                                     <div class="form-group-label"><h2>外语语种</h2></div>
                                     <div class="layui-item layui-col-xs12 form-table-container">
@@ -811,7 +860,45 @@
                                                         <fmt:formatDate value="${language.certifDate}" pattern="yyyy-MM-dd"/>
                                                     </td>
                                                     <td>
-                                                        <c:if test="${not empty language.filePathStr}"><img src="${language.filePathStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${language.filePathStr}','90%','90%')" alt=""></c:if>
+                                                        <c:if test="${not empty language.filePathStr}">
+                                                            <%-- 安全处理URL中的 & --%>
+                                                            <c:set var="safeFilePath" value="${fn:replace(language.filePathStr, '&', '&amp;')}" />
+
+                                                            <%-- 先从 language.fileName 里提取扩展名 --%>
+                                                            <c:set var="fileNameArr" value="${fn:split(language.fileName, '.')}" />
+                                                            <c:set var="fileExt" value="${fn:toLowerCase(fileNameArr[fn:length(fileNameArr) - 1])}" />
+
+                                                            <%-- 如果没有后缀,尝试从 filePathStr 里提取 --%>
+                                                            <c:choose>
+                                                                <c:when test="${fn:contains(language.fileName, '.')}">
+                                                                    <%-- 已经有后缀 --%>
+                                                                    <c:set var="downloadFileName" value="${language.fileName}" />
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <%-- 从路径最后部分提取后缀 --%>
+                                                                    <c:set var="pathParts" value="${fn:split(language.filePathStr, '/')}"/>
+                                                                    <c:set var="lastPart" value="${pathParts[fn:length(pathParts) - 1]}" />
+                                                                    <c:set var="lastPartArr" value="${fn:split(lastPart, '.')}" />
+                                                                    <c:set var="pathExt" value="${fn:toLowerCase(lastPartArr[fn:length(lastPartArr) - 1])}" />
+                                                                    <c:set var="downloadFileName" value="${language.fileName}.${pathExt}" />
+                                                                </c:otherwise>
+                                                            </c:choose>
+
+                                                            <%-- 显示图片缩略图 --%>
+                                                            <img src="${safeFilePath}" width="24" height="24"
+                                                                 style="cursor:pointer; vertical-align:middle;"
+                                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeFilePath}','90%','90%')"
+                                                                 alt="文件预览" title="点击预览" />
+
+                                                            <%-- 下载按钮 --%>
+                                                            <a href="javascript:void(0);"
+                                                               title="下载文件"
+                                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                                               onclick="downloadFile('${ctx}', '${language.filePath}', '${downloadFileName}')">
+                                                                <i class="fa fa-download"></i>
+                                                            </a>
+                                                        </c:if>
+
                                                     </td>
                                                 </tr>
                                             </c:forEach>
@@ -913,7 +1000,45 @@
                                                             ${certificate.issType}
                                                     </td>
                                                     <td >
-                                                        <c:if test="${not empty certificate.filePathStr}"><img src="${certificate.filePathStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${certificate.filePathStr}','90%','90%')" alt=""></c:if>
+                                                        <c:if test="${not empty certificate.filePathStr}">
+                                                            <%-- 安全处理URL中的 & --%>
+                                                            <c:set var="safeFilePath" value="${fn:replace(certificate.filePathStr, '&', '&amp;')}" />
+
+                                                            <%-- 先从 certificate.fileName 里提取扩展名 --%>
+                                                            <c:set var="fileNameArr" value="${fn:split(certificate.fileName, '.')}" />
+                                                            <c:set var="fileExt" value="${fn:toLowerCase(fileNameArr[fn:length(fileNameArr) - 1])}" />
+
+                                                            <%-- 如果没有后缀,尝试从 filePathStr 里提取 --%>
+                                                            <c:choose>
+                                                                <c:when test="${fn:contains(certificate.fileName, '.')}">
+                                                                    <%-- 已经有后缀 --%>
+                                                                    <c:set var="downloadFileName" value="${certificate.fileName}" />
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <%-- 从路径最后部分提取后缀 --%>
+                                                                    <c:set var="pathParts" value="${fn:split(certificate.filePathStr, '/')}"/>
+                                                                    <c:set var="lastPart" value="${pathParts[fn:length(pathParts) - 1]}" />
+                                                                    <c:set var="lastPartArr" value="${fn:split(lastPart, '.')}" />
+                                                                    <c:set var="pathExt" value="${fn:toLowerCase(lastPartArr[fn:length(lastPartArr) - 1])}" />
+                                                                    <c:set var="downloadFileName" value="${certificate.fileName}.${pathExt}" />
+                                                                </c:otherwise>
+                                                            </c:choose>
+
+                                                            <%-- 显示图片缩略图 --%>
+                                                            <img src="${safeFilePath}" width="24" height="24"
+                                                                 style="cursor:pointer; vertical-align:middle;"
+                                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeFilePath}','90%','90%')"
+                                                                 alt="文件预览" title="点击预览" />
+
+                                                            <%-- 下载按钮 --%>
+                                                            <a href="javascript:void(0);"
+                                                               title="下载文件"
+                                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                                               onclick="downloadFile('${ctx}', '${certificate.filePath}', '${downloadFileName}')">
+                                                                <i class="fa fa-download"></i>
+                                                            </a>
+                                                        </c:if>
+
                                                     </td>
                                                 </tr>
                                             </c:forEach>
@@ -954,7 +1079,44 @@
                                                             ${title.approvalAuthority}
                                                     </td>
                                                     <td>
-                                                        <c:if test="${not empty title.filePathStr}"><img src="${title.filePathStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${title.filePathStr}','90%','90%')" alt=""></c:if>
+                                                        <c:if test="${not empty title.filePathStr}">
+                                                            <%-- 安全处理URL中的 & --%>
+                                                            <c:set var="safeFilePath" value="${fn:replace(title.filePathStr, '&', '&amp;')}" />
+
+                                                            <%-- 先从 title.fileName 里提取扩展名 --%>
+                                                            <c:set var="fileNameArr" value="${fn:split(title.fileName, '.')}" />
+                                                            <c:set var="fileExt" value="${fn:toLowerCase(fileNameArr[fn:length(fileNameArr) - 1])}" />
+
+                                                            <%-- 如果没有后缀,尝试从 filePathStr 里提取 --%>
+                                                            <c:choose>
+                                                                <c:when test="${fn:contains(title.fileName, '.')}">
+                                                                    <%-- 已经有后缀 --%>
+                                                                    <c:set var="downloadFileName" value="${title.fileName}" />
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <%-- 从路径最后部分提取后缀 --%>
+                                                                    <c:set var="pathParts" value="${fn:split(title.filePathStr, '/')}"/>
+                                                                    <c:set var="lastPart" value="${pathParts[fn:length(pathParts) - 1]}" />
+                                                                    <c:set var="lastPartArr" value="${fn:split(lastPart, '.')}" />
+                                                                    <c:set var="pathExt" value="${fn:toLowerCase(lastPartArr[fn:length(lastPartArr) - 1])}" />
+                                                                    <c:set var="downloadFileName" value="${title.fileName}.${pathExt}" />
+                                                                </c:otherwise>
+                                                            </c:choose>
+
+                                                            <%-- 显示图片缩略图 --%>
+                                                            <img src="${safeFilePath}" width="24" height="24"
+                                                                 style="cursor:pointer; vertical-align:middle;"
+                                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeFilePath}','90%','90%')"
+                                                                 alt="文件预览" title="点击预览" />
+
+                                                            <%-- 下载按钮 --%>
+                                                            <a href="javascript:void(0);"
+                                                               title="下载文件"
+                                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                                               onclick="downloadFile('${ctx}', '${title.filePath}', '${downloadFileName}')">
+                                                                <i class="fa fa-download"></i>
+                                                            </a>
+                                                        </c:if>
                                                     </td>
                                                 </tr>
                                             </c:forEach>
@@ -1045,7 +1207,44 @@
                                                             ${training.certificate}
                                                     </td>
                                                     <td>
-                                                        <c:if test="${not empty training.filePathStr}"><img src="${training.filePathStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${training.filePathStr}','90%','90%')" alt="${training.fileName}"></c:if>
+                                                        <c:if test="${not empty training.filePathStr}">
+                                                            <%-- 安全处理URL中的 & --%>
+                                                            <c:set var="safeFilePath" value="${fn:replace(training.filePathStr, '&', '&amp;')}" />
+
+                                                            <%-- 先从 training.fileName 里提取扩展名 --%>
+                                                            <c:set var="fileNameArr" value="${fn:split(training.fileName, '.')}" />
+                                                            <c:set var="fileExt" value="${fn:toLowerCase(fileNameArr[fn:length(fileNameArr) - 1])}" />
+
+                                                            <%-- 如果没有后缀,尝试从 filePathStr 里提取 --%>
+                                                            <c:choose>
+                                                                <c:when test="${fn:contains(training.fileName, '.')}">
+                                                                    <%-- 已经有后缀 --%>
+                                                                    <c:set var="downloadFileName" value="${training.fileName}" />
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <%-- 从路径最后部分提取后缀 --%>
+                                                                    <c:set var="pathParts" value="${fn:split(training.filePathStr, '/')}"/>
+                                                                    <c:set var="lastPart" value="${pathParts[fn:length(pathParts) - 1]}" />
+                                                                    <c:set var="lastPartArr" value="${fn:split(lastPart, '.')}" />
+                                                                    <c:set var="pathExt" value="${fn:toLowerCase(lastPartArr[fn:length(lastPartArr) - 1])}" />
+                                                                    <c:set var="downloadFileName" value="${training.fileName}.${pathExt}" />
+                                                                </c:otherwise>
+                                                            </c:choose>
+
+                                                            <%-- 显示图片缩略图 --%>
+                                                            <img src="${safeFilePath}" width="24" height="24"
+                                                                 style="cursor:pointer; vertical-align:middle;"
+                                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeFilePath}','90%','90%')"
+                                                                 alt="文件预览" title="点击预览" />
+
+                                                            <%-- 下载按钮 --%>
+                                                            <a href="javascript:void(0);"
+                                                               title="下载文件"
+                                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                                               onclick="downloadFile('${ctx}', '${training.filePath}', '${downloadFileName}')">
+                                                                <i class="fa fa-download"></i>
+                                                            </a>
+                                                        </c:if>
                                                     </td>
                                                     <td>
                                                             ${training.remarks}
@@ -1172,6 +1371,96 @@
                                     </div>
                                 </div>
                                 <div class="form-group layui-row">
+                                    <div class="form-group-label"><h2>劳动合同</h2></div>
+                                    <div class="layui-item layui-col-xs12 form-table-container">
+                                        <table id="labourTable" class="table table-bordered table-condensed details">
+                                            <thead>
+                                            <tr>
+                                                <th width="12%">合同类型</th>
+                                                <th width="12%">合同编号</th>
+                                                <th width="12%">合同期限</th>
+                                                <th width="11%">合同起始日期</th>
+                                                <th width="11%">合同终止日期</th>
+                                                <th width="11%">试用期结束日期</th>
+                                                <th width="11%">办理日期</th>
+                                                <th width="20%">文件</th>
+                                            </tr>
+                                            </thead>
+                                            <tbody id="labourList">
+                                            <c:forEach items="${workStaffBasicInfo.laborContractList}" var="buyDetails" varStatus="status">
+                                                <tr>
+                                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+                                                    <td>${buyDetails.contractNum}</td>
+                                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+                                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+                                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+                                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
+                                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+                                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+                                                    <td class="text-left op-td">
+                                                        <!-- 文件或图片展示区域 -->
+                                                        <span id="laborContractList${varStatus.index}_fileName1">
+                                                            <c:if test="${not empty buyDetails.filePathStr}">
+                                                                <!-- 提取文件名 -->
+                                                                <c:set var="fileNameArr" value="${fn:split(buyDetails.filePath, '/')}" />
+                                                                <c:set var="fileName" value="${fileNameArr[fn:length(fileNameArr) - 1]}" />
+
+                                                                <!-- 提取文件扩展名 -->
+                                                                <c:set var="extArr" value="${fn:split(fileName, '.')}" />
+                                                                <c:set var="ext" value="${fn:toLowerCase(extArr[fn:length(extArr) - 1])}" />
+
+                                                                <!-- 判断是否是图片类型 -->
+                                                                <c:choose>
+                                                                    <c:when test="${ext == 'jpg' || ext == 'jpeg' || ext == 'png' || ext == 'gif' || ext == 'bmp' || ext == 'webp'}">
+                                                                        <!-- 图片预览 -->
+                                                                        <img src="${buyDetails.filePathStr}" width="24" height="24"
+                                                                             style="cursor:pointer; vertical-align:middle;"
+                                                                             onclick="preview('预览','${buyDetails.filePathStr}','90%','90%','1')"
+                                                                             alt="图片预览" title="点击预览图片" />
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(buyDetails.fileName,'pdf')}">
+                                                                                <a class="attention-info" href="javascript:void(0)" style="color: #007bff;" onclick="preview('预览','${buyDetails.filePathStr}','90%','90%','1')">${buyDetails.fileName}</a>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <a class="attention-info" href="javascript:void(0)" style="color: #007bff;" onclick="preview('预览','${buyDetails.filePathStr}','90%','90%')">${buyDetails.fileName}</a>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                        <!-- 普通文件预览(带图标和文件名,文件名超10字符截断) -->
+                                                                        <%--<a href="${buyDetails.filePathStr}" target="_blank" title="${buyDetails.fileName}" style="text-decoration:none;color:#007bff;">
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:length(buyDetails.fileName) > 10}">
+                                                                                    ${fn:substring(buyDetails.fileName, 0, 10)}...
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    ${buyDetails.fileName}
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </a>--%>
+
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:if>
+                                                        </span>
+
+                                                        <!-- 下载按钮 -->
+                                                        <a href="javascript:void(0);"
+                                                           title="下载 ${buyDetails.fileName}"
+                                                           style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                                           onclick="downloadFile('${ctx}', '${buyDetails.filePath}', '${buyDetails.fileName}')">
+                                                            <i class="fa fa-download"></i>
+                                                        </a>
+
+                                                    </td>
+                                                </tr>
+                                            </c:forEach>
+                                            </tbody>
+                                        </table>
+                                    </div>
+                                </div>
+                                <%--<div class="form-group layui-row">
                                     <div class="form-group-label"><h2>电子档案</h2></div>
                                     <div class="layui-item layui-col-xs12 form-table-container">
                                         <table id="recordTable" class="table table-bordered table-condensed details">
@@ -1203,7 +1492,7 @@
                                             </tbody>
                                         </table>
                                     </div>
-                                </div>
+                                </div>--%>
                             </div>
                         </div>
                     </div>

+ 1 - 1
src/main/webapp/webpage/modules/workrelationship/workRelationshipList.jsp

@@ -244,7 +244,7 @@
 				<div class="nav-btns">
 					<%--此处按钮样式包括 nav-btn-add nav-btn-refresh nav-btn-import nav-btn-export nav-btn-query nav-btn-reset--%>
 					<shiro:hasPermission name="workrelationship:workRelationship:add">
-						<button class="nav-btn nav-btn-add" title="劳动关系" onclick="openDialogre('劳动关系管理','${ctx}/workrelationship/workRelationship/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+						<button class="nav-btn nav-btn-add" title="劳动合同" onclick="openDialogre('劳动合同管理','${ctx}/workrelationship/workRelationship/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加劳动合同</button>
 					</shiro:hasPermission>
 
 					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>

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

@@ -247,7 +247,7 @@
                 ,{field:'mobile',align:'center', title: '移动电话', minWidth:100}
                 ,{field:'office',align:'center', title: '经办部门', minWidth:100}
                 ,{field:'role',align:'center', title: '岗位', minWidth:100}
-                ,{field:'highestEducation',align:'center', title: '最高学历', minWidth:100}
+                /*,{field:'highestEducation',align:'center', title: '最高学历', minWidth:100}*/
 
                 // ,{field:'jobGrade',align:'center', title: '职级', minWidth:100}
                 /*,{field:'auditUserName',align:'center', title: '校审人员', minWidth:100

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

@@ -320,7 +320,7 @@
                     <%--</div>--%>
                 <%--</div>--%>
                 <%--<div class="form-group layui-row">--%>
-                    <%--<div class="form-group-label"><h2>劳动关系</h2></div>--%>
+                    <%--<div class="form-group-label"><h2>劳动合同</h2></div>--%>
                     <%--<div class="layui-item layui-col-xs12 form-table-container">--%>
                         <%--<table id="labourTable" class="table table-bordered table-condensed details">--%>
                             <%--<thead>--%>

+ 64 - 63
src/main/webapp/webpage/modules/workstaff/workStaffAchiveInfoForm.jsp

@@ -81,8 +81,8 @@
         function this_upload_show_image(index){
             var obj =$("#this_upload_file_"+index)[0].files[0];
             var fileType = obj.type;
-            if(obj.size>100*1024){
-                layer.msg("请上传100KB内图片格式文件!",{icon:2});
+            if(obj.size>1000*1024){
+                layer.msg("请上传1000KB内图片格式文件!",{icon:2});
                 return false ;
             }
             var url ;
@@ -507,8 +507,8 @@
                             <th width="8%"><span class="require-item">*</span>学历性质</th>
                             <th width="11%"><span class="require-item">*</span>入学日期</th>
                             <th width="11%">毕业日期</th>
-                            <th width="10%">学历证书</th>
-                            <th width="10%">学位证书</th>
+                            <th width="10%">学历证书<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
+                            <th width="10%">学位证书<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             <th width="10%">操作</th>
                         </tr>
                         </thead>
@@ -650,61 +650,7 @@
                     </script>
                 </div>
             </div>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>劳动关系</h2></div>
-                <div class="layui-item layui-col-xs12 form-table-container">
-                    <table id="labourTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                            <th width="12%">合同类型</th>
-                            <th width="12%">合同编号</th>
-                            <th width="12%">合同期限</th>
-                            <th width="11%">合同起始日期</th>
-                            <th width="11%">合同终止日期</th>
-                            <th width="11%">试用期结束日期</th>
-                            <th width="11%">办理日期</th>
-                            <th width="20%">文件</th>
-                        </tr>
-                        </thead>
-                        <tbody id="labourList">
-                        <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
-                            <tr>
-                                <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
-                                <td>${buyDetails.contractNum}</td>
-                                <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
-                                <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
-                                <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
-                                <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
-                                <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
-                                    <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
 
-                                <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                    <c:choose>
-                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-                                            <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <c:choose>
-                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
-                                </c:forEach>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>外语语种</h2></div>
                 <div class="layui-item nav-btns">
@@ -719,7 +665,7 @@
                             <th width="15%"><span class="require-item">*</span>熟练程度</th>
                             <th width="20%">证书名称</th>
                             <th width="20%">获证日期</th>
-                            <th width="15%">文件</th>
+                            <th width="15%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             <th width="10%">操作</th>
                         </tr>
                         </thead>
@@ -951,7 +897,7 @@
                             <th width="7%">专业</th>
                             <th width="6%">等级</th>
                             <th width="6%">取得方式</th>
-                            <th width="10%">文件</th>
+                            <th width="10%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             <th width="10%">操作</th>
                         </tr>
                         </thead>
@@ -1103,7 +1049,7 @@
                             <th width="15%"><span class="require-item">*</span>取得日期</th>
                             <th width="15%"><span class="require-item">*</span>取得途径</th>
                             <th width="15%"><span class="require-item">*</span>审批单位</th>
-                            <th width="15%">文件</th>
+                            <th width="15%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             <th width="10%">操作</th>
                         </tr>
                         </thead>
@@ -1304,7 +1250,7 @@
                             <th width="9%"><span class="require-item">*</span>培训类型</th>
                             <th width="5%">学时</th>
                             <th width="10%"><span class="require-item">*</span>所获证书</th>
-                            <th width="10%">文件</th>
+                            <th width="10%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             <th width="7%">备注</th>
                             <th width="10%">操作</th>
                         </tr>
@@ -1731,6 +1677,61 @@
                 </div>
             </div>
             <div class="form-group layui-row">
+                <div class="form-group-label"><h2>劳动合同</h2></div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="labourTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th width="12%">合同类型</th>
+                            <th width="12%">合同编号</th>
+                            <th width="12%">合同期限</th>
+                            <th width="11%">合同起始日期</th>
+                            <th width="11%">合同终止日期</th>
+                            <th width="11%">试用期结束日期</th>
+                            <th width="11%">办理日期</th>
+                            <th width="20%">文件</th>
+                        </tr>
+                        </thead>
+                        <tbody id="labourList">
+                        <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
+                            <tr>
+                                <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+                                <td>${buyDetails.contractNum}</td>
+                                <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+                                <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+                                <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+                                <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
+                                <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+                                    <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+                                <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+                                    <c:choose>
+                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                            <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:otherwise>
+                                    </c:choose>
+                                </c:forEach>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <%--<div class="form-group layui-row">
                 <div class="form-group-label"><h2>电子档案</h2></div>
                 <div class="layui-item nav-btns">
                     <a href=javascript:void(0); onclick="addRowRecord('#recordList',recordIdx,recordTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
@@ -1814,7 +1815,7 @@
                         }
                     </script>
                 </div>
-            </div>
+            </div>--%>
         </form:form>
     </div>
 </div>

+ 58 - 57
src/main/webapp/webpage/modules/workstaff/workStaffAchiveInfoForms.jsp

@@ -81,8 +81,8 @@
         function this_upload_show_image(index){
             var obj =$("#this_upload_file_"+index)[0].files[0];
             var fileType = obj.type;
-            if(obj.size>100*1024){
-                layer.msg("请上传100KB内图片格式文件!",{icon:2});
+            if(obj.size>1000*1024){
+                layer.msg("请上传1000KB内图片格式文件!",{icon:2});
                 return false ;
             }
             var url ;
@@ -650,61 +650,7 @@
                     </script>
                 </div>
             </div>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>劳动关系</h2></div>
-                <div class="layui-item layui-col-xs12 form-table-container">
-                    <table id="labourTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                            <th width="12%">合同类型</th>
-                            <th width="12%">合同编号</th>
-                            <th width="12%">合同期限</th>
-                            <th width="11%">合同起始日期</th>
-                            <th width="11%">合同终止日期</th>
-                            <th width="11%">试用期结束日期</th>
-                            <th width="11%">办理日期</th>
-                            <th width="20%">文件</th>
-                        </tr>
-                        </thead>
-                        <tbody id="labourList">
-                        <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
-                            <tr>
-                                <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
-                                <td>${buyDetails.contractNum}</td>
-                                <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
-                                <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
-                                <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
-                                <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
-                                <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
-                                    <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
 
-                                <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                    <c:choose>
-                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-                                            <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <c:choose>
-                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
-                                </c:forEach>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>外语语种</h2></div>
                 <div class="layui-item nav-btns">
@@ -1731,6 +1677,61 @@
                 </div>
             </div>
             <div class="form-group layui-row">
+                <div class="form-group-label"><h2>劳动合同</h2></div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="labourTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th width="12%">合同类型</th>
+                            <th width="12%">合同编号</th>
+                            <th width="12%">合同期限</th>
+                            <th width="11%">合同起始日期</th>
+                            <th width="11%">合同终止日期</th>
+                            <th width="11%">试用期结束日期</th>
+                            <th width="11%">办理日期</th>
+                            <th width="20%">文件</th>
+                        </tr>
+                        </thead>
+                        <tbody id="labourList">
+                        <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
+                            <tr>
+                                <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+                                <td>${buyDetails.contractNum}</td>
+                                <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+                                <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+                                <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+                                <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
+                                <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+                                    <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+                                <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+                                    <c:choose>
+                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                            <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:otherwise>
+                                    </c:choose>
+                                </c:forEach>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <%--<div class="form-group layui-row">
                 <div class="form-group-label"><h2>电子档案</h2></div>
                 <div class="layui-item nav-btns">
                     <a href=javascript:void(0); onclick="addRowRecord('#recordList',recordIdx,recordTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
@@ -1824,7 +1825,7 @@
                         }
                     </script>
                 </div>
-            </div>
+            </div>--%>
         </form:form>
     </div>
 </div>

File diff suppressed because it is too large
+ 641 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicCertificateModify.jsp


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

@@ -8,6 +8,8 @@
 	<script type="text/javascript">
         var validateForm;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+            $("#opinion").val(ss);
             if(obj == 2){//驳回
                 $("#inputForm").attr("action","${ctx}/workstaff/workStaffBasicInfo/back");
             }else{
@@ -351,12 +353,17 @@
             var imgStr = '<img src="'+url+'" width="24" height="24" onclick="openDialogView(\'预览\',\'${ctx}/sys/picturepreview/picturePreview?url='+url+'\',\'90%\',\'90%\')" alt="'+file.name+'">';
             $('#'+spanId).html(imgStr);
         }
+        function f1(row) {
+            // window.parent.document.getElementById('opinion').value = row;
+            $("#opinion").val(row)
+        }
     </script>
 </head>
 <body>
     <div class="single-form">
         <div class="container view-form">
             <form:form id="inputForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/saveAchiveBack" enctype="multipart/form-data" method="post" class="form-horizontal">
+                <input type="hidden" id="opinion" name="act.comment" value="" maxlength="240">
                 <form:hidden path="id"/>
                 <form:hidden path="userId"/>
                 <form:hidden path="home"/>
@@ -662,61 +669,7 @@
                         </table>
                     </div>
                 </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>劳动关系</h2></div>
-                    <div class="layui-item layui-col-xs12 form-table-container">
-                        <table id="labourTable" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                <th width="12%">合同类型</th>
-                                <th width="12%">合同编号</th>
-                                <th width="12%">合同期限</th>
-                                <th width="11%">合同起始日期</th>
-                                <th width="11%">合同终止日期</th>
-                                <th width="11%">试用期结束日期</th>
-                                <th width="11%">办理日期</th>
-                                <th width="20%">文件</th>
-                            </tr>
-                            </thead>
-                            <tbody id="labourList">
-                            <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
-                                <tr>
-                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
-                                    <td>${buyDetails.contractNum}</td>
-                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
-                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
-                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
 
-                                    <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                        <c:choose>
-                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-                                                <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </c:forEach>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
                 <div class="form-group layui-row">
                     <div class="form-group-label"><h2>外语语种</h2></div>
                     <div class="layui-item layui-col-xs12 form-table-container">
@@ -728,7 +681,7 @@
                                 <th width="15%"><span class="require-item">*</span>熟练程度</th>
                                 <th width="20%">证书名称</th>
                                 <th width="20%">获证日期</th>
-                                <th width="15%">文件</th>
+                                <th width="15%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             </tr>
                             </thead>
                             <tbody id="languageList">
@@ -833,7 +786,7 @@
                                 <th width="7%">专业</th>
                                 <th width="6%">等级</th>
                                 <th width="6%">取得方式</th>
-                                <th width="10%">文件</th>
+                                <th width="10%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             </tr>
                             </thead>
                             <tbody id="certificateList">
@@ -901,7 +854,7 @@
                                 <th width="15%"><span class="require-item">*</span>取得日期</th>
                                 <th width="15%"><span class="require-item">*</span>取得途径</th>
                                 <th width="15%"><span class="require-item">*</span>审批单位</th>
-                                <th width="15%">文件</th>
+                                <th width="15%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             </tr>
                             </thead>
                             <tbody id="titleList">
@@ -996,7 +949,7 @@
                                 <th width="9%"><span class="require-item">*</span>培训类型</th>
                                 <th width="5%">学时</th>
                                 <th width="10%"><span class="require-item">*</span>所获证书</th>
-                                <th width="10%">文件</th>
+                                <th width="10%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                                 <th width="7%">备注</th>
                             </tr>
                             </thead>
@@ -1181,6 +1134,103 @@
                     </div>
                 </div>
                 <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>劳动合同</h2></div>
+                    <div class="layui-item layui-col-xs12 form-table-container">
+                        <table id="labourTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="12%">合同类型</th>
+                                <th width="12%">合同编号</th>
+                                <th width="12%">合同期限</th>
+                                <th width="11%">合同起始日期</th>
+                                <th width="11%">合同终止日期</th>
+                                <th width="11%">试用期结束日期</th>
+                                <th width="11%">办理日期</th>
+                                <th width="20%">文件</th>
+                            </tr>
+                            </thead>
+                            <tbody id="labourList">
+                            <c:forEach items="${workStaffBasicInfo.laborContractList}" var="buyDetails" varStatus="status">
+                                <tr>
+                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+                                    <td>${buyDetails.contractNum}</td>
+                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+                                    <td class="text-left op-td">
+                                        <!-- 文件或图片展示区域 -->
+                                        <span id="laborContractList${varStatus.index}_fileName1">
+                                                            <c:if test="${not empty buyDetails.filePathStr}">
+                                                                <!-- 提取文件名 -->
+                                                                <c:set var="fileNameArr" value="${fn:split(buyDetails.filePath, '/')}" />
+                                                                <c:set var="fileName" value="${fileNameArr[fn:length(fileNameArr) - 1]}" />
+
+                                                                <!-- 提取文件扩展名 -->
+                                                                <c:set var="extArr" value="${fn:split(fileName, '.')}" />
+                                                                <c:set var="ext" value="${fn:toLowerCase(extArr[fn:length(extArr) - 1])}" />
+
+                                                                <!-- 判断是否是图片类型 -->
+                                                                <c:choose>
+                                                                    <c:when test="${ext == 'jpg' || ext == 'jpeg' || ext == 'png' || ext == 'gif' || ext == 'bmp' || ext == 'webp'}">
+                                                                        <!-- 图片预览 -->
+                                                                        <img src="${buyDetails.filePathStr}" width="24" height="24"
+                                                                             style="cursor:pointer; vertical-align:middle;"
+                                                                             onclick="preview('预览','${buyDetails.filePathStr}','90%','90%','1')"
+                                                                             alt="图片预览" title="点击预览图片" />
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(buyDetails.fileName,'pdf')}">
+                                                                                <a class="attention-info" href="javascript:void(0)" style="color: #007bff;" onclick="preview('预览','${buyDetails.filePathStr}','90%','90%','1')">${buyDetails.fileName}</a>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <a class="attention-info" href="javascript:void(0)" style="color: #007bff;" onclick="preview('预览','${buyDetails.filePathStr}','90%','90%')">${buyDetails.fileName}</a>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                        <!-- 普通文件预览(带图标和文件名,文件名超10字符截断) -->
+                                                                        <%--<a href="${buyDetails.filePathStr}" target="_blank" title="${buyDetails.fileName}" style="text-decoration:none;color:#007bff;">
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:length(buyDetails.fileName) > 10}">
+                                                                                    ${fn:substring(buyDetails.fileName, 0, 10)}...
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    ${buyDetails.fileName}
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </a>--%>
+
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:if>
+                                                        </span>
+
+                                        <!-- 下载按钮 -->
+                                        <a href="javascript:void(0);"
+                                           title="下载 ${buyDetails.fileName}"
+                                           style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                           onclick="downloadFile('${ctx}', '${buyDetails.filePath}', '${buyDetails.fileName}')">
+                                            <i class="fa fa-download"></i>
+                                        </a>
+
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+
+
+                <div class="form-group-label">
+                    <h2>审批意见</h2>
+                </div>
+                <iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+
+                <%--<div class="form-group layui-row">
                     <div class="form-group-label"><h2>电子档案</h2></div>
                     <div class="layui-item layui-col-xs12 form-table-container">
                         <table id="recordTable" class="table table-bordered table-condensed can-edit">
@@ -1220,7 +1270,7 @@
                             </tbody>
                         </table>
                     </div>
-                </div>
+                </div>--%>
             </form:form>
         </div>
     </div>

+ 69 - 57
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailForm.jsp

@@ -65,8 +65,8 @@
         function this_upload_show_image(index){
             var obj =$("#this_upload_file_"+index)[0].files[0];
             var fileType = obj.type;
-            if(obj.size>100*1024){
-                layer.msg("请上传100KB内图片格式文件!",{icon:2});
+            if(obj.size>1000*1024){
+                layer.msg("请上传1000KB内图片格式文件!",{icon:2});
                 return false ;
             }
             var url ;
@@ -682,61 +682,7 @@
                         </script>
                     </div>
                 </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>劳动关系</h2></div>
-                    <div class="layui-item layui-col-xs12 form-table-container">
-                        <table id="labourTable" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                <th width="12%">合同类型</th>
-                                <th width="12%">合同编号</th>
-                                <th width="12%">合同期限</th>
-                                <th width="11%">合同起始日期</th>
-                                <th width="11%">合同终止日期</th>
-                                <th width="11%">试用期结束日期</th>
-                                <th width="11%">办理日期</th>
-                                <th width="20%">文件</th>
-                            </tr>
-                            </thead>
-                            <tbody id="labourList">
-                            <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
-                                <tr>
-                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
-                                    <td>${buyDetails.contractNum}</td>
-                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
-                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
-                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
 
-                                    <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                        <c:choose>
-                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-                                                <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </c:forEach>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
                 <div class="form-group layui-row">
                     <div class="form-group-label"><h2>外语语种</h2></div>
                     <div class="layui-item nav-btns">
@@ -1781,6 +1727,72 @@
                     </div>
                 </div>
                 <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>劳动合同</h2></div>
+                    <div class="layui-item layui-col-xs12 form-table-container">
+                        <table id="labourTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="12%">合同类型</th>
+                                <th width="12%">合同编号</th>
+                                <th width="12%">合同期限</th>
+                                <th width="11%">合同起始日期</th>
+                                <th width="11%">合同终止日期</th>
+                                <th width="11%">试用期结束日期</th>
+                                <th width="11%">办理日期</th>
+                                <th width="20%">文件</th>
+                            </tr>
+                            </thead>
+                            <tbody id="labourList">
+                            <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
+                                <tr>
+                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+                                    <td>${buyDetails.contractNum}</td>
+                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+                                    <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:forEach>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+
+                <div class="form-group-label">
+                    <h2>驳回原因</h2>
+                </div>
+                <div class="layui-item layui-col-sm8 lw6 with-textarea">
+                    <div class="layui-input-block" style="margin-left:10px;position: relative">
+                        <textarea path="" id="opinion" class="form-control"  rows="4" style="width: 100%; height: 80%; border: 1px solid #f1f1f1;
+                         padding: 5px; background-color: #f9f9f9; font-weight: bold;" readonly maxlength="500">${workStaffBasicInfo.act.comment}</textarea>
+                        <input type="file" name="upload_files" style="display: none;">
+                    </div>
+                </div>
+                <%--<div class="form-group layui-row">
                     <div class="form-group-label"><h2>电子档案</h2></div>
                     <div class="layui-item nav-btns">
                         <a href=javascript:void(0); onclick="addRowRecord('#recordList',recordIdx,recordTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
@@ -1869,7 +1881,7 @@
                             }
                         </script>
                     </div>
-                </div>
+                </div>--%>
             </form:form>
         </div>
     </div>

+ 109 - 62
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModify.jsp

@@ -70,8 +70,8 @@
         function this_upload_show_image(index){
             var obj =$("#this_upload_file_"+index)[0].files[0];
             var fileType = obj.type;
-            if(obj.size>100*1024){
-                layer.msg("请上传100KB内图片格式文件!",{icon:2});
+            if(obj.size>1000*1024){
+                layer.msg("请上传1000KB内图片格式文件!",{icon:2});
                 return false ;
             }
             var url ;
@@ -482,8 +482,8 @@
                                 <th width="8%"><span class="require-item">*</span>学历性质</th>
                                 <th width="11%"><span class="require-item">*</span>入学日期</th>
                                 <th width="11%">毕业日期</th>
-                                <th width="10%">学历证书</th>
-                                <th width="10%">学位证书</th>
+                                <th width="10%">学历证书<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
+                                <th width="10%">学位证书<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                                 <th width="10%">操作</th>
                             </tr>
                             </thead>
@@ -625,61 +625,7 @@
                         </script>
                     </div>
                 </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>劳动关系</h2></div>
-                    <div class="layui-item layui-col-xs12 form-table-container">
-                        <table id="labourTable" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                <th width="12%">合同类型</th>
-                                <th width="12%">合同编号</th>
-                                <th width="12%">合同期限</th>
-                                <th width="11%">合同起始日期</th>
-                                <th width="11%">合同终止日期</th>
-                                <th width="11%">试用期结束日期</th>
-                                <th width="11%">办理日期</th>
-                                <th width="20%">文件</th>
-                            </tr>
-                            </thead>
-                            <tbody id="labourList">
-                            <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
-                                <tr>
-                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
-                                    <td>${buyDetails.contractNum}</td>
-                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
-                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
-                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
 
-                                    <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                        <c:choose>
-                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-                                                <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </c:forEach>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
                 <div class="form-group layui-row">
                     <div class="form-group-label"><h2>外语语种</h2></div>
                     <div class="layui-item nav-btns">
@@ -694,7 +640,7 @@
                                 <th width="15%"><span class="require-item">*</span>熟练程度</th>
                                 <th width="20%">证书名称</th>
                                 <th width="20%">获证日期</th>
-                                <th width="15%">文件</th>
+                                <th width="15%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                                 <th width="10%">操作</th>
                             </tr>
                             </thead>
@@ -926,7 +872,7 @@
                                 <th width="7%">专业</th>
                                 <th width="6%">等级</th>
                                 <th width="6%">取得方式</th>
-                                <th width="10%">文件</th>
+                                <th width="10%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                                 <th width="10%">操作</th>
                             </tr>
                             </thead>
@@ -1086,7 +1032,7 @@
                                 <th width="15%"><span class="require-item">*</span>取得日期</th>
                                 <th width="15%"><span class="require-item">*</span>取得途径</th>
                                 <th width="15%"><span class="require-item">*</span>审批单位</th>
-                                <th width="15%">文件</th>
+                                <th width="15%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                                 <th width="10%">操作</th>
                             </tr>
                             </thead>
@@ -1287,7 +1233,7 @@
                                 <th width="9%"><span class="require-item">*</span>培训类型</th>
                                 <th width="5%">学时</th>
                                 <th width="10%"><span class="require-item">*</span>所获证书</th>
-                                <th width="10%">文件</th>
+                                <th width="10%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                                 <th width="7%">备注</th>
                                 <th width="10%">操作</th>
                             </tr>
@@ -1713,6 +1659,107 @@
                         </script>
                     </div>
                 </div>
+                <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>劳动合同</h2></div>
+                    <div class="layui-item layui-col-xs12 form-table-container">
+                        <table id="labourTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="12%">合同类型</th>
+                                <th width="12%">合同编号</th>
+                                <th width="12%">合同期限</th>
+                                <th width="11%">合同起始日期</th>
+                                <th width="11%">合同终止日期</th>
+                                <th width="11%">试用期结束日期</th>
+                                <th width="11%">办理日期</th>
+                                <th width="20%">文件</th>
+                            </tr>
+                            </thead>
+                            <tbody id="labourList">
+                            <c:forEach items="${workStaffBasicInfo.laborContractList}" var="buyDetails" varStatus="status">
+                                <tr>
+                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+                                    <td>${buyDetails.contractNum}</td>
+                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+                                    <td class="text-left op-td">
+                                        <!-- 文件或图片展示区域 -->
+                                        <span id="laborContractList${varStatus.index}_fileName1">
+                                                            <c:if test="${not empty buyDetails.filePathStr}">
+                                                                <!-- 提取文件名 -->
+                                                                <c:set var="fileNameArr" value="${fn:split(buyDetails.filePath, '/')}" />
+                                                                <c:set var="fileName" value="${fileNameArr[fn:length(fileNameArr) - 1]}" />
+
+                                                                <!-- 提取文件扩展名 -->
+                                                                <c:set var="extArr" value="${fn:split(fileName, '.')}" />
+                                                                <c:set var="ext" value="${fn:toLowerCase(extArr[fn:length(extArr) - 1])}" />
+
+                                                                <!-- 判断是否是图片类型 -->
+                                                                <c:choose>
+                                                                    <c:when test="${ext == 'jpg' || ext == 'jpeg' || ext == 'png' || ext == 'gif' || ext == 'bmp' || ext == 'webp'}">
+                                                                        <!-- 图片预览 -->
+                                                                        <img src="${buyDetails.filePathStr}" width="24" height="24"
+                                                                             style="cursor:pointer; vertical-align:middle;"
+                                                                             onclick="preview('预览','${buyDetails.filePathStr}','90%','90%','1')"
+                                                                             alt="图片预览" title="点击预览图片" />
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(buyDetails.fileName,'pdf')}">
+                                                                                <a class="attention-info" href="javascript:void(0)" style="color: #007bff;" onclick="preview('预览','${buyDetails.filePathStr}','90%','90%','1')">${buyDetails.fileName}</a>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <a class="attention-info" href="javascript:void(0)" style="color: #007bff;" onclick="preview('预览','${buyDetails.filePathStr}','90%','90%')">${buyDetails.fileName}</a>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                        <!-- 普通文件预览(带图标和文件名,文件名超10字符截断) -->
+                                                                        <%--<a href="${buyDetails.filePathStr}" target="_blank" title="${buyDetails.fileName}" style="text-decoration:none;color:#007bff;">
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:length(buyDetails.fileName) > 10}">
+                                                                                    ${fn:substring(buyDetails.fileName, 0, 10)}...
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    ${buyDetails.fileName}
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </a>--%>
+
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:if>
+                                                        </span>
+
+                                        <!-- 下载按钮 -->
+                                        <a href="javascript:void(0);"
+                                           title="下载 ${buyDetails.fileName}"
+                                           style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                           onclick="downloadFile('${ctx}', '${buyDetails.filePath}', '${buyDetails.fileName}')">
+                                            <i class="fa fa-download"></i>
+                                        </a>
+
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+
+                <div class="form-group-label">
+                    <h2>驳回原因</h2>
+                </div>
+                <div class="layui-item layui-col-sm8 lw6 with-textarea">
+                    <div class="layui-input-block" style="margin-left:10px;position: relative">
+                        <textarea path="" id="opinion" class="form-control"  rows="4" style="width: 100%; height: 80%; border: 1px solid #f1f1f1;
+                         padding: 5px; background-color: #f9f9f9; font-weight: bold;" readonly maxlength="500">${workStaffBasicInfo.act.comment}</textarea>
+                        <input type="file" name="upload_files" style="display: none;">
+                    </div>
+                </div>
                 <%--<div class="form-group layui-row">
                     <div class="form-group-label"><h2>电子档案</h2></div>
                     <div class="layui-item nav-btns">

+ 58 - 57
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModifyDirectly.jsp

@@ -79,8 +79,8 @@
         function this_upload_show_image(index){
             var obj =$("#this_upload_file_"+index)[0].files[0];
             var fileType = obj.type;
-            if(obj.size>100*1024){
-                layer.msg("请上传100KB内图片格式文件!",{icon:2});
+            if(obj.size>1000*1024){
+                layer.msg("请上传1000KB内图片格式文件!",{icon:2});
                 return false ;
             }
             var url ;
@@ -637,61 +637,7 @@
                     </script>
                 </div>
             </div>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>劳动关系</h2></div>
-                <div class="layui-item layui-col-xs12 form-table-container">
-                    <table id="labourTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                            <th width="12%">合同类型</th>
-                            <th width="12%">合同编号</th>
-                            <th width="12%">合同期限</th>
-                            <th width="11%">合同起始日期</th>
-                            <th width="11%">合同终止日期</th>
-                            <th width="11%">试用期结束日期</th>
-                            <th width="11%">办理日期</th>
-                            <th width="20%">文件</th>
-                        </tr>
-                        </thead>
-                        <tbody id="labourList">
-                        <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
-                            <tr>
-                                <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
-                                <td>${buyDetails.contractNum}</td>
-                                <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
-                                <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
-                                <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
-                                <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
-                                <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
-                                    <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
 
-                                <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                    <c:choose>
-                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-                                            <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <c:choose>
-                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
-                                </c:forEach>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>外语语种</h2></div>
                 <div class="layui-item nav-btns">
@@ -1633,6 +1579,61 @@
                 </div>
             </div>
             <div class="form-group layui-row">
+                <div class="form-group-label"><h2>劳动合同</h2></div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="labourTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th width="12%">合同类型</th>
+                            <th width="12%">合同编号</th>
+                            <th width="12%">合同期限</th>
+                            <th width="11%">合同起始日期</th>
+                            <th width="11%">合同终止日期</th>
+                            <th width="11%">试用期结束日期</th>
+                            <th width="11%">办理日期</th>
+                            <th width="20%">文件</th>
+                        </tr>
+                        </thead>
+                        <tbody id="labourList">
+                        <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
+                            <tr>
+                                <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+                                <td>${buyDetails.contractNum}</td>
+                                <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+                                <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+                                <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+                                <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
+                                <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+                                    <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+                                <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+                                    <c:choose>
+                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                            <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:otherwise>
+                                    </c:choose>
+                                </c:forEach>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <%--<div class="form-group layui-row">
                 <div class="form-group-label"><h2>电子档案</h2></div>
                 <div class="layui-item nav-btns">
                     <a href=javascript:void(0); onclick="addRowRecord('#recordList',recordIdx,recordTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
@@ -1716,7 +1717,7 @@
                         }
                     </script>
                 </div>
-            </div>
+            </div>--%>
         </form:form>
     </div>
 </div>

+ 634 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicDirectlyAudit.jsp

@@ -0,0 +1,634 @@
+<%--suppress ALL --%>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>员工信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+            $("#opinion").val(ss);
+            if(obj == 2){//驳回
+                $("#inputForm").attr("action","${ctx}/workstaff/workStaffBasicInfo/backDirectly");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workstaff/workStaffBasicInfo/passDirectly");
+            }
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+		function basicInfo(){
+		    var achiveId=$("#id").val();
+            $(".basicInfo").each(function () {
+                var name =  $(this).attr("name");
+                if(name=='nativePlace.id'){
+                    name='nativePlace';
+                }
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getChange',
+                    data:{ "name":name, "achiveId":achiveId},
+                    success:function(data) {
+                        if(data.newValue!=null){
+                            if(name=='nativePlace'){//地区
+                                $("#nativePlaceId").val(data.newKey);
+                                $("#nativePlaceName").val(data.newValue);
+                                $("#nativePlaceName").css("color","red");
+                            }/*else if(name=="picture"){
+                                $("#this_upload_image_1").prop("src",data.newValue);
+                                $("#picture").val(data.newValue);
+                                // this_upload_show_image("1");
+                            }*/else{
+                                if(name=='exSoldier'){
+                                    $("#exSoldierId").val(data.newValue);
+                                    $("#exSoldierId").css("color","red");
+                                    $("#exSoldier").val(data.newKey);
+                                }else{
+                                    $("#"+name).val(data.newValue);
+                                    $("#"+name).css("color","red");
+                                }
+                            }
+                        }
+                    }
+                });
+            })
+        }
+        function eduInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#educationList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#educationList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'教育经历'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function languageInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#languageList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#languageList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'外语语种'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function experienceInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#experienceList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#experienceList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'工作经历'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function certificateInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#certificateList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#certificateList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'执业资格证书'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function titleInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#titleList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#titleList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'职称'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function familyInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#familyList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#familyList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'家庭情况'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function trainingInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#trainingList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#trainingList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'培训经历'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function socialInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#socialPositionList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#socialPositionList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'社会及行业职务'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function rewardsInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#rewardsList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#rewardsList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'奖惩情况'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function achievementInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#achievementList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#achievementList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'工作业绩'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+        function recordInfo(){
+            var achiveId=$("#id").val();
+            var idx1 = $("#recordList tr").length;
+            for(var i=0;i<idx1;i++){
+                var id=$("#recordList"+i+"_id").val();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstaff/workStaffBasicInfo/getEdu',
+                    async: false,
+                    data:{ "id":id, "achiveId":achiveId,"module":'电子档案'},
+                    success:function(data) {
+                        if(data){
+                            $("#"+id).css("color","red");
+                        }
+                    }
+                });
+            }
+        }
+
+		$(document).ready(function() {
+            basicInfo();//基本信息
+            eduInfo();//教育经历
+            languageInfo();//外语语种
+            experienceInfo();//工作经历
+            certificateInfo();//执业资格证书
+            titleInfo();//职称
+            familyInfo();//家庭情况
+            trainingInfo();//培训经历
+            socialInfo();//社会及行业职务
+            rewardsInfo();//奖惩情况
+            achievementInfo();//工作业绩
+            recordInfo();//电子档案
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+	</script>
+    <script type="text/javascript">
+        //上传用户头像
+        function this_upload_image_button(index){
+            $("#this_upload_file_"+index).click();
+        }
+        function this_upload_show_image(index){
+            var obj =$("#this_upload_file_"+index)[0].files[0];
+            var fileType = obj.type;
+            if(obj.size>1000*1024){
+                layer.msg("请上传1000KB内图片格式文件!",{icon:2});
+                return false ;
+            }
+            var url ;
+            if((fileType.indexOf("png")>=0||fileType.indexOf("bmp")>=0||fileType.indexOf("jpg")>=0||fileType.indexOf("jpeg")>=0)){
+                url = window.URL.createObjectURL(obj);
+            }else {
+                /*$("#this_upload_msg").css({"color":"red"});*/
+                this_close_img(index);
+                layer.msg("请上传图片格式文件!",{icon:2});
+                return false ;
+            }
+            /*$("#this_upload_msg" + "index").removeAttr("style");*/
+            $("#this_upload_image_"+index).attr("src",url);
+
+            var span = '<span id="this_upload_close_'+index+'" class="pic_close glyphicon glyphicon-remove" onclick="this_close_img('+index+');"></span>';
+            $("#this_upload_image_" + index).before(span);
+        }
+
+        function this_close_img(index) {
+            $("#this_upload_div_"+index).remove();
+            this_add_div(index);
+        }
+
+        function this_add_div(index) {
+            var this_upload_div_1 =
+                '<div id="this_upload_div_'+ index + '" style="position:relative;">'+
+                '<img  id="this_upload_image_' + index + '" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"  onclick="this_upload_image_button('+index+')"/>'+
+                '<input id="this_upload_file_'+ index + '" type="file" style="display:none"  name="pictureFile"  onchange="this_upload_show_image('+index+ ')" /><br>'+
+                '</div>';
+            $("#this_upload_image_div_"+ index).html("").append(this_upload_div_1);
+        }
+
+        function this_upload_file_button(id){
+            $("#"+id).click();
+        }
+        function changeFileName(obj,index) {
+            var file = obj.files[0];
+            var url = null;
+            if (window.createObjectURL != undefined) { // basic
+                url = window.createObjectURL(file);
+            } else if (window.URL != undefined) { // mozilla(firefox)
+                url = window.URL.createObjectURL(file);
+            } else if (window.webkitURL != undefined) { // webkit or chrome
+                url = window.webkitURL.createObjectURL(file);
+            }
+            console.log(url);
+            var fileType = file.type;
+            if(index==1 && (file.size > 1000*1024 || !(fileType.indexOf("png")>=0||fileType.indexOf("bmp")>=0||fileType.indexOf("jpg")>=0||fileType.indexOf("jpeg")>=0))){
+                layer.msg("请上传1000KB内图片!",{icon:2});
+                return;
+            }
+            var spanId = $(obj).attr("id") + 'Name' + index;
+            var imgStr = '<img src="'+url+'" width="24" height="24" onclick="openDialogView(\'预览\',\'${ctx}/sys/picturepreview/picturePreview?url='+url+'\',\'90%\',\'90%\')" alt="'+file.name+'">';
+            $('#'+spanId).html(imgStr);
+        }
+
+        function f1(row) {
+            // window.parent.document.getElementById('opinion').value = row;
+            $("#opinion").val(row)
+        }
+    </script>
+</head>
+<body>
+    <div class="single-form">
+        <div class="container view-form">
+            <form:form id="inputForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/saveAchiveBack" enctype="multipart/form-data" method="post" class="form-horizontal">
+                <input type="hidden" id="opinion" name="act.comment" value="" maxlength="240">
+                <form:hidden path="id"/>
+                <form:hidden path="userId"/>
+                <form:hidden path="home"/>
+                <div class="form-group layui-row first">
+                    <div class="form-group-label"><h2>基本信息</h2></div>
+                    <div class="layui-item layui-col-sm6 lw7" style="padding-right: 0;">
+                        <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="no" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item layui-col-sm12">
+                            <label class="layui-form-label"><span class="require-item">*</span>性    别:</label>
+                            <div class="layui-input-block">
+                                <input value="${fns:getDictLabel(workStaffBasicInfo.gender,'sex','')}" type="text" readonly="true" class="form-control basicInfo layui-input" />
+                                <input name="gender" value="${workStaffBasicInfo.gender}" type="hidden" readonly="true" class="form-control  layui-input" />
+                            </div>
+                        </div>
+                        <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"/>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <div style="margin-right: 120px;">
+                            <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"/>
+                                </div>
+                            </div>
+                            <div class="layui-item layui-col-sm12">
+                                <label class="layui-form-label"><span class="require-item">*</span>民    族:</label>
+                                <div class="layui-input-block">
+                                    <input value="${fns:getDictLabel(workStaffBasicInfo.nation,'nation_type','')}" type="text" readonly="true" class="form-control  layui-input" />
+                                    <input name="nation" value="${workStaffBasicInfo.nation}" type="hidden" readonly="true" class="form-control  layui-input" />
+                                </div>
+                            </div>
+                            <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"/>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="profile_box_wrapper">
+                            <div class="profile_box">
+                                <div id="this_upload_image_div_1">
+                                    <div id="this_upload_div_1" style="position:relative;">
+                                        <c:choose>
+                                            <c:when test="${not empty workStaffBasicInfo.pictureStr}">
+                                                <span id="this_upload_close_1" class="pic_close glyphicon glyphicon-remove" onclick="this_close_img(1)"></span>
+                                                <img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${workStaffBasicInfo.pictureStr}"/>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <img alt="_blank" id="this_upload_image_1" name="pictureFile" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"/>
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <input id="picture" type="text" name="picture" style="display: none" class="basicInfo">
+                                        <input id="this_upload_file_1" type="file" style="display:none"  name="pictureFile"  onchange="this_upload_show_image(1)"  class="form-control"/>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>出生日期:</label>
+                        <div class="layui-input-block">
+                            <input name="birthday" value="<fmt:formatDate value="${workStaffBasicInfo.birthday}" pattern="yyyy-MM-dd"/>" type="text" readonly="true" class="form-control basicInfo layui-input" />
+                        </div>
+                    </div>
+                    <%--<div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>公历/农历:</label>
+                        <div class="layui-input-block">
+                            <input value="${fns:getDictLabel(workStaffBasicInfo.calendar,'calendar_type','')}" type="text" readonly="true" class="form-control  layui-input" />
+                            <input value="${workStaffBasicInfo.calendar}" type="hidden" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>--%>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">电子邮箱:</label>
+                        <div class="layui-input-block">
+                            <form:input path="email" htmlEscape="false" readonly="true" class="form-control basicInfo layui-input email"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>移动电话:</label>
+                        <div class="layui-input-block">
+                            <form:input path="mobile" htmlEscape="false" readonly="true" class="form-control layui-input basicInfo isPhone"/>
+                        </div>
+                    </div>
+                        <div class="layui-item layui-col-sm6 lw7">
+                            <label class="layui-form-label">座机:</label>
+                            <div class="layui-input-block">
+                                <form:input path="phone" id="phone" placeholder=""  readonly="true"  htmlEscape="false"   class="form-control isTel basicInfo  layui-input"  maxlength="50"/>
+                            </div>
+                        </div>
+                        <div class="layui-item layui-col-sm6 lw7">
+                            <label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+                            <div class="layui-input-block">
+                                <input name="status" value="${workStaffBasicInfo.status}" type="text" readonly="true" class="form-control  layui-input" />
+                            </div>
+                        </div>
+                        <div class="layui-item layui-col-sm6 lw7">
+                            <label class="layui-form-label"><span class="require-item">*</span>归属部门:</label>
+                            <div class="layui-input-block">
+                                <input name="office.name" value="${workStaffBasicInfo.office.name}" type="text" readonly="true" class="form-control  layui-input" />
+                                <input name="office.id" value="${workStaffBasicInfo.office.id}" type="hidden" readonly="true" class="form-control  layui-input" />
+                            </div>
+                        </div>
+                        <div class="layui-item layui-col-sm6 lw7">
+                            <input name="roleId" value="${workStaffBasicInfo.roleId}" style="display: none"/>
+                            <label class="layui-form-label"><span class="require-item">*</span>岗    位:</label>
+                            <div class="layui-input-block">
+                                <input name="roleName" value="${workStaffBasicInfo.roleName}" type="text" readonly="true" class="form-control  layui-input" />
+                            </div>
+                        </div>
+                </div>
+
+
+                <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>执业资格证书</h2></div>
+                    <div class="layui-item layui-col-xs12 form-table-container">
+                        <table id="certificateTable" class="table table-bordered table-condensed can-edit">
+                            <thead>
+                            <tr>
+                                <th class="hide"></th>
+                                <th width="10%"><span class="require-item">*</span>证书名称</th>
+                                <th width="10%"><span class="require-item">*</span>证书编号</th>
+                                <th width="10%">发证机关</th>
+                                <th width="11%"><span class="require-item">*</span>发证日期</th>
+                                <th width="11%">注册日期</th>
+                                <th width="9%">注册证书编号</th>
+                                <th width="7%">专业</th>
+                                <th width="6%">等级</th>
+                                <th width="6%">取得方式</th>
+                                <th width="10%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
+                            </tr>
+                            </thead>
+                            <tbody id="certificateList">
+                            <c:forEach items="${workStaffBasicInfo.certificateList}" var="certificate" varStatus="varStatus">
+                                <tr id="${certificate.id}">
+                                    <td class="hide">
+                                        <input type="hidden" id="certificateList${varStatus.index}_id" name="certificateList[${varStatus.index}].id" value="${certificate.id}">
+                                        <input id="certificateList${varStatus.index}_delFlag" name="certificateList[${varStatus.index}].delFlag" type="hidden" value="0"/>
+                                        <input id="certificateList${varStatus.index}_fileName" name="certificateList[${varStatus.index}].fileName" type="hidden" value="${certificate.fileName}"/>
+                                        <input id="certificateList${varStatus.index}_filePath" name="certificateList[${varStatus.index}].filePath" type="hidden" value="${certificate.filePath}"/>
+                                        <input id="certificateList${varStatus.index}_major" name="certificateList[${varStatus.index}].major" type="hidden" value="${certificate.major}"/>
+                                    </td>
+                                    <td>
+                                        <input id="certificateList${varStatus.index}_name" name="certificateList[${varStatus.index}].name" value="${certificate.name}" type="text" readonly="true" class="form-control  layui-input" />
+                                    </td>
+                                    <td>
+                                        <input id="certificateList${varStatus.index}_num" name="certificateList[${varStatus.index}].num" readonly="true" class="form-control " value="${certificate.num}"/>
+                                    </td>
+                                    <td>
+                                        <input id="certificateList${varStatus.index}_issuingAuthority" name="certificateList[${varStatus.index}].issuingAuthority" readonly="true" class="form-control" value="${certificate.issuingAuthority}"/>
+                                    </td>
+                                    <td>
+                                        <input id="certificateList${varStatus.index}_issuingDate" name="certificateList[${varStatus.index}].issuingDate" type="text"  maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
+                                               value="<fmt:formatDate value="${certificate.issuingDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
+                                    </td>
+                                    <td>
+                                        <input id="certificateList${varStatus.index}_registDate" name="certificateList[${varStatus.index}].registDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
+                                               value="<fmt:formatDate value="${certificate.registDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
+                                    </td>
+                                    <td>
+                                        <input id="certificateList${varStatus.index}_registNum" name="certificateList[${varStatus.index}].registNum" readonly="true" class="form-control" value="${certificate.registNum}"/>
+                                    </td>
+                                    <td>
+                                        <select  disabled readonly="true" class="form-control ">
+                                            <c:forEach items="${fns:getMainDictList('certificate_major')}" var="var">
+                                                <option value="${var.value}" <c:if test="${certificate.major eq var.value}">selected</c:if>>${var.label}</option>
+                                            </c:forEach>
+                                        </select>
+                                    </td>
+                                    <td>
+                                        <input id="certificateList${varStatus.index}_grade" name="certificateList[${varStatus.index}].grade" readonly="true" class="form-control" value="${certificate.grade}"/>
+                                    </td>
+                                    <td>
+                                        <input id="certificateList${varStatus.index}_issType" name="certificateList[${varStatus.index}].issType" readonly="true" class="form-control" value="${certificate.issType}"/>
+                                    </td>
+                                    <td class="text-left op-td">
+                                        <c:if test="${not empty certificate.filePathStr}">
+                                            <%-- 安全处理URL中的 & --%>
+                                            <c:set var="safeFilePath" value="${fn:replace(certificate.filePathStr, '&', '&amp;')}" />
+
+                                            <%-- 先从 certificate.fileName 里提取扩展名 --%>
+                                            <c:set var="fileNameArr" value="${fn:split(certificate.fileName, '.')}" />
+                                            <c:set var="fileExt" value="${fn:toLowerCase(fileNameArr[fn:length(fileNameArr) - 1])}" />
+
+                                            <%-- 如果没有后缀,尝试从 filePathStr 里提取 --%>
+                                            <c:choose>
+                                                <c:when test="${fn:contains(certificate.fileName, '.')}">
+                                                    <%-- 已经有后缀 --%>
+                                                    <c:set var="downloadFileName" value="${certificate.fileName}" />
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <%-- 从路径最后部分提取后缀 --%>
+                                                    <c:set var="pathParts" value="${fn:split(certificate.filePathStr, '/')}"/>
+                                                    <c:set var="lastPart" value="${pathParts[fn:length(pathParts) - 1]}" />
+                                                    <c:set var="lastPartArr" value="${fn:split(lastPart, '.')}" />
+                                                    <c:set var="pathExt" value="${fn:toLowerCase(lastPartArr[fn:length(lastPartArr) - 1])}" />
+                                                    <c:set var="downloadFileName" value="${certificate.fileName}.${pathExt}" />
+                                                </c:otherwise>
+                                            </c:choose>
+
+                                            <%-- 显示图片缩略图 --%>
+                                            <img src="${safeFilePath}" width="24" height="24"
+                                                 style="cursor:pointer; vertical-align:middle;"
+                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeFilePath}','90%','90%')"
+                                                 alt="文件预览" title="点击预览" />
+
+                                            <%-- 下载按钮 --%>
+                                            <a href="javascript:void(0);"
+                                               title="下载文件"
+                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                               onclick="downloadFile('${ctx}', '${certificate.filePath}', '${downloadFileName}')">
+                                                <i class="fa fa-download"></i>
+                                            </a>
+                                        </c:if>
+                                        <input id="certificateList${varStatus.index}_file" name="certificateList[${varStatus.index}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+
+
+                <div class="form-group-label">
+                    <h2>审批意见</h2>
+                </div>
+                <iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+            </form:form>
+        </div>
+    </div>
+    <script type="text/javascript">
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1, idx1:idx1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+        }
+        function delRow(obj, prefix){
+            var delFlag = $(prefix+"_delFlag");
+            delFlag.val("1");
+            $(obj).parent().parent().hide();
+        }
+
+    </script>
+</body>
+</html>

File diff suppressed because it is too large
+ 551 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicDirectlyModify.jsp


File diff suppressed because it is too large
+ 325 - 85
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp


+ 3 - 3
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoList.jsp

@@ -248,12 +248,12 @@
                             </form:select>
                         </div>
                     </div>
-                    <div class="layui-item query athird">
+                    <%--<div class="layui-item query athird">
                         <label class="layui-form-label">最高学历:</label>
                         <div class="layui-input-block">
                             <form:input path="highestEducation" htmlEscape="false" maxlength="20"  class=" form-control layui-input"/>
                         </div>
-                    </div>
+                    </div>--%>
                     <div class="layui-item query athird">
                         <label class="layui-form-label">入职日期:</label>
                         <div class="layui-input-block readOnlyFFF">
@@ -353,7 +353,7 @@
                 ,{field:'mobile',align:'center', title: '移动电话', minWidth:100}
                 ,{field:'office',align:'center', title: '部门', minWidth:100}
                 ,{field:'role',align:'center', title: '岗位', minWidth:100}
-                ,{field:'highestEducation',align:'center', title: '最高学历', minWidth:100}
+                /*,{field:'highestEducation',align:'center', title: '最高学历', minWidth:100}*/
                 // ,{field:'jobGrade',align:'center', title: '职级', minWidth:100}
                 /*,{field:'auditUserName',align:'center', title: '校审人员', minWidth:100
                     ,event:'auditUserId',config:{type:'select',data:params,verify:true}

+ 312 - 80
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoView.jsp

@@ -206,7 +206,7 @@
                             <form:input style="background-color: #f1f1f1" path="accumulationFundId" htmlEscape="false" readonly="true" class="form-control layui-input number" maxlength="12"/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm6 lw7">
+                    <%--<div class="layui-item layui-col-sm6 lw7">
                         <label class="layui-form-label">微信号:</label>
                         <div class="layui-input-block">
                             <form:input style="background-color: #f1f1f1" path="wechatId" htmlEscape="false" readonly="true" class="form-control layui-input"/>
@@ -217,21 +217,21 @@
                         <div class="layui-input-block">
                             <form:input style="background-color: #f1f1f1" path="qqId" htmlEscape="false" readonly="true" class="form-control layui-input number" minlength="5" maxlength="10"/>
                         </div>
-                    </div>
+                    </div>--%>
                     <div class="layui-item layui-col-sm6 lw7">
                         <label class="layui-form-label">入职日期:</label>
                         <div class="layui-input-block">
                             <input style="background-color: #f1f1f1" name="entryDate" value="<fmt:formatDate value="${workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>" type="text" readonly="true" class="form-control  layui-input" />
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm6 lw7">
+                    <%--<div class="layui-item layui-col-sm6 lw7">
                         <label class="layui-form-label">试用岗位:</label>
                         <div class="layui-input-block">
                             <form:input style="background-color: #f1f1f1" path="tryOutJob" htmlEscape="false" readonly="true" class="form-control layui-input"/>
                         </div>
-                    </div>
+                    </div>--%>
                     <div class="layui-item layui-col-sm6 lw7">
-                        <label class="layui-form-label double-line">试用期(月):</label>
+                        <label class="layui-form-label">试用期(月):</label>
                         <div class="layui-input-block">
                             <form:input style="background-color: #f1f1f1" path="trialPeriod" htmlEscape="false" readonly="true" class="form-control layui-input number" maxlength="2"/>
                         </div>
@@ -244,6 +244,13 @@
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">职    位:</label>
+                        <div class="layui-input-block">
+                            <input name="duty" value="${workStaffBasicInfo.duty}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+
+                    <div class="layui-item layui-col-sm6 lw7">
                         <label class="layui-form-label"><span class="require-item">*</span>归属部门:</label>
                         <div class="layui-input-block">
                             <input style="background-color: #f1f1f1" name="office.name" value="${workStaffBasicInfo.office.name}" type="text" readonly="true" class="form-control  layui-input" />
@@ -256,36 +263,30 @@
                             <input style="background-color: #f1f1f1" id="roleName" value="${workStaffBasicInfo.roleName}" type="text" readonly class="form-control layui-input" />
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm6 lw7">
+                    <%--<div class="layui-item layui-col-sm6 lw7">
                         <label class="layui-form-label"><span class="require-item">*</span>最高学历:</label>
                         <div class="layui-input-block ">
                             <input style="background-color: #f1f1f1" id="highestEducation" value="${workStaffBasicInfo.highestEducation}" type="text" readonly class="form-control layui-input" />
                         </div>
-                    </div>
+                    </div>--%>
                     <div class="layui-item layui-col-sm12 with-textarea">
                         <label class="layui-form-label">备注:</label>
                         <div class="layui-input-block">
                             <form:textarea style="background-color: #f1f1f1" path="remarks" htmlEscape="false" readonly="true" rows="4" maxlength="500" class="form-control "/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm12 with-textarea">
+                    <%--<div class="layui-item layui-col-sm12 with-textarea">
                         <label class="layui-form-label">个人简介:</label>
                         <div class="layui-input-block">
                             <form:textarea style="background-color: #f1f1f1" path="individualResume" htmlEscape="false" readonly="true" rows="4" maxlength="500" class="form-control "/>
                         </div>
-                    </div>
+                    </div>--%>
 
 
 
 
 
                     <%--<div class="layui-item layui-col-sm6 lw7">
-                        <label class="layui-form-label">职    位:</label>
-                        <div class="layui-input-block">
-                            <input name="duty" value="${workStaffBasicInfo.duty}" type="text" readonly="true" class="form-control  layui-input" />
-                        </div>
-                    </div>
-                    <div class="layui-item layui-col-sm6 lw7">
                         <label class="layui-form-label">职    级:</label>
                         <div class="layui-input-block with-icon">
                             <form:input path="jobGrade.name" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
@@ -404,72 +405,63 @@
                                         <fmt:formatDate value="${education.endDate}" pattern="yyyy-MM-dd"/>
                                     </td>
                                     <td class="text-left op-td">
-                                        <c:if test="${not empty education.eduPhotoStr}"><img src="${education.eduPhotoStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.eduPhotoStr}','90%','90%')" alt=""></c:if>
+                                        <c:if test="${not empty education.eduPhotoStr}">
+                                            <%-- 安全处理带签名链接中的 & 符号 --%>
+                                            <c:set var="safePhotoUrl" value="${fn:replace(education.eduPhotoStr, '&', '&amp;')}" />
+
+                                            <%-- 图片展示 --%>
+                                            <img src="${safePhotoUrl}" width="24" height="24"
+                                                 style="cursor:pointer; vertical-align:middle;"
+                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safePhotoUrl}','90%','90%')"
+                                                 alt="图片预览" title="点击预览图片" />
+
+                                            <%-- 提取扩展名 --%>
+                                            <c:set var="extArr" value="${fn:split(education.eduPhoto, '.')}" />
+                                            <c:set var="ext" value="${fn:toLowerCase(extArr[fn:length(extArr) - 1])}" />
+                                            <c:set var="downloadFileName" value="学历图片.${ext}" />
+                                            <%-- 下载按钮 --%>
+                                            <a href="javascript:void(0);"
+                                               title="下载图片"
+                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                               onclick="downloadFile('${ctx}', '${education.eduPhoto}', '${downloadFileName}')">
+                                                <i class="fa fa-download"></i>
+                                            </a>
+                                        </c:if>
                                     </td>
+
                                     <td class="text-left op-td">
-                                        <c:if test="${not empty education.degreePhotoStr}"><img src="${education.degreePhotoStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.degreePhotoStr}','90%','90%')" alt=""></c:if>
+                                        <c:if test="${not empty education.degreePhotoStr}">
+                                            <%-- 安全处理带签名链接中的 & 符号 --%>
+                                            <c:set var="safeDegreeUrl" value="${fn:replace(education.degreePhotoStr, '&', '&amp;')}" />
+
+                                            <%-- 图片展示 --%>
+                                            <img src="${safeDegreeUrl}" width="24" height="24"
+                                                 style="cursor:pointer; vertical-align:middle;"
+                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeDegreeUrl}','90%','90%')"
+                                                 alt="图片预览" title="点击预览图片" />
+
+                                            <%-- 提取扩展名 --%>
+                                            <c:set var="degreeExtArr" value="${fn:split(education.degreePhoto, '.')}" />
+                                            <c:set var="degreeExt" value="${fn:toLowerCase(degreeExtArr[fn:length(degreeExtArr) - 1])}" />
+                                            <c:set var="degreeDownloadFileName" value="学位证书.${degreeExt}" />
+
+                                            <%-- 下载按钮 --%>
+                                            <a href="javascript:void(0);"
+                                               title="下载学位证书"
+                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                               onclick="downloadFile('${ctx}', '${education.degreePhoto}', '${degreeDownloadFileName}')">
+                                                <i class="fa fa-download"></i>
+                                            </a>
+                                        </c:if>
                                     </td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>劳动关系</h2></div>
-                    <div class="layui-item layui-col-xs12 form-table-container">
-                        <table id="labourTable" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                <th width="12%">合同类型</th>
-                                <th width="12%">合同编号</th>
-                                <th width="12%">合同期限</th>
-                                <th width="11%">合同起始日期</th>
-                                <th width="11%">合同终止日期</th>
-                                <th width="11%">试用期结束日期</th>
-                                <th width="11%">办理日期</th>
-                                <th width="20%">文件</th>
-                            </tr>
-                            </thead>
-                            <tbody id="labourList">
-                            <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
-                                <tr>
-                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
-                                    <td>${buyDetails.contractNum}</td>
-                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
-                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
-                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
-                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
 
-                                    <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                        <c:choose>
-                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-                                                <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </c:forEach>
                                 </tr>
                             </c:forEach>
                             </tbody>
                         </table>
                     </div>
                 </div>
+
                 <div class="form-group layui-row">
                     <div class="form-group-label"><h2>外语语种</h2></div>
                     <div class="layui-item layui-col-xs12 form-table-container">
@@ -480,7 +472,7 @@
                                 <th width="20%"><span class="require-item">*</span>熟练程度</th>
                                 <th width="20%">证书名称</th>
                                 <th width="20%">获证日期</th>
-                                <th width="20%">文件</th>
+                                <th width="20%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             </tr>
                             </thead>
                             <tbody id="languageList">
@@ -499,7 +491,45 @@
                                         <fmt:formatDate value="${language.certifDate}" pattern="yyyy-MM-dd"/>
                                     </td>
                                     <td>
-                                        <c:if test="${not empty language.filePathStr}"><img src="${language.filePathStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${language.filePathStr}','90%','90%')" alt=""></c:if>
+                                        <c:if test="${not empty language.filePathStr}">
+                                            <%-- 安全处理URL中的 & --%>
+                                            <c:set var="safeFilePath" value="${fn:replace(language.filePathStr, '&', '&amp;')}" />
+
+                                            <%-- 先从 language.fileName 里提取扩展名 --%>
+                                            <c:set var="fileNameArr" value="${fn:split(language.fileName, '.')}" />
+                                            <c:set var="fileExt" value="${fn:toLowerCase(fileNameArr[fn:length(fileNameArr) - 1])}" />
+
+                                            <%-- 如果没有后缀,尝试从 filePathStr 里提取 --%>
+                                            <c:choose>
+                                                <c:when test="${fn:contains(language.fileName, '.')}">
+                                                    <%-- 已经有后缀 --%>
+                                                    <c:set var="downloadFileName" value="${language.fileName}" />
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <%-- 从路径最后部分提取后缀 --%>
+                                                    <c:set var="pathParts" value="${fn:split(language.filePathStr, '/')}"/>
+                                                    <c:set var="lastPart" value="${pathParts[fn:length(pathParts) - 1]}" />
+                                                    <c:set var="lastPartArr" value="${fn:split(lastPart, '.')}" />
+                                                    <c:set var="pathExt" value="${fn:toLowerCase(lastPartArr[fn:length(lastPartArr) - 1])}" />
+                                                    <c:set var="downloadFileName" value="${language.fileName}.${pathExt}" />
+                                                </c:otherwise>
+                                            </c:choose>
+
+                                            <%-- 显示图片缩略图 --%>
+                                            <img src="${safeFilePath}" width="24" height="24"
+                                                 style="cursor:pointer; vertical-align:middle;"
+                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeFilePath}','90%','90%')"
+                                                 alt="文件预览" title="点击预览" />
+
+                                            <%-- 下载按钮 --%>
+                                            <a href="javascript:void(0);"
+                                               title="下载文件"
+                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                               onclick="downloadFile('${ctx}', '${language.filePath}', '${downloadFileName}')">
+                                                <i class="fa fa-download"></i>
+                                            </a>
+                                        </c:if>
+
                                     </td>
                                 </tr>
                             </c:forEach>
@@ -563,7 +593,7 @@
                                 <th width="11%">注册日期</th>
                                 <th width="11%"><span class="require-item">*</span>发证日期</th>
                                 <th width="10%">发证机关</th>
-                                <th width="10%">文件</th>
+                                <th width="10%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             </tr>
                             </thead>
                             <tbody id="certificateList">
@@ -585,7 +615,45 @@
                                         ${certificate.issuingAuthority}
                                     </td>
                                     <td >
-                                        <c:if test="${not empty certificate.filePathStr}"><img src="${certificate.filePathStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${certificate.filePathStr}','90%','90%')" alt=""></c:if>
+                                        <c:if test="${not empty certificate.filePathStr}">
+                                            <%-- 安全处理URL中的 & --%>
+                                            <c:set var="safeFilePath" value="${fn:replace(certificate.filePathStr, '&', '&amp;')}" />
+
+                                            <%-- 先从 certificate.fileName 里提取扩展名 --%>
+                                            <c:set var="fileNameArr" value="${fn:split(certificate.fileName, '.')}" />
+                                            <c:set var="fileExt" value="${fn:toLowerCase(fileNameArr[fn:length(fileNameArr) - 1])}" />
+
+                                            <%-- 如果没有后缀,尝试从 filePathStr 里提取 --%>
+                                            <c:choose>
+                                                <c:when test="${fn:contains(certificate.fileName, '.')}">
+                                                    <%-- 已经有后缀 --%>
+                                                    <c:set var="downloadFileName" value="${certificate.fileName}" />
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <%-- 从路径最后部分提取后缀 --%>
+                                                    <c:set var="pathParts" value="${fn:split(certificate.filePathStr, '/')}"/>
+                                                    <c:set var="lastPart" value="${pathParts[fn:length(pathParts) - 1]}" />
+                                                    <c:set var="lastPartArr" value="${fn:split(lastPart, '.')}" />
+                                                    <c:set var="pathExt" value="${fn:toLowerCase(lastPartArr[fn:length(lastPartArr) - 1])}" />
+                                                    <c:set var="downloadFileName" value="${certificate.fileName}.${pathExt}" />
+                                                </c:otherwise>
+                                            </c:choose>
+
+                                            <%-- 显示图片缩略图 --%>
+                                            <img src="${safeFilePath}" width="24" height="24"
+                                                 style="cursor:pointer; vertical-align:middle;"
+                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeFilePath}','90%','90%')"
+                                                 alt="文件预览" title="点击预览" />
+
+                                            <%-- 下载按钮 --%>
+                                            <a href="javascript:void(0);"
+                                               title="下载文件"
+                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                               onclick="downloadFile('${ctx}', '${certificate.filePath}', '${downloadFileName}')">
+                                                <i class="fa fa-download"></i>
+                                            </a>
+                                        </c:if>
+
                                     </td>
                                 </tr>
                             </c:forEach>
@@ -604,7 +672,7 @@
                                 <th width="15%"><span class="require-item">*</span>取得日期</th>
                                 <th width="15%"><span class="require-item">*</span>取得途径</th>
                                 <th width="20%"><span class="require-item">*</span>审批单位</th>
-                                <th width="15%">文件</th>
+                                <th width="15%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             </tr>
                             </thead>
                             <tbody id="titleList">
@@ -626,7 +694,44 @@
                                         ${title.approvalAuthority}
                                     </td>
                                     <td>
-                                        <c:if test="${not empty title.filePathStr}"><img src="${title.filePathStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${title.filePathStr}','90%','90%')" alt=""></c:if>
+                                        <c:if test="${not empty title.filePathStr}">
+                                            <%-- 安全处理URL中的 & --%>
+                                            <c:set var="safeFilePath" value="${fn:replace(title.filePathStr, '&', '&amp;')}" />
+
+                                            <%-- 先从 title.fileName 里提取扩展名 --%>
+                                            <c:set var="fileNameArr" value="${fn:split(title.fileName, '.')}" />
+                                            <c:set var="fileExt" value="${fn:toLowerCase(fileNameArr[fn:length(fileNameArr) - 1])}" />
+
+                                            <%-- 如果没有后缀,尝试从 filePathStr 里提取 --%>
+                                            <c:choose>
+                                                <c:when test="${fn:contains(title.fileName, '.')}">
+                                                    <%-- 已经有后缀 --%>
+                                                    <c:set var="downloadFileName" value="${title.fileName}" />
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <%-- 从路径最后部分提取后缀 --%>
+                                                    <c:set var="pathParts" value="${fn:split(title.filePathStr, '/')}"/>
+                                                    <c:set var="lastPart" value="${pathParts[fn:length(pathParts) - 1]}" />
+                                                    <c:set var="lastPartArr" value="${fn:split(lastPart, '.')}" />
+                                                    <c:set var="pathExt" value="${fn:toLowerCase(lastPartArr[fn:length(lastPartArr) - 1])}" />
+                                                    <c:set var="downloadFileName" value="${title.fileName}.${pathExt}" />
+                                                </c:otherwise>
+                                            </c:choose>
+
+                                            <%-- 显示图片缩略图 --%>
+                                            <img src="${safeFilePath}" width="24" height="24"
+                                                 style="cursor:pointer; vertical-align:middle;"
+                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeFilePath}','90%','90%')"
+                                                 alt="文件预览" title="点击预览" />
+
+                                            <%-- 下载按钮 --%>
+                                            <a href="javascript:void(0);"
+                                               title="下载文件"
+                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                               onclick="downloadFile('${ctx}', '${title.filePath}', '${downloadFileName}')">
+                                                <i class="fa fa-download"></i>
+                                            </a>
+                                        </c:if>
                                     </td>
                                 </tr>
                             </c:forEach>
@@ -685,7 +790,7 @@
                                 <th width="10%"><span class="require-item">*</span>培训类型</th>
                                 <th width="10%">学时</th>
                                 <th width="10%"><span class="require-item">*</span>所获证书</th>
-                                <th width="10%">文件</th>
+                                <th width="10%">文件<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                                 <th width="10%">备注</th>
                             </tr>
                             </thead>
@@ -717,7 +822,44 @@
                                         ${training.certificate}
                                     </td>
                                     <td>
-                                        <c:if test="${not empty training.filePathStr}"><img src="${training.filePathStr}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${training.filePathStr}','90%','90%')" alt="${training.fileName}"></c:if>
+                                        <c:if test="${not empty training.filePathStr}">
+                                            <%-- 安全处理URL中的 & --%>
+                                            <c:set var="safeFilePath" value="${fn:replace(training.filePathStr, '&', '&amp;')}" />
+
+                                            <%-- 先从 training.fileName 里提取扩展名 --%>
+                                            <c:set var="fileNameArr" value="${fn:split(training.fileName, '.')}" />
+                                            <c:set var="fileExt" value="${fn:toLowerCase(fileNameArr[fn:length(fileNameArr) - 1])}" />
+
+                                            <%-- 如果没有后缀,尝试从 filePathStr 里提取 --%>
+                                            <c:choose>
+                                                <c:when test="${fn:contains(training.fileName, '.')}">
+                                                    <%-- 已经有后缀 --%>
+                                                    <c:set var="downloadFileName" value="${training.fileName}" />
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <%-- 从路径最后部分提取后缀 --%>
+                                                    <c:set var="pathParts" value="${fn:split(training.filePathStr, '/')}"/>
+                                                    <c:set var="lastPart" value="${pathParts[fn:length(pathParts) - 1]}" />
+                                                    <c:set var="lastPartArr" value="${fn:split(lastPart, '.')}" />
+                                                    <c:set var="pathExt" value="${fn:toLowerCase(lastPartArr[fn:length(lastPartArr) - 1])}" />
+                                                    <c:set var="downloadFileName" value="${training.fileName}.${pathExt}" />
+                                                </c:otherwise>
+                                            </c:choose>
+
+                                            <%-- 显示图片缩略图 --%>
+                                            <img src="${safeFilePath}" width="24" height="24"
+                                                 style="cursor:pointer; vertical-align:middle;"
+                                                 onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${safeFilePath}','90%','90%')"
+                                                 alt="文件预览" title="点击预览" />
+
+                                            <%-- 下载按钮 --%>
+                                            <a href="javascript:void(0);"
+                                               title="下载文件"
+                                               style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                               onclick="downloadFile('${ctx}', '${training.filePath}', '${downloadFileName}')">
+                                                <i class="fa fa-download"></i>
+                                            </a>
+                                        </c:if>
                                     </td>
                                     <td>
                                         ${training.remarks}
@@ -844,6 +986,96 @@
                     </div>
                 </div>
                 <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>劳动合同</h2></div>
+                    <div class="layui-item layui-col-xs12 form-table-container">
+                        <table id="labourTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="12%">合同类型</th>
+                                <th width="12%">合同编号</th>
+                                <th width="12%">合同期限</th>
+                                <th width="11%">合同起始日期</th>
+                                <th width="11%">合同终止日期</th>
+                                <th width="11%">试用期结束日期</th>
+                                <th width="11%">办理日期</th>
+                                <th width="20%">文件</th>
+                            </tr>
+                            </thead>
+                            <tbody id="labourList">
+                            <c:forEach items="${workStaffBasicInfo.laborContractList}" var="buyDetails" varStatus="status">
+                                <tr>
+                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+                                    <td>${buyDetails.contractNum}</td>
+                                    <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+                                    <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
+                                    <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+                                        <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+                                    <td class="text-left op-td">
+                                        <!-- 文件或图片展示区域 -->
+                                        <span id="laborContractList${varStatus.index}_fileName1">
+                                                            <c:if test="${not empty buyDetails.filePathStr}">
+                                                                <!-- 提取文件名 -->
+                                                                <c:set var="fileNameArr" value="${fn:split(buyDetails.filePath, '/')}" />
+                                                                <c:set var="fileName" value="${fileNameArr[fn:length(fileNameArr) - 1]}" />
+
+                                                                <!-- 提取文件扩展名 -->
+                                                                <c:set var="extArr" value="${fn:split(fileName, '.')}" />
+                                                                <c:set var="ext" value="${fn:toLowerCase(extArr[fn:length(extArr) - 1])}" />
+
+                                                                <!-- 判断是否是图片类型 -->
+                                                                <c:choose>
+                                                                    <c:when test="${ext == 'jpg' || ext == 'jpeg' || ext == 'png' || ext == 'gif' || ext == 'bmp' || ext == 'webp'}">
+                                                                        <!-- 图片预览 -->
+                                                                        <img src="${buyDetails.filePathStr}" width="24" height="24"
+                                                                             style="cursor:pointer; vertical-align:middle;"
+                                                                             onclick="preview('预览','${buyDetails.filePathStr}','90%','90%','1')"
+                                                                             alt="图片预览" title="点击预览图片" />
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(buyDetails.fileName,'pdf')}">
+                                                                                <a class="attention-info" href="javascript:void(0)" style="color: #007bff;" onclick="preview('预览','${buyDetails.filePathStr}','90%','90%','1')">${buyDetails.fileName}</a>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <a class="attention-info" href="javascript:void(0)" style="color: #007bff;" onclick="preview('预览','${buyDetails.filePathStr}','90%','90%')">${buyDetails.fileName}</a>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                        <!-- 普通文件预览(带图标和文件名,文件名超10字符截断) -->
+                                                                        <%--<a href="${buyDetails.filePathStr}" target="_blank" title="${buyDetails.fileName}" style="text-decoration:none;color:#007bff;">
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:length(buyDetails.fileName) > 10}">
+                                                                                    ${fn:substring(buyDetails.fileName, 0, 10)}...
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    ${buyDetails.fileName}
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </a>--%>
+
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:if>
+                                                        </span>
+
+                                        <!-- 下载按钮 -->
+                                        <a href="javascript:void(0);"
+                                           title="下载 ${buyDetails.fileName}"
+                                           style="color: #28a745; margin-left: 5px; text-decoration: none;"
+                                           onclick="downloadFile('${ctx}', '${buyDetails.filePath}', '${buyDetails.fileName}')">
+                                            <i class="fa fa-download"></i>
+                                        </a>
+
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+                <%--<div class="form-group layui-row">
                     <div class="form-group-label"><h2>电子档案</h2></div>
                     <div class="layui-item layui-col-xs12 form-table-container">
                         <table id="recordTable" class="table table-bordered table-condensed details">
@@ -875,7 +1107,7 @@
                             </tbody>
                         </table>
                     </div>
-                </div>
+                </div>--%>
             </form:form>
         </div>
     </div>