瀏覽代碼

Merge remote-tracking branch 'origin/master'

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

+ 97 - 0
src/main/java/com/jeeplus/modules/projectFilingBatch/entity/ProjectFilingBatchExcel.java

@@ -0,0 +1,97 @@
+package com.jeeplus.modules.projectFilingBatch.entity;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.sys.entity.Office;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 项目归档管理
+ * @author: 程铄
+ * @create: 2021-03-16 10:01
+ */
+public class ProjectFilingBatchExcel extends DataEntity<ProjectFilingBatchExcel> {
+
+    private String filingBatch ;//档次批号
+    private String filingName ;//批次归档名称
+    private String createNameStr;   //创建人
+    private String projectId;   //项目编号
+    private String reportNumber;   //报告号
+    private String projectName;   //项目名称
+    private String batchFileType;   //归档文件类型
+    private String batchFileMiao;   //归档文件类型
+    public String getFilingBatch() {
+        return filingBatch;
+    }
+
+    public void setFilingBatch(String filingBatch) {
+        this.filingBatch = filingBatch;
+    }
+
+    public String getFilingName() {
+        return filingName;
+    }
+
+    public void setFilingName(String filingName) {
+        this.filingName = filingName;
+    }
+
+    public String getCreateNameStr() {
+        return createNameStr;
+    }
+
+    public void setCreateNameStr(String createNameStr) {
+        this.createNameStr = createNameStr;
+    }
+
+    @ExcelField(title="项目编号", align=2, sort=4)
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    @ExcelField(title="报告号", align=2, sort=5)
+    public String getReportNumber() {
+        return reportNumber;
+    }
+
+    public void setReportNumber(String reportNumber) {
+        this.reportNumber = reportNumber;
+    }
+
+    @ExcelField(title="项目名称", align=2, sort=6)
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    @ExcelField(title="归档文件类型", align=2, sort=7)
+    public String getBatchFileType() {
+        return batchFileType;
+    }
+
+    public void setBatchFileType(String batchFileType) {
+        this.batchFileType = batchFileType;
+    }
+
+    @ExcelField(title="归档文件描述", align=2, sort=8)
+    public String getBatchFileMiao() {
+        return batchFileMiao;
+    }
+
+    public void setBatchFileMiao(String batchFileMiao) {
+        this.batchFileMiao = batchFileMiao;
+    }
+}

+ 32 - 55
src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java

@@ -18,6 +18,7 @@ import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.contractclient.entity.WorkContractClient;
 import com.jeeplus.modules.contractclient.service.WorkContractClientService;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchExcel;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchProInfo;
 import com.jeeplus.modules.projectFilingBatch.service.ProjectFilingBatchService;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
@@ -1555,27 +1556,22 @@ public class WorkFullManageController extends BaseController {
 	@RequestMapping(value="downloadBatchFilingList")
 	@ResponseBody
 	public void downloadBatchFilingList(HttpServletResponse response, ProjectFilingBatch projectFilingBatch)  {
-		Map data = batchFilingListData(projectFilingBatch);
-
-
-		//模板对象
-		Template template=null;
-		//freemaker模板路径
-		File path = new File(this.getClass().getResource("/").getPath()+"/freemarker");
-		Configuration cfg = new Configuration();
 		try {
-			cfg.setDirectoryForTemplateLoading(path);
-			//选择对应的ftl文件
-			template = cfg.getTemplate("batchFilingList.ftl","UTF-8");
-		} catch (IOException e) {
-			e.printStackTrace();
+			List<ProjectFilingBatchExcel> filingBatchExcel = batchFilingListData(projectFilingBatch);
+			projectFilingBatch = projectFilingBatchService.get(projectFilingBatch.getId());
+			//表头
+			User user=UserUtils.get(projectFilingBatch.getCreateBy().getId());
+			String title=projectFilingBatch.getFilingBatch()+"+"+projectFilingBatch.getFilingName()+"+"+user.getName();
+			String fileName = "批量归档清单"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+			ExportExcel excel=new ExportExcel(title, ProjectFilingBatchExcel.class).setDataList(filingBatchExcel);
+			excel.write(response, fileName).dispose();
+		} catch (Exception e) {
+			logger.error("Exception e:"+e);
 		}
-		File docFile = new File("批量归档清单.xlsx");
-		FreemarkerUtil.generateFile(data,template,docFile);
-		ResponseUtil.docResponse("批量归档清单.xlsx",docFile,response);
 
 	}
-	private Map<String,Object> batchFilingListData(ProjectFilingBatch projectFilingBatch){
+	private List<ProjectFilingBatchExcel> batchFilingListData(ProjectFilingBatch projectFilingBatch){
+
 		//获取详细信息
 		projectFilingBatch = projectFilingBatchService.get(projectFilingBatch.getId());
 		List<RuralProjectRecords> ruralProjectRecordsList = new ArrayList<>();
@@ -1599,61 +1595,42 @@ public class WorkFullManageController extends BaseController {
 		projectFilingBatch.setCreateBy(UserUtils.get(projectFilingBatch.getCreateBy().getId()));
 		//项目信息
 		projectFilingBatch.setProject(ruralProjectRecordsList);
-		//freemarker参数值准备
-		Map<String,Object> data  = new LinkedHashMap<>();
-		//表头
-		if (StringUtils.isNotBlank(projectFilingBatch.getFilingBatch())){
-			data.put("filingBatch",projectFilingBatch.getFilingBatch());
-		}else{
-			data.put("filingBatch","");
-		}
-		if (StringUtils.isNotBlank(projectFilingBatch.getFilingName())){
-			data.put("batchName",projectFilingBatch.getFilingName());
-		}else{
-			data.put("batchName","");
-		}
-		if (null!=projectFilingBatch.getCreateBy()){
-			User user=UserUtils.get(projectFilingBatch.getCreateBy().getId());
-			data.put("batchUser",user.getName());
-		}else{
-			data.put("batchUser","");
-		}
-		List<Map<String,String>> list=new LinkedList<>();
+		//poi参数值准备
+		List<ProjectFilingBatchExcel> list=new LinkedList<>();
 		for (RuralProjectRecords ruralProjectRecords:ruralProjectRecordsList){
+			ProjectFilingBatchExcel filingBatchExcel=new ProjectFilingBatchExcel();
 			if (ruralProjectRecords.getProInfos().size()>0){
 				for(ProjectFilingBatchProInfo proInfo:ruralProjectRecords.getProInfos()){
-					Map<String,String> map=new HashMap<>();
-					map.put("projectId",ruralProjectRecords.getProjectId());
+					filingBatchExcel.setProjectId(ruralProjectRecords.getProjectId());
 					if (StringUtils.isNotBlank(ruralProjectRecords.getProjectReportNumber())){
-						map.put("number",ruralProjectRecords.getProjectReportNumber());
+						filingBatchExcel.setReportNumber(ruralProjectRecords.getProjectReportNumber());
 					}else{
-						map.put("number","");
+						filingBatchExcel.setReportNumber("");
 					}
-					map.put("projectName",ruralProjectRecords.getProjectName());
-					map.put("batchFileType", proInfo.getProInfoType());
+					filingBatchExcel.setProjectName(ruralProjectRecords.getProjectName());
+					filingBatchExcel.setBatchFileType(proInfo.getProInfoType());
 					if (StringUtils.isNotBlank(proInfo.getProInfoName())){
-						map.put("batchFileMiao",proInfo.getProInfoName());
+						filingBatchExcel.setBatchFileMiao(proInfo.getProInfoName());
 					}else{
-						map.put("batchFileMiao","");
+						filingBatchExcel.setBatchFileMiao("");
 					}
-					list.add(map);
+					list.add(filingBatchExcel);
 				}
 			}else{
 				Map<String,String> map=new HashMap<>();
-				map.put("projectId",ruralProjectRecords.getProjectId());
+				filingBatchExcel.setProjectId(ruralProjectRecords.getProjectId());
 				if (StringUtils.isNotBlank(ruralProjectRecords.getProjectReportNumber())){
-					map.put("number",ruralProjectRecords.getProjectReportNumber());
+					filingBatchExcel.setReportNumber(ruralProjectRecords.getProjectReportNumber());
 				}else{
-					map.put("number","");
+					filingBatchExcel.setReportNumber("");
 				}
-				map.put("projectName",ruralProjectRecords.getProjectName());
-				map.put("batchFileType","");
-				map.put("batchFileMiao","");
-				list.add(map);
+				filingBatchExcel.setProjectName(ruralProjectRecords.getProjectName());
+				filingBatchExcel.setBatchFileType("");
+				filingBatchExcel.setBatchFileMiao("");
+				list.add(filingBatchExcel);
 			}
 		}
-		data.put("list",list);
-		return data;
+		return list;
 	}
 
 }

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

@@ -3707,12 +3707,67 @@ public class WorkProjectNotifyController extends BaseController {
 						}
 					//}
 					projectReportRecord.setUploadMode(uploadMode);
+					//获取项目基础信息
+					ruralProjectRecordsService.queryProjectDetail(ruralProjectRecords);
+					//工程咨询
+					List<MainDictDetail> mainDictList = Lists.newArrayList();
+					if("1".equals(ruralProjectRecords.getProjectType())){
+						mainDictList = DictUtils.getMainDictList("attachment_project_sort");
+						//造价审核
+					} else if("2".equals(ruralProjectRecords.getProjectType())){
+						mainDictList = DictUtils.getMainDictList("attachment_project_sort_cost");
+					}
+					if(StringUtils.isNotBlank(ruralProjectRecords.getAttachmentProjectSort())){
+						//处理项目类别
+						for (MainDictDetail info: mainDictList) {
+							if(ruralProjectRecords.getAttachmentProjectSort().equals(info.getValue())){
+								ruralProjectRecords.setAttachmentProjectSort(info.getLabel());
+								break;
+							}
+						}
+					}
 					model.addAttribute("projectcontentinfo", projectcontentinfo);
 					model.addAttribute("projectRecords", ruralProjectRecords);
 					model.addAttribute("projectReportData", projectReportData);
 					model.addAttribute("workContractInfo", workContractInfo);
 					model.addAttribute("projectReportRecord", projectReportRecord);
 					model.addAttribute("project", projectReportRecord.getReport().getProject());
+					//tap页
+					//查询所有的工程类型
+					List<ProjectEngineeringInfo> projectEngineeringInfo=engineeringService.findList(new ProjectEngineeringInfo());
+					model.addAttribute("projectEngineeringInfo",projectEngineeringInfo);
+					//项目计划
+					RuralProjectRecords projectRecordPlans = this.planView(ruralProjectRecords.getId());
+					model.addAttribute("projectRecordPlans", projectRecordPlans);
+					//获取质量复核项目组成员
+					List<RuralReportConsultant> consultantinfo =this.qualityView(ruralProjectRecords,projectReportData);
+					model.addAttribute("consultantinfo", consultantinfo);
+					//获取总审人员
+					User user=UserUtils.get(projectReportData.getBzshbUserId());
+					model.addAttribute("bzshbUserName",user.getName());
+					//质量复核标准展示
+					String review="";
+					if ("2".equals(ruralProjectRecords.getSubmitMoney())){
+						review="1";
+					};
+					List<WorkReviewAudit> workReviewAuditList = projectContentDataService.findListReview(review,"质量复核");
+					WorkReviewAudit revAudit = new WorkReviewAudit();
+					String type = "4";
+					revAudit.setCompanyId(UserUtils.getSelectCompany().getId());
+					revAudit.setType(type);
+					revAudit.setReportId(projectReportData.getId());
+					List<WorkReviewAudit> reaudits = workReviewStandardService.findAuditList(revAudit);
+					for(WorkReviewAudit reAudit:workReviewAuditList){
+						for (WorkReviewAudit audit:reaudits){
+							if (reAudit.getId().equals(audit.getStandardId())){
+								reAudit.setDeductOption(audit.getDeductOption());
+								break;
+							}
+						}
+					}
+					model.addAttribute("datalist", workReviewAuditList);
+
+					
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
 						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));

文件差異過大導致無法顯示
+ 1113 - 817
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordAudit.jsp


+ 4 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordAudit.jsp

@@ -28,8 +28,10 @@
 			var fileNumTow =  $("#fileNumTow").val();
 			var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
 			$("#opinion").val(ss);
-			var referenceView= document.getElementById("referenceView").contentWindow.document.getElementById("opinion").value
-			$("#referenceRemarks").val(referenceView);
+			if ('${type}'!='1'){
+				var referenceView= document.getElementById("referenceView").contentWindow.document.getElementById("opinion").value
+				$("#referenceRemarks").val(referenceView);
+			}
             if(validateForm.form()){
                 if(obj == 1){
 					/*if(fileNum == ''|| fileNum == undefined){

+ 4 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordAudit.jsp

@@ -17,8 +17,10 @@
 			var fileNumTow =  $("#fileNumTow").val();
 			var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
 			$("#opinion").val(ss);
-			var referenceView= document.getElementById("referenceView").contentWindow.document.getElementById("opinion").value
-			$("#referenceRemarks").val(referenceView);
+			if ('${type}'!='1'){
+				var referenceView= document.getElementById("referenceView").contentWindow.document.getElementById("opinion").value
+				$("#referenceRemarks").val(referenceView);
+			}
             if(validateForm.form()){
                 if(obj == 1){
 					/*if(fileNum == ''|| fileNum == undefined){