瀏覽代碼

资料归档缺失说明admin修改功能添加,到处文件模板修改

user5 3 年之前
父節點
當前提交
d08da142ae

+ 204 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportDefectRecordController.java

@@ -235,6 +235,166 @@ public class ProjectReportDefectRecordController extends BaseController {
 	}
 
 	/**
+	 * 跳转到资料缺失说明页面
+	 */
+	@RequiresPermissions("ruralProject:ruralProjectMessageAll:adminDescription")
+	@RequestMapping(value = "formAdminDescription")
+	public String formAdminDescription(ProjectMaterialDefectRecord materialDefectRecord, Model model) throws Exception {
+		//查询“配农网”工程类型id
+		String engineeringId = engineeringService.getEngineeringId("202");
+		if (StringUtils.isBlank(materialDefectRecord.getView()) || !materialDefectRecord.getView().equals("view")){
+			if(StringUtils.isBlank(materialDefectRecord.getId())){
+				materialDefectRecord.setCreateDate(new Date());
+				materialDefectRecord.setCreateBy(UserUtils.getUser());
+			}
+		}
+		ProjectReportData projectReportData = new ProjectReportData();
+		ProjectRecords projectRecords = new ProjectRecords();
+		projectReportData.setFileStatus("1");
+		ProjectReportData reportData = ruralProjectMessageService.getProjectReportDateByProjectId(materialDefectRecord.getReportId());
+		if(null != reportData){
+			if (StringUtils.isBlank(materialDefectRecord.getView()) || !materialDefectRecord.getView().equals("view")){
+
+			}else{
+//                ProjectReportRecord projectReportRecordInfo =ruralProjectMessageService.getProjectReportRecord(reportData.getId());
+//                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecordInfo, projectReportRecord);
+			}
+		}
+		//获取项目信息
+		RuralProjectRecords ruralProjectRecords = projectRecordsService.get(materialDefectRecord.getReportId());
+		MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);
+		//获取合同信息
+		WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(projectRecords.getWorkContractInfo().getId());
+		projectRecords.setWorkContractInfo(projectContractInfo);
+		reportData.setProject(projectRecords);
+		materialDefectRecord.setReport(reportData);
+		materialDefectRecord.setUploadMode(uploadMode);
+		model.addAttribute("materialDefectRecord", materialDefectRecord);
+		model.addAttribute("project", materialDefectRecord.getReport().getProject());
+
+		ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+		//添加项目类型
+		relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+		relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+		//判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+		String money=ruralProjectRecords.getSubmitMoney();
+		Integer approvalMoney=null;
+		if(StringUtils.isBlank(money)){
+			approvalMoney=1;
+		}else{
+			approvalMoney=Integer.parseInt(money);
+		}
+		switch (approvalMoney){
+			case 0:
+				//金额为0
+				relateInfo.setAttachmentProjectApprovalMoney(null);
+				break;
+			case 1:
+				//500w以下金额状态
+				relateInfo.setAttachmentProjectApprovalMoney("1");
+				break;
+			case 2:
+				//500w以上金额状态
+				relateInfo.setAttachmentProjectApprovalMoney("2");
+				break;
+		}
+
+		//添加报告类型
+		relateInfo.setRequiredStage(2);
+		relateInfo.setId(ruralProjectRecords.getId());
+		//查询报告文件、依据性文件、其他文件必填列表以及数据
+		List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+		for (MainDictDetail mainDict : mainDictDetails) {
+			relateInfo.setAttachType(mainDict.getValue());
+			switch (mainDict.getValue()) {
+				case "11":
+					List<ProjectTemplateInfo> fileAttachmentList = projectTemplateService.getProjectTemplateList(relateInfo);
+					for (ProjectTemplateInfo info: fileAttachmentList) {
+						info.setAttachTypes(info.getAttachTypes().toLowerCase());
+						if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+							if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+								if(!info.getAttachTypes().contains("zip")){
+									info.setAttachTypes(info.getAttachTypes()+",zip");
+								}
+								if(!info.getAttachTypes().contains("rar")){
+									info.setAttachTypes(info.getAttachTypes()+",rar");
+								}
+							}
+						}
+						if (1==info.getMustFlag()){
+							info.setMustFlag(0);
+						}
+					}
+					materialDefectRecord.setFileAttachmentList(fileAttachmentList);
+					break;
+				case "12":
+					List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateList(relateInfo);
+					for (ProjectTemplateInfo info: projectTemplateList) {
+						info.setAttachTypes(info.getAttachTypes().toLowerCase());
+						if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+							if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+								if(!info.getAttachTypes().contains("zip")){
+									info.setAttachTypes(info.getAttachTypes()+",zip");
+								}
+								if(!info.getAttachTypes().contains("rar")){
+									info.setAttachTypes(info.getAttachTypes()+",rar");
+								}
+							}
+						}
+						if (1==info.getMustFlag()){
+							info.setMustFlag(0);
+						}
+					}
+					materialDefectRecord.setFileGistdataList(projectTemplateList);
+					break;
+				case "13":
+					List<ProjectTemplateInfo> projectOtherList = projectTemplateService.getProjectTemplateList(relateInfo);
+					for (ProjectTemplateInfo info: projectOtherList) {
+						if ("其他资料".equals(info.getAttachName())){
+							info.setMustFlag(1);
+							//判定必填项的下的是否有附件信息
+							if (info.getWorkAttachments().size()!=0){
+								info.setFileFlag(1);
+							}
+						}else{
+							if (1==info.getMustFlag()){
+								info.setMustFlag(0);
+							}
+						}
+					}
+					materialDefectRecord.setFileOtherList(projectOtherList);
+					break;
+			}
+
+		}
+
+		if(null != projectContractInfo){
+			if(projectContractInfo.getWorkClientInfoList().size()>0){
+				model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
+			}
+		}
+
+		if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("view")){
+			return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordView";
+		}else if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("modiftApply")){
+			ProcessInstance processInstance = actTaskService.getProcIns(materialDefectRecord.getProcessInstanceId());
+			if (processInstance!=null) {
+				Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+				Act act = new Act();
+				act.setTaskId(taskInfok.getId());
+				act.setTaskName(taskInfok.getName());
+				act.setProcDefId(taskInfok.getProcessDefinitionId());
+				act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+				act.setProcInsId(taskInfok.getProcessInstanceId());
+				act.setTask(taskInfok);
+				materialDefectRecord.setAct(act);
+			}
+			return "modules/ruralprojectrecords/record/projectRepordDescriptionModify";
+		}
+		return "modules/ruralprojectrecords/record/cost/projectRecordAdminDescriptionForm";
+	}
+
+	/**
 	 * 保存归档资料缺失说明
 	 */
 	@RequestMapping(value = "saveDefectRecord")
@@ -310,6 +470,50 @@ public class ProjectReportDefectRecordController extends BaseController {
 	}
 
 	/**
+	 * 管理员保存归档资料缺失说明
+	 */
+	@RequiresPermissions("ruralProject:ruralProjectMessageAll:adminDescription")
+	@RequestMapping(value = "adminSaveDefectRecord")
+	public String adminSaveDefectRecord(ProjectMaterialDefectRecord materialDefectRecord, Model model, RedirectAttributes redirectAttributes,Integer saveAuditFlag) throws Exception{
+		if (!beanValidator(model, materialDefectRecord)){
+			return formDescription(materialDefectRecord, model);
+		}
+		try {
+			//获取创建者信息
+			User user = materialDefectRecord.getCreateBy();
+			String sta = materialDefectRecord.getStatus();
+			if(user!=null && !UserUtils.getUser().getId().equals(user.getId()) && StringUtils.isNotBlank(user.getId())){
+				addMessage(redirectAttributes, "您不是申请人,无法修改");
+				if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixun")){
+					return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessageAll/?repage";
+				}else if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixunModify")){
+					return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessageAll/?repage";
+				}
+				return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessageAll/?repage";
+			}
+			//状态设置为审核中
+			materialDefectRecord.setStatus("5");
+			String processInstanceId ="";
+			if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+				processInstanceId = projectReportRecordService.getMaterialDefectRecord(materialDefectRecord.getId()).getProcessInstanceId();
+			}
+			Map<String, Object> variables = new HashMap<>();
+
+			ruralProjectMessageService.adminSaveProjectReportRecord(materialDefectRecord);//保存
+			addMessage(redirectAttributes, "保存报告归档资料缺失说明成功");
+		}catch (Exception e){
+			addMessage(redirectAttributes, "保存报告归档资料缺失说明失败");
+			logger.error("保存报告归档资料缺失说明失败",e);
+		}
+		if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixun")){
+			return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessageAll/?repage";
+		}else if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixunModify")){
+			return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessageAll/?repage";
+		}
+		return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessageAll/?repage";
+	}
+
+	/**
 	 * 查看,增加,编辑报告归档表单页面
 	 */
 	@RequestMapping(value = "formDescriptionModify")

+ 25 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -3355,6 +3355,31 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
         }
         return "true";
     }
+    /**
+     * admin提交归档资料缺失说明存储
+     * @param materialDefectRecord
+     */
+    @Transactional(readOnly = false)
+    public String adminSaveProjectReportRecord(ProjectMaterialDefectRecord materialDefectRecord) {
+
+        User user = UserUtils.getUser();
+        Boolean insert = false;
+        if (com.jeeplus.common.utils.StringUtils.isBlank(materialDefectRecord.getId())){
+            materialDefectRecord.setCompanyId(user.getComId());
+            materialDefectRecord.setOfficeId(user.getOffice().getId());
+            materialDefectRecord.preInsert();
+            insert = true;
+        }
+        //将附件插入数据库
+        saveDefectRecordWorkattachments(materialDefectRecord);
+        //对数据进行插入数据库
+        if (insert) { //新增操作
+            this.insertProjectMaterialDefectRecord(materialDefectRecord);
+        }else {//修改操作
+            this.saveProjectMaterialDefectRecord(materialDefectRecord);
+        }
+        return "true";
+    }
 
     /**
      * 保存上报数据

+ 18 - 16
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -4630,8 +4630,8 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     principalLocation.setKeyword("项目负责人:");
                     principalLocation.setKeywordIndex(1);
                     locations.add(principalLocation);
-                    /*principalLocation.setOffsetX(0.7759);
-                    principalLocation.setOffsetY(0.1934);
+                    principalLocation.setOffsetX("0.2");
+                    /*principalLocation.setOffsetY("0.02");
                     principalLocations.add(principalLocation);*/
 
                     //添加盖章位置
@@ -4694,11 +4694,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     //principalLocation.setPage(0);
                     principalLocation.setRectType("SEAL_CORPORATE");
                     principalLocation.setKeyword("专业咨询员");
-                    principalLocation.setKeywordIndex(2);
-                    *//*principalLocation.setOffsetX(0.7759);
-                    principalLocation.setOffsetY(0.1934);*//*
+                    principalLocation.setKeywordIndex(1);
+                    principalLocation.setOffsetX("0.2");
+                    principalLocation.setOffsetY("-0.02");
                     principalLocations.add(principalLocation);
                     actionUser.setLocations(principalLocations);
+                    actionUser.setAutoSign("true");
                     actions.add(actionUser);
                 }
             }
@@ -4726,8 +4727,8 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 principalLocation.setRectType("SEAL_CORPORATE");
                 principalLocation.setKeyword("技术负责人:");
                 principalLocation.setKeywordIndex(1);
-                principalLocation.setOffsetX("-0.02");
-                principalLocation.setOffsetY("0.07");
+                principalLocation.setOffsetX("0.2");
+                principalLocation.setOffsetY("0.03");
                 locations.add(principalLocation);
                 /*principalLocation.setOffsetX(0.7518);
                 principalLocation.setOffsetY(0.1642);
@@ -4759,7 +4760,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 principalLocation.setRectType("SEAL_CORPORATE");
                 principalLocation.setKeyword("技术负责人:");
                 principalLocation.setKeywordIndex(1);
-                principalLocation.setOffsetX("0.17");
+                principalLocation.setOffsetX("0.07");
                 principalLocation.setOffsetY("0.05");
                 locations.add(principalLocation);
                 /*principalLocation.setOffsetY(0.1642);
@@ -4932,8 +4933,8 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     principalLocation.setKeyword("项目负责人:");
                     principalLocation.setKeywordIndex(1);
                     locations.add(principalLocation);
-                    /*principalLocation.setOffsetX(0.7759);
-                    principalLocation.setOffsetY(0.1934);
+                    principalLocation.setOffsetX("0.2");
+                    /*principalLocation.setOffsetY("0.02");
                     principalLocations.add(principalLocation);*/
 
                     //添加盖章位置
@@ -4996,11 +4997,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     //principalLocation.setPage(0);
                     principalLocation.setRectType("SEAL_CORPORATE");
                     principalLocation.setKeyword("专业咨询员");
-                    principalLocation.setKeywordIndex(2);
-                    *//*principalLocation.setOffsetX(0.7759);
-                    principalLocation.setOffsetY(0.1934);*//*
+                    principalLocation.setKeywordIndex(1);
+                    principalLocation.setOffsetX("0.2");
+                    principalLocation.setOffsetY("-0.02");
                     principalLocations.add(principalLocation);
                     actionUser.setLocations(principalLocations);
+                    actionUser.setAutoSign("true");
                     actions.add(actionUser);
                 }
             }
@@ -5028,8 +5030,8 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 principalLocation.setRectType("SEAL_CORPORATE");
                 principalLocation.setKeyword("技术负责人:");
                 principalLocation.setKeywordIndex(1);
-                principalLocation.setOffsetX("-0.02");
-                principalLocation.setOffsetY("0.07");
+                principalLocation.setOffsetX("0.2");
+                principalLocation.setOffsetY("0.03");
                 locations.add(principalLocation);
                 /*principalLocation.setOffsetX(0.7518);
                 principalLocation.setOffsetY(0.1642);
@@ -5061,7 +5063,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 principalLocation.setRectType("SEAL_CORPORATE");
                 principalLocation.setKeyword("技术负责人:");
                 principalLocation.setKeywordIndex(1);
-                principalLocation.setOffsetX("0.17");
+                principalLocation.setOffsetX("0.07");
                 principalLocation.setOffsetY("0.05");
                 locations.add(principalLocation);
                 /*principalLocation.setOffsetY(0.1642);

+ 105 - 4
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/yanChengSignature/RuralProjectMessageElectronicSealYCService.java

@@ -2,11 +2,10 @@ package com.jeeplus.modules.ruralprojectrecords.service.yanChengSignature;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.oss.OSSClientUtil;
 import com.jeeplus.common.service.CrudService;
-import com.jeeplus.common.utils.IdGen;
-import com.jeeplus.common.utils.ImageUtil;
-import com.jeeplus.common.utils.MyBeanUtils;
-import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.common.utils.*;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
@@ -47,7 +46,9 @@ import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
 import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
+import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
 import org.activiti.engine.RuntimeService;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.apache.commons.lang3.StringEscapeUtils;
@@ -73,6 +74,16 @@ import java.util.regex.Pattern;
 @Service
 @Transactional(readOnly = true)
 public class RuralProjectMessageElectronicSealYCService extends CrudService<RuralProjectMessageElectronicSealDao, ProjectReportSignatureInfo> {
+    //空白图片的base64参数
+    private final String blankBase64 = "iVBORw0KGgoAAAANSUhEUgAAAIIAAAA/CAYAAAAsVxBWAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\n" +
+            "jwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAACPSURBVHhe7dIBDQAwEMSg+Td9+1QHaOANjghE\n" +
+            "BCICEYGIQEQgIhARiAhEBCICEYGIQEQgIhARiAhEBCICEYGIQEQgIhARiAhEBCICEYGIQEQgIhAR\n" +
+            "iAhEBCICEYGIQEQgIhARiAhEBCICEYGIQEQgIhARiAhEBCICEYGIQEQgIhARiAhEBCICEYGIQETg\n" +
+            "bB/QoX96EpAulQAAAABJRU5ErkJggg==";
+    /**
+     * 阿里云文件服务器前缀
+     */
+    private final static String aliyunUrl = Global.getConfig("aliyunUrl");
 
     //生产环境域名
     @Value("${serverDomain}")
@@ -112,6 +123,8 @@ public class RuralProjectMessageElectronicSealYCService extends CrudService<Rura
     private WorkattachmentService workattachmentService;
     @Autowired
     private WorkClientAttachmentDao workClientAttachmentDao;
+    @Autowired
+    private WorkStaffBasicInfoService workStaffBasicInfoService;
 
     /**
      * 根据项目id查询审定单是否存在送审信息
@@ -1650,6 +1663,30 @@ public class RuralProjectMessageElectronicSealYCService extends CrudService<Rura
         //约定作业期
         data.put("promiseTime",promiseTime);
         data.put("projectMaster",ruralProjectRecords.getLeaderNameStr());
+        //如果项目负责人不为空,则对项目负责人(第一个)进行获取签字章并存储
+        if(StringUtils.isNotBlank(ruralProjectRecords.getProjectMasterId())){
+            String base64String = base64String(ruralProjectRecords.getProjectMasterId());
+            data.put("handSignature3",base64String);
+        }else{
+            data.put("handSignature3","");
+        }
+
+        //查询杨荣华杨所的用户信息
+        User yrhUser = UserUtils.getByUserName("杨荣华");
+        if(StringUtils.isNotBlank(yrhUser.getId())){
+            String base64String = base64String(yrhUser.getId());
+            data.put("handSignature1",base64String);
+        }else{
+            data.put("handSignature1","");
+        }
+        //查询陈红星陈总的用户信息
+        User chxUser = UserUtils.getByUserName("陈红星");
+        if(StringUtils.isNotBlank(chxUser.getId())){
+            String base64String = base64String(chxUser.getId());
+            data.put("handSignature2",base64String);
+        }else{
+            data.put("handSignature2","");
+        }
 
         //咨询员信息
         if(null != consultants && consultants.size()>0){
@@ -1666,6 +1703,14 @@ public class RuralProjectMessageElectronicSealYCService extends CrudService<Rura
             RuralReportConsultant consultantUserConsultant = new RuralReportConsultant();
             User consultantUser = UserUtils.get(projectReportSignatureInfo.getConsultant());
             data.put("consultantName1",consultantUser.getName());
+            //如果咨询员不为空,则对项咨询员进行获取签字章并存储
+            if(StringUtils.isNotBlank(consultantUser.getId())){
+                String base64String = base64String(consultantUser.getId());
+                data.put("handSignature4",base64String);
+            }else{
+                data.put("handSignature4","");
+            }
+
             data.put("zixunyuanName",consultantUser.getName());
             data.put("consultantProfession1","");
             data.put("consultantQualification1","");
@@ -2425,4 +2470,60 @@ public class RuralProjectMessageElectronicSealYCService extends CrudService<Rura
         String id = dao.findZXYByName(Name);
         return id;
     }
+    /**
+     * 根据用户id获取用户手签章并转换为base64字符串输出
+     * @param userIds
+     * @return
+     */
+    public String base64String(String userIds){
+        String imageStr = "";
+        String path = null;
+        String fileName = null;
+        try {
+            String[] split = userIds.split(",");
+            List<String> userList = Arrays.asList(split);
+            WorkStaffBasicInfo workStaffBasicInfo = workStaffBasicInfoService.getWorkStaffBasicInfoByUserId(userList.get(0));
+            //判断人员的手签章是否存在
+            if(StringUtils.isNotBlank(workStaffBasicInfo.getHandSignature())){
+                String aliyunUrlStr = aliyunUrl + workStaffBasicInfo.getHandSignature();
+                //下载文件
+                if(System.getProperty("os.name").toLowerCase().contains("win")){
+                    path = "D:/attachment-file/handSignature/";
+                }else{
+                    path = "/attachment-file/handSignature/";
+                }
+
+                String file = aliyunUrlStr;
+                file = file.replace("amp;","");
+                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];
+                File filePath = new File(path);
+                if (!filePath.mkdirs()) {
+                    filePath.mkdirs();
+                }
+                new OSSClientUtil().downByStreamSaveLocal(ossKey,fileName,path+fileName);
+                imageStr = ImageUtil.getImageStr(path+fileName);
+            }
+        }catch (Exception e){
+            e.getMessage();
+        }finally {
+            FileUtils.delFile(path+fileName);
+        }
+        if(StringUtils.isBlank(imageStr)){
+            imageStr = blankBase64;
+        }
+
+
+        return imageStr;
+    }
 }

文件差異過大導致無法顯示
+ 1422 - 884
src/main/resources/freemarker/projectSignature.ftl


+ 25 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllList.jsp

@@ -1054,6 +1054,31 @@
 							}
 						}
 						</shiro:hasPermission>
+
+
+                        <shiro:hasPermission name="ruralProject:ruralProjectMessageAll:adminDescription">
+                            //归档资料缺失说明
+                            if(d.projectReportStatusTwo == 0){
+                                if(d.projectReportStatus == 5){
+                                    if(d.emergencyProject == 1){
+                                        if(d.projectReportRecordStatus != 1 && d.projectReportRecordStatus != 2  && d.projectReportRecordStatus != 5 ){
+                                            if (d.defectRecordStatus==0) {
+                                                xml+="<a href=\"#\" onclick=\"openDialogre('新增缺失说明信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formAdminDescription?reportId=" + d.id +"','95%', '95%','','提交,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 资料缺失说明</a>";
+                                            }
+                                        }
+                                    }
+                                }
+                            }else{
+                                if(d.projectReportStatusTwo == 5){
+                                    if(d.projectReportRecordStatus != 1 && d.projectReportRecordStatus != 2  && d.projectReportRecordStatus != 5){
+                                        if (d.defectRecordStatus==0) {
+                                            xml+="<a href=\"#\" onclick=\"openDialogre('新增缺失说明信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formAdminDescription?reportId=" + d.id +"','95%', '95%','','提交,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 资料缺失说明</a>";
+                                        }
+                                    }
+                                }
+                            }
+                        </shiro:hasPermission>
+
 						xml+="</div>";
 						return[xml].join('');
 					}}