Jelajahi Sumber

报告签章代码

user5 3 tahun lalu
induk
melakukan
9ee071e48c
21 mengubah file dengan 525 tambahan dan 102 penghapusan
  1. 8 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportDataDao.java
  2. 11 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java
  3. 7 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectRecordsDao.java
  4. 9 9
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/Location.java
  5. 18 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java
  6. 30 3
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageElectronicSealService.java
  7. 133 30
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java
  8. 10 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  9. 25 8
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java
  10. 6 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageElectronicSealController.java
  11. 57 3
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureCallBackController.java
  12. 5 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java
  13. 0 41
      src/main/resources/freemarker/projectSignature.ftl
  14. 26 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml
  15. 4 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml
  16. 1 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageElectronicSealDao.xml
  17. 25 1
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  18. 3 0
      src/main/resources/mappings/modules/sys/WorkattachmentDao.xml
  19. 8 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/downloadType/importWordReportForm.jsp
  20. 84 4
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/electronicSeal/ruralProjectMessageElectronicSealList.jsp
  21. 55 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/ruralProjectRecordsView.jsp

+ 8 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportDataDao.java

@@ -8,6 +8,7 @@ import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportTreeData;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectReportData;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant;
 import com.jeeplus.modules.sys.entity.Workattachment;
@@ -156,6 +157,13 @@ public interface ProjectReportDataDao extends CrudDao<ProjectReportData> {
     Integer updateSignatureInfo(ProjectReportData projectReportData);
 
     /**
+     * 修改报告签章 项目重的信息
+     * @param records
+     * @return
+     */
+    Integer updateReportSignatureInfo(RuralProjectRecords records);
+
+    /**
      * 根据签章的contractId查询报告信息
      * @param contractId
      * @return

+ 11 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java

@@ -22,6 +22,7 @@ import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.projectreportnum.service.ProjectReportNumService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectReportData;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
@@ -1623,6 +1624,16 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 	}
 
 	/**
+	 * 修改报告签章 项目重的信息
+	 * @param records
+	 * @return
+	 */
+	@Transactional(readOnly = false)
+	public void updateReportSignatureInfo(RuralProjectRecords records) {
+		dao.updateReportSignatureInfo(records);
+	}
+
+	/**
 	 * 根据签章contractId查询报告信息
 	 * @param contractId
 	 * @return

+ 7 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectRecordsDao.java

@@ -245,4 +245,11 @@ public interface RuralProjectRecordsDao extends CrudDao<RuralProjectRecords> {
      * @return
      */
     Integer getProjectByNameList(@Param("projectNameList") List<String> projectNameList);
+
+    /**
+     * 根据签章id查询信息
+     * @param contractId
+     * @return
+     */
+    RuralProjectRecords getProjectRecordsByContractId(String contractId);
 }

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

@@ -9,11 +9,11 @@ public class Location {
     private String id;
     private String documentId ; //合同文档ID
     private String rectType ;   //签章类型
-    private Integer page ;      //签署页码,坐标指定位置时必须,0:全部页,-1:最后一页,其他:第page页
+    private String page ;      //签署页码,坐标指定位置时必须,0:全部页,-1:最后一页,其他:第page页
     private String keyword ;    //关键字,关键字指定位置时必须
     private Integer keywordIndex ;  //第几个关键字,0:全部,-1:最后一个,其他:第keyIndex 个,默认为1
-    private Double offsetX ;    //X轴坐标,坐标定位时必传,关键字定位时选传
-    private Double offsetY ;    //Y轴坐标,坐标定位时必传,关键字定位时选传
+    private String offsetX ;    //X轴坐标,坐标定位时必传,关键字定位时选传
+    private String offsetY ;    //Y轴坐标,坐标定位时必传,关键字定位时选传
     private String contractId ;
     private String signatoryId ;
     private String actionId ;
@@ -42,11 +42,11 @@ public class Location {
         this.rectType = rectType;
     }
 
-    public Integer getPage() {
+    public String getPage() {
         return page;
     }
 
-    public void setPage(Integer page) {
+    public void setPage(String page) {
         this.page = page;
     }
 
@@ -66,19 +66,19 @@ public class Location {
         this.keywordIndex = keywordIndex;
     }
 
-    public Double getOffsetX() {
+    public String getOffsetX() {
         return offsetX;
     }
 
-    public void setOffsetX(Double offsetX) {
+    public void setOffsetX(String offsetX) {
         this.offsetX = offsetX;
     }
 
-    public Double getOffsetY() {
+    public String getOffsetY() {
         return offsetY;
     }
 
-    public void setOffsetY(Double offsetY) {
+    public void setOffsetY(String offsetY) {
         this.offsetY = offsetY;
     }
 

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

@@ -268,6 +268,8 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private String approvalSignatureProcessInstanceId; //审定单申请流程id
 	private Integer reportSignatureStatus; //报告签章申请状态
 	private String reportSignatureProcessInstanceId; //报告签章申请流程id
+	private String prsiId; //报告签章数据信息id
+	private String signatureDownloadUrl; //报告签章文档下载链接
 
 
 	private Integer reportSignatureFlag;		//是否审定单签章(1为已签章)
@@ -2009,4 +2011,20 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public void setReportSignatureUploadDate(Date reportSignatureUploadDate) {
 		this.reportSignatureUploadDate = reportSignatureUploadDate;
 	}
+
+	public String getPrsiId() {
+		return prsiId;
+	}
+
+	public void setPrsiId(String prsiId) {
+		this.prsiId = prsiId;
+	}
+
+	public String getSignatureDownloadUrl() {
+		return signatureDownloadUrl;
+	}
+
+	public void setSignatureDownloadUrl(String signatureDownloadUrl) {
+		this.signatureDownloadUrl = signatureDownloadUrl;
+	}
 }

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

@@ -1898,11 +1898,15 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
      * 将文件上传到阿里云中
      * @param projectReportData
      */
-    public void uploadOss(ProjectReportData projectReportData,File docFile){
+    @Transactional(readOnly = false)
+    public String uploadOss(ProjectReportData projectReportData,File docFile){
         //获取报告信息
         projectReportData = projectReportDataService.get(projectReportData.getId());
         //查询签章数据信息
         ProjectReportSignatureInfo projectReportSignatureInfo = dao.get(projectReportData.getNumber());
+        if(null == projectReportSignatureInfo){
+            return "该项目未上传报告签章内容信息";
+        }
         //获取项目信息
         RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(projectReportData.getProject().getId());
         ruralProjectRecordsService.queryUserNames(ruralProjectRecords);
@@ -1926,20 +1930,43 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
             workattachment.setUrl(uploadPath);
             workattachment.setType("docx");
             workattachment.setAttachmentFlag("199");
-            workattachment.setAttachmentName(ruralProjectRecords.getProjectName() + " 报告签章.docx");
+            workattachment.setAttachmentName(ruralProjectRecords.getProjectName() + "报告签章.docx");
             workattachment.setAttachmentUser(UserUtils.getUser().getId());
 
 
             WorkClientAttachment workClientAttachment = new WorkClientAttachment();
             workClientAttachment.setProjectId(ruralProjectRecords.getId());
             workClientAttachment.setAttachmentId(projectReportSignatureInfo.getId());
-            workClientAttachment.setAttachmentName(ruralProjectRecords.getProjectName() + " 报告签章.docx");
+            workClientAttachment.setAttachmentName(ruralProjectRecords.getProjectName() + "报告签章.docx");
             //删除原有数据信息
             workattachmentService.deleteByAttachIdAndProject(workClientAttachment);
             //新增新的数据信息
             workattachmentService.insertOnWorkAttachment(workattachment);
 
         }
+        return "";
+    }
+
+    public void getFile(RuralProjectRecords ruralProjectRecords){
+        if(StringUtils.isNotBlank(ruralProjectRecords.getId())){
+            //获取报告信息
+            ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(ruralProjectRecords.getId());
+            if(null != projectReportData && StringUtils.isNotBlank(projectReportData.getNumber())){
+                //查询签章数据信息
+                ProjectReportSignatureInfo projectReportSignatureInfo = dao.get(projectReportData.getNumber());
+                if(null != projectReportSignatureInfo){
+                    //将备考表添加到附件中
+                    Workattachment workattachment = new Workattachment();
+                    workattachment.setAttachmentId(projectReportSignatureInfo.getId());
+                    workattachment.setProjectId(ruralProjectRecords.getId());
+                    List<Workattachment> list = workattachmentService.findList(workattachment);
+                    workattachmentService.attachmentManageOnUrl(list);
+                    if(null != list && list.size()>0){
+                        ruralProjectRecords.setSignatureDownloadUrl(list.get(0).getTemporaryUrl());
+                    }
+                }
+            }
+        }
     }
 
 

+ 133 - 30
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -3874,12 +3874,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         List<Location> locations = Lists.newArrayList();
         Location location = new Location();
         location.setDocumentId(documentList.get(0));
-        location.setPage(0);
+        location.setPage("0");
         location.setRectType("SEAL_CORPORATE");
         //location.setKeyword("咨询企业(章)");
         location.setKeywordIndex(-1);
-        location.setOffsetX(0.7749);
-        location.setOffsetY(0.2725);
+        location.setOffsetX("0.7749");
+        location.setOffsetY("0.2725");
         locations.add(location);
         companyAction.setLocations(locations);
         actions.add(companyAction);
@@ -3902,12 +3902,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     List<Location> principalLocations = Lists.newArrayList();
                     Location principalLocation = new Location();
                     principalLocation.setDocumentId(documentList.get(0));
-                    principalLocation.setPage(0);
+                    principalLocation.setPage("0");
                     principalLocation.setRectType("SEAL_CORPORATE");
                     //principalLocation.setKeyword("项目负责人(签字盖章)");
                     principalLocation.setKeywordIndex(-1);
-                    principalLocation.setOffsetX(0.7759);
-                    principalLocation.setOffsetY(0.1934);
+                    principalLocation.setOffsetX("0.7759");
+                    principalLocation.setOffsetY("0.1934");
                     principalLocations.add(principalLocation);
                     actionUser.setLocations(principalLocations);
                     actions.add(actionUser);
@@ -3930,12 +3930,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 List<Location> principalLocations = Lists.newArrayList();
                 Location principalLocation = new Location();
                 principalLocation.setDocumentId(documentList.get(0));
-                principalLocation.setPage(0);
+                principalLocation.setPage("0");
                 principalLocation.setRectType("SEAL_CORPORATE");
                 //principalLocation.setKeyword("签发人");
                 principalLocation.setKeywordIndex(-1);
-                principalLocation.setOffsetX(0.7518);
-                principalLocation.setOffsetY(0.1642);
+                principalLocation.setOffsetX("0.7518");
+                principalLocation.setOffsetY("0.1642");
                 principalLocations.add(principalLocation);
                 actionUser.setLocations(principalLocations);
                 actions.add(actionUser);
@@ -4040,9 +4040,70 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     stamper.setDocumentId(invalidDocumentId);
                     stamper.setType("SEAL_CORPORATE");
                     stamper.setSealId(location.getSealId());
-                    stamper.setPage(location.getPage());
-                    stamper.setX(location.getOffsetX());
-                    stamper.setY(location.getOffsetY());
+                    stamper.setPage(Integer.parseInt(location.getPage()));
+                    stamper.setX(Double.valueOf(location.getOffsetX()));
+                    stamper.setY(Double.valueOf(location.getOffsetY()));
+                    stampers.add(stamper);
+                }
+                signByCompanyInfo.setStampers(stampers);
+                //将数据转换为jsonString
+                Object obj = com.alibaba.fastjson.JSONArray.toJSON(signByCompanyInfo);
+                String signByCompanyInfoJsonStr = obj.toString();
+                //进行静默签署
+                String signByCompanyStr = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/signbycompany", signByCompanyInfoJsonStr);
+                HashMap signByCompanyStrMap = JSON.parseObject(signByCompanyStr, HashMap.class);
+                String signByCompanyStrResult = signByCompanyStrMap.get("code").toString();
+                if (!"0".equals(signByCompanyStrResult)) {
+                    return null;
+                }
+            }
+        }
+        return "";
+    }
+
+    /**
+     * 根据contractId进行静默签署(非坐标)
+     * @param contractId
+     * @return
+     */
+    public String signbyCompanyByKeyWord (String contractId,List<String> invalidDocumentIdList){
+
+        //根据合同id查询坐标
+        Map map = new HashMap();
+        map.put("contractId",contractId);
+        String coordinateMapStr = SignaturePostUtil.doGet( map,HTTPTOP + "/contract/query/location");
+        HashMap hashMap = JSON.parseObject(coordinateMapStr, HashMap.class);
+        String resultStr = hashMap.get("result").toString();
+        Map  classMap = new HashMap();
+        classMap.put("locations", Location.class);
+        //2、使用JSONArray
+        JSONArray jsonArray= JSONArray.fromObject(resultStr);
+        //获得jsonArray的第一个元素
+        Object o=jsonArray.get(0);
+        net.sf.json.JSONObject jsonObject= net.sf.json.JSONObject.fromObject(o);
+        //对json数据进行实例化
+        CoordinateInfo coordinateInfo = (CoordinateInfo) net.sf.json.JSONObject.toBean(jsonObject, CoordinateInfo.class, classMap);
+        //发起合同
+        Map sendContractMap = new HashMap();
+        sendContractMap.put("contractId",contractId);
+        String sendContractJsonString = JSON.toJSONString(sendContractMap);
+        String sendContractStr = SignaturePostUtil.sendPostApplicationJson( HTTPTOP + "/contract/send",sendContractJsonString);
+        HashMap signUrlHashMap = JSON.parseObject(sendContractStr, HashMap.class);
+        String sendContractResult = signUrlHashMap.get("code").toString();
+        if("0".equals(sendContractResult)) {
+            List<Location> locations = coordinateInfo.getLocations();
+
+            SignByCompanyInfo signByCompanyInfo = new SignByCompanyInfo();
+            signByCompanyInfo.setContractId(contractId);
+            signByCompanyInfo.setTenantName("江苏兴光项目管理有限公司");
+
+            for (Location location : locations) {
+                List<Stamper> stampers = Lists.newArrayList();
+                for (String invalidDocumentId : invalidDocumentIdList) {
+                    Stamper stamper = new Stamper();
+                    stamper.setDocumentId(invalidDocumentId);
+                    stamper.setType("SEAL_CORPORATE");
+                    stamper.setSealId(location.getSealId());
                     stampers.add(stamper);
                 }
                 signByCompanyInfo.setStampers(stampers);
@@ -4076,23 +4137,44 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         List<Action> actions = Lists.newArrayList();
         Action companyAction = new Action();
         companyAction.setType("CORPORATE");
-        companyAction.setName("公司印章");
+        companyAction.setName("公司执业印章");
         companyAction.setSerialNo("1");
-        companyAction.setSealId("2894161942659543252");
+        //公司方章编号
+        companyAction.setSealId("2894163220106129636");
         //添加盖章位置
         List<Location> locations = Lists.newArrayList();
         Location location = new Location();
         location.setDocumentId(documentList.get(0));
-        location.setPage(0);
+        //location.setPage(0);
         location.setRectType("SEAL_CORPORATE");
-        //location.setKeyword("咨询企业(章)");
-        location.setKeywordIndex(-1);
-        location.setOffsetX(0.7749);
-        location.setOffsetY(0.2725);
+        location.setKeyword("咨询企业执业印章");
+        location.setKeywordIndex(1);
+        /*location.setOffsetX(0.7749);
+        location.setOffsetY(0.2725);*/
         locations.add(location);
         companyAction.setLocations(locations);
         actions.add(companyAction);
 
+        Action companyActionCircle = new Action();
+        companyActionCircle.setType("CORPORATE");
+        companyActionCircle.setName("公司印章");
+        companyActionCircle.setSerialNo("1");
+        //公司圆章编号
+        companyActionCircle.setSealId("2894161942659543252");
+        //添加盖章位置
+        List<Location> locationCircles = Lists.newArrayList();
+        Location locationCircle = new Location();
+        locationCircle.setDocumentId(documentList.get(0));
+        //location.setPage(0);
+        locationCircle.setRectType("SEAL_CORPORATE");
+        locationCircle.setKeyword("江苏兴光项目管理有限公司(印章)");
+        locationCircle.setKeywordIndex(1);
+        locationCircle.setOffsetX("-0.2");
+        //locationCircle.setOffsetY("0.2725");
+        locationCircles.add(locationCircle);
+        companyActionCircle.setLocations(locationCircles);
+        actions.add(companyActionCircle);
+
         //根据角色信息录入签署方信息
         //负责人
         if(StringUtils.isNotBlank(principalUserId)){
@@ -4111,15 +4193,36 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     List<Location> principalLocations = Lists.newArrayList();
                     Location principalLocation = new Location();
                     principalLocation.setDocumentId(documentList.get(0));
-                    principalLocation.setPage(0);
+                    //principalLocation.setPage(0);
                     principalLocation.setRectType("SEAL_CORPORATE");
-                    //principalLocation.setKeyword("项目负责人(签字盖章)");
-                    principalLocation.setKeywordIndex(-1);
-                    principalLocation.setOffsetX(0.7759);
-                    principalLocation.setOffsetY(0.1934);
+                    principalLocation.setKeyword("项目负责人");
+                    principalLocation.setKeywordIndex(3);
+                    /*principalLocation.setOffsetX(0.7759);
+                    principalLocation.setOffsetY(0.1934);*/
                     principalLocations.add(principalLocation);
                     actionUser.setLocations(principalLocations);
                     actions.add(actionUser);
+
+
+                    Action actionUserSign = new Action();
+                    actionUserSign.setType("CORPORATE");
+                    actionUserSign.setName(user.getName() + "印章");    //填写人员信息
+                    actionUserSign.setSerialNo("1");
+                    actionUserSign.setSealId(userSealId);   //人员印章id
+
+                    //添加盖章位置
+                    List<Location> principalLocationSigns = Lists.newArrayList();
+                    Location principalLocationSign = new Location();
+                    principalLocationSign.setDocumentId(documentList.get(0));
+                    //principalLocation.setPage(0);
+                    principalLocationSign.setRectType("SEAL_CORPORATE");
+                    principalLocationSign.setKeyword("项目负责人署名");
+                    principalLocationSign.setKeywordIndex(1);
+                    /*principalLocation.setOffsetX(0.7759);
+                    principalLocation.setOffsetY(0.1934);*/
+                    principalLocationSigns.add(principalLocationSign);
+                    actionUserSign.setLocations(principalLocationSigns);
+                    actions.add(actionUserSign);
                 }
             }
         }
@@ -4127,7 +4230,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         User technologyPrincipalUser = UserUtils.getByLoginName("陈红星");
         if(null != technologyPrincipalUser){
             //获取成员印章id信息
-            String userSealId = SignaturePostUtil.getUserSealByMobile(technologyPrincipalUser.getMobile(),"","陈红星个人签名章");
+            String userSealId = SignaturePostUtil.getUserSealByMobile(technologyPrincipalUser.getMobile(),"","陈星造价工程师印章");
             if(StringUtils.isNotBlank(userSealId)){
                 Action actionUser = new Action();
                 actionUser.setType("CORPORATE");
@@ -4139,12 +4242,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 List<Location> principalLocations = Lists.newArrayList();
                 Location principalLocation = new Location();
                 principalLocation.setDocumentId(documentList.get(0));
-                principalLocation.setPage(0);
+                //principalLocation.setPage(0);
                 principalLocation.setRectType("SEAL_CORPORATE");
-                //principalLocation.setKeyword("签发人");
-                principalLocation.setKeywordIndex(-1);
-                principalLocation.setOffsetX(0.7518);
-                principalLocation.setOffsetY(0.1642);
+                principalLocation.setKeyword("技术负责人");
+                principalLocation.setKeywordIndex(2);
+                /*principalLocation.setOffsetX(0.7518);
+                principalLocation.setOffsetY(0.1642);*/
                 principalLocations.add(principalLocation);
                 actionUser.setLocations(principalLocations);
                 actions.add(actionUser);

+ 10 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -2763,4 +2763,14 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		}
 		return "导入B类项目成功";
 	}
+
+	/**
+	 * 根据签章contractId查询报告信息
+	 * @param contractId
+	 * @return
+	 */
+	@Transactional(readOnly = false)
+	public RuralProjectRecords getProjectRecordsByContractId(String contractId) {
+		return dao.getProjectRecordsByContractId(contractId);
+	}
 }

+ 25 - 8
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -38,6 +38,7 @@ import com.jeeplus.modules.projectrecord.service.ProjectPlanService;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsReportedDao;
 import com.jeeplus.modules.ruralprojectrecords.entity.*;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageElectronicSealService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.ruralprojectrecords.utils.FileUtil;
@@ -121,6 +122,8 @@ public class RuralProjectMessageController extends BaseController {
     private RuralProjectRecordsReportedDao ruralProjectRecordsReportedDao;
     @Autowired
     private ProjectEngineeringService engineeringService;
+    @Autowired
+    private RuralProjectMessageElectronicSealService ruralProjectMessageElectronicSealService;
 
     private static byte[] SYN_BYTE = new byte[0];
 
@@ -1912,6 +1915,16 @@ public class RuralProjectMessageController extends BaseController {
             }
             //MultipartFile转File
             File srcFile = FileUtil.transformMultipartFile(uploadFile);
+            //上传到阿里云上的文件
+            File uploadOssFile = FileUtil.transformMultipartFile(uploadFile);
+            ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(records.getId());
+            //将文件上传到阿里云中 并替换已存在的相关文件
+            String uploadOssResult = ruralProjectMessageElectronicSealService.uploadOss(projectReportData, uploadOssFile);
+            if(StringUtils.isNotBlank(uploadOssResult)){
+                map.put("str",uploadOssResult);
+                return map;
+            }
+
             //截取文件名称
             String fileName = srcFile.getName().substring(0,srcFile.getName().lastIndexOf("."));
             //截取文件后缀名
@@ -1934,7 +1947,11 @@ public class RuralProjectMessageController extends BaseController {
                 return map;
             }
             //进行静默签署
-            ruralProjectMessageService.signbyCompany(contractId,documentList);
+            String signbyCompany = ruralProjectMessageService.signbyCompanyByKeyWord(contractId, documentList);
+            if(StringUtils.isNotBlank(signbyCompany)){
+                map.put("str",signbyCompany);
+                return map;
+            }
 
             //获取contractUrl路径
             /*String contractUrl = ruralProjectMessageService.getSignatureContractUrl(contractId);
@@ -1944,14 +1961,14 @@ public class RuralProjectMessageController extends BaseController {
             }*/
             //将documentId 和contractId存储到质量复核对应的数据种
             //签章完成则进行数据的保存
-            /*projectReportData.setSignatureFlag(1);
-            projectReportData.setSignatureDocumentId(documentId);
-            projectReportData.setSignatureContractId(contractId);
-            projectReportData.setSignatureFileName(fileName);
-            projectReportData.setSignatureUploadFileUser(UserUtils.getUser());
-            projectReportData.setSignatureUploadDate(new Date());
+            records.setReportSignatureFlag(1);
+            records.setReportSignatureDocumentId(documentId);
+            records.setReportSignatureContractId(contractId);
+            records.setReportSignatureFileName(fileName);
+            records.setReportSignatureUploadFileUser(UserUtils.getUser());
+            records.setReportSignatureUploadDate(new Date());
             //修改签章对应信息文件
-            projectReportDataService.updateSignatureInfo(projectReportData);*/
+            projectReportDataService.updateReportSignatureInfo(records);
             map.put("contractUrl","");
             map.put("str","审定单签章成功");
 

+ 6 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageElectronicSealController.java

@@ -80,6 +80,8 @@ public class RuralProjectMessageElectronicSealController extends BaseController
     private ProjectReportDataService projectReportDataService;
     @Autowired
     private ActTaskService actTaskService;
+    @Autowired
+    private RuralProjectRecordsService ruralProjectRecordsService;
 
     @ModelAttribute
     public RuralProjectRecords get(@RequestParam(required=false) String id) {
@@ -155,6 +157,8 @@ public class RuralProjectMessageElectronicSealController extends BaseController
                     records1.getWorkContractInfo().setClientName(records1.getWorkContractInfo().getClient().getName());
                 }
             }
+            //将生成的文件上传到阿里云中
+            ruralProjectMessageElectronicSealService.getFile(records1);
         }
         if(StringUtils.isNotBlank(oldSubmitMoney)){
             projectRecords.setSubmitMoney(oldSubmitMoney);
@@ -657,9 +661,9 @@ public class RuralProjectMessageElectronicSealController extends BaseController
             e.printStackTrace();
         }
 
-        File docFile = new File(projectName + " 报告签章.docx");
+        File docFile = new File(projectName + " 报告签章.doc");
         FreemarkerUtil.generateFile(data,template,docFile);
-        ResponseUtil.docResponse(projectName + " 报告签章.docx",docFile,response);
+        ResponseUtil.docResponse(projectName + " 报告签章.doc",docFile,response);
         //将生成的文件上传到阿里云中
         ruralProjectMessageElectronicSealService.uploadOss(projectReportData,docFile);
     }

+ 57 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureCallBackController.java

@@ -189,9 +189,9 @@ public class RuralProjectSignatureCallBackController extends BaseController {
                     stamper.setDocumentId(invalidDocumentId);
                     stamper.setType("SEAL_CORPORATE");
                     stamper.setSealId(location.getSealId());
-                    stamper.setPage(location.getPage());
-                    stamper.setX(location.getOffsetX());
-                    stamper.setY(location.getOffsetY());
+                    stamper.setPage(Integer.parseInt(location.getPage()));
+                    stamper.setX(Double.valueOf(location.getOffsetX()));
+                    stamper.setY(Double.valueOf(location.getOffsetY()));
                     stampers.add(stamper);
                 }
                 signByCompanyInfo.setStampers(stampers);
@@ -267,4 +267,58 @@ public class RuralProjectSignatureCallBackController extends BaseController {
         }
         return resultMap;
     }
+
+    /**
+     * 查看附件
+     */
+    @RequestMapping(value = "/getViewUrlByReportContractId", method=RequestMethod.GET)
+    @ResponseBody
+    public Map getViewUrlByReportContractId(String contractId) {
+        Map resultMap = new HashMap();
+        resultMap.put("success",false);
+        //根据contractId查询对应的报告信息
+        RuralProjectRecords ruralProjectRecords = projectRecordsService.getProjectRecordsByContractId(contractId);
+        if(null == ruralProjectRecords || StringUtils.isBlank(ruralProjectRecords.getReportSignatureContractId())){
+            return resultMap;
+        }
+        //根据contractId将文件下载下来 并上传到阿里云服务种
+        //添加请求头c
+        Map<String,String> requestHeaderMap = new HashMap<>();
+        requestHeaderMap.put("x-qys-accesstoken", apptoken);
+        requestHeaderMap.put("x-qys-signature", signature);
+        requestHeaderMap.put("x-qys-timestamp", "0");
+
+        Map map =new HashMap();
+        map.put("contractId",contractId);
+        String viewUrlStr = SignaturePostUtil.doGet(map, HTTPTOP + "/contract/viewurl");
+        HashMap viewUrlStrMap = JSON.parseObject(viewUrlStr, HashMap.class);
+        String code = viewUrlStrMap.get("code").toString();
+        if("0".equals(code)){
+            resultMap.put("success",true);
+            resultMap.put("viewUrl",viewUrlStrMap.get("viewUrl").toString());
+            return resultMap;
+        }
+        return resultMap;
+    }
+
+
+
+    /**
+     * 下载附件
+     */
+    @RequestMapping(value = "/downLoadReportAttach", method=RequestMethod.GET)
+    public void downLoadReportAttach(String contractId,HttpServletResponse response) {
+        //根据contractId查询对应的报告信息
+        RuralProjectRecords ruralProjectRecords = projectRecordsService.getProjectRecordsByContractId(contractId);
+        if(null == ruralProjectRecords || StringUtils.isBlank(ruralProjectRecords.getReportSignatureContractId())){
+            return ;
+        }
+        //根据contractId将文件下载下来 并上传到阿里云服务种
+        //添加请求头
+        Map<String,String> requestHeaderMap = new HashMap<>();
+        requestHeaderMap.put("x-qys-accesstoken", apptoken);
+        requestHeaderMap.put("x-qys-signature", signature);
+        requestHeaderMap.put("x-qys-timestamp", "0");
+        SignaturePostUtil.downloadZipGet(HTTPTOP + "/contract/download?contractId="+contractId,requestHeaderMap,ruralProjectRecords.getReportSignatureFileName()+".zip","",response);
+    }
 }

+ 5 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java

@@ -129,6 +129,11 @@ public class RuralProjectViewController extends BaseController {
         if (projectRecords!=null&& StringUtils.isNotBlank(projectRecords.getId())) {
             projectRecords = projectRecordsService.get(projectRecords.getId());
             projectRecordsService.queryProjectDetail(projectRecords);
+
+            if(null != projectRecords.getReportSignatureUploadFileUser() && StringUtils.isNotBlank(projectRecords.getReportSignatureUploadFileUser().getId())){
+                projectRecords.setReportSignatureUploadFileUser(UserUtils.get(projectRecords.getReportSignatureUploadFileUser().getId()));
+            }
+
             ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
             projectPlanInfo.setProjectId(projectRecords.getId());
             if(null != projectRecords.getWorkContractInfo()){

+ 0 - 41
src/main/resources/freemarker/projectSignature.ftl

@@ -11132,14 +11132,6 @@
 						<w:sz-cs w:val="28"/>
 					</w:rPr>
 				</w:pPr>
-				<w:r>
-					<w:rPr>
-						<w:sz w:val="28"/>
-					</w:rPr>
-					<w:pict>
-						<v:oval id="椭圆 17" o:spid="_x0000_s1041" style="position:absolute;margin-left:225.8pt;margin-top:3.15pt;width:162pt;height:108pt;z-index:-7;mso-wrap-style:square;v-text-anchor:top" strokecolor="red"/>
-					</w:pict>
-				</w:r>
 			</w:p>
 			<w:p wsp:rsidR="00000000" wsp:rsidRDefault="00DE62EF">
 				<w:pPr>
@@ -11151,39 +11143,6 @@
 						<w:sz-cs w:val="28"/>
 					</w:rPr>
 				</w:pPr>
-				<w:r>
-					<w:rPr>
-						<w:sz w:val="28"/>
-					</w:rPr>
-					<w:pict>
-						<v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">
-							<v:stroke joinstyle="miter"/>
-							<v:path gradientshapeok="t" o:connecttype="rect"/>
-						</v:shapetype>
-						<v:shape id="文本框 18" o:spid="_x0000_s1042" type="#_x0000_t202" style="position:absolute;margin-left:257.4pt;margin-top:1.05pt;width:98.9pt;height:16.5pt;z-index:8;mso-wrap-style:square;v-text-anchor:top" strokecolor="red">
-							<v:textbox style="mso-fit-shape-to-text:t">
-								<w:txbxContent>
-									<w:p wsp:rsidR="00000000" wsp:rsidRDefault="00DE62EF">
-										<w:pPr>
-											<w:spacing w:after="78"/>
-											<w:rPr>
-												<w:color w:val="FF0000"/>
-											</w:rPr>
-										</w:pPr>
-										<w:r>
-											<w:rPr>
-												<w:rFonts w:hint="fareast"/>
-												<wx:font wx:val="宋体"/>
-												<w:color w:val="FF0000"/>
-											</w:rPr>
-											<w:t>公司公章、电子章</w:t>
-										</w:r>
-									</w:p>
-								</w:txbxContent>
-							</v:textbox>
-						</v:shape>
-					</w:pict>
-				</w:r>
 			</w:p>
 			<w:p wsp:rsidR="00000000" wsp:rsidRDefault="00DE62EF">
 				<w:pPr>

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

@@ -1126,6 +1126,32 @@
 		WHERE id = #{id}
 	</update>
 
+	<update id="updateReportSignatureInfo">
+		UPDATE rural_project_records SET
+			<if test="reportSignatureDocumentId != null and reportSignatureDocumentId != ''">
+				report_signature_document_id = #{reportSignatureDocumentId}
+			</if>
+			<if test="reportSignatureInvalidDocumentId != null and reportSignatureInvalidDocumentId != ''">
+				,report_signature_invalid_document_id = #{reportSignatureInvalidDocumentId}
+			</if>
+			<if test="reportSignatureContractId != null and reportSignatureContractId != ''">
+				,report_signature_contract_id = #{reportSignatureContractId}
+			</if>
+			<if test="reportSignatureFlag != null and reportSignatureFlag != ''">
+				,report_signature_flag = #{reportSignatureFlag}
+			</if>
+			<if test="reportSignatureFileName != null and reportSignatureFileName != ''">
+				,report_signature_file_name = #{reportSignatureFileName}
+			</if>
+			<if test="reportSignatureUploadFileUser != null and reportSignatureUploadFileUser.id != null and reportSignatureUploadFileUser.id != ''">
+				,report_signature_upload_file_user = #{reportSignatureUploadFileUser.id}
+			</if>
+			<if test="reportSignatureUploadDate != null and reportSignatureUploadDate != ''">
+				,report_signature_upload_date = #{reportSignatureUploadDate}
+			</if>
+		WHERE id = #{id}
+	</update>
+
 	<select id="getProjectReportDataByContractId" resultType="ProjectReportData" >
 		SELECT
 		<include refid="projectReportDataColumns"/>

+ 4 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml

@@ -377,6 +377,9 @@ END) as projectScale*/
 		,prd.ZiXunShouRu as "money"
 		,prd.signature_flag as "signatureFlag"
 		,prd.signature_contract_id as "signatureContractId"
+		,a.report_signature_flag as "reportSignatureFlag"
+		,a.report_signature_contract_id as "reportSignatureContractId"
+		,prsi.id as "prsiId"
 		FROM rural_project_records a
 		LEFT JOIN sys_area area ON area.id = a.area_id
 		left join rural_project_records_reported rprr on rprr.id = a.id
@@ -401,6 +404,7 @@ END) as projectScale*/
 		left join project_paper_filing ppf on ppf.project_id = a.id
 		left join project_approval_signature pas on pas.project_id = a.id
 		left join project_report_signature prs on prs.project_id = a.id
+		left join project_report_signature_info prsi on prsi.project_report_id = prd.number
 		/*LEFT JOIN work_invoice_project_relation wip ON wip.project_id = a.id
 		LEFT JOIN work_invoice wi ON wi.id = wip.invoice_id*/
 		<where>

+ 1 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageElectronicSealDao.xml

@@ -3,6 +3,7 @@
 <mapper namespace="com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectMessageElectronicSealDao">
 
 	<sql id="projectReportRecordColumns">
+			a.id as "id",
 			a.project_report_id,
 			a.submit_fee as "submit_fee",
 			a.authorize_fee as "authorize_fee",

+ 25 - 1
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -61,7 +61,7 @@
 		a.report_signature_contract_id as "reportSignatureContractId",
 		a.report_signature_invalid_document_id as "reportSignatureInvalidDocumentId",
 		a.report_signature_file_name as "reportSignatureFileName",
-		a.report_signature_upload_file_user as "reportSignatureUploadFileUser",
+		a.report_signature_upload_file_user as "reportSignatureUploadFileUser.id",
 		a.report_signature_upload_date as "reportSignatureUploadDate"
 	</sql>
 
@@ -94,6 +94,30 @@
 		WHERE a.id = #{id}
 	</select>
 
+	<select id="getProjectRecordsByContractId" resultType="RuralProjectRecords" >
+		SELECT
+			<include refid="projectRecordsColumns"/>
+		,a.file_num AS "fileNum"
+	    ,a.check_process_instance_id AS "checkProcessInstanceId"
+        ,su.name AS "createBy.name"
+        ,o.top_company AS "office.name"
+		,prd.number AS "projectReportNumber"
+		,prd.id AS "prdId"
+		,prr.id As "prrid"
+		,a.project_master_id as "projectMasterId"
+		,a.submit_money as "submitMoney"
+		,a.engineering_type as "engineeringType"
+		,supmi.name as "projectMasterName"
+        FROM rural_project_records a
+        <include refid="projectRecordsJoins"/>
+        LEFT JOIN sys_user su ON su.id = a.create_by
+        LEFT JOIN sys_user supmi ON supmi.id = a.project_master_id
+		left join project_report_data prd on prd.project_id = a.id
+		LEFT JOIN rural_project_report_record prr on prd.id = prr.report_id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		WHERE a.report_signature_contract_id = #{contractId}
+	</select>
+
 
 	<select id="getById" resultType="RuralProjectRecords" >
 		SELECT

+ 3 - 0
src/main/resources/mappings/modules/sys/WorkattachmentDao.xml

@@ -182,6 +182,9 @@
 			<if test="divIdType != null and divIdType != ''">
 				AND div_id_type = #{divIdType}
 			</if>
+			<if test="projectId != null and projectId != ''">
+				and project_id = #{projectId}
+			</if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">

+ 8 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/downloadType/importWordReportForm.jsp

@@ -37,13 +37,20 @@
 <div >
 	<div class="container view-form">
 		<form:form id="inputForm" modelAttribute="projectReportData" enctype="multipart/form-data" action="${ctx}/ruralProject/ruralProjectMessage/importReportFile" method="post" class="form-horizontal">
-			<form:hidden path="project.id" htmlEscape="false" value="${projectId}" class="form-control layui-input required"/>
+			<input type="hidden" id="projectId" name="projectId" value="${projectId}">
 			<input type="hidden" id="visitType" name="visitType" value="${visitType}">
 			<div class="form-group layui-row first">
 				<div class="layui-item layui-col-sm12 ">
 					<input id="uploadFile" name="uploadFile" type="file" style="width:330px"/>导入文件不能超过5M,仅允许导入“doc”或“docx”格式文件!<br/> 
 				</div>
 			</div>
+			<div class="layui-item layui-col-sm12">
+				<label class="layui-form-label double-line" style="padding-left: 0px"><span class="require-item">*</span>项目负责人:</label>
+				<div class="layui-input-block  ">
+					<sys:reportedtreeselectUserZXY id="principalUserId" name="principalUserId" value="" labelName="principalUserName" labelValue=""
+												   cssStyle="background-color: #fff" title="用户" url="/sys/office/treeDataAll?type=5" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+				</div>
+			</div>
 		</form:form>
 	</div>
 </div>

+ 84 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/electronicSeal/ruralProjectMessageElectronicSealList.jsp

@@ -238,6 +238,77 @@
 			});
 		}
 
+
+		function openDialogreByReportImportFile(title,url,width,height,target,buttons) {
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			var split = buttons.split(",");
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				skin: 'three-btns',
+				content: url,
+				btn: split,
+				btn1: function(index, layero){
+					//关闭当前页
+					top.layer.close(index)
+
+					/*parent.layer.msg('正在进行签章,大概需要5秒钟,请稍等', {
+						icon: 1,
+						time: 5000 //2秒关闭(如果不配置,默认是3秒)
+					}, function(){
+						//do something
+					});*/
+					parent.layer.msg("正在进行签章,大概需要5秒钟,请稍等",{icon:1});
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					inputForm.attr("action","${ctx}/ruralProject/ruralProjectMessage/importReportFile");//表单提交成功后,从服务器返回的url在当前tab中展示
+					var $document = iframeWin.contentWindow.document;
+
+					formSubmitsignature($document,"inputForm",index);
+					/*if(iframeWin.contentWindow.doSubmit(1) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}*/
+				},
+				btn2:function(index,layero){
+					if(split.length==2){return}
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}else {
+						return false;
+					}
+				},
+				btn3: function (index) {
+				}
+			});
+		}
+
 		function openDialogre(title,url,width,height,target,buttons) {
 
 			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
@@ -1134,11 +1205,17 @@
 							}else if(d.reportSignatureStatus == 5){
 								//上传审定单进行签章
 								<shiro:hasPermission name="ruralProject:ruralProjectMessage:importReportFile">
-								if(d.signatureFlag != "1"){
-									xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogreByImportFile('上传报告签章', '${ctx}/ruralProject/ruralProjectMessage/skipImportReportWord?id=" + d.id + "&visitType=1','400px', '35%','','导入,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 报告签章</a>";
+								if(d.reportSignatureFlag != "1"){
+									xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogreByReportImportFile('上传报告签章', '${ctx}/ruralProject/ruralProjectMessage/skipImportReportWord?id=" + d.id + "&visitType=1','400px', '35%','','导入,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 报告签章</a>";
+								}
+								if(d.signatureDownloadUrl != null && d.signatureDownloadUrl != undefined && d.signatureDownloadUrl != ""){
+									xml+="<a href=\""+d.signatureDownloadUrl+"\" class=\"layui-btn  layui-btn-xs\">报告下载</a>"
+								}else{
+									if(d.prsiId != null && d.prsiId != undefined && d.prsiId != ""){
+										//报告下载
+										xml+="<a href=\"${ctx}/ruralProject/electronicSeal/downloadMassControl?id="+ d.pidId +"\" class=\"layui-btn  layui-btn-xs\">报告下载</a>"
+									}
 								}
-								//报告下载
-								xml+="<a href=\"${ctx}/ruralProject/electronicSeal/downloadMassControl?id="+ d.pidId +"\" onclick=\"return confirmx('需要下载吗?', this.href)\" class=\"layui-btn  layui-btn-xs\">报告下载</a>"
 								//自动生成电子签章报告(在有报告的前提下可使用,没有报告信息则不进行展示该按钮)
 								//xml+="<a href=\"${ctx}/ruralProject/electronicSeal/downloadMassControl?id="+ d.pidId +"\" onclick=\"return confirmx('确认要自动生成报告签章吗?', this.href)\" class=\"layui-btn  layui-btn-xs\" > 自动生成报告签章</a>";
 								</shiro:hasPermission>
@@ -1201,11 +1278,14 @@
 					,"submitMoney":"${projectRecords.submitMoney}"
 					,"money":"${projectRecords.money}"
 					,"signatureFlag":"${projectRecords.signatureFlag}"
+					,"reportSignatureFlag":"${projectRecords.reportSignatureFlag}"
 					,"signatureContractId":"${projectRecords.signatureContractId}"
 					,"approvalSignatureStatus":"${projectRecords.approvalSignatureStatus}"
 					,"approvalSignatureProcessInstanceId":"${projectRecords.approvalSignatureProcessInstanceId}"
 					,"reportSignatureStatus":"${projectRecords.reportSignatureStatus}"
 					,"reportSignatureProcessInstanceId":"${projectRecords.reportSignatureProcessInstanceId}"
+					,"prsiId":"${projectRecords.prsiId}"
+					,"signatureDownloadUrl":"${projectRecords.signatureDownloadUrl}"
 					,"falg":
 					<c:choose>
 						<c:when test="${fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id}">

+ 55 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/ruralProjectRecordsView.jsp

@@ -65,6 +65,24 @@
 			<%--}--%>
 		})
 
+
+		function openSignatureview(contractId){
+			$.ajax({
+				type:"get",
+				url:'${ctx}/ruralProject/signatureCallBack/getViewUrlByReportContractId',
+				data:{
+					"contractId":contractId
+				},
+				dataType:"json",
+				success:function(data){
+					if(data.success) {
+						window.open(data.viewUrl);
+					}else {
+						top.layer.msg("文件预览页打开失败", {icon: 0});
+					}
+				}
+			})
+		}
 	</script>
 </head>
 <body>
@@ -384,6 +402,43 @@
 					</table>
 				</div>
 			</div>
+			<c:if test="${projectRecords.reportSignatureFlag == 1}">
+				<div class="form-group layui-row">
+					<div class="form-group-label"><h2>审定单签章附件表</h2></div>
+					<div class="layui-item layui-col-xs12 form-table-container" >
+						<table id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
+							<thead>
+							<tr>
+
+								<th>文件</th>
+								<th>上传人</th>
+								<th>上传时间</th>
+								<th width="180px">操作</th>
+							</tr>
+							</thead>
+							<tbody>
+							<c:choose>
+								<c:when test="${projectRecords.reportSignatureFlag == 1}">
+									<tr>
+										<td><a class="attention-info" href="javascript:void(0)" onclick="openSignatureview('${projectRecords.reportSignatureContractId}')">${projectRecords.reportSignatureFileName}.zip</a></td>
+										<td>${projectRecords.reportSignatureUploadFileUser.name}</td>
+										<td><fmt:formatDate value="${projectRecords.reportSignatureUploadDate}" type="both"/></td>
+										<td class="op-td">
+											<a href="javascript:location.href='${ctx}/ruralProject/signatureCallBack/downLoadReportAttach?contractId=${projectRecords.reportSignatureContractId}'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+										</td>
+									</tr>
+								</c:when>
+								<c:otherwise>
+									<tr>
+										<td colspan="4" align="center">暂无数据</td>
+									</tr>
+								</c:otherwise>
+							</c:choose>
+							</tbody>
+						</table>
+					</div>
+				</div>
+			</c:if>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >