瀏覽代碼

军工保密证书功能和人员信息调整功能提交

徐滕 2 周之前
父節點
當前提交
475e9ef2d1
共有 22 個文件被更改,包括 709 次插入64 次删除
  1. 14 1
      src/main/java/com/jeeplus/modules/militaryIndustryConfidentiality/service/MilitaryIndustryConfidentialityService.java
  2. 0 2
      src/main/java/com/jeeplus/modules/militaryIndustryConfidentiality/web/MilitaryIndustryConfidentialityController.java
  3. 115 0
      src/main/java/com/jeeplus/modules/utils/SftpClientUtil.java
  4. 2 0
      src/main/java/com/jeeplus/modules/workstaff/dao/WorkStaffAchivesDao.java
  5. 9 0
      src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffEducation.java
  6. 37 1
      src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffRewards.java
  7. 227 4
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java
  8. 16 4
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffEducationService.java
  9. 37 8
      src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoController.java
  10. 30 2
      src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoDimissionController.java
  11. 31 2
      src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoEmploymentInController.java
  12. 4 0
      src/main/resources/mappings/modules/workstaff/WorkStaffAchivesDao.xml
  13. 8 4
      src/main/resources/mappings/modules/workstaff/WorkStaffEducationDao.xml
  14. 20 10
      src/main/webapp/webpage/modules/militaryIndustryConfidentiality/militaryIndustryConfidentialityList.jsp
  15. 7 3
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsList.jsp
  16. 6 3
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsList.jsp
  17. 9 5
      src/main/webapp/webpage/modules/sys/userInfo.jsp
  18. 5 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailAudit.jsp
  19. 20 5
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailForm.jsp
  20. 20 5
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModify.jsp
  21. 20 5
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp
  22. 72 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoList.jsp

+ 14 - 1
src/main/java/com/jeeplus/modules/militaryIndustryConfidentiality/service/MilitaryIndustryConfidentialityService.java

@@ -2,6 +2,7 @@ package com.jeeplus.modules.militaryIndustryConfidentiality.service;
 
 import com.google.common.collect.Lists;
 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.StringUtils;
@@ -42,11 +43,23 @@ public class MilitaryIndustryConfidentialityService extends CrudService<Military
             if(StringUtils.isNotEmpty(militaryIndustryConfidentiality.getFilePath())) {
                 militaryIndustryConfidentiality.setFilePathStr(WorkattachmentService.fileUrlManage(militaryIndustryConfidentiality.getFilePath()));
             }
-
         }
         return militaryIndustryConfidentiality;
     }
 
+
+    public Page<MilitaryIndustryConfidentiality> findPage(Page<MilitaryIndustryConfidentiality> page, MilitaryIndustryConfidentiality militaryIndustryConfidentiality) {
+        Page<MilitaryIndustryConfidentiality> pageList = super.findPage(page, militaryIndustryConfidentiality);
+        for (MilitaryIndustryConfidentiality industryConfidentiality : pageList.getList()) {
+            if (null != industryConfidentiality) {
+                if(StringUtils.isNotEmpty(industryConfidentiality.getFilePath())) {
+                    industryConfidentiality.setFilePathStr(WorkattachmentService.fileUrlManage(industryConfidentiality.getFilePath()));
+                }
+            }
+        }
+        return pageList;
+    }
+
     /**
      * 保存
      * @param militaryIndustryConfidentiality

+ 0 - 2
src/main/java/com/jeeplus/modules/militaryIndustryConfidentiality/web/MilitaryIndustryConfidentialityController.java

@@ -19,7 +19,6 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -72,7 +71,6 @@ public class MilitaryIndustryConfidentialityController extends BaseController {
             }
         }
         Page<MilitaryIndustryConfidentiality> page = service.findPage(new Page<MilitaryIndustryConfidentiality>(request, response), militaryIndustryConfidentiality);
-        List<MilitaryIndustryConfidentiality> list = page.getList();
         model.addAttribute("page", page);
         return "modules/militaryIndustryConfidentiality/militaryIndustryConfidentialityList";
     }

+ 115 - 0
src/main/java/com/jeeplus/modules/utils/SftpClientUtil.java

@@ -426,6 +426,121 @@ public class SftpClientUtil {
     }
 
     /**
+     * 下载文件
+     *
+     * @param directory     SFTP服务器的文件路径
+     * @param downloadFile  SFTP服务器上的文件名
+     * @return              字节数组
+     */
+    public byte[] downloadFileOnPathAndName(String directory, String downloadFile,String downLoadFilePath,String finalFileName) throws IOException {
+        File dirFile = new File(downLoadFilePath);
+        if (!dirFile.exists()) {
+            dirFile.mkdirs();
+        }
+        if("1".equals(uploadMode)){
+            OutputStream out = null;
+            InputStream in = null;
+            FileOutputStream fileOut = null;
+            String fileNamePath = directory +"/" + downloadFile;
+            try {
+                fileNamePath = URLDecoder.decode(fileNamePath,"UTF-8");
+                String path = fileNamePath.substring(fileNamePath.indexOf(".com") + 4, fileNamePath.length());
+                String fileName = URLEncoder.encode(finalFileName,"UTF-8");
+                BOSClientUtil bosClientUtil = new BOSClientUtil();
+                in = bosClientUtil.getObject(path);
+
+                BufferedInputStream bis = new BufferedInputStream(in);
+                //判断文件的保存路径后面是否以/结尾
+                if (!downLoadFilePath.endsWith("/")) {
+                    downLoadFilePath += "/";
+                }
+                //写入到文件(注意文件保存路径的后面一定要加上文件的名称)
+                fileOut = new FileOutputStream(downLoadFilePath + downloadFile);
+                BufferedOutputStream bos = new BufferedOutputStream(fileOut);
+                byte[] buf = new byte[4096];
+                int length = bis.read(buf);
+                //保存文件
+                while(length != -1)
+                {
+                    bos.write(buf, 0, length);
+                    length = bis.read(buf);
+                }
+                bos.close();
+                fileOut.close();
+            }catch (IOException e){
+                e.printStackTrace();
+            }finally {
+                if (out != null) {
+                    out.close();
+                }
+                if (in != null) {
+                    in.close();
+                }
+            }
+        }else if("2".equals(uploadMode)){
+            String fileNamePath = directory +"/" + downloadFile;
+            try {
+                fileNamePath = URLDecoder.decode(fileNamePath,"UTF-8");
+                String fileName = URLEncoder.encode(finalFileName,"UTF-8");
+                String key = fileNamePath.substring(1,fileNamePath.length());
+
+                //判断文件的保存路径后面是否以/结尾
+                if (!downLoadFilePath.endsWith("/")) {
+                    downLoadFilePath += "/";
+                }
+                //写入文件路径字符串
+                String downFileStr = downLoadFilePath + finalFileName;
+                new OSSClientUtil().downByStreamSaveLocal(key,fileName,downFileStr);
+
+            }catch (IOException e){
+                e.printStackTrace();
+            }
+        }else{
+            try{
+                String path = directory.substring(directory.indexOf("=")+1, directory.length());
+                if(StringUtils.isNotBlank(host) && ("127.0.0.1".equals(host) || "localhost".equals(host))){
+                    String wPath = path+"/"+downloadFile;
+                    File fileurl = new File(wPath);
+                    //将文件读入文件流
+                    InputStream inStream = new FileInputStream(fileurl);
+
+                    File file = new File(downLoadFilePath,downloadFile);
+                    //将下载保存到文件。
+                    FileOutputStream out = new FileOutputStream(file);
+                    Streams.copy(inStream, out, true);
+                }else{
+                    ChannelSftp sftp = connect();
+                    if(path != null && !"".equals(path)){
+                        sftp.cd(path);
+                    }
+                    InputStream inputStream = sftp.get(downloadFile);
+
+                    BufferedInputStream bis = new BufferedInputStream(inputStream);
+                    //写入到文件(注意文件保存路径的后面一定要加上文件的名称)
+                    FileOutputStream  fileOut = new FileOutputStream(downLoadFilePath + "/" + downloadFile);
+                    BufferedOutputStream bos = new BufferedOutputStream(fileOut);
+
+                    byte[] buf = new byte[4096];
+                    int length = bis.read(buf);
+                    //保存文件
+                    while(length != -1)
+                    {
+                        bos.write(buf, 0, length);
+                        length = bis.read(buf);
+                    }
+                    bos.close();
+                    bis.close();
+                }
+            }catch (SftpException | IOException e){
+                logger.error("文件下载异常!", e);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+
+    /**
      * File转MultipartFile
      * @param file
      * @return

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

@@ -57,4 +57,6 @@ public interface WorkStaffAchivesDao extends CrudDao<WorkStaffBasicInfo> {
     void updateWorkStaffAchieves(WorkStaffBasicInfo workStaffBasicInfo);
 
     void updateAlterationDate(String id);
+
+    public String getHightEduByAchiveId(String achiveId);
 }

+ 9 - 0
src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffEducation.java

@@ -32,6 +32,7 @@ public class WorkStaffEducation extends DataEntity<WorkStaffEducation> {
     private MultipartFile eduPhotoFile;
 	private String eduPhotoStr;		// 学历证书
 	private String degreePhotoStr;		// 学位证书
+	private String heightEdu;		// 是否最高学历
 
     public MultipartFile getDegreePhotoFile() {
         return degreePhotoFile;
@@ -164,4 +165,12 @@ public class WorkStaffEducation extends DataEntity<WorkStaffEducation> {
 	public void setDegreePhotoStr(String degreePhotoStr) {
 		this.degreePhotoStr = degreePhotoStr;
 	}
+
+	public String getHeightEdu() {
+		return heightEdu;
+	}
+
+	public void setHeightEdu(String heightEdu) {
+		this.heightEdu = heightEdu;
+	}
 }

+ 37 - 1
src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffRewards.java

@@ -6,6 +6,7 @@ package com.jeeplus.modules.workstaff.entity;
 
 import com.jeeplus.common.persistence.DataEntity;
 import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 奖惩情况Entity
@@ -22,6 +23,10 @@ public class WorkStaffRewards extends DataEntity<WorkStaffRewards> {
 	private String grade;		// 级别
 	private String reason;		// 原因
 	private String organization;		// 授予机构
+	private String filePath;		// 文件
+	private String filePathStr;		// 文件
+	private String fileName;		// 文件名
+	private MultipartFile file;
 	
 	public WorkStaffRewards() {
 		super();
@@ -93,5 +98,36 @@ public class WorkStaffRewards extends DataEntity<WorkStaffRewards> {
 	public void setOrganization(String organization) {
 		this.organization = organization;
 	}
-	
+
+	public String getFilePath() {
+		return filePath;
+	}
+
+	public void setFilePath(String filePath) {
+		this.filePath = filePath;
+	}
+
+	public String getFilePathStr() {
+		return filePathStr;
+	}
+
+	public void setFilePathStr(String filePathStr) {
+		this.filePathStr = filePathStr;
+	}
+
+	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;
+	}
 }

+ 227 - 4
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java

@@ -3,6 +3,9 @@
  */
 package com.jeeplus.modules.workstaff.service;
 
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.extra.spring.SpringUtil;
 import com.dingtalk.api.response.OapiV2DepartmentListsubResponse;
 import com.dingtalk.api.response.OapiV2UserCreateResponse;
 import com.google.common.collect.Lists;
@@ -15,6 +18,9 @@ import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.MenuStatusEnum;
 import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryRelationInfo;
+import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.sys.dao.AreaDao;
 import com.jeeplus.modules.sys.entity.Area;
 import com.jeeplus.modules.sys.entity.MainDictDetail;
@@ -25,6 +31,8 @@ import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.sysuseroffice.entity.Useroffice;
 import com.jeeplus.modules.sysuseroffice.service.UserofficeService;
+import com.jeeplus.modules.utils.SftpClientUtil;
+import com.jeeplus.modules.utils.ZipCompressUtil;
 import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
@@ -33,10 +41,7 @@ import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
 import com.jeeplus.modules.workrelationship.dao.WorkRelationshipDao;
 import com.jeeplus.modules.workrelationship.entity.WorkRelationship;
 import com.jeeplus.modules.workstaff.dao.*;
-import com.jeeplus.modules.workstaff.entity.DingTalkUser;
-import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
-import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfoExcel;
-import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
+import com.jeeplus.modules.workstaff.entity.*;
 import com.jeeplus.modules.workstaff.utils.DingTalkUtils;
 import com.jeeplus.modules.workstaffachiveslog.dao.WorkStaffAchivesLogDao;
 import com.jeeplus.modules.workstaffachiveslog.entity.WorkStaffAchivesLog;
@@ -48,12 +53,19 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.math.BigDecimal;
+import java.net.URLEncoder;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.NumberFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -1531,6 +1543,217 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         //钉钉逻辑
     }
 
+    public String exportAll(List<String> idList,String type) throws Exception {
+        //设置下载的压缩包名(固定字符+时间戳)
+        long timeMillis = System.currentTimeMillis();
+        String fileLocality = "";
+        switch (type) {
+            case "1"://身份证
+                fileLocality = "身份证附件_"+ timeMillis;
+                break;
+            case "2"://学历证书
+                fileLocality = "学历证书附件_"+ timeMillis;
+                break;
+            case "3"://学位证书
+                fileLocality = "学位证书附件_"+ timeMillis;
+                break;
+            case "4"://培训证书
+                fileLocality = "培训证书附件_"+ timeMillis;
+                break;
+            case "5"://执业资格证
+                fileLocality = "执业资格证附件_"+ timeMillis;
+                break;
+            case "6"://职称证书
+                fileLocality = "职称证书附件_"+ timeMillis;
+                break;
+            case "7"://外语语种证书
+                fileLocality = "外语语种证书附件_"+ timeMillis;
+                break;
+            case "8"://表彰
+                fileLocality = "表彰证书附件_"+ timeMillis;
+                break;
+            case "9"://劳动合同
+                fileLocality = "劳动合同附件_"+ timeMillis;
+                break;
+        }
+        //判定当前系统
+        String path = null;
+        if(System.getProperty("os.name").toLowerCase().contains("win")){
+            path = Global.getConfig("remoteServer.winDirectory");
+        }else{
+            path = Global.getConfig("remoteServer.directory");
+        }
+        path = path + "/" + fileLocality;
+        //检查该路径对应的目录是否存在. 如果不存在则创建目录
+        File dir=new File(path);
+        if (!dir.exists()) {
+            dir.mkdirs();
+        }
+
+        File resultFile = null;
+        File file = null;
+
+        try {
+            //遍历项目id并查询对应数据信息
+            for (String userId: idList) {
+                WorkStaffBasicInfo workStaffBasicInfo = this.get(userId);
+                String downloadPath = path + "/" + workStaffBasicInfo.getName();
+                File dirFile = null;
+
+                //按照achieveId查询
+                String id = workStaffBasicInfo.getId();
+                if (StringUtils.isNotBlank(id) && StringUtils.isNotBlank(workStaffBasicInfo.getAchiveId())) {
+                    workStaffBasicInfo.setId(workStaffBasicInfo.getAchiveId());
+                }
+
+                switch (type) {
+                    case "1"://身份证
+                        dirFile=new File(downloadPath + "_身份证附件");
+                        if(StringUtils.isNotBlank(workStaffBasicInfo.getIdCardPortraitPath())){
+                            this.disposeFileList( workStaffBasicInfo.getIdCardPortraitPath(), workStaffBasicInfo.getName() + "身份证人像面", dirFile.getPath());
+                        }
+                        if(StringUtils.isNotBlank(workStaffBasicInfo.getIdCardNationalEmblemPath())){
+                            this.disposeFileList( workStaffBasicInfo.getIdCardNationalEmblemPath(), workStaffBasicInfo.getName() + "身份证国徽面", dirFile.getPath());
+                        }
+
+                        break;
+                    case "2"://学历证书
+                        dirFile=new File(downloadPath + "_学历证书附件");
+                        educationService.query(workStaffBasicInfo);
+                        for (WorkStaffEducation workStaffEducation : workStaffBasicInfo.getEducationList()) {
+                            if(StringUtils.isNotBlank(workStaffEducation.getEduPhoto())){
+                                this.disposeFileList(workStaffEducation.getEduPhoto(),workStaffBasicInfo.getName() + workStaffEducation.getSchool() + "学历证书", dirFile.getPath());
+                            }
+                        }
+                        break;
+                    case "3"://学位证书
+                        dirFile=new File(downloadPath + "_学位证书附件");
+                        educationService.query(workStaffBasicInfo);
+                        for (WorkStaffEducation workStaffEducation : workStaffBasicInfo.getEducationList()) {
+                            this.disposeFileList(workStaffEducation.getDegreePhoto(),workStaffBasicInfo.getName() + workStaffEducation.getSchool() + "学位证书", dirFile.getPath());
+                        }
+                        break;
+                    case "4"://培训证书
+                        dirFile=new File(downloadPath + "_培训证书附件");
+                        trainingService.query(workStaffBasicInfo);
+                        for (WorkStaffTraining workStaffTraining : workStaffBasicInfo.getTrainingList()) {
+                            this.disposeFileList(workStaffTraining.getFilePath(),workStaffBasicInfo.getName() + workStaffTraining.getAgency() + "培训证书", dirFile.getPath());
+                        }
+                        break;
+                    case "5"://执业资格证
+                        dirFile=new File(downloadPath + "_执业资格证附件");
+                        certificateService.query(workStaffBasicInfo);
+                        for (WorkStaffCertificate workStaffCertificate : workStaffBasicInfo.getCertificateList()) {
+                            this.disposeFileList(workStaffCertificate.getFilePath(),workStaffBasicInfo.getName() + workStaffCertificate.getName() + "执业资格证书", dirFile.getPath());
+                        }
+                        break;
+                    case "6"://职称证书
+                        dirFile=new File(downloadPath + "_职称证书附件");
+                        titleService.query(workStaffBasicInfo);
+                        for (WorkStaffTitle workStaffTitle : workStaffBasicInfo.getTitleList()) {
+                            this.disposeFileList(workStaffTitle.getFilePath(),workStaffBasicInfo.getName() + workStaffTitle.getName() + "职称证书", dirFile.getPath());
+                        }
+                        break;
+                    case "7"://外语语种证书
+                        dirFile=new File(downloadPath + "_外语语种证书附件");
+                        languagesService.query(workStaffBasicInfo);
+                        for (WorkStaffLanguages workStaffLanguages : workStaffBasicInfo.getLanguageList()) {
+                            this.disposeFileList(workStaffLanguages.getFilePath(),workStaffBasicInfo.getName() + workStaffLanguages.getLanguage() + "语种证书", dirFile.getPath());
+                        }
+                        break;
+                    case "8"://表彰
+                        dirFile=new File(downloadPath + "_表彰证书附件");
+                        rewardsService.query(workStaffBasicInfo);
+                        for (WorkStaffRewards workStaffRewards : workStaffBasicInfo.getRewardsList()) {
+                            this.disposeFileList(workStaffRewards.getFilePath(),workStaffBasicInfo.getName() + workStaffRewards.getName() + "表彰证书", dirFile.getPath());
+                        }
+                        break;
+                    case "9"://劳动合同
+                        dirFile=new File(downloadPath + "_劳动合同附件");
+                        labourContractService.query(workStaffBasicInfo);
+                        for (WorkStaffLaborContract workStaffLaborContract : workStaffBasicInfo.getLaborContractList()) {
+                            this.disposeFileList(workStaffLaborContract.getFilePath(),workStaffBasicInfo.getName() + workStaffLaborContract.getFileName() + "劳动合同", dirFile.getPath());
+                        }
+                        break;
+                }
+
+            }
+            //处理完之后进行打包压缩并删除之前的文件
+            ZipCompressUtil zipUtil = new ZipCompressUtil();
+            resultFile = new File(path);
+            file = zipUtil.zipCompress(resultFile, true);
+
+        }catch (IOException e) {
+            logger.error("Exception e:"+e);
+        }
+        finally {
+            //路径是个文件且不为空时删除文件
+            if(resultFile.isFile()&&resultFile.exists()){
+                resultFile.delete();
+            }
+        }
+
+        return file.getPath();
+    }
+
+
+    /**
+     * 处理文件信息
+     * @param filePath
+     * @param fileName
+     * @param downloadPath
+     */
+    public void disposeFileList(String filePath,String fileName,String downloadPath) throws IOException {
+        SftpClientUtil sftpClientUtil = new SftpClientUtil();
+        String prefix = Global.getAliyunUrl();
+        String alyunPrefix = Global.getAliDownloadUrl();
+
+        if (filePath.startsWith(prefix)) {
+            filePath = filePath.substring(prefix.length());
+        }
+        if (filePath.startsWith(alyunPrefix)) {
+            filePath = filePath.substring(alyunPrefix.length());
+        }
+        String substring = filePath.substring(0, filePath.lastIndexOf("/"));
+        String extension = filePath.substring(filePath.lastIndexOf(".") + 1, filePath.length());
+        sftpClientUtil.downloadFileOnPathAndName(filePath.substring(0,filePath.lastIndexOf("/")),filePath.substring(filePath.lastIndexOf("/") + 1, filePath.length()),downloadPath,fileName + "." + extension);
+    }
+
+    /**
+     * 下载压缩文件
+     * @param filePath
+     * @param response
+     */
+    public void downloadZipFile(String filePath, HttpServletResponse response){
+        File file = new File(filePath);
+        // 取得文件名。
+        String fileName = file.getName();
+        InputStream in = null;
+        try {
+            fileName = URLEncoder.encode(fileName,"UTF8");
+            in = new FileInputStream(file);
+            response.reset();//重置 响应头
+            response.setCharacterEncoding("UTF-8");
+            response.setContentType("application/x-download");
+            response.setHeader("Content-disposition", "attachment; filename=" + fileName);
+
+            byte[] b = new byte[1024];
+            int len;
+            while ((len = in.read(b)) > 0){
+                response.getOutputStream().write(b, 0, len);
+            }
+            in.close();
+            response.getOutputStream().close();
+        }catch (IOException e) {
+            logger.error("Exception e:"+e);
+        }
+        finally {
+            //路径是个文件且不为空时删除文件
+            if(file.isFile()&&file.exists()){
+                file.delete();
+            }
+        }
+    }
 
 
 }

+ 16 - 4
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffEducationService.java

@@ -210,7 +210,7 @@ public class WorkStaffEducationService extends CrudService<WorkStaffEducationDao
                 Field[] declaredFields = newClass.getDeclaredFields();
                 for (Field field : declaredFields) {
                     String name = field.getName();
-                    if("school".equals(name)||"major".equals(name)||"edu".equals(name)||"degree".equals(name)||"eduType".equals(name)
+                    if("school".equals(name)||"major".equals(name)||"edu".equals(name)||"degree".equals(name)||"eduType".equals(name) || "heightEdu".equals(name)
                             || "startDate".equals(name)||"endDate".equals(name)||"eduPhoto".equals(name)||"degreePhoto".equals(name)){
                         String setMethod = "set"+name.substring(0,1).toUpperCase()+name.substring(1);
                         String getMethod = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
@@ -297,7 +297,7 @@ public class WorkStaffEducationService extends CrudService<WorkStaffEducationDao
                 Field[] declaredFields = newClass.getDeclaredFields();
                 for (Field field : declaredFields) {
                     String name = field.getName();
-                    if("school".equals(name)||"major".equals(name)||"edu".equals(name)||"degree".equals(name)||"eduType".equals(name)
+                    if("school".equals(name)||"major".equals(name)||"edu".equals(name)||"degree".equals(name)||"eduType".equals(name) || "heightEdu".equals(name)
                             || "startDate".equals(name)||"endDate".equals(name)||"eduPhoto".equals(name)||"degreePhoto".equals(name)){
                         String setMethod = "set"+name.substring(0,1).toUpperCase()+name.substring(1);
                         String getMethod = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
@@ -374,7 +374,7 @@ public class WorkStaffEducationService extends CrudService<WorkStaffEducationDao
                         for (Field field : declaredFields) {
                             String name = field.getName();
                             if("school".equals(name)||"major".equals(name)||"edu".equals(name)||"degree".equals(name)||"eduType".equals(name)
-                                    || "startDate".equals(name)||"endDate".equals(name)||"eduPhoto".equals(name)||"degreePhoto".equals(name)
+                                    || "startDate".equals(name)||"endDate".equals(name)||"eduPhoto".equals(name)||"degreePhoto".equals(name) || "heightEdu".equals(name)
                                     ||"degreePhotoFile".equals(name)||"eduPhotoFile".equals(name)){
                                 String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                                 WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
@@ -409,6 +409,12 @@ public class WorkStaffEducationService extends CrudService<WorkStaffEducationDao
                                                         DictUtils.getDictLabel(oldValue,"edu_type",""),
                                                         DictUtils.getDictLabel(newValue,"edu_type",""),
                                                         oldValue,newValue,newEducation.getId(),"修改");
+                                            }else if("heightEdu".equals(name)){
+                                                workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                        "教育经历",describes,name,
+                                                        DictUtils.getDictLabel(oldValue,"yes_no",""),
+                                                        DictUtils.getDictLabel(newValue,"yes_no",""),
+                                                        oldValue,newValue,newEducation.getId(),"修改");
                                             }else{
                                                 workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
                                                         "教育经历",describes,name,
@@ -456,7 +462,7 @@ public class WorkStaffEducationService extends CrudService<WorkStaffEducationDao
                     for (Field field : declaredFields) {
                         String name = field.getName();
                         if("school".equals(name)||"major".equals(name)||"edu".equals(name)||"degree".equals(name)||"eduType".equals(name)
-                                || "startDate".equals(name)||"endDate".equals(name)||"eduPhoto".equals(name)||"degreePhoto".equals(name)
+                                || "startDate".equals(name)||"endDate".equals(name)||"eduPhoto".equals(name)||"degreePhoto".equals(name) || "heightEdu".equals(name)
                                 ||"degreePhotoFile".equals(name)||"eduPhotoFile".equals(name)){
                             String methodName = "get"+name.substring(0,1).toUpperCase()+name.substring(1);
                             WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
@@ -488,6 +494,12 @@ public class WorkStaffEducationService extends CrudService<WorkStaffEducationDao
                                                 "",
                                                 DictUtils.getDictLabel(newValue,"edu_type",""),
                                                 "",newValue,newId,"新增");
+                                    }else if("heightEdu".equals(name)){
+                                        workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
+                                                "教育经历",describes,name,
+                                                "",
+                                                DictUtils.getDictLabel(newValue,"yes_no",""),
+                                                "",newValue,newId,"新增");
                                     }else{
                                         workStaffAchivesLogService.saveStaffLog(workStaffAchivesLog,workStaffBasicInfo.getId(),
                                                 "教育经历",describes,name,

+ 37 - 8
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoController.java

@@ -31,6 +31,7 @@ import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workreceiptsregister.entity.ResponseEntity;
 import com.jeeplus.modules.workrelationship.entity.WorkRelationship;
+import com.jeeplus.modules.workstaff.dao.WorkStaffAchivesDao;
 import com.jeeplus.modules.workstaff.entity.*;
 import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
 import com.jeeplus.modules.workstaff.service.WorkStaffCertificateService;
@@ -49,16 +50,10 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
+import java.io.*;
 import java.net.URLDecoder;
 import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -77,6 +72,8 @@ public class WorkStaffBasicInfoController extends BaseController {
 	@Autowired
 	private WorkStaffAchivesLogDao workStaffAchivesLogDao;
 	@Autowired
+	private WorkStaffAchivesDao workStaffAchivesDao;
+	@Autowired
 	private WorkProjectNotifyService workProjectNotifyService;
     @Autowired
     private SysImportInfoService sysImportInfoService;
@@ -133,6 +130,9 @@ public class WorkStaffBasicInfoController extends BaseController {
 		for (WorkStaffBasicInfo info:list){
 			info.setRoleId(roleService.getRoleIdByUserId(info.getUserId()));
 			info.setRoleName(roleService.getRoleNameByUserId(info.getUserId()));
+			//获取人员最高学历信息
+			workStaffAchivesDao.getHightEduByAchiveId(info.getAchiveId());
+
 		}
 		model.addAttribute("page", page);
 		return "modules/workstaff/workStaffBasicInfoList";
@@ -1193,4 +1193,33 @@ public class WorkStaffBasicInfoController extends BaseController {
 		addMessage(redirectAttributes, "员工登录权限更新成功");
 		return "redirect:"+Global.getAdminPath()+"/workstaff/workStaffBasicInfo/?repage";
 	}
+
+	/**
+	 * 项目相应文件批量下载并压缩
+	 */
+	@RequiresPermissions("ruralProject:ruralProjectRecords:del")
+	@RequestMapping(value = "exportAll")
+	public String exportAll(HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+		String listIds = request.getParameter("listId");
+		String type = request.getParameter("type");
+		List<String> idList = Arrays.asList(listIds.split(","));
+		String filePath = null;
+		try {
+			filePath = workStaffBasicInfoService.exportAll(idList,type);
+			workStaffBasicInfoService.downloadZipFile(filePath,response);
+			return null;
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "批量下载项目文件失败!");
+			logger.error("Exception e:"+e);
+		}finally {
+			if(StringUtils.isNotBlank(filePath)){
+				File file = new File(filePath);
+				//路径是个文件且不为空时删除文件
+				if(file.isFile()&&file.exists()){
+					file.delete();
+				}
+			}
+		}
+		return "redirect:"+Global.getAdminPath()+"/workstaff/workStaffBasicInfo/?repage";
+	}
 }

+ 30 - 2
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoDimissionController.java

@@ -1,9 +1,14 @@
 package com.jeeplus.modules.workstaff.web;
 
+import com.jeeplus.common.config.Global;
 import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.sys.service.RoleService;
 import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfoExcel;
 import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -11,7 +16,9 @@ import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -24,7 +31,7 @@ import java.util.List;
  */
 @Controller
 @RequestMapping(value = "${adminPath}/workstaff/workStaffBasicInfoDimission")
-public class WorkStaffBasicInfoDimissionController {
+public class WorkStaffBasicInfoDimissionController extends BaseController {
 
     @Autowired
     private WorkStaffBasicInfoService workStaffBasicInfoService;
@@ -74,6 +81,27 @@ public class WorkStaffBasicInfoDimissionController {
             info.setRoleName(roleService.getRoleNameByUserId(info.getUserId()));
         }
         model.addAttribute("page", page);
-        return "modules/workstaff/workStaffBasicInfoList";
+        return "modules/workstaff/workStaffBasicInfoDimissionList";
+    }
+
+
+    /**
+     * 导出excel文件
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfo:export")
+    @RequestMapping(value = "exportAchive", method= RequestMethod.POST)
+    public String exportFile(WorkStaffBasicInfo workStaffBasicInfo, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        try {
+            workStaffBasicInfo.setStatus("离职");
+            String fileName = "离职员工信息"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<WorkStaffBasicInfo> page = workStaffBasicInfoService.findPage(new Page<WorkStaffBasicInfo>(request, response, -1), workStaffBasicInfo);
+            List<WorkStaffBasicInfoExcel> excelData=workStaffBasicInfoService.getExcelData(page);
+            new ExportExcel("离职员工信息", WorkStaffBasicInfoExcel.class).setDataList(excelData).write(response, fileName).dispose();
+            addMessage(redirectAttributes, "导出离职员工信息记录成功!");
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出离职员工信息记录失败!失败信息:"+e.getMessage());
+        }
+        return "redirect:"+ Global.getAdminPath()+"/workstaff/workStaffBasicInfoDimission/?repage";
     }
 }

+ 31 - 2
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoEmploymentInController.java

@@ -1,9 +1,14 @@
 package com.jeeplus.modules.workstaff.web;
 
+import com.jeeplus.common.config.Global;
 import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.sys.service.RoleService;
 import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfoExcel;
 import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -11,7 +16,9 @@ import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -24,7 +31,7 @@ import java.util.List;
  */
 @Controller
 @RequestMapping(value = "${adminPath}/workstaff/workStaffBasicInfoEmploymentIn")
-public class WorkStaffBasicInfoEmploymentInController {
+public class WorkStaffBasicInfoEmploymentInController extends BaseController {
 
     @Autowired
     private WorkStaffBasicInfoService workStaffBasicInfoService;
@@ -74,6 +81,28 @@ public class WorkStaffBasicInfoEmploymentInController {
             info.setRoleName(roleService.getRoleNameByUserId(info.getUserId()));
         }
         model.addAttribute("page", page);
-        return "modules/workstaff/workStaffBasicInfoList";
+        return "modules/workstaff/workStaffBasicInfoEmploymentInList";
     }
+
+
+    /**
+     * 导出excel文件
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfo:export")
+    @RequestMapping(value = "exportAchive", method= RequestMethod.POST)
+    public String exportFile(WorkStaffBasicInfo workStaffBasicInfo, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        try {
+            workStaffBasicInfo.setStatus("返聘");
+            String fileName = "返聘员工信息"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<WorkStaffBasicInfo> page = workStaffBasicInfoService.findPage(new Page<WorkStaffBasicInfo>(request, response, -1), workStaffBasicInfo);
+            List<WorkStaffBasicInfoExcel> excelData=workStaffBasicInfoService.getExcelData(page);
+            new ExportExcel("返聘员工信息", WorkStaffBasicInfoExcel.class).setDataList(excelData).write(response, fileName).dispose();
+            addMessage(redirectAttributes, "导出返聘员工信息记录成功!");
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出返聘员工信息记录失败!失败信息:"+e.getMessage());
+        }
+        return "redirect:"+ Global.getAdminPath()+"/workstaff/workStaffBasicInfoEmploymentIn/?repage";
+    }
+
 }

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

@@ -864,4 +864,8 @@
 			alteration_date = now()
 		where id = #{id}
 	</update>
+
+	<select id="getHightEduByAchiveId" resultType="java.lang.String">
+		
+	</select>
 </mapper>

+ 8 - 4
src/main/resources/mappings/modules/workstaff/WorkStaffEducationDao.xml

@@ -19,7 +19,8 @@
 		a.start_date AS "startDate",
 		a.end_date AS "endDate",
 		a.edu_photo AS "eduPhoto",
-		a.degree_photo AS "degreePhoto"
+		a.degree_photo AS "degreePhoto",
+		a.height_edu AS "heightEdu"
 	</sql>
 	
 	<sql id="workStaffEducationJoins">
@@ -92,7 +93,8 @@
 			start_date,
 			end_date,
 			edu_photo,
-			degree_photo
+			degree_photo,
+			height_edu
 		) VALUES (
 			#{id},
 			#{createBy.id},
@@ -110,7 +112,8 @@
 			#{startDate},
 			#{endDate},
 			#{eduPhoto},
-			#{degreePhoto}
+			#{degreePhoto},
+			#{heightEdu}
 		)
 	</insert>
 	
@@ -128,7 +131,8 @@
 			start_date = #{startDate},
 			end_date = #{endDate},
 			edu_photo = #{eduPhoto},
-			degree_photo = #{degreePhoto}
+			degree_photo = #{degreePhoto},
+			height_edu = #{heightEdu}
 		WHERE id = #{id}
 	</update>
 	

+ 20 - 10
src/main/webapp/webpage/modules/militaryIndustryConfidentiality/militaryIndustryConfidentialityList.jsp

@@ -84,8 +84,15 @@
             });
         }
 
-        function setParentInfo(ids,names,nos,salarys){
-            return;
+        function previewImage(src) {
+            layer.open({
+                type: 1,
+                title: false,
+                area: ['80%', '80%'],
+                shadeClose: true,
+                content: '<div style="width: 100%; height: 100%; text-align: center; display: flex; align-items: center; justify-content: center;"><img src="' + src + '" style="max-width: 100%; max-height: 100%; object-fit: contain;" /></div>'
+
+            });
         }
 	</script>
 </head>
@@ -204,7 +211,7 @@
             ,page: false
             ,cols: [[
                 {field:'index',align:'center', title: '序号',width:40}
-                ,{field:'userName',align:'center', title: '姓名',minWidth:100,templet:function(d){
+                ,{field:'userName',align:'center', title: '姓名',width:100,templet:function(d){
                         if (!d.wsbiId && !d.userId) {
                             // wsbiId 为空,直接显示用户名(无链接)
                             return '<span title="' + d.userName + '">' + d.userName + '</span>';
@@ -214,18 +221,20 @@
                                 "<span title=\"" + d.userName + "\">" + d.userName + "</span></a>";
                         }
                 }}
-                ,{field:'personnelType',align:'center', title: '所在单位',minWidth:150}
-                ,{field:'name',align:'center', title: '证书名称', minWidth:100}
                 ,{field:'num',align:'center', title: '证书编号', minWidth:100, templet:function(d){
                         // wsbiId 不为空,显示可点击链接
                         return "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看证书详情', '${ctx}/militaryIndustryConfidentiality/view?id=" + d.id + "','95%','95%')\">" +
                             "<span title=\"" + d.num + "\">" + d.num + "</span></a>";
+                }}
+                ,{field:'personnelType',align:'center', title: '所在单位',width:120}
+                ,{field:'officeName',align:'center', title: '部门', width:120}
+                ,{field:'effectiveDate',align:'center', title: '证书生效日期', width:120}
+                ,{field:'endDate',align:'center', title: '证书到期日期', width:120}
+                ,{field:'status',align:'center', title: '证书状态', width:80}
+                ,{field:'filePathStr',align:'center', title: '证书', width:100,templet:function (d) {
+                        if (!d.filePathStr) return '';
+                        return '<img src="' + d.filePathStr + '" style="max-width:60px; max-height:60px; cursor:pointer; border-radius:4px;" onclick="previewImage(\'' + d.filePathStr + '\')" />';
                     }}
-                ,{field:'officeName',align:'center', title: '部门', minWidth:100}
-                ,{field:'effectiveDate',align:'center', title: '证书生效日期', minWidth:100}
-                ,{field:'periodOfValidity',align:'center', title: '证书有效期(年)', minWidth:100}
-                ,{field:'endDate',align:'center', title: '证书到期日期', minWidth:100}
-                ,{field:'status',align:'center', title: '证书状态', minWidth:80}
                 ,{field:'op',align:'center',title:"操作",width:260,templet:function(d){
                         ////对操作进行初始化
                         var xml = "<div class=\"layui-btn-group\">";
@@ -261,6 +270,7 @@
                     , "num": "${militaryIndustryConfidentiality.num}"
                     , "effectiveDate": "<fmt:formatDate value="${militaryIndustryConfidentiality.effectiveDate}" pattern="yyyy-MM-dd"/>"
                     , "periodOfValidity": "${militaryIndustryConfidentiality.periodOfValidity}"
+                    , "filePathStr": "${militaryIndustryConfidentiality.filePathStr}"
                     , "endDate": "<fmt:formatDate value="${militaryIndustryConfidentiality.endDate}" pattern="yyyy-MM-dd"/>"
                     , "status":"${fns:getMainDictLabels(militaryIndustryConfidentiality.status,',','militaryIndustryConfidentiality_status', '')}"
                     , "personnelType":"${fns:getMainDictLabels(militaryIndustryConfidentiality.personnelType,',','militaryIndustryConfidentiality_personnel_type', '')}"

+ 7 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsList.jsp

@@ -827,9 +827,13 @@
 			if (listId.length <= 0) {
 				layer.msg("请选择需要下载的项目信息", {icon: 2})
 			} else {
-				$("#searchForm").attr("action","${ctx}/ruralProject/ruralProjectRecords/exportAll?listId="+ listId);
-				$("#searchForm").submit();
-				return true;
+				/*$("#searchForm").attr("action","${ctx}/ruralProject/ruralProjectRecords/exportAll?listId="+ listId);
+				$("#searchForm").submit();*/
+
+				// 发起下载请求
+				window.location.href = "${ctx}/ruralProject/ruralProjectRecords/exportAll?listId="+ listId;
+
+				layer.closeAll();
 			}
 		});
     })

+ 6 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsList.jsp

@@ -693,9 +693,12 @@
 			if (listId.length <= 0) {
 				layer.msg("请选择需要下载的项目信息", {icon: 2})
 			} else {
-				$("#searchForm").attr("action","${ctx}/ruralProject/ruralProjectRecords/exportAll?listId="+ listId);
-				$("#searchForm").submit();
-				return true;
+				/*$("#searchForm").attr("action","${ctx}/ruralProject/ruralProjectRecords/exportAll?listId="+ listId);
+				$("#searchForm").submit();*/
+				// 发起下载请求
+				window.location.href = "${ctx}/ruralProject/ruralProjectRecords/exportAll?listId="+ listId;
+
+				layer.closeAll();
 			}
 		});
     })

+ 9 - 5
src/main/webapp/webpage/modules/sys/userInfo.jsp

@@ -810,11 +810,12 @@
                                         <table id="educationTable" class="table table-bordered table-condensed details">
                                             <thead>
                                             <tr>
-                                                <th width="12%"><span class="require-item">*</span>毕业院校</th>
-                                                <th width="12%">所学专业</th>
-                                                <th width="12%"><span class="require-item">*</span>学    历</th>
-                                                <th width="12%">学    位</th>
-                                                <th width="12%"><span class="require-item">*</span>学历性质</th>
+                                                <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 class="require-item">*</span>学历性质</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="10%">学历证书</th>
@@ -840,6 +841,9 @@
                                                             ${fns:getDictLabel(education.eduType,'edu_type','')}
                                                     </td>
                                                     <td>
+                                                            ${fns:getDictLabel(education.heightEdu,'yes_no','')}
+                                                    </td>
+                                                    <td>
                                                         <fmt:formatDate value="${education.startDate}" pattern="yyyy-MM-dd"/>
                                                     </td>
                                                     <td>

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

@@ -692,6 +692,7 @@
                                 <th width="12%"><span class="require-item">*</span>学    历</th>
                                 <th width="8%">学    位</th>
                                 <th width="8%"><span class="require-item">*</span>学历性质</th>
+                                <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>
@@ -726,6 +727,10 @@
                                         <input name="educationList[${varStatus.index}].eduType" value="${education.eduType}" type="hidden" readonly="true" class="form-control  layui-input" />
                                     </td>
                                     <td style="text-align:center;">
+                                        <input  id="educationList${varStatus.index}_heightEdu" value="${fns:getDictLabel(education.heightEdu,'yes_no','')}" type="text" readonly="true" class="form-control layui-input" />
+                                        <input name="educationList[${varStatus.index}].heightEdu" value="${education.heightEdu}" type="hidden" readonly="true" class="form-control  layui-input" />
+                                    </td>
+                                    <td style="text-align:center;">
                                         <input id="educationList${varStatus.index}_startDate" name="educationList[${varStatus.index}].startDate"  type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                                value="<fmt:formatDate value="${education.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                     </td>

+ 20 - 5
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailForm.jsp

@@ -750,13 +750,14 @@
                             <thead>
                             <tr>
                                 <th class="hide"></th>
-                                <th width="10%"><span class="require-item">*</span>毕业院校</th>
-                                <th width="10%">所学专业</th>
-                                <th width="12%"><span class="require-item">*</span>学    历</th>
+                                <th width="8%"><span class="require-item">*</span>毕业院校</th>
+                                <th width="8%">所学专业</th>
+                                <th width="8%"><span class="require-item">*</span>学    历</th>
                                 <th width="8%">学    位</th>
                                 <th width="8%"><span class="require-item">*</span>学历性质</th>
-                                <th width="11%"><span class="require-item">*</span>入学日期</th>
-                                <th width="11%">毕业日期</th>
+                                <th width="8%"><span class="require-item">*</span>是否最高学历</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%">学位证书<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                                 <th width="10%">操作</th>
@@ -799,6 +800,13 @@
                                         </select>
                                     </td>
                                     <td style="text-align:center;">
+                                        <select name="educationList[${varStatus.index}].heightEdu" id="educationList${varStatus.index}_heightEdu" class="form-control">
+                                            <c:forEach items="${fns:getDictList('yes_no')}" var="var">
+                                                <option value="${var.value}" <c:if test="${education.heightEdu eq var.value}">selected</c:if>>${var.label}</option>
+                                            </c:forEach>
+                                        </select>
+                                    </td>
+                                    <td style="text-align:center;">
                                         <input id="educationList${varStatus.index}_startDate" name="educationList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                                value="<fmt:formatDate value="${education.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                     </td>
@@ -857,6 +865,13 @@
                         </select>
                     </td>
                     <td style="text-align:center;">
+                        <select name="educationList[{{idx}}].heightEdu" id="educationList{{idx}}_heightEdu" class="form-control">
+                            <c:forEach items="${fns:getDictList('yes_no')}" var="var">
+                                <option value="${var.value}" <c:if test="${row.heightEdu eq var.value}">selected</c:if>>${var.label}</option>
+                            </c:forEach>
+                        </select>
+                    </td>
+                    <td style="text-align:center;">
                         <input id="educationList{{idx}}_startDate" name="educationList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                value="<fmt:formatDate value="${row.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                     </td>

+ 20 - 5
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModify.jsp

@@ -691,13 +691,14 @@
                             <thead>
                             <tr>
                                 <th class="hide"></th>
-                                <th width="10%"><span class="require-item">*</span>毕业院校</th>
-                                <th width="10%">所学专业</th>
-                                <th width="12%"><span class="require-item">*</span>学    历</th>
+                                <th width="8%"><span class="require-item">*</span>毕业院校</th>
+                                <th width="8%">所学专业</th>
+                                <th width="8%"><span class="require-item">*</span>学    历</th>
                                 <th width="8%">学    位</th>
                                 <th width="8%"><span class="require-item">*</span>学历性质</th>
-                                <th width="11%"><span class="require-item">*</span>入学日期</th>
-                                <th width="11%">毕业日期</th>
+                                <th width="8%"><span class="require-item">*</span>是否最高学历</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%">学位证书<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                                 <th width="10%">操作</th>
@@ -740,6 +741,13 @@
                                         </select>
                                     </td>
                                     <td style="text-align:center;">
+                                        <select name="educationList[${varStatus.index}].heightEdu" id="educationList${varStatus.index}_heightEdu" class="form-control">
+                                            <c:forEach items="${fns:getDictList('yes_no')}" var="var">
+                                                <option value="${var.value}" <c:if test="${education.heightEdu eq var.value}">selected</c:if>>${var.label}</option>
+                                            </c:forEach>
+                                        </select>
+                                    </td>
+                                    <td style="text-align:center;">
                                         <input id="educationList${varStatus.index}_startDate" name="educationList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                                style="background-color: #fff" placeholder="入学日期" value="<fmt:formatDate value="${education.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                     </td>
@@ -798,6 +806,13 @@
                         </select>
                     </td>
                     <td style="text-align:center;">
+                        <select name="educationList[{{idx}}].heightEdu" id="educationList{{idx}}_heightEdu" class="form-control">
+                            <c:forEach items="${fns:getDictList('yes_no')}" var="var">
+                                <option value="${var.value}" <c:if test="${row.heightEdu eq var.value}">selected</c:if>>${var.label}</option>
+                            </c:forEach>
+                        </select>
+                    </td>
+                    <td style="text-align:center;">
                         <input id="educationList{{idx}}_startDate" name="educationList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                placeholder="入学时间" style="background-color:#fff" value="<fmt:formatDate value="${row.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                     </td>

+ 20 - 5
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp

@@ -1107,13 +1107,14 @@
                         <thead>
                         <tr>
                             <th class="hide"></th>
-                            <th width="10%"><span class="require-item">*</span>毕业院校</th>
-                            <th width="10%">所学专业</th>
-                            <th width="12%"><span class="require-item">*</span>学    历</th>
+                            <th width="8%"><span class="require-item">*</span>毕业院校</th>
+                            <th width="8%">所学专业</th>
+                            <th width="8%"><span class="require-item">*</span>学    历</th>
                             <th width="8%">学    位</th>
                             <th width="8%"><span class="require-item">*</span>学历性质</th>
-                            <th width="11%"><span class="require-item">*</span>入学日期</th>
-                            <th width="11%">毕业日期</th>
+                            <th width="8%"><span class="require-item">*</span>是否最高学历</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%">学位证书<span style="color: #FF8C69; font-size: 10px; font-weight: normal; margin-left: 5px;">(图片)</span></th>
                             <th width="10%">操作</th>
@@ -1156,6 +1157,13 @@
                                     </select>
                                 </td>
                                 <td style="text-align:center;">
+                                    <select name="educationList[${varStatus.index}].heightEdu" id="educationList${varStatus.index}_heightEdu" class="form-control">
+                                        <c:forEach items="${fns:getDictList('yes_no')}" var="var">
+                                            <option value="${var.value}" <c:if test="${education.heightEdu eq var.value}">selected</c:if>>${var.label}</option>
+                                        </c:forEach>
+                                    </select>
+                                </td>
+                                <td style="text-align:center;">
                                     <input id="educationList${varStatus.index}_startDate" name="educationList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                            value="<fmt:formatDate value="${education.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                 </td>
@@ -1217,6 +1225,13 @@
                         </select>
                     </td>
                     <td style="text-align:center;">
+                        <select name="educationList[{{idx}}].heightEdu" id="educationList{{idx}}_heightEdu" class="form-control">
+                            <c:forEach items="${fns:getDictList('yes_no')}" var="var">
+                                <option value="${var.value}" <c:if test="${row.heightEdu eq var.value}">selected</c:if>>${var.label}</option>
+                            </c:forEach>
+                        </select>
+                    </td>
+                    <td style="text-align:center;">
                         <input id="educationList{{idx}}_startDate" name="educationList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                               style="background-color:#fff" placeholder="入学日期" value="<fmt:formatDate value="${row.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                     </td>

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

@@ -294,6 +294,9 @@
                         <shiro:hasPermission name="workstaff:workStaffBasicInfo:export">
                             <table:exportExcel url="${ctx}/workstaff/workStaffBasicInfo/exportAchive"></table:exportExcel><!-- 导出按钮 -->
                         </shiro:hasPermission>
+                        <shiro:hasPermission name="workstaff:workStaffBasicInfo:batchExport">
+                            <button type="button" data-toggle="tooltip" data-placement="top" class="layui-btn layui-btn-sm layui-bg-blue" id="exportAll"> 批量下载附件</button>
+                        </shiro:hasPermission>
                         <button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
                     </div>
 <%--                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:add">--%>
@@ -338,6 +341,7 @@
             ,elem: '#contentTable'
             ,page: false
             ,cols: [[
+                {checkbox: true, fixed: true},
                 {field:'index',align:'center', title: '序号',width:40}
                 ,{field:'no',align:'center', title: '工号',minWidth:100,templet:function(d){
                         var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfo/view?id="+d.id+"','95%','95%')\">" +
@@ -511,6 +515,74 @@
     $(window).resize(function(){
         resizeListWindow1();
     });
+
+    // 点击导出按钮事件
+    $("#exportAll").bind("click", function () {
+        var checkList = layui.table.checkStatus('contentTable').data;
+        var listId = [];
+        $.each(checkList, function (i, data) {
+            listId.push(data.id);
+        });
+
+        if (listId.length <= 0) {
+            layer.msg("请选择需要下载的人员信息", { icon: 2 });
+            return;
+        }
+
+        // 弹出附件类型选择弹窗
+        layer.open({
+            type: 1,
+            title: '选择附件类型',
+            area: ['550px', '450px'], // 设置宽高
+            shadeClose: true,
+            content: `
+      <div style="padding: 20px; height: 100%; box-sizing: border-box; color: #000; font-size: 14px; position: relative;">
+        <form class="layui-form" id="downloadForm" style="height: 100%;">
+          <div class="layui-form-item">
+            <label class="layui-form-label" style="color: #000;">附件类型</label>
+            <div class="layui-input-block">
+              <select name="attachmentType" lay-filter="attachmentTypeSelect">
+                <option value="1">身份证(正反面)</option>
+                <option value="2">学历证书</option>
+                <option value="3">学位证书</option>
+                <option value="4">培训证书</option>
+                <option value="5">执业资格证证书</option>
+                <option value="6">职称证书</option>
+                <option value="7">外语语种证书</option>
+                <option value="9">劳动合同</option>
+              </select>
+            </div>
+          </div>
+
+          <!-- 右下角按钮 -->
+          <div style="position: absolute; bottom: 20px; right: 20px;">
+            <button type="button" class="layui-btn layui-btn-normal" id="confirmDownload">确认下载</button>
+          </div>
+        </form>
+      </div>
+    `,
+            success: function () {
+                layui.form.render(); // 渲染 layui 的 select 组件
+
+                // 绑定确认按钮事件
+                $("#confirmDownload").on("click", function () {
+                    var type = $("#downloadForm select[name='attachmentType']").val();
+
+                    // 替换成你的下载接口地址
+                    /*$("#searchForm").attr("action","${ctx}/workstaff/workStaffBasicInfo/exportAll?listId="+ listId + "&type=" + type);
+                    $("#searchForm").submit();*/
+
+                    // 发起下载请求
+                    window.location.href = "${ctx}/workstaff/workStaffBasicInfo/exportAll?listId="+ listId + "&type=" + type;
+
+                    layer.closeAll();
+                });
+            }
+        });
+    });
+
+
+
 </script>
 </body>
 </html>