Prechádzať zdrojové kódy

审定单调整:若为内审项目,则审定单可上传多个并多个文件可同时签章

user5 1 rok pred
rodič
commit
ddc505512f

+ 9 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java

@@ -228,6 +228,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private String ZiXunShouRu;   //咨询收入
 	private String zaoJiaShiZhengHao;   //造价师注册证号
 	private String attachmentProjectSort;   //项目类别
+	private String attachmentProjectSortKey;   //项目类别
 	private String checkProcessInstanceId;   //检查流程id
 	private Integer checkStatus;   //检查状态
 	private String bzshbUserId; //总审用户id
@@ -1245,6 +1246,14 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 		this.attachmentProjectSort = attachmentProjectSort;
 	}
 
+	public String getAttachmentProjectSortKey() {
+		return attachmentProjectSortKey;
+	}
+
+	public void setAttachmentProjectSortKey(String attachmentProjectSortKey) {
+		this.attachmentProjectSortKey = attachmentProjectSortKey;
+	}
+
 	public String getCheckProcessInstanceId() {
 		return checkProcessInstanceId;
 	}

+ 19 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecordsExport.java

@@ -317,6 +317,8 @@ public class RuralProjectRecordsExport extends ActEntity<RuralProjectRecordsExpo
 	private String caseStatus;				//案例项目的状态
 	private String caseProcessId;			//案例项目的流程id
 	private Double ziXunBDE;			//上报中的咨询标的额
+	private String filingBoxNum;			//B类项目盒号
+	private String ppfFileNum;			//A类项目盒号
 
 
 
@@ -2323,4 +2325,21 @@ public class RuralProjectRecordsExport extends ActEntity<RuralProjectRecordsExpo
 	public void setProjectReportRecordAuditDate(Date projectReportRecordAuditDate) {
 		this.projectReportRecordAuditDate = projectReportRecordAuditDate;
 	}
+
+	@ExcelField(title="归档盒号", align=2, sort=26)
+	public String getFilingBoxNum() {
+		return filingBoxNum;
+	}
+
+	public void setFilingBoxNum(String filingBoxNum) {
+		this.filingBoxNum = filingBoxNum;
+	}
+
+	public String getPpfFileNum() {
+		return ppfFileNum;
+	}
+
+	public void setPpfFileNum(String ppfFileNum) {
+		this.ppfFileNum = ppfFileNum;
+	}
 }

+ 3 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/ProjectPaperFilingService.java

@@ -194,6 +194,9 @@ public class ProjectPaperFilingService extends CrudService<ProjectPaperFilingDao
             workActivityProcessService.insert(workActivityProcess);
             workActivityProcessService.insertAuditsByType(bggdglys,processInstance.getId(),1,1);
         }
+        //修改向目标中纸质归档状态值
+        record.setPaperFilingStatus(paperFiling.getStatus().toString());
+        ruralProjectRecordsService.updateProjectPaperFiling(record);
         return "true";
     }
     /**

+ 14 - 4
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageAllService.java

@@ -1328,10 +1328,17 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
             projectRecords.setEndingCount(endingCount);
         }
         if(null!= projectRecords.getOffice() && StringUtils.isNotBlank(projectRecords.getOffice().getId())){
-            //查询该选择节点下所有的部门Id
-            List<String> officeIdList = officeService.getChildrenOffice(projectRecords.getOffice().getId());
-            officeIdList.add(projectRecords.getOffice().getId());
-            projectRecords.setOfficeIdList(officeIdList);
+            if("一部本部".equals(projectRecords.getOffice().getId())){
+                List<String> officeIdList = Lists.newArrayList();
+                Office office = officeService.getByName("工程一部");
+                officeIdList.add(office.getId());
+                projectRecords.setOfficeIdList(officeIdList);
+            }else{
+                //查询该选择节点下所有的部门Id
+                List<String> officeIdList = officeService.getChildrenOffice(projectRecords.getOffice().getId());
+                officeIdList.add(projectRecords.getOffice().getId());
+                projectRecords.setOfficeIdList(officeIdList);
+            }
         }
         page.setCountFlag(false);
         projectRecords.setPage(page);
@@ -1449,6 +1456,9 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
 
                     }
                 } else if ("2".equals(info.getSubmitMoney())){
+                    if(StringUtils.isNotBlank(info.getPpfFileNum())){
+                        info.setFilingBoxNum(info.getPpfFileNum());
+                    }
                     //设置电子未归档天数
                     if (null != info.getTwoAuditPassDate() && 5 != info.getProjectReportRecordStatus()
                             && 7!= info.getProjectReportRecordStatus()){

+ 3 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageElectronicSealService.java

@@ -3141,10 +3141,10 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
                 data.put("constructionUnitAssessmentFee","");
             }
             //扣除考核费后审定金额  扣除考核费后审定金额=审定金额-施工单位考核费
-            if(StringUtils.isNotBlank(projectReportSignatureInfo.getSubmitFee()) && StringUtils.isNotBlank(projectReportSignatureInfo.getAuthorizeFee())){
-                BigDecimal submitFee=new BigDecimal(projectReportSignatureInfo.getSubmitFee());
+            if(StringUtils.isNotBlank(projectReportSignatureInfo.getAuthorizeFee()) && StringUtils.isNotBlank(projectReportSignatureInfo.getAuthorizeFee())){
+                BigDecimal authorizeFee=new BigDecimal(projectReportSignatureInfo.getAuthorizeFee());
                 BigDecimal constructionUnitAssessmentFee=new BigDecimal(projectReportSignatureInfo.getConstructionUnitAssessmentFee());
-                BigDecimal subtract = submitFee.subtract(constructionUnitAssessmentFee);
+                BigDecimal subtract = authorizeFee.subtract(constructionUnitAssessmentFee);
                 // 四舍五入
                 BigDecimal value = subtract.setScale(2,BigDecimal.ROUND_HALF_UP);
                 // 不足两位小数补0

+ 278 - 98
src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/ApprovalThread.java

@@ -13,6 +13,7 @@ import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.service.WorkattachmentService;
 import com.jeeplus.modules.sys.utils.UserUtils;
@@ -85,117 +86,294 @@ public class ApprovalThread extends Thread {
             workClientAttachment.setAttachmentFlag("144");
             workClientAttachment.setAttachmentId(ruralProjectRecords.getId());
             List<Workattachment> fileList = workattachmentService.findList(workClientAttachment);
+
+            //创建一个用于存放签章文件documentId的集合
+            List<String> documentList = Lists.newArrayList();
+
             if(fileList.size()>0){
-                Workattachment workattachment = fileList.get(0);
-                if(StringUtils.isBlank(workattachment.getUrl())){
-                    disposeResult = "审定单文件存储路径为空,无法进行签章操作,请驳回后重新上传审定单";
-                    bool = false;
-                    notification(bool,disposeResult,"","","");
-                }
-                //下载审定单文件
-                String path = null;
-                if(System.getProperty("os.name").toLowerCase().contains("win")){
-                    path = "D:/attachment-file/";
-                }else{
-                    path = "/attachment-file/";
-                }
-                String file = workattachment.getUrl();
-                file = file.replace("amp;","");
-                String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
-                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 ossKey = file.split(cons+"/")[1];
-                new OSSClientUtil().downByStreamSaveLocal(ossKey,fileName,path+fileName);
-                //将下载下来的文件转换为file文件
-                File srcFile = new File(path+fileName);
-                File verticalInvalidFile = new File(path+fileName);
-                deleteFile = path+fileName;
-
-                //截取文件名称
-                String srcFileName = srcFile.getName().substring(0,srcFile.getName().lastIndexOf("."));
-                //截取文件后缀名
-                String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".")+1, srcFile.getName().length());
-                if(!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())){
-                    disposeResult = "请上传doc、docx或者pdf的文件进行签章操作";
-                    bool = false;
-                    notification(bool,disposeResult,"","","");
-                }
-                //获取真签单的documentId
-                HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
-                String code = hashMap.get("code").toString();
-
-                if("0".equals(code)){
-                    String result = hashMap.get("result").toString();
-                    HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
-                    documentId =  documentIdMap.get("documentId").toString();
-                    if("".equals(documentId)){
+                //判定是否为内审项目
+                if(("1".equals(ruralProjectRecords.getProjectType()) && "8".equals(ruralProjectRecords.getAttachmentProjectSort())) ||
+                        ("2".equals(ruralProjectRecords.getProjectType()) && ("5".equals(ruralProjectRecords.getAttachmentProjectSort())) || "6".equals(ruralProjectRecords.getAttachmentProjectSort()))){
+
+
+                    //循环遍历附件信息,并将附件信息的信息生成documentId用于生成签章contractId
+                    for (Workattachment workattachment : fileList) {
+                        if(StringUtils.isBlank(workattachment.getUrl())){
+                            bool = false;
+                            disposeResult =  "内审报告签章文件存储路径为空,无法进行签章操作,请驳回后重新上传盖章文件";
+                            notification(bool,disposeResult,"","","");
+                        }else{
+                            if(StringUtils.isBlank(workattachment.getUrl())){
+                                bool = false;
+                                disposeResult =  "内审报告签章文件存储路径为空,无法进行签章操作,请驳回后重新上传盖章文件";
+                                notification(bool,disposeResult,"","","");
+                            }else {
+                                //下载审定单文件
+                                String path = null;
+                                if(System.getProperty("os.name").toLowerCase().contains("win")){
+                                    path = "D:/attachment-file/";
+                                }else{
+                                    path = "/attachment-file/";
+                                }
+                                String file = workattachment.getUrl();
+                                file = file.replace("amp;","");
+                                String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+                                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 ossKey = file.split(cons+"/")[1];
+                                new OSSClientUtil().downByStreamSaveLocal(ossKey,fileName,path+fileName);
+                                //将下载下来的文件转换为file文件
+                                File srcFile = new File(path+fileName);
+                                deleteFile = path+fileName;
+
+                                //截取文件后缀名
+                                String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".")+1, srcFile.getName().length());
+                                if(!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())){
+                                    disposeResult =  "请上传doc、docx或者pdf的文件进行签章操作";
+                                    bool = false;
+                                    notification(bool,disposeResult,"","","");
+                                }else{
+
+                                    //获取真签单的documentId
+                                    HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
+                                    String code = hashMap.get("code").toString();
+
+                                    if("0".equals(code)){
+                                        String result = hashMap.get("result").toString();
+                                        HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
+                                        documentId =  documentIdMap.get("documentId").toString();
+                                        if("".equals(documentId)){
+                                            disposeResult =  "签章文件创建失败,签章文件存在问题";
+                                            bool = false;
+                                            notification(bool,disposeResult,"","","");
+                                        }else{
+                                            documentList.add(documentId);
+                                        }
+                                    }else{
+                                        String message = hashMap.get("message").toString();
+                                        disposeResult =  message;
+                                        bool = false;
+                                        notification(bool,disposeResult,"","","");
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    Workattachment workattachment = fileList.get(0);
+                    if(StringUtils.isBlank(workattachment.getUrl())){
+                        disposeResult = "审定单文件存储路径为空,无法进行签章操作,请驳回后重新上传审定单";
                         bool = false;
-                        disposeResult = "签章文件创建失败";
                         notification(bool,disposeResult,"","","");
+                    }
+                    //下载审定单文件
+                    String path = null;
+                    if(System.getProperty("os.name").toLowerCase().contains("win")){
+                        path = "D:/attachment-file/";
                     }else{
+                        path = "/attachment-file/";
+                    }
+                    String file = workattachment.getUrl();
+                    file = file.replace("amp;","");
+                    String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+                    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 ossKey = file.split(cons+"/")[1];
+                    new OSSClientUtil().downByStreamSaveLocal(ossKey,fileName,path+fileName);
+                    //将下载下来的文件转换为file文件
+                    File srcFile = new File(path+fileName);
+                    File verticalInvalidFile = new File(path+fileName);
+                    //截取文件名称
+                    String srcFileName = srcFile.getName().substring(0,srcFile.getName().lastIndexOf("."));
+
+
+
+                    if(documentList.size()>0){
                         //获取竖版假(空白)签单的documentId
                         String verticalInvalidDocumentId = SignaturePostUtil.getVerticalInvalidDocument(verticalInvalidFile.getName(),verticalInvalidFile);
-                        if("".equals(verticalInvalidDocumentId)){
+
+                        //先将数据进行保存
+                        //签章完成则进行数据的保存
+                        ruralProjectRecords.setReportInternalAuditSignatureFlag(0);
+                        ruralProjectRecords.setReportInternalAuditSignatureDocumentId(String.join(",", documentList));
+                        ruralProjectRecords.setReportInternalAuditSignatureContractId("");
+                        ruralProjectRecords.setReportInternalAuditSignatureFileName("报告号:" + projectReportData.getNumber() + ruralProjectRecords.getProjectName() + "内审签章文件");
+                        ruralProjectRecords.setReportInternalAuditSignatureUploadFileUser(UserUtils.getUser());
+                        ruralProjectRecords.setReportInternalAuditSignatureUploadDate(new Date());
+                        //修改签章对应信息文件
+                        projectReportDataService.updateReportInternalAuditSignatureInfo(ruralProjectRecords);
+
+
+                        //签章完成则进行数据的保存
+                        projectReportData.setSignatureFlag(0);
+                        projectReportData.setSignatureDocumentId(String.join(",", documentList));
+                        projectReportData.setSignatureInvalidDocumentId(verticalInvalidDocumentId);
+                        projectReportData.setSignatureContractId("");
+                        projectReportData.setSignatureFileName(srcFileName);
+                        projectReportData.setSignatureUploadFileUser(UserUtils.getUser());
+                        projectReportData.setSignatureUploadDate(new Date());
+                        //修改签章对应信息文件
+                        projectReportDataService.updateSignatureInfo(projectReportData);
+
+
+                        List<String> invalidDocumentList = Lists.newArrayList();
+                        documentList.add(verticalInvalidDocumentId);
+                        invalidDocumentList.add(verticalInvalidDocumentId);
+                        //将空白单的documentId存入数据库种
+                        projectReportData.setSignatureInvalidDocumentId(String.join(",", invalidDocumentList));
+
+
+                        //根据项目id 和 documentId生成合同id
+                        long s1 = System.currentTimeMillis();
+                        HashMap contractIdHashMap = ruralProjectMessageService.getSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"",projectReportSignature.getSignatureType());
+                        String contractIdCode = contractIdHashMap.get("code").toString();
+                        String contractId = "";
+                        if("0".equals(contractIdCode)){
+                            contractId = contractIdHashMap.get("contractId").toString();
+                            if("".equals(contractId)){
+                                disposeResult =  "签章文件创建失败";
+                                bool = false;
+                                notification(bool,disposeResult,"","","");
+                            }
+                        }else{
+                            disposeResult =  contractIdHashMap.get("message").toString();
+                            bool = false;
+                            notification(bool,disposeResult,"","","");
+                        }
+                        long s2 = System.currentTimeMillis();
+                        System.out.println("创建签章合同用时:" + (s2-s1));
+                    }else{
+                        String message = "签章文件创建失败,签章文件存在问题";
+                        disposeResult =  message;
+                        bool = false;
+                        notification(bool,disposeResult,"","","");
+                    }
+                }else{
+                    Workattachment workattachment = fileList.get(0);
+                    if(StringUtils.isBlank(workattachment.getUrl())){
+                        disposeResult = "审定单文件存储路径为空,无法进行签章操作,请驳回后重新上传审定单";
+                        bool = false;
+                        notification(bool,disposeResult,"","","");
+                    }
+                    //下载审定单文件
+                    String path = null;
+                    if(System.getProperty("os.name").toLowerCase().contains("win")){
+                        path = "D:/attachment-file/";
+                    }else{
+                        path = "/attachment-file/";
+                    }
+                    String file = workattachment.getUrl();
+                    file = file.replace("amp;","");
+                    String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+                    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 ossKey = file.split(cons+"/")[1];
+                    new OSSClientUtil().downByStreamSaveLocal(ossKey,fileName,path+fileName);
+                    //将下载下来的文件转换为file文件
+                    File srcFile = new File(path+fileName);
+                    File verticalInvalidFile = new File(path+fileName);
+                    deleteFile = path+fileName;
+
+                    //截取文件名称
+                    String srcFileName = srcFile.getName().substring(0,srcFile.getName().lastIndexOf("."));
+                    //截取文件后缀名
+                    String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".")+1, srcFile.getName().length());
+                    if(!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())){
+                        disposeResult = "请上传doc、docx或者pdf的文件进行签章操作";
+                        bool = false;
+                        notification(bool,disposeResult,"","","");
+                    }
+                    //获取真签单的documentId
+                    HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
+                    String code = hashMap.get("code").toString();
+
+                    if("0".equals(code)){
+                        String result = hashMap.get("result").toString();
+                        HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
+                        documentId =  documentIdMap.get("documentId").toString();
+                        if("".equals(documentId)){
                             bool = false;
-                            disposeResult = "竖版模板文件创建失败";
+                            disposeResult = "签章文件创建失败";
                             notification(bool,disposeResult,"","","");
                         }else{
-                            //签章完成则进行数据的保存
-                            projectReportData.setSignatureFlag(0);
-                            projectReportData.setSignatureDocumentId(documentId);
-                            projectReportData.setSignatureInvalidDocumentId(verticalInvalidDocumentId);
-                            projectReportData.setSignatureContractId("");
-                            projectReportData.setSignatureFileName(srcFileName);
-                            projectReportData.setSignatureUploadFileUser(UserUtils.getUser());
-                            projectReportData.setSignatureUploadDate(new Date());
-                            //修改签章对应信息文件
-                            projectReportDataService.updateSignatureInfo(projectReportData);
-
-
-                            List<String> documentList = Lists.newArrayList();
-                            List<String> invalidDocumentList = Lists.newArrayList();
-                            documentList.add(documentId);
-                            documentList.add(verticalInvalidDocumentId);
-                            //documentList.add(acrossInvalidDocumentId);
-                            invalidDocumentList.add(verticalInvalidDocumentId);
-                            //invalidDocumentList.add(acrossInvalidDocumentId);
-                            //将空白单的documentId存入数据库种
-                            projectReportData.setSignatureInvalidDocumentId(String.join(",", invalidDocumentList));
-                            //根据项目id 和 documentId生成合同id
-                            HashMap contractIdHashMap = ruralProjectMessageService.getSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"",projectReportSignature.getSignatureType());
-                            String contractIdCode = contractIdHashMap.get("code").toString();
-                            String contractId = "";
-                            if("0".equals(contractIdCode)){
-                                contractId = contractIdHashMap.get("contractId").toString();
-                                if("".equals(contractId)){
-                                    disposeResult = "签章文件创建失败";
+                            //获取竖版假(空白)签单的documentId
+                            String verticalInvalidDocumentId = SignaturePostUtil.getVerticalInvalidDocument(verticalInvalidFile.getName(),verticalInvalidFile);
+                            if("".equals(verticalInvalidDocumentId)){
+                                bool = false;
+                                disposeResult = "竖版模板文件创建失败";
+                                notification(bool,disposeResult,"","","");
+                            }else{
+                                //签章完成则进行数据的保存
+                                projectReportData.setSignatureFlag(0);
+                                projectReportData.setSignatureDocumentId(documentId);
+                                projectReportData.setSignatureInvalidDocumentId(verticalInvalidDocumentId);
+                                projectReportData.setSignatureContractId("");
+                                projectReportData.setSignatureFileName(srcFileName);
+                                projectReportData.setSignatureUploadFileUser(UserUtils.getUser());
+                                projectReportData.setSignatureUploadDate(new Date());
+                                //修改签章对应信息文件
+                                projectReportDataService.updateSignatureInfo(projectReportData);
+
+
+                                List<String> invalidDocumentList = Lists.newArrayList();
+                                documentList.add(documentId);
+                                documentList.add(verticalInvalidDocumentId);
+                                //documentList.add(acrossInvalidDocumentId);
+                                invalidDocumentList.add(verticalInvalidDocumentId);
+                                //invalidDocumentList.add(acrossInvalidDocumentId);
+                                //将空白单的documentId存入数据库种
+                                projectReportData.setSignatureInvalidDocumentId(String.join(",", invalidDocumentList));
+                                //根据项目id 和 documentId生成合同id
+                                HashMap contractIdHashMap = ruralProjectMessageService.getSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"",projectReportSignature.getSignatureType());
+                                String contractIdCode = contractIdHashMap.get("code").toString();
+                                String contractId = "";
+                                if("0".equals(contractIdCode)){
+                                    contractId = contractIdHashMap.get("contractId").toString();
+                                    if("".equals(contractId)){
+                                        disposeResult = "签章文件创建失败";
+                                        bool = false;
+                                        notification(bool,disposeResult,"","","");
+                                    }
+                                }else{
                                     bool = false;
+                                    disposeResult = contractIdHashMap.get("message").toString();
                                     notification(bool,disposeResult,"","","");
                                 }
-                            }else{
-                                bool = false;
-                                disposeResult = contractIdHashMap.get("message").toString();
-                                notification(bool,disposeResult,"","","");
                             }
-                        }
 
+                        }
+                    }else{
+                        String message = hashMap.get("message").toString();
+                        bool = false;
+                        disposeResult = message;
+                        notification(bool,disposeResult,"","","");
                     }
-                }else{
-                    String message = hashMap.get("message").toString();
-                    bool = false;
-                    disposeResult = message;
-                    notification(bool,disposeResult,"","","");
-                }
 
-                //进行静默签署
+                    //进行静默签署
                                 /*HashMap signbyCompanyHashMap = ruralProjectMessageService.signbyCompany(contractId, documentList);
                                 if(null != signbyCompanyHashMap){
                                     String signbyCompany = signbyCompanyHashMap.get("code").toString();
@@ -203,9 +381,11 @@ public class ApprovalThread extends Thread {
                                         disposeResult = signbyCompanyHashMap.get("message").toString();
                                     }
                                 }*/
-                //将documentId 和contractId存储到质量复核对应的数据种
-                //签章完成则进行数据的保存
-                //notification(bool,disposeResult,documentId,contractId,srcFileName);
+                    //将documentId 和contractId存储到质量复核对应的数据种
+                    //签章完成则进行数据的保存
+                    //notification(bool,disposeResult,documentId,contractId,srcFileName);
+                }
+
             }else{
                 disposeResult = "审定单文件未找到,无法进行签章操作";
                 bool = false;

+ 1 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageElectronicSealController.java

@@ -375,6 +375,7 @@ public class RuralProjectMessageElectronicSealController extends BaseController
                 //处理项目类别
                 for (MainDictDetail info: mainDictList) {
                     if(projectRecords.getAttachmentProjectSort().equals(info.getValue())){
+                        projectRecords.setAttachmentProjectSortKey(projectRecords.getAttachmentProjectSort());
                         projectRecords.setAttachmentProjectSort(info.getLabel());
                         break;
                     }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 41 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureOldMessageDisposeController.java


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

@@ -1758,21 +1758,21 @@ public class WorkProjectNotifyController extends BaseController {
 							ruralProjectRecords.setProcessInstanceId(projectApprovalSignature.getProcessInstanceId());
 						}
 
-						if(StringUtils.isNotBlank(ruralProjectRecords.getReportSignatureUrl())){
-							ruralProjectRecords.setReportSignatureUrlFlag(1);
+						if(StringUtils.isNotBlank(ruralProjectRecords.getReportInternalAuditSignatureUrl())){
+							ruralProjectRecords.setReportInternalAuditSignatureUrlFlag(1);
 							//处理文件路径
 							//如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
-							if(ruralProjectRecords.getReportSignatureUrl().contains("/xg-qz")){
-								if(StringUtils.isNotBlank(ruralProjectRecords.getReportSignatureUrl())){
-									String signatureUrl = ruralProjectRecords.getReportSignatureUrl().replace("/xg-qz","");
-									ruralProjectRecords.setReportSignatureUrl(signatureUrl);
+							if(ruralProjectRecords.getReportInternalAuditSignatureUrl().contains("/xg-qz")){
+								if(StringUtils.isNotBlank(ruralProjectRecords.getReportInternalAuditSignatureUrl())){
+									String signatureUrl = ruralProjectRecords.getReportInternalAuditSignatureUrl().replace("/xg-qz","");
+									ruralProjectRecords.setReportInternalAuditSignatureUrl(signatureUrl);
 								}
-								ruralProjectRecords.setReportSignatureUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + ruralProjectRecords.getReportSignatureUrl()));
+								ruralProjectRecords.setReportInternalAuditSignatureUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + ruralProjectRecords.getReportInternalAuditSignatureUrl()));
 							}else{
-								ruralProjectRecords.setReportSignatureUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + ruralProjectRecords.getReportSignatureUrl()));
+								ruralProjectRecords.setReportInternalAuditSignatureUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + ruralProjectRecords.getReportInternalAuditSignatureUrl()));
 							}
 						}else{
-							ruralProjectRecords.setReportSignatureUrlFlag(0);
+							ruralProjectRecords.setReportInternalAuditSignatureUrlFlag(0);
 						}
 					}
 					ruralProjectRecords.setAct(getByAct(ruralProjectRecords.getProcessInstanceId()));

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 130 - 220
src/main/resources/freemarker/projectInternalAuditSignature.ftl


+ 1 - 1
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml

@@ -1266,7 +1266,7 @@
 		LEFT JOIN sys_user c ON c.id = a.consultant_id
 		LEFT JOIN sys_user p ON p.id = a.principal_id
 		LEFT JOIN sys_user t ON t.id = a.technicist_id
-		WHERE a.signature_document_id = #{documentId}
+		WHERE a.signature_document_id like concat ('%',#{documentId},'%')
 	</select>
 
 

+ 13 - 7
src/main/webapp/webpage/modules/ruralprojectrecords/electronicSeal/ruralProjectRecordsApprovalForm.jsp

@@ -569,13 +569,19 @@
             $("#flagFile").val(false);
             var files = $("#attachment_file")[0].files;
             var length = $("#file_attachment").find("tr").length ;
-            if(length>0){
-                top.layer.msg("已上传审定单,审定单文件有且只能存在一条", {icon: 0});
-                return;
-            }
-            if(files.length>1){
-                top.layer.msg("只能够上传一个审定单签章文件", {icon: 0});
-                return;
+            var projectType = '${projectRecords.projectType}';
+            var attachmentProjectSort = '${projectRecords.attachmentProjectSortKey}';
+            if(("1" === projectType && "8" === attachmentProjectSort) || ("2" === projectType && ("5" === attachmentProjectSort || "6" === attachmentProjectSort))){
+
+            }else{
+                if(length>0){
+                    top.layer.msg("已上传审定单,审定单文件有且只能存在一条", {icon: 0});
+                    return;
+                }
+                if(files.length>1){
+                    top.layer.msg("只能够上传一个审定单签章文件", {icon: 0});
+                    return;
+                }
             }
             for(var i = 0;i<files.length;i++) {
                 var file = files[i];

+ 4 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/electronicSeal/ruralProjectRecordsReportInternalAuditSignatureView.jsp

@@ -1214,14 +1214,14 @@
                                     <div class="op-btn-box" >
                                         <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
                                         <c:if test="${status.index == 0}">
-                                            <c:if test="${not empty projectRecords.reportSignatureContractId}">
+                                            <c:if test="${not empty projectRecords.reportInternalAuditSignatureContractId}">
 
                                                 <c:choose>
-                                                    <c:when test="${projectRecords.reportSignatureUrlFlag == 1}">
-                                                        <a href="${projectRecords.reportSignatureUrl}" class="op-btn  op-btn-download layui-bg-orange">报告签章下载</a>
+                                                    <c:when test="${projectRecords.reportInternalAuditSignatureUrlFlag == 1}">
+                                                        <a href="${projectRecords.reportInternalAuditSignatureUrl}" class="op-btn  op-btn-download layui-bg-orange">内审报告签章下载</a>
                                                     </c:when>
                                                     <c:otherwise>
-                                                        <a href="javascript:location.href='${ctx}/ruralProject/signatureCallBack/downLoadReportAttach?contractId='+'${projectRecords.reportSignatureContractId}'" class="op-btn  op-btn-download layui-bg-orange">报告签章下载</a>
+                                                        <a href="javascript:location.href='${ctx}/ruralProject/signatureCallBack/downLoadReportAttach?contractId='+'${projectRecords.reportInternalAuditSignatureContractId}'" class="op-btn  op-btn-download layui-bg-orange">报告签章下载</a>
                                                     </c:otherwise>
                                                 </c:choose>
                                             </c:if>