Просмотр исходного кода

代码调整优化以及公司级月报导出功能调整

user5 2 лет назад
Родитель
Сommit
ab74384ebb
20 измененных файлов с 468 добавлено и 58 удалено
  1. 5 5
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectContentDataService.java
  2. 13 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportRecordService.java
  3. 3 3
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecordsExport.java
  4. 173 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  5. 12 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageAllController.java
  6. 3 3
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureOldMessageDisposeController.java
  7. 103 0
      src/main/java/com/jeeplus/modules/statement/controller/StatementCompanyComprehensiveController.java
  8. 9 0
      src/main/java/com/jeeplus/modules/statement/entity/StatementCompanyComprehensiveInfo.java
  9. 10 0
      src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java
  10. 4 4
      src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoAllController.java
  11. 4 4
      src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java
  12. 62 13
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  13. 1 1
      src/main/java/com/jeeplus/modules/workreview/service/WorkReviewStandardService.java
  14. 1 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml
  15. 11 11
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordReportDao.xml
  16. 45 7
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  17. 5 5
      src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml
  18. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllList.jsp
  19. 2 0
      src/main/webapp/webpage/modules/statement/projectReportList.jsp
  20. 1 1
      src/main/webapp/webpage/modules/workclientinfo/workClientInfoFormDetail.jsp

+ 5 - 5
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectContentDataService.java

@@ -343,7 +343,7 @@ public class ProjectContentDataService extends CrudService<ProjectContentDataDao
                 workReviewAudit.setStandardDetail(reviewStandard.getStandardDetail());
                 workReviewAudit.setSort(reviewStandard.getSort());
                 workReviewAudit.setId(reviewStandard.getId());
-                if (orderNum>10100 && orderNum<10200){
+                if (orderNum < 10200){
                     workReviewAudit.setType("4");
                     workReviewAudit.setParent(new WorkReviewAudit("0"));
                     workReviewAudit.setParentIds("0,");
@@ -359,7 +359,7 @@ public class ProjectContentDataService extends CrudService<ProjectContentDataDao
                 workReviewAudit.setStandardDetail(reviewStandard.getStandardDetail());
                 workReviewAudit.setSort(reviewStandard.getSort());
                 workReviewAudit.setId(reviewStandard.getId());
-                if (orderNum>20100 && orderNum<20199){
+                if (orderNum < 20199){
                     workReviewAudit.setType("4");
                     workReviewAudit.setParent(new WorkReviewAudit("0"));
                     workReviewAudit.setParentIds("0,");
@@ -375,7 +375,7 @@ public class ProjectContentDataService extends CrudService<ProjectContentDataDao
                 workReviewAudit.setStandardDetail(reviewStandard.getStandardDetail());
                 workReviewAudit.setSort(reviewStandard.getSort());
                 workReviewAudit.setId(reviewStandard.getId());
-                if (orderNum>30100 && orderNum<30199){
+                if (orderNum < 30199){
                     workReviewAudit.setType("4");
                     workReviewAudit.setParent(new WorkReviewAudit("0"));
                     workReviewAudit.setParentIds("0,");
@@ -440,7 +440,7 @@ public class ProjectContentDataService extends CrudService<ProjectContentDataDao
                 workReviewAudit.setStandardDetail(reviewStandard.getStandardDetail());
                 workReviewAudit.setSort(reviewStandard.getSort());
                 workReviewAudit.setId(reviewStandard.getId());
-                if (orderNum>10200 && orderNum<10299){
+                if (orderNum < 10299){
                     workReviewAudit.setType("4");
                     workReviewAudit.setParent(new WorkReviewAudit("0"));
                     workReviewAudit.setParentIds("0,");
@@ -456,7 +456,7 @@ public class ProjectContentDataService extends CrudService<ProjectContentDataDao
                 workReviewAudit.setStandardDetail(reviewStandard.getStandardDetail());
                 workReviewAudit.setSort(reviewStandard.getSort());
                 workReviewAudit.setId(reviewStandard.getId());
-                if (orderNum>20200 && orderNum<20299){
+                if (orderNum < 20299){
                     workReviewAudit.setType("4");
                     workReviewAudit.setParent(new WorkReviewAudit("0"));
                     workReviewAudit.setParentIds("0,");

+ 13 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportRecordService.java

@@ -135,6 +135,19 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 		return projectReportRecord;
 	}
 
+	public ProjectReportRecord getInfo(String id) {
+		ProjectReportRecord projectReportRecord= super.get(id);
+		if (null == projectReportRecord){
+			projectReportRecord = dao.getRuralProjectReportRecord(id);
+			ProjectReportData reportData = ruralProjectMessageService.getProjectReportDateByProjectId(dao.getProjectId(projectReportRecord.getReport().getId()));
+			projectReportRecord.setReport(reportData);
+			projectReportRecord.setType(2);
+		}else{
+			projectReportRecord.setType(1);
+		}
+		return projectReportRecord;
+	}
+
 
 	/**
 	 * 获取归档资料说明信息

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

@@ -359,7 +359,7 @@ public class RuralProjectRecordsExport extends ActEntity<RuralProjectRecordsExpo
 		this.recodeNum = recodeNum;
 	}
 
-	//@ExcelField(title="电子归档状态", align=2, sort=18,dictType = "archive_state")
+	@ExcelField(title="归档状态", align=2, sort=18,dictType = "archive_state")
 	public Integer getProjectReportRecordStatus() {
 		return projectReportRecordStatus;
 	}
@@ -1366,7 +1366,7 @@ public class RuralProjectRecordsExport extends ActEntity<RuralProjectRecordsExpo
 		this.actType = actType;
 	}
 
-	@ExcelField(title="责人", align=2, sort=9)
+	@ExcelField(title="责人", align=2, sort=9)
 	public String getProjectMasterName() {
 		return projectMasterName;
 	}
@@ -1901,7 +1901,7 @@ public class RuralProjectRecordsExport extends ActEntity<RuralProjectRecordsExpo
 		this.completionStatus = completionStatus;
 	}
 
-	@ExcelField(title="归档状态", align=2, sort=19)
+	//@ExcelField(title="归档状态", align=2, sort=19)
 	public String getDownArchiveStatus() {
 		return downArchiveStatus;
 	}

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

@@ -276,6 +276,11 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		projectRecords.setProjectLeaders(users);
 		return projectRecords;
 	}
+	public RuralProjectRecords getMastersByProjectRecords(RuralProjectRecords projectRecords) {
+		List<User> users = workProjectUserDao.queryProjectUsers(projectRecords.getId(), "1");
+		projectRecords.setProjectLeaders(users);
+		return projectRecords;
+	}
 	public Boolean getByUsers(RuralProjectRecords projectRecords) {
 		List<User> users = workProjectUserDao.queryAllProjectUsers(projectRecords.getId());
 		User user = UserUtils.getUser();
@@ -403,6 +408,44 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		return recordsList;
 	}
 
+	public List<RuralProjectRecords> disposeProjectType(List<RuralProjectRecords> recordsList) {
+		if(null != recordsList && recordsList.size()>0){
+
+			//查询报告文件、依据性文件、其他文件必填列表以及数据
+			List<MainDictDetail> projectSortCostList = projectSortCostList();
+
+			//查询报告文件、依据性文件、其他文件必填列表以及数据
+			List<MainDictDetail> projectSortList = projectSortList();
+
+			for (RuralProjectRecords info : recordsList) {
+				if (StringUtils.isNotBlank(info.getProjectType())){
+					if("1".equals(info.getProjectType())){  //工程咨询
+						if(StringUtils.isNotBlank(info.getAttachmentProjectSort())){
+							for (MainDictDetail infoDetail: projectSortList) {
+								if(info.getAttachmentProjectSort().equals(infoDetail.getValue())){
+									info.setAttachmentProjectSort(infoDetail.getLabel());
+									break;
+								}
+							}
+						}
+
+					}else if("2".equals(info.getProjectType())){    //造价审核
+						if(StringUtils.isNotBlank(info.getAttachmentProjectSort())){
+							for (MainDictDetail infoDetail: projectSortCostList) {
+								if(info.getAttachmentProjectSort().equals(infoDetail.getValue())){
+									info.setAttachmentProjectSort(infoDetail.getLabel());
+									break;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+
+		return recordsList;
+	}
+
 	/**
 	 * 项目计划查询数据信息
 	 * @param page
@@ -2190,6 +2233,132 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	}
 
 	/**
+	 * 项目列表新增文件信息获取
+	 * @param projectRecords  项目信息
+	 * @return
+	 */
+	public RuralProjectcontentinfo formAccessory(RuralProjectRecords projectRecords,ProjectReportData projectReportData){
+		//查询“配农网”工程类型id
+		String engineeringId = engineeringService.getEngineeringId("202");
+		RuralProjectcontentinfo projectcontentinfo = new RuralProjectcontentinfo();
+
+		projectcontentinfo.setProject(projectRecords);
+		projectcontentinfo.setProjectReportData(projectReportData);
+		//声明项目与附件关系表联系
+		ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+		//添加项目类型
+		relateInfo.setAttachmentProjectType(projectRecords.getProjectType());
+		relateInfo.setAttachmentProjectSort(projectRecords.getAttachmentProjectSort());
+//		Integer approvalMoney = 0;
+//		if(null != projectReportData){
+			//查看送审金额是否为500w以上金额
+//			approvalMoney = projectAccessoryRelationService.decideAttachmentProjectApprovalMoney(projectReportData.getReviewFee());
+
+//		}
+		//设置默认值为500w以上的展示数据
+//		approvalMoney = 2;
+		String money=projectcontentinfo.getProject().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;
+		}
+		//创建阶段集合(若为归档阶段则将新增报告和归档阶段信息都添加在内)
+		List<Integer> requiredStageList = Lists.newArrayList();
+		requiredStageList.add(1);
+		//添加报告类型
+		relateInfo.setRequiredStage(1);
+		relateInfo.setId(projectRecords.getId());
+
+		//声明归档状态
+		String reportRecordStatus = null;
+		//判断报告信息是否已存在
+		if(null != projectReportData){
+			//判断是否已经审批完成
+			if ("5".equals(projectReportData.getStatus())){
+				//查询归档状态信息
+				reportRecordStatus = dao.getReportRecordStatus(projectReportData.getId());
+				//如果归档状态不为空,则查询归档展示列
+				if(StringUtils.isNotBlank(reportRecordStatus)){
+					relateInfo.setRequiredStage(2);
+					requiredStageList.add(2);
+				}
+			}
+		}else{
+			//没有提交报告信息
+
+		}
+
+		//查询报告文件、依据性文件、其他文件必填列表以及数据
+		List<MainDictDetail> mainDictDetails = this.attachmentTemplateList();
+		disposeProjectFileView(mainDictDetails,relateInfo,engineeringId,projectRecords,projectcontentinfo);
+
+		/*for (MainDictDetail mainDict : mainDictDetails) {
+
+			relateInfo.setAttachType(mainDict.getValue());
+			switch (mainDict.getValue()) {
+				case "11":
+					List<ProjectTemplateInfo> fileAttachmentList = this.getProjectTemplate(relateInfo,requiredStageList);
+					for (ProjectTemplateInfo info: fileAttachmentList) {
+						info.setAttachTypes(info.getAttachTypes().toLowerCase());
+						if(engineeringId.equals(projectRecords.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");
+								}
+							}
+						}
+					}
+					projectcontentinfo.setFileAttachmentList(fileAttachmentList);
+					break;
+				case "12":
+					List<ProjectTemplateInfo> projectTemplateList = this.getProjectTemplate(relateInfo, requiredStageList);
+					for (ProjectTemplateInfo info: projectTemplateList) {
+						info.setAttachTypes(info.getAttachTypes().toLowerCase());
+						if(engineeringId.equals(projectRecords.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");
+								}
+							}
+						}
+					}
+					projectcontentinfo.setFileGistdataList(projectTemplateList);
+					break;
+				case "13":
+					projectcontentinfo.setFileOtherList(this.getProjectTemplate(relateInfo,requiredStageList));
+					break;
+			}
+
+		}*/
+
+		//添加当前文件服务器类型
+		projectcontentinfo.setUploadMode(uploadMode);
+		return projectcontentinfo;
+	}
+
+	/**
 	 * 文件展示数据处理
 	 * @param mainDictDetails
 	 * @param relateInfo
@@ -4018,6 +4187,10 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	public Page<RuralProjectRecords> findReportPageOverdue(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords,
 														   StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,
 															String year,String bigDateType,String smallDateType) {
+		if(StringUtils.isNotBlank(statementCompanyComprehensiveInfo.getDepartmentLevel()) && "company".equals(statementCompanyComprehensiveInfo.getDepartmentLevel())){
+			bigDateType = "0";
+			statementCompanyComprehensiveInfo.setBigDateType("2");
+		}
 		//将获取的datetype转为需要的具体时间   含年月日
 		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(bigDateType),new Integer(smallDateType),new Integer(year));
 		String beginDate = map.get("beginDate");

+ 12 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageAllController.java

@@ -96,6 +96,7 @@ public class RuralProjectMessageAllController extends BaseController {
     @RequiresPermissions("ruralProject:ruralProjectMessageAll:list")
     @RequestMapping(value = {"list", ""})
     public String list(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        long s1 = System.currentTimeMillis();
         if(UserUtils.isManager()){
             model.addAttribute("flag","1");
         }
@@ -140,6 +141,9 @@ public class RuralProjectMessageAllController extends BaseController {
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserList();
         model.addAttribute("userList", auditUserList);
+
+        long s2 = System.currentTimeMillis();
+        System.out.println("s2-s1: " + (s2-s1));
         //添加查询类型list
         projectRecords.setTypeList(typeList);
         Page<RuralProjectRecords> page = ruralProjectMessageAllService.findPage(new Page<RuralProjectRecords>(request, response), projectRecords);
@@ -150,6 +154,8 @@ public class RuralProjectMessageAllController extends BaseController {
                 model.addAttribute("workContractInfoClientName", projectRecords.getWorkContractInfo().getClient().getName());
             }
         }
+        long s3 = System.currentTimeMillis();
+        System.out.println("s3-s2: " + (s3-s2));
         //无合同状态下,获取委托方的名称
         List<RuralProjectRecords> list = page.getList();
         for (int i = 0; i < list.size(); i++) {
@@ -168,11 +174,15 @@ public class RuralProjectMessageAllController extends BaseController {
         if(StringUtils.isNotBlank(oldSubmitMoney)){
             projectRecords.setSubmitMoney(oldSubmitMoney);
         }
+        long s4 = System.currentTimeMillis();
+        System.out.println("s4-s3: " + (s4-s3));
         //查询工程类型
         if (projectRecords.getEngineeringType()!=null){
             ProjectEngineeringInfo engineeringInfo=engineeringService.get(projectRecords.getEngineeringType());
             model.addAttribute("engineeringInfo", engineeringInfo);
         }
+        long s5 = System.currentTimeMillis();
+        System.out.println("s5-s4: " + (s5-s4));
         model.addAttribute("beginDate", projectRecords.getBeginDate());
         model.addAttribute("endDate", projectRecords.getEndDate());
         model.addAttribute("moneyAll", ruralProjectMessageAllService.getMoneyAll(projectRecords));
@@ -180,6 +190,8 @@ public class RuralProjectMessageAllController extends BaseController {
         if (StringUtils.isNotBlank(oldProjectSort)){
             model.addAttribute("oldProjectSort", oldProjectSort);
         }
+        long s6 = System.currentTimeMillis();
+        System.out.println("s6-s5: " + (s6-s5));
         return "modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllList";
     }
 

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

@@ -238,12 +238,12 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
         System.out.println(c.get(Calendar.DATE));
         System.out.println(c.getActualMaximum(Calendar.DATE));
         long l1 = System.currentTimeMillis();
-        Integer month = c.get(Calendar.MONTH); //第一个月从0开始,所以得到月份+1
+        Integer month = c.get(Calendar.MONTH)+1; //第一个月从0开始,所以得到月份+1
         //当月最后一天
         logger.info("-----------公司级—月度报表(开始)------------------");
         statementCompanyComprehensiveService.disposeStatementCompany(year,2,month);
         logger.info("------------公司级—月度报表(结束)------------------");
-        /*logger.info("------------公司级—年度报表(月报中年度信息)(开始)------------------");
+        logger.info("------------公司级—年度报表(月报中年度信息)(开始)------------------");
         statementCompanyComprehensiveService.disposeStatementCompanyByYear(year,0,month);
         logger.info("------------公司级—年度报表(月报中年度信息)(结束)------------------");
         logger.info("-----------部门级—月度报表(开始)------------------");
@@ -252,7 +252,7 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
         logger.info("-----------部门级—年度报表(月报中年度信息)(开始)------------------");
         statementCompanyComprehensiveService.disposeStatementOfficeByYear(year,0,month);
         logger.info("------------部门级—年度报表(月报中年度信息)(结束)------------------");
-        logger.info("-----------张静—月度报表(开始)------------------");
+        /*logger.info("-----------张静—月度报表(开始)------------------");
         statementCompanyComprehensiveService.disposeReportDataStatementCompany(year,2,month);
         logger.info("------------张静—月度报表(结束)------------------");*/
         map.put("msgMonth","月度报表处理完成");

+ 103 - 0
src/main/java/com/jeeplus/modules/statement/controller/StatementCompanyComprehensiveController.java

@@ -1,12 +1,17 @@
 package com.jeeplus.modules.statement.controller;
 
 import com.google.common.collect.Lists;
+import com.jeeplus.common.config.Global;
 import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
 import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
 import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
+import com.jeeplus.modules.ruralprojectrecords.entity.DownloadProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsExport;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
@@ -31,6 +36,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
 import java.util.List;
 import java.util.Map;
 
@@ -122,6 +128,7 @@ public class StatementCompanyComprehensiveController extends BaseController {
         model.addAttribute("field10",statementCompanyComprehensiveInfo.getField10());
         model.addAttribute("field11",statementCompanyComprehensiveInfo.getField11());
         model.addAttribute("field12",statementCompanyComprehensiveInfo.getField12());
+        model.addAttribute("departmentLevel",statementCompanyComprehensiveInfo.getDepartmentLevel());
 
         //这个是我删除的有需要可以补回,但是得注意projectRecords的submitmoney值
         //进行查询之后进行任何操作,返回还是查询之后的数据页面
@@ -183,11 +190,13 @@ public class StatementCompanyComprehensiveController extends BaseController {
         model.addAttribute("recordState",recordState);
         model.addAttribute("reportedState",reportedState);
         model.addAttribute("projectPaperFiling",projectPaperFiling);
+        model.addAttribute("departmentLevel","company");
         model.addAttribute("projectFlingBatchRelation",projectFlingBatchRelation);
         model.addAttribute("field5",statementCompanyComprehensiveInfo.getField5());
         model.addAttribute("field6",statementCompanyComprehensiveInfo.getField6());
         model.addAttribute("field7",statementCompanyComprehensiveInfo.getField7());
         model.addAttribute("field8",statementCompanyComprehensiveInfo.getField8());
+        statementCompanyComprehensiveInfo.setDepartmentLevel("company");
 
         //这个是我删除的有需要可以补回,但是得注意projectRecords的submitmoney值
         //进行查询之后进行任何操作,返回还是查询之后的数据页面
@@ -1079,4 +1088,98 @@ public class StatementCompanyComprehensiveController extends BaseController {
         model.addAttribute("page", page);
         return "modules/statement/departmentProjectReportList";
     }
+
+
+
+    //公司级:项目报表详细
+    //参数:officeId ,bigDateType,smallDateType
+    // grade:是否为A、B类(1=B,2=A),recordState:不为空则为查询本*电子归档,reportedState:不为空则为查询本*上报
+    @RequestMapping(value = "exportProjectReportList")
+    public String exportProjectReportList(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response
+            , Model model, @Param(value = "bigDateType") String bigDateType
+            , @Param(value = "smallDateType") String smallDateType
+            , @Param(value = "officeId") String officeId
+            , @Param(value = "year") String year
+            , @Param(value = "grade")String grade
+            , @Param(value = "recordState")String recordState
+            , @Param(value = "reportedState")String reportedState
+            , @Param(value = "projectPaperFiling")String projectPaperFiling
+            , @Param(value = "projectFlingBatchRelation")String projectFlingBatchRelation
+            ,StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo){
+
+        //每次都必须接收前端传参并放入model
+        model.addAttribute("bigDateType",bigDateType);
+        model.addAttribute("smallDateType",smallDateType);
+        model.addAttribute("officeId",officeId);
+        model.addAttribute("year",year);
+        model.addAttribute("grade",grade);
+        model.addAttribute("recordState",recordState);
+        model.addAttribute("reportedState",reportedState);
+        model.addAttribute("projectPaperFiling",projectPaperFiling);
+        model.addAttribute("projectFlingBatchRelation",projectFlingBatchRelation);
+        model.addAttribute("field5",statementCompanyComprehensiveInfo.getField5());
+        model.addAttribute("field6",statementCompanyComprehensiveInfo.getField6());
+        model.addAttribute("field7",statementCompanyComprehensiveInfo.getField7());
+        model.addAttribute("field8",statementCompanyComprehensiveInfo.getField8());
+        model.addAttribute("field9",statementCompanyComprehensiveInfo.getField9());
+        model.addAttribute("field10",statementCompanyComprehensiveInfo.getField10());
+        model.addAttribute("field11",statementCompanyComprehensiveInfo.getField11());
+        model.addAttribute("field12",statementCompanyComprehensiveInfo.getField12());
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+
+        String fileName = "";
+        if(StringUtils.isNotBlank(recordState) && "5".equals(recordState)){
+            fileName = "电子归档";
+        } else if (StringUtils.isNotBlank(statementCompanyComprehensiveInfo.getField11()) && "5".equals(statementCompanyComprehensiveInfo.getField11())){
+            fileName = "未质量符合";
+        } else if (StringUtils.isNotBlank(statementCompanyComprehensiveInfo.getField12()) && "5".equals(statementCompanyComprehensiveInfo.getField12())){
+            fileName = "超期未质量符合";
+        } else if (StringUtils.isNotBlank(statementCompanyComprehensiveInfo.getField5()) && "5".equals(statementCompanyComprehensiveInfo.getField5())){
+            fileName = "超期未归档";
+        } else if (StringUtils.isNotBlank(statementCompanyComprehensiveInfo.getField6()) && "5".equals(statementCompanyComprehensiveInfo.getField6())){
+            fileName = "超期已归档";
+        } else if (StringUtils.isNotBlank(projectPaperFiling) && "5".equals(projectPaperFiling)){
+            fileName = "A类纸质归档";
+        } else if (StringUtils.isNotBlank(projectFlingBatchRelation) && "5".equals(projectFlingBatchRelation)){
+            fileName = "B类批量归档";
+        } else if (StringUtils.isNotBlank(statementCompanyComprehensiveInfo.getField7()) && "5".equals(statementCompanyComprehensiveInfo.getField7())){
+            fileName = "超期未上报";
+        } else if (StringUtils.isNotBlank(statementCompanyComprehensiveInfo.getField8()) && "5".equals(statementCompanyComprehensiveInfo.getField8())){
+            fileName = "超期已上报";
+        } else if (StringUtils.isNotBlank(reportedState) && "5".equals(reportedState)){
+            fileName = "上报";
+        } else if (StringUtils.isNotBlank(grade) && "2".equals(grade)){
+            fileName = "新增A类";
+        }else if (StringUtils.isNotBlank(grade) && "1".equals(grade)){
+            fileName = "新增B类";
+        }
+        fileName += DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+        //添加查询类型(造价审核)
+        //projectRecords.setProjectType("2");
+        //获取项目信息
+        try {
+            Page<RuralProjectRecords> page = new Page<RuralProjectRecords>();
+            if(StringUtils.isNotBlank(grade) || StringUtils.isNotBlank(recordState) || StringUtils.isNotBlank(reportedState) || StringUtils.isNotBlank(projectPaperFiling) || StringUtils.isNotBlank(recordState) || StringUtils.isNotBlank(projectFlingBatchRelation)) {
+                page = projectRecordsService.findReportPage(new Page<RuralProjectRecords>(request, response, -1), projectRecords, officeId, grade, bigDateType, smallDateType, recordState, reportedState, year,projectPaperFiling,projectFlingBatchRelation);
+            }else{
+                statementCompanyComprehensiveInfo.setType("1");
+                page = projectRecordsService.findReportPageOverdue(new Page<RuralProjectRecords>(request, response, -1), projectRecords,statementCompanyComprehensiveInfo,year,bigDateType, smallDateType);
+            }
+            List<RuralProjectRecords> ruralProjectRecordsList = projectRecordsService.disposeProjectType(page.getList());
+            new ExportExcel("数据一览表", RuralProjectRecordsExport.class).setDataList(ruralProjectRecordsList).write(response, fileName).dispose();
+        }catch (Exception e){
+            System.out.println("");
+        }
+
+        //查询工程类型
+        if (projectRecords.getEngineeringType()!=null){
+            ProjectEngineeringInfo engineeringInfo=engineeringService.get(projectRecords.getEngineeringType());
+            model.addAttribute("engineeringInfo", engineeringInfo);
+        }
+        return "redirect:"+ Global.getAdminPath()+"/statement/StatementCompanyComprehensive/projectReportList?repage";
+    }
+
+
 }

+ 9 - 0
src/main/java/com/jeeplus/modules/statement/entity/StatementCompanyComprehensiveInfo.java

@@ -13,6 +13,7 @@ public class StatementCompanyComprehensiveInfo extends DataEntity<StatementCompa
     private String type;            //类型(1:项目;2:开票;3:报销;4:合同)
     private String bigDateType;     //状态1(0:年;1:季度;2:月份)
     private String smallDateType;   //状态2(针对状态1进行精确所在指定季度或者月份)
+    private String departmentLevel;   //部门状态(若是公司级,则为 company,部门级则为 office)
     private String statementDate;   //报表时间
     private String officeName;      //部门名称
     private String userId;          //用户id
@@ -66,6 +67,14 @@ public class StatementCompanyComprehensiveInfo extends DataEntity<StatementCompa
         this.smallDateType = smallDateType;
     }
 
+    public String getDepartmentLevel() {
+        return departmentLevel;
+    }
+
+    public void setDepartmentLevel(String departmentLevel) {
+        this.departmentLevel = departmentLevel;
+    }
+
     public String getStatementDate() {
         return statementDate;
     }

+ 10 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java

@@ -242,6 +242,16 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 	}
 
 	/**
+	 * 获取合同基础信息
+	 * @param id
+	 * @return
+	 */
+	public WorkContractInfo getInfoById (String id) {
+		WorkContractInfo workContractInfo = super.get(id);
+		return workContractInfo;
+	}
+
+	/**
 	 * 仅查询合同信息
 	 * @param id
 	 * @return

+ 4 - 4
src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoAllController.java

@@ -85,7 +85,7 @@ public class WorkContractInfoAllController extends BaseController {
         List<WorkContractInfo> list = page.getList();
 
         //查询所有和当前登陆人有关的项目的审核
-        WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+        /*WorkProjectNotify workProjectNotify = new WorkProjectNotify();
         workProjectNotify.setUser(UserUtils.getUser());
         workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
         workProjectNotify.setRemarks("待审批");
@@ -116,7 +116,7 @@ public class WorkContractInfoAllController extends BaseController {
         //添加新合同信息
         workProjectNotify.setType("143");
         //查询所有需要当前登录人进行处理的项目信息
-        List<WorkProjectNotify> newContractNotifyList = workProjectNotifyService.findList(workProjectNotify);
+        List<WorkProjectNotify> newContractNotifyList = workProjectNotifyService.findList(workProjectNotify);*/
 
         //查询合同借用信息状态
         if(list.size()>0){
@@ -143,7 +143,7 @@ public class WorkContractInfoAllController extends BaseController {
                 }else{
                     info.setFlagAdmin("0");
                 }
-                for (WorkProjectNotify notify: notifyList) {
+                /*for (WorkProjectNotify notify: notifyList) {
                     if(notify.getNotifyId().equals(info.getId())){
                         info.setNotifyId(notify.getId());
                         if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
@@ -181,7 +181,7 @@ public class WorkContractInfoAllController extends BaseController {
                         }
                         break;
                     }
-                }
+                }*/
             }
         }
         model.addAttribute("page", page);

+ 4 - 4
src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java

@@ -174,7 +174,7 @@ public class WorkContractInfoController extends BaseController {
         List<WorkContractInfo> list = page.getList();
 
         //查询所有和当前登陆人有关的项目的审核
-        WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+        /*WorkProjectNotify workProjectNotify = new WorkProjectNotify();
         workProjectNotify.setUser(UserUtils.getUser());
         workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
         workProjectNotify.setRemarks("待审批");
@@ -205,7 +205,7 @@ public class WorkContractInfoController extends BaseController {
         //添加新合同信息
         workProjectNotify.setType("143");
         //查询所有需要当前登录人进行处理的项目信息
-        List<WorkProjectNotify> newContractNotifyList = workProjectNotifyService.findList(workProjectNotify);
+        List<WorkProjectNotify> newContractNotifyList = workProjectNotifyService.findList(workProjectNotify);*/
 
         //查询合同借用信息状态
         if(list.size()>0){
@@ -238,7 +238,7 @@ public class WorkContractInfoController extends BaseController {
                 }else{
                     info.setFlagAdmin("0");
                 }
-                for (WorkProjectNotify notify: notifyList) {
+                /*for (WorkProjectNotify notify: notifyList) {
                     if(notify.getNotifyId().equals(info.getId())){
                         info.setNotifyId(notify.getId());
                         if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
@@ -276,7 +276,7 @@ public class WorkContractInfoController extends BaseController {
                         }
                         break;
                     }
-                }
+                }*/
                 //查询合同是否被项目调用
                 Integer count=workContractInfoService.findContractBycount(info.getId());
                 if (count>0){

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

@@ -2067,7 +2067,7 @@ public class WorkProjectNotifyController extends BaseController {
 					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(projectPaperFiling.getProjectId());
 
 					if (ruralProjectRecords != null && StringUtils.isNotBlank(ruralProjectRecords.getId())) {
-						ruralProjectRecordsService.queryProjectDetail(ruralProjectRecords);
+						ruralProjectRecordsService.queryNotifyProjectDetail(ruralProjectRecords);
 						ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
 						projectPlanInfo.setProjectId(ruralProjectRecords.getId());
 
@@ -2091,7 +2091,7 @@ public class WorkProjectNotifyController extends BaseController {
 						}
 					}
 					//获取项目基础信息
-					ruralProjectRecordsService.queryProjectDetail(ruralProjectRecords);
+					//ruralProjectRecordsService.queryProjectDetail(ruralProjectRecords);
 					//工程咨询
 					List<MainDictDetail> mainDictList = Lists.newArrayList();
 					if("1".equals(ruralProjectRecords.getProjectType())){
@@ -2138,7 +2138,7 @@ public class WorkProjectNotifyController extends BaseController {
 					Projectcontentinfo projectcontentinfo = projectcontentinfoService.getByInfoId(projectReportData.getId());
 					projectcontentinfo.setProjectReportData(projectReportData);
 					//获取合同信息
-					WorkContractInfo workContractInfo=this.queryWorkContract(ruralProjectRecords.getId());
+					WorkContractInfo workContractInfo=this.getContractByProjectRecords(ruralProjectRecords);
 					if(null != workContractInfo){
 						WorkClientInfo clientInfo = workClientInfoService.get(workContractInfo.getClient().getId());
 						model.addAttribute("workClientInfo", clientInfo);
@@ -2152,7 +2152,8 @@ public class WorkProjectNotifyController extends BaseController {
 							projectReportRecord.setChargeCriterionList(chargeCriterionList);
 						}
 					}
-					WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(ruralProjectRecords.getWorkContractInfo().getId());
+					//WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(ruralProjectRecords.getWorkContractInfo().getId());
+					WorkContractInfo projectContractInfo = workContractInfo;
 					ruralProjectRecords.setWorkContractInfo(projectContractInfo);
 					MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords,projectReportRecord.getReport().getProject());//将编辑表单中的非NULL值覆盖数据库记录中的值
 					if(null != projectContractInfo){
@@ -2160,7 +2161,7 @@ public class WorkProjectNotifyController extends BaseController {
 							model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
 						}
 					}
-					RuralProjectcontentinfo ruralProjectcontentinfo = ruralProjectRecordsService.formAccessory(ruralProjectRecords);
+					RuralProjectcontentinfo ruralProjectcontentinfo = ruralProjectRecordsService.formAccessory(ruralProjectRecords, projectReportData);
 					ruralProjectRecordsService.disposeData(ruralProjectcontentinfo);
 					model.addAttribute("projectcontentinfo", ruralProjectcontentinfo);
 					model.addAttribute("projectReportData", projectReportData);
@@ -6320,7 +6321,7 @@ public class WorkProjectNotifyController extends BaseController {
 				} else if (workProjectNotify.getType().equals("103")) {    //工作内容报告归档Two
 					//查询“配农网”工程类型id
 					String engineeringId = engineeringService.getEngineeringId("202");
-					ProjectReportRecord projectReportRecord = projectReportRecordService.get(workProjectNotify.getNotifyId());
+					ProjectReportRecord projectReportRecord = projectReportRecordService.getInfo(workProjectNotify.getNotifyId());
 					//判断是否未全过程归档项目信息
 					if("3".equals(projectReportRecord.getReport().getProject().getProjectType())){
 						Act act = getByAct(projectReportRecord.getProcessInstanceId());
@@ -6339,15 +6340,16 @@ public class WorkProjectNotifyController extends BaseController {
 					}
 
 					long l1 = System.currentTimeMillis();
-					ProjectReportData projectReportData = projectReportDataService.getOnRural(projectReportRecord.getReport().getId());
+					//ProjectReportData projectReportData = projectReportDataService.getOnRural(projectReportRecord.getReport().getId());
+					ProjectReportData projectReportData = projectReportRecord.getReport();
 					projectReportRecord.setProjectReportData(projectReportData);
-					projectReportRecord.setReport(projectReportData);
+					//projectReportRecord.setReport(projectReportData);
 					Projectcontentinfo projectcontentinfo = projectcontentinfoService.getByInfoId(projectReportData.getId());
 					projectcontentinfo.setProjectReportData(projectReportData);
 					long l2 = System.currentTimeMillis();
 					//获取项目信息
 					l1 = System.currentTimeMillis();
-					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.getNotifyQueryProjectUsers(projectReportRecord.getReport().getProject().getId());
+					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(projectReportRecord.getReport().getProject().getId());
 
 					l2 = System.currentTimeMillis();
 					//获取复核标准
@@ -6373,7 +6375,7 @@ public class WorkProjectNotifyController extends BaseController {
 
 					l1 = System.currentTimeMillis();
 					//获取合同信息
-					WorkContractInfo workContractInfo=this.queryWorkContract(ruralProjectRecords.getId());
+					WorkContractInfo workContractInfo=this.getContractByProjectRecords(ruralProjectRecords);
 					if(null != workContractInfo){
 						WorkClientInfo clientInfo = workClientInfoService.get(workContractInfo.getClient().getId());
 						model.addAttribute("workClientInfo", clientInfo);
@@ -6400,7 +6402,8 @@ public class WorkProjectNotifyController extends BaseController {
 
 
 					l1 = System.currentTimeMillis();
-					WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(ruralProjectRecords.getWorkContractInfo().getId());
+					//WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(ruralProjectRecords.getWorkContractInfo().getId());
+					WorkContractInfo projectContractInfo = workContractInfo;
 					ruralProjectRecords.setWorkContractInfo(projectContractInfo);
 					MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords,projectReportRecord.getReport().getProject());//将编辑表单中的非NULL值覆盖数据库记录中的值
 					if(null != projectContractInfo){
@@ -6521,7 +6524,7 @@ public class WorkProjectNotifyController extends BaseController {
 					List<ProjectEngineeringInfo> projectEngineeringInfo=engineeringService.findList(new ProjectEngineeringInfo());
 					model.addAttribute("projectEngineeringInfo",projectEngineeringInfo);
 					//项目计划
-					RuralProjectRecords projectRecordPlans = this.planView(ruralProjectRecords.getId());
+					RuralProjectRecords projectRecordPlans = this.planViewByProjectRecords(ruralProjectRecords);
 					model.addAttribute("projectRecordPlans", projectRecordPlans);
 					//获取质量复核项目组成员
 					List<RuralReportConsultant> consultantinfo =this.qualityView(ruralProjectRecords,projectReportData);
@@ -6551,7 +6554,7 @@ public class WorkProjectNotifyController extends BaseController {
 					}
 					model.addAttribute("datalist", workReviewAuditList);
 
-					//拆线呢报告签发评分展示项
+					//查询报告签发评分展示项
 					List<WorkReviewAudit> reviewAuditList = projectContentDataService.findListIssue(reviewId,"报告签发");
 					//查询报告签发评分评论数据
 					WorkReviewAudit workReviewAuditTwo = new WorkReviewAudit();
@@ -8647,6 +8650,14 @@ public class WorkProjectNotifyController extends BaseController {
 		WorkContractInfo workContractInfo = workContractInfoService.get(projectRecords.getWorkContractInfo().getId());
 		return workContractInfo;
 	}
+	/**
+	 * 查询报告审核客户合同详细信息
+	 */
+	public WorkContractInfo getContractByProjectRecords(RuralProjectRecords projectRecords){
+		//获取合同信息
+		WorkContractInfo workContractInfo = workContractInfoService.getInfoById(projectRecords.getWorkContractInfo().getId());
+		return workContractInfo;
+	}
 	//获取项目计划
 	public RuralProjectRecords planView(String projectId) {
 		//获取项目信息
@@ -8691,6 +8702,44 @@ public class WorkProjectNotifyController extends BaseController {
 		projectRecords.setUploadMode(uploadMode);
 		return projectRecords;
 	}
+	//获取项目计划
+	public RuralProjectRecords planViewByProjectRecords(RuralProjectRecords projectRecords) {
+		//获取项目信息
+		//如果没有id则为新增 添加创建人信息和当前创建时间信息
+		projectRecords = ruralProjectRecordsService.getMastersByProjectRecords(projectRecords);
+
+		ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
+		//将项目id放入项目计划表中
+		projectPlanInfo.setProjectId(projectRecords.getId());
+		//获取项目计划信息
+		List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
+		if(projectPlanList.size() == 0){
+			//获取项目计划信息
+			List<MainDictDetail> mainDictList = DictUtils.getMainDictList("projectPlan");
+			if(mainDictList.size()>0){
+				for (MainDictDetail mainDict : mainDictList) {
+					ProjectPlanInfo projectPlan = new ProjectPlanInfo();
+					projectPlan.setProjectStage(mainDict.getLabel());
+					//将项目负责人添加到展示栏
+					if(null != projectRecords.getProjectLeaders()) {
+						projectPlan.setRemindName(projectRecords.getProjectLeaders().get(0).getName());
+						projectPlan.setRemindId(projectRecords.getProjectLeaders().get(0).getId());
+					}
+					//将项目等级人信息添加到完成人控件中
+					User user = UserUtils.get(projectRecords.getCreateBy().getId());
+					projectPlan.setFinishId(user.getId());
+					projectPlan.setFinishName(user.getName());
+					projectPlanList.add(projectPlan);
+				}
+			}
+		}
+		//获取 项目计划附件信息
+		List<WorkClientAttachment> workAttachmentList = projectPlanService.getWorkAttachment(projectRecords.getId());
+		projectRecords.setProjectPlanList(projectPlanList);
+		projectRecords.setWorkAttachments(workAttachmentList);
+		projectRecords.setUploadMode(uploadMode);
+		return projectRecords;
+	}
 
 	//获取项目组成员
 	public List<RuralReportConsultant> reConsultants(RuralProjectRecords records,ProjectReportData projectReportData){

+ 1 - 1
src/main/java/com/jeeplus/modules/workreview/service/WorkReviewStandardService.java

@@ -128,7 +128,7 @@ public class WorkReviewStandardService extends TreeService<WorkReviewStandardDao
         workReviewAudit.setCompanyId(company.getId());
         try {
             List<WorkReviewAudit> list = workReviewAuditDao.findList(workReviewAudit);
-            if(workReviewAudit!=null&& StringUtils.isNotBlank(workReviewAudit.getStandardDetail())){
+            if(StringUtils.isNotBlank(workReviewAudit.getStandardDetail())){
                 //标准内容模糊查询,查询所有父节点
                 Set<String> parentIdSet = new HashSet<>();
                 for (WorkReviewAudit reviewStandard : list) {

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

@@ -261,6 +261,7 @@
 	<select id="getProjectReportDateByProjectId" resultType="com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData">
 		SELECT
 		<include refid="projectReportDataColumns"/>
+		,a.bzshb_user_id as "bzshbUserId"
 		from project_report_data a
 		where a.project_id = #{projectId}
 	</select>

+ 11 - 11
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordReportDao.xml

@@ -165,18 +165,18 @@
 
 	<select id="findPageHome" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordReportInfo" >
 		SELECT
-		<include refid="ruralProjectInfoColumns"/>
-		,(case when prr.status is null and date_add(prd.update_date,interval #{endingCount} day)&lt; now() then '超期未归档'
-		when prr.status!=5 and date_add(prd.update_date,interval #{endingCount} day)&lt; now() then '超期归档中'
-		when prr.status=5 and date_add(prd.update_date,interval #{endingCount} day)&lt; now() then '超期已归档'
-		when prr.status is null and date_add(prd.update_date,interval #{endingCount} day)&gt;= now() then '未归档'
-		when prr.status!=5 and date_add(prd.update_date,interval #{endingCount} day)&gt;= now() then '归档中'
-		when prr.status=5 and date_add(prd.update_date,interval #{endingCount} day)&gt;= now() then '已归档'
-		end) as "recordStatus",
-		"未上报" as reportedStatus
-		,a.project_type as "projectType"
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.project_name AS "projectName",
+		a.project_id AS "projectId",
+		a.project_type AS "projectType"
 		FROM rural_project_records a
-		<include refid="ruralProjectInfoJoins"/>
+		LEFT JOIN project_report_data prd ON prd.project_id = a.id
+		LEFT JOIN rural_project_report_record prr ON prr.report_id = prd.id
+		LEFT JOIN work_project_user w1 ON a.id = w1.project_id
 		<where>
 			a.del_flag = 0
 			<if test="typeList !=null and typeList !=''">

+ 45 - 7
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -2760,6 +2760,14 @@
 		<include refid="projectRecordsColumnss"/>
 		,a.record_state as "recordState"
 		,a.submit_money as "submitMoney"
+		,(case
+		when a.submit_money = '1' and pfp.status = '5' then
+		'已归档'
+		when a.submit_money = '2' and ppf.status = '5' then
+		'已归档' else '未归档'
+		end) as downArchiveStatus
+		,a.attachment_project_sort as "attachmentProjectSort"
+		,rprr.ZiXunBDE as "ziXunBDE"
 		,(case when a.submit_money = '1' then 'B级' when a.submit_money = '2' then 'A级' else '' end) as projectScale
 		,(case
 		when a.submit_money = '1' and prd.status = '5' then
@@ -2991,7 +2999,9 @@
 				ORDER BY a.update_date DESC
 			</otherwise>
 		</choose>
-	limit ${ruralProjectRecords.page.pageNo},${ruralProjectRecords.page.pageSize}
+		<if test="ruralProjectRecords.page.pageSize != '-1'">
+			limit ${ruralProjectRecords.page.pageNo},${ruralProjectRecords.page.pageSize}
+		</if>
 	</select>
 
 	<select id="reportPageCount" resultType="integer">
@@ -3169,6 +3179,12 @@
 		when a.submit_money = '2' and prdt.status = '5' then
 		'已完成' else '未完成'
 		end) as completionStatus
+		,(case
+		when a.submit_money = '1' and pfp.status = '5' then
+		'已归档'
+		when a.submit_money = '2' and ppf.status = '5' then
+		'已归档' else '未归档'
+		end) as downArchiveStatus
 		,a.project_type as projectType,
 		wci.name AS "workContractInfo.name",
 		wci.contract_num as "workContractInfo.contractNum",
@@ -3182,7 +3198,21 @@
 		ifnull(prd.number ,"") as "projectReportNumber"
 		,ifnull(prd.status,0) as "projectReportStatus"
 		,ifnull(prd.name,"") as "projectReportName"
-		,ifnull(prr.status,0) as "projectReportRecordStatus"
+		<choose>
+			<when test="statementCompanyComprehensiveInfo.field5  != null and statementCompanyComprehensiveInfo.field5 == '5'.toString()">
+				,ifnull(prr.status,6) as "projectReportRecordStatus"
+			</when>
+			<otherwise>
+				<choose>
+					<when test="statementCompanyComprehensiveInfo.field6  != null and statementCompanyComprehensiveInfo.field6 == '5'.toString()">
+						,ifnull(prr.status,7) as "projectReportRecordStatus"
+					</when>
+					<otherwise>
+						,ifnull(prr.status,0) as "projectReportRecordStatus"
+					</otherwise>
+				</choose>
+			</otherwise>
+		</choose>
 		,ifnull(prrd.status,0) as "downProjectReportRecordStatus",
 		prrd.file_num as recodeNum,
 		prr.process_instance_id as prrProcessInstanceId,
@@ -3225,6 +3255,8 @@
 		,a.report_signature_url as "reportSignatureUrl"
 		,a.report_signature_contract_id as "reportSignatureContractId"
 		,prsi.id as "prsiId"
+		,a.attachment_project_sort as "attachmentProjectSort"
+		,rprr.ZiXunBDE as "ziXunBDE"
 		FROM statement_data_info sdi
 
 		<if test="statementCompanyComprehensiveInfo.field5 == '5'.toString() ">
@@ -3277,7 +3309,9 @@
 			and sdi.year = #{statementCompanyComprehensiveInfo.year}
 			and sdi.type = #{statementCompanyComprehensiveInfo.type}
 			and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
-			and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
+			<if test="statementCompanyComprehensiveInfo.departmentLevel != null and statementCompanyComprehensiveInfo.departmentLevel !='' and statementCompanyComprehensiveInfo.departmentLevel != 'company'">
+				and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
+			</if>
 			and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
 			<if test="statementCompanyComprehensiveInfo.field5 == '5'.toString() ">
 				and a.record_state != 7
@@ -3290,7 +3324,7 @@
 				and pmdr.id is null
 				and a.over_record_status = 1
 				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
-				and prr.status = 5
+				and prr.status = 7
 				and prr.del_flag = 0
 				and prr.accomplish_date >= #{beginDate}
 				and prr.accomplish_date &lt;= #{endDate}
@@ -3412,7 +3446,9 @@
 				ORDER BY a.update_date DESC
 			</otherwise>
 		</choose>
-		limit ${ruralProjectRecords.page.pageNo},${ruralProjectRecords.page.pageSize}
+		<if test="ruralProjectRecords.page.pageSize != -1">
+			limit ${ruralProjectRecords.page.pageNo},${ruralProjectRecords.page.pageSize}
+		</if>
 	</select>
 
 	<select id="selectReportPageOverdueCount" resultType="integer">
@@ -3468,7 +3504,9 @@
 			and sdi.year = #{statementCompanyComprehensiveInfo.year}
 			and sdi.type = #{statementCompanyComprehensiveInfo.type}
 			and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
-			and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
+			<if test="statementCompanyComprehensiveInfo.departmentLevel != null and statementCompanyComprehensiveInfo.departmentLevel !='' and statementCompanyComprehensiveInfo.departmentLevel != 'company'">
+				and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
+			</if>
 			and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
 			<if test="statementCompanyComprehensiveInfo.field5 == '5'.toString() ">
 				and a.record_state != 7
@@ -3481,7 +3519,7 @@
 				and pmdr.id is null
 				and a.over_record_status = 1
 				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
-				and prr.status = 5
+				and prr.status = 7
 				and prr.del_flag = 0
 				and prr.accomplish_date >= #{beginDate}
 				and prr.accomplish_date &lt;= #{endDate}

+ 5 - 5
src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml

@@ -301,7 +301,7 @@
 			and a.record_state = 7
 			and a.over_record_status = 1
 			and a.office_id in(select id  from sys_office where id = #{officeId} or parent_ids like concat('%',#{officeId},'%'))
-			and rprr.status = 5
+			and rprr.status = 7
 			and rprr.del_flag = 0
 			and rprr.accomplish_date >= #{beginDate}
 			and rprr.accomplish_date &lt;= #{endDate}
@@ -319,7 +319,7 @@
 			and a.status = 5
 			and a.record_state = 7
 			and a.over_record_status = 1
-			and rprr.status = 5
+			and rprr.status = 7
 			and rprr.del_flag = 0
 			and pmdrd.id is null
 			and rprr.accomplish_date >= #{beginDate}
@@ -373,7 +373,7 @@
 		select a.id as "fieldId",a.office_id as "officeId",so.parent_ids as "officeParentIds" from rural_project_records a
 		left join sys_office so on so.id = a.office_id
 		left join project_report_data prd on a.id = prd.project_id
-		left join rural_project_records_reported rprr on prd.id = rprr.id
+		left join rural_project_records_reported rprr on a.id = rprr.id
 		left join project_material_defect_record pmdrd on prd.id = pmdrd.report_id
 		<where>
 			a.del_flag=0
@@ -954,7 +954,7 @@
 			and a.record_state = 7
 			and a.over_record_status = 1
 			and a.create_by = #{userId}
-			and rprr.status = 5
+			and rprr.status = 7
 			and rprr.del_flag = 0
 			and rprr.accomplish_date >= #{beginDate}
 			and rprr.accomplish_date &lt;= #{endDate}
@@ -973,7 +973,7 @@
 			and a.status = 5
 			and a.record_state = 7
 			and a.over_record_status = 1
-			and rprr.status = 5
+			and rprr.status = 7
 			and rprr.del_flag = 0
 			and pmdrd.id is null
 			and rprr.accomplish_date >= #{beginDate}

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

@@ -1037,7 +1037,7 @@
 						}
 						return xml;
 					}}
-                ,{align:'center', title: '电子',  width:110,templet:function(d){
+                ,{align:'center', title: '电子',  width:140,templet:function(d){
                         var st = getRuralProjectArchiveState(d.projectReportRecordStatus);
                         if(st.action){
 

+ 2 - 0
src/main/webapp/webpage/modules/statement/projectReportList.jsp

@@ -371,6 +371,7 @@
 					<input id="recordState" name="recordState" type="hidden" value="${recordState}"/>
 					<input id="reportedState" name="reportedState" type="hidden" value="${reportedState}"/>
 					<input id="projectPaperFiling" name="projectPaperFiling" type="hidden" value="${projectPaperFiling}"/>
+					<input id="departmentLevel" name="departmentLevel" type="hidden" value="${departmentLevel}"/>
 					<input id="projectFlingBatchRelation" name="projectFlingBatchRelation" type="hidden" value="${projectFlingBatchRelation}"/>
 					<input id="field5" name="field5" type="hidden" value="${field5}"/>
 					<input id="field6" name="field6" type="hidden" value="${field6}"/>
@@ -499,6 +500,7 @@
 <%--						<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:exportAll">--%>
 <%--							<button type="button" data-toggle="tooltip" data-placement="top" class="layui-btn layui-btn-sm layui-bg-blue" id="delUser"> 批量下载</button>--%>
 <%--						</shiro:hasPermission>--%>
+							<table:exportExcel url="${ctx}/statement/StatementCompanyComprehensive/exportProjectReportList"></table:exportExcel><!-- 导出按钮 -->--%>
 						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
 					</div>
 					<div style="clear: both;"></div>

+ 1 - 1
src/main/webapp/webpage/modules/workclientinfo/workClientInfoFormDetail.jsp

@@ -143,7 +143,7 @@
                         </c:forEach>
                         <c:if test="${bankSize == 0}">
                             <tr>
-                                <td colspan="3">暂无数据</td>
+                                <td colspan="4">暂无数据</td>
                             </tr>
                         </c:if>
                         </tbody>