3 Коміти 71b8ff76c7 ... 61def314b5

Автор SHA1 Опис Дата
  徐滕 61def314b5 造价类项目批量导入功能 1 місяць тому
  徐滕 7f4888c0df Merge remote-tracking branch 'origin/master' 1 місяць тому
  徐滕 139e8703cd 代码提交 1 місяць тому
31 змінених файлів з 451 додано та 142 видалено
  1. 30 21
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/ImportBRuralProjectRecords.java
  2. 153 53
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  3. 1 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java
  4. 6 3
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectRecordsController.java
  5. 8 0
      src/main/java/com/jeeplus/modules/sys/web/LoginController.java
  6. 39 0
      src/main/java/com/jeeplus/modules/sys/web/RegisterController.java
  7. 21 25
      src/main/java/com/jeeplus/modules/sys/web/UserController.java
  8. 11 0
      src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientInfo.java
  9. 23 4
      src/main/java/com/jeeplus/modules/workclientinfo/service/WorkClientInfoAllService.java
  10. 11 0
      src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractInfo.java
  11. 19 0
      src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoAllService.java
  12. 1 1
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml
  13. 6 6
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  14. 2 1
      src/main/resources/mappings/modules/sys/OfficeDao.xml
  15. 28 4
      src/main/resources/mappings/modules/workclientinfo/WorkClientInfoDao.xml
  16. 22 0
      src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml
  17. BIN
      src/main/webapp/dot/审核类项目批量导入模板.xlsx
  18. BIN
      src/main/webapp/dot/造价B类项目批量导入模板.xlsx
  19. 1 1
      src/main/webapp/webpage/modules/collectAccessory/collectAccessoryCompanyList.jsp
  20. 1 1
      src/main/webapp/webpage/modules/collectAccessory/collectAccessoryList.jsp
  21. 1 1
      src/main/webapp/webpage/modules/collectAccessory/collectAccessoryOfficeList.jsp
  22. 6 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageList.jsp
  23. 10 10
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordModify.jsp
  24. 5 3
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllList.jsp
  25. 6 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp
  26. 1 0
      src/main/webapp/webpage/modules/sys/sysIndex.jsp
  27. 5 2
      src/main/webapp/webpage/modules/sys/userModifyPwd.jsp
  28. 8 1
      src/main/webapp/webpage/modules/workclientinfo/all/workClientInfoList.jsp
  29. 1 1
      src/main/webapp/webpage/modules/workclientinfo/workClientInfoList.jsp
  30. 21 3
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoAllList.jsp
  31. 4 0
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoList.jsp

+ 30 - 21
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/ImportBRuralProjectRecords.java

@@ -39,6 +39,7 @@ public class ImportBRuralProjectRecords extends ActEntity<ImportBRuralProjectRec
 	private String projectSite;		//建设地点
 	private String leaderName;		//项目责任人	必填
 	private String projectMasterName;		//项目负责人
+	private String belongingDepartmentName;		//项目责任人	必填
 	private String engineeringName;	//工程类型名称
 	private String engineeringType;	//工程类型
 	private String whetherReportNumber;	//是否生成报告
@@ -47,43 +48,47 @@ public class ImportBRuralProjectRecords extends ActEntity<ImportBRuralProjectRec
 	private Date beginDate;			//项目开始日期	同步到项目计划,“收集及熟悉资料”开始和结算时间
 	private Date endDate;			//项目结束日期	同步到项目计划,“出具报告”开始和结算时间
 	private String attachmentProjectSort;   //项目类别	必填
-	private String clientNumber;	//客户编号	无合同项目必填,有合同项目不读取
+	private String clientName;	//委托方客户名称	无合同项目必填,有合同项目不读取
+
 
-	@ExcelField(title="是否有合同", align=2, sort=1)
 	public String getWhetherContract() {
 		return whetherContract;
 	}
-	@ExcelField(title="合同编号", align=2, sort=2)
+	@ExcelField(title="合同编号", align=2, sort=1)
 	public String getContractNumber() {
 		return contractNumber;
 	}
-	@ExcelField(title="项目名称", align=2, sort=3)
+	@ExcelField(title="项目名称", align=2, sort=2)
 	public String getProjectName() {
 		return projectName;
 	}
-	@ExcelField(title="项目所在地", align=2, sort=4)
+	@ExcelField(title="项目所在地", align=2, sort=3)
 	public String getAreaName() {
 		return areaName;
 	}
 
-	@ExcelField(title="投资性质", align=2, sort=5)
+	@ExcelField(title="投资性质", align=2, sort=4)
 	public String getProjectProperties() {
 		return projectProperties;
 	}
 
-	@ExcelField(title="建设地点", align=2, sort=6)
+	@ExcelField(title="建设地点", align=2, sort=5)
 	public String getProjectSite() {
 		return projectSite;
 	}
-	@ExcelField(title="项目责任人", align=2, sort=7)
+	@ExcelField(title="项目责任人", align=2, sort=6)
 	public String getLeaderName() {
 		return leaderName;
 	}
-	@ExcelField(title="项目负责人", align=2, sort=8)
+	@ExcelField(title="项目负责人", align=2, sort=7)
 	public String 	getProjectMasterName() {
 		return projectMasterName;
 	}
-	@ExcelField(title="工程类型名称", align=2, sort=9)
+	@ExcelField(title="项目归属部门", align=2, sort=8)
+	public String getBelongingDepartmentName() {
+		return belongingDepartmentName;
+	}
+	@ExcelField(title="工程类型", align=2, sort=9)
 	public String getEngineeringName() {
 		return engineeringName;
 	}
@@ -91,8 +96,10 @@ public class ImportBRuralProjectRecords extends ActEntity<ImportBRuralProjectRec
 	public String getWhetherReportNumber() {
 		return whetherReportNumber;
 	}
-	public BigDecimal getSubmitScale() {
-		return submitScale;
+
+	@ExcelField(title="送审规模(万元)", align=2, sort=11)
+	public String getSubmitScaleStr() {
+		return submitScaleStr;
 	}
 	@ExcelField(title="项目开始日期", align=2, sort=12)
 	public Date getBeginDate() {
@@ -106,17 +113,15 @@ public class ImportBRuralProjectRecords extends ActEntity<ImportBRuralProjectRec
 	public String getAttachmentProjectSort() {
 		return attachmentProjectSort;
 	}
-	@ExcelField(title="客户编号", align=2, sort=15)
-	public String getClientNumber() {
-		return clientNumber;
+	@ExcelField(title="委托方客户名称", align=2, sort=15)
+	public String getClientName() {
+		return clientName;
 	}
 
-	@ExcelField(title="送审规模", align=2, sort=11)
-	public String getSubmitScaleStr() {
-		return submitScaleStr;
+	public BigDecimal getSubmitScale() {
+		return submitScale;
 	}
 
-
 	public void setSubmitScaleStr(String submitScaleStr) {
 		this.submitScaleStr = submitScaleStr;
 	}
@@ -154,6 +159,10 @@ public class ImportBRuralProjectRecords extends ActEntity<ImportBRuralProjectRec
 		this.projectMasterName = projectMasterName;
 	}
 
+	public void setBelongingDepartmentName(String belongingDepartmentName) {
+		this.belongingDepartmentName = belongingDepartmentName;
+	}
+
 	public void setEngineeringName(String engineeringName) {
 		this.engineeringName = engineeringName;
 	}
@@ -178,8 +187,8 @@ public class ImportBRuralProjectRecords extends ActEntity<ImportBRuralProjectRec
 		this.attachmentProjectSort = attachmentProjectSort;
 	}
 
-	public void setClientNumber(String clientNumber) {
-		this.clientNumber = clientNumber;
+	public void setClientName(String clientName) {
+		this.clientName = clientName;
 	}
 
 	public String getEngineeringType() {

+ 153 - 53
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -858,7 +858,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 					}
 				} else if ("2".equals(projectRecords.getProjectType())) {	//造价审核
 					//预算审核、结算审核、分包审核 需要纸质归档
-					if ("2".equals(projectRecords.getAttachmentProjectSort()) || "4".equals(projectRecords.getAttachmentProjectSort()) || "7".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort()) || "10".equals(projectRecords.getAttachmentProjectSort()) || "11".equals(projectRecords.getAttachmentProjectSort())) {
+					if ("2".equals(projectRecords.getAttachmentProjectSort()) || "4".equals(projectRecords.getAttachmentProjectSort()) || "7".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort()) || "10".equals(projectRecords.getAttachmentProjectSort()) || "11".equals(projectRecords.getAttachmentProjectSort()) || "12".equals(projectRecords.getAttachmentProjectSort())) {
 						projectRecords.setPaperFilingStatus(null);
 					}else{
 						projectRecords.setPaperFilingStatus("10");
@@ -3906,10 +3906,11 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		Iterator<ImportBRuralProjectRecords> iterator = list.iterator();
 		while(iterator.hasNext()){
 			ImportBRuralProjectRecords info = iterator.next();
-			if(StringUtils.isBlank(info.getWhetherContract())
-					&& StringUtils.isBlank(info.getProjectName())
+			if(StringUtils.isBlank(info.getProjectName())
 					&& StringUtils.isBlank(info.getAreaName())
-					&& StringUtils.isBlank(info.getLeaderName())
+					&& StringUtils.isBlank(info.getProjectProperties())
+					&& StringUtils.isBlank(info.getProjectMasterName())
+					&& StringUtils.isBlank(info.getBelongingDepartmentName())
 					&& StringUtils.isBlank(info.getEngineeringName())
 					&& StringUtils.isBlank(info.getWhetherReportNumber())
 					&& StringUtils.isBlank(info.getSubmitScaleStr())
@@ -3934,15 +3935,22 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 			}
 		}
 
+		Office findByBelongingDepartmentOffice = new Office();
+		findByBelongingDepartmentOffice.setParentIds(UserUtils.getSelectCompany().getId());
+		findByBelongingDepartmentOffice.setType("2");
+		List<Office> byBelongingDepartmentList = officeService.findByBelongingDepartment(findByBelongingDepartmentOffice);
+
+
 		List<RuralProjectRecords> projectRecordsList = Lists.newArrayList();
 		for (ImportBRuralProjectRecords importBRuralProjectRecords : list){
 			try{
 				RuralProjectRecords projectRecords = new RuralProjectRecords();
 				//判定必填项是否填完
-				if(StringUtils.isBlank(importBRuralProjectRecords.getWhetherContract())
-						|| StringUtils.isBlank(importBRuralProjectRecords.getProjectName())
+				if(StringUtils.isBlank(importBRuralProjectRecords.getProjectName())
 						|| StringUtils.isBlank(importBRuralProjectRecords.getAreaName())
-						|| StringUtils.isBlank(importBRuralProjectRecords.getLeaderName())
+						|| StringUtils.isBlank(importBRuralProjectRecords.getProjectProperties())
+						|| StringUtils.isBlank(importBRuralProjectRecords.getProjectMasterName())
+						|| StringUtils.isBlank(importBRuralProjectRecords.getBelongingDepartmentName())
 						|| StringUtils.isBlank(importBRuralProjectRecords.getEngineeringName())
 						|| StringUtils.isBlank(importBRuralProjectRecords.getWhetherReportNumber())
 						|| StringUtils.isBlank(importBRuralProjectRecords.getSubmitScaleStr())
@@ -4013,6 +4021,22 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 					projectRecords.setCity(city.getName());
 					projectRecords.setCounty(district.getName());
 					projectRecords.setArea(district);
+				}else if(2 == areaNameList.size()){
+					//根据名称查询省级单位信息
+					Area province = areaService.getByNameAndParentId(areaNameList.get(0),"1");
+					if(null == province ){
+						return "项目所在地填写错误,查询不到省级信息";
+					}
+					//根据名称查询市级单位信息
+					Area city = areaService.getByNameAndParentId(areaNameList.get(1),province.getId());
+					if(null == city){
+						return "项目所在地填写错误,查询不到市级信息";
+					}
+					projectRecords.setProvince(province.getName());
+					projectRecords.setCity(city.getName());
+					projectRecords.setArea(city);
+				}else if(1 == areaNameList.size()){
+					return "项目所在地填写错误,至少选择市级信息";
 				}else{
 					return "项目所在地填写错误";
 				}
@@ -4045,6 +4069,16 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 				}else{
 					projectRecords.setReportedState(null);
 				}
+				//判断项目归属部门
+				if("其他".equals(importBRuralProjectRecords.getBelongingDepartmentName())){
+					projectRecords.setBelongingDepartment(importBRuralProjectRecords.getBelongingDepartmentName());
+				}else{
+					for (Office office : byBelongingDepartmentList) {
+						if(office.getName().equals(importBRuralProjectRecords.getBelongingDepartmentName())){
+							projectRecords.setBelongingDepartment(office.getId());
+						}
+					}
+				}
 
 				//判断工程类型
 				List<ProjectEngineeringInfo> engineeringInfos=engineeringService.findList(new ProjectEngineeringInfo());  //这能有数据?
@@ -4066,11 +4100,30 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 				Office company= new Office();
 				Office office =  new Office();
 
-				if("是".equals(importBRuralProjectRecords.getWhetherContract())){
-					//判断当是否有合同为是时,合同编号是否为空
-					if(StringUtils.isBlank(importBRuralProjectRecords.getContractNumber())){
-						return "是否有合同选择是的情况下合同编号为空";
+				//判断当是否有合同为是时,合同编号是否为空
+				if(StringUtils.isBlank(importBRuralProjectRecords.getContractNumber())){
+					//判断当是否有合同为否时,客户编号是否为空
+					if(StringUtils.isBlank(importBRuralProjectRecords.getClientName())){
+						return "未填写合同编号的情况下委托方客户名称不可为空";
+					}
+					//根据客户编号查询客户信息
+					WorkClientInfo workClientInfo = workClientInfoService.getByName(importBRuralProjectRecords.getClientName());
+					if(null == workClientInfo){
+						return "委托方客户名称:"+ importBRuralProjectRecords.getClientName() + "  不存在或已删除";
 					}
+					List<WorkClientLinkman> linkmanList = workClientInfoService.queryLinkManByClientId(workClientInfo.getId());
+					WorkClientLinkman linkman = linkmanList.get(0);
+					linkman.setClientId(workClientInfo);
+					List<WorkClientLinkman> clientLinkmanList = Lists.newArrayList();
+					clientLinkmanList.add(linkman);
+					projectRecords.setWorkClientLinkmanList(clientLinkmanList);
+					WorkContractInfo workContractInfo = new WorkContractInfo();
+					workContractInfo.setId("");
+					projectRecords.setWorkContractInfo(workContractInfo);
+					//无合同
+					company.setId(UserUtils.getUser().getCompany().getId());
+					office.setId(UserUtils.getUser().getOffice().getId());
+				}else{
 					//根据合同编号查询合同信息
 					//判断当前的合同是否被作废或者删除
 					WorkContractInfo workContractInfo = contractInfoService.getByContractNum(importBRuralProjectRecords.getContractNumber());
@@ -4091,31 +4144,8 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 							projectRecords.setWorkClientLinkmanList(clientLinkmanList);
 						}
 					}
-				}else if("否".equals(importBRuralProjectRecords.getWhetherContract())){
-					//判断当是否有合同为否时,客户编号是否为空
-					if(StringUtils.isBlank(importBRuralProjectRecords.getClientNumber())){
-						return "是否有合同选择否的情况下客户编号为空";
-					}
-					//根据客户编号查询客户信息
-					WorkClientInfo workClientInfo = workClientInfoService.getByName(importBRuralProjectRecords.getClientNumber());
-					if(null == workClientInfo){
-						return "客户编号:"+ importBRuralProjectRecords.getClientNumber() + "  不存在或已删除";
-					}
-					List<WorkClientLinkman> linkmanList = workClientInfoService.queryLinkManByClientId(workClientInfo.getId());
-					WorkClientLinkman linkman = linkmanList.get(0);
-					linkman.setClientId(workClientInfo);
-					List<WorkClientLinkman> clientLinkmanList = Lists.newArrayList();
-					clientLinkmanList.add(linkman);
-					projectRecords.setWorkClientLinkmanList(clientLinkmanList);
-					WorkContractInfo workContractInfo = new WorkContractInfo();
-					workContractInfo.setId("");
-					projectRecords.setWorkContractInfo(workContractInfo);
-					//无合同
-					company.setId(UserUtils.getUser().getCompany().getId());
-					office.setId(UserUtils.getUser().getOffice().getId());
-				}else{
-					return "是否有合同栏填写不正确";
 				}
+
 				projectRecords.setCompany(company);
 				projectRecords.setOffice(office);
 
@@ -4125,22 +4155,34 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 				BigDecimal twoHundred = new BigDecimal("200");
 				BigDecimal fiveHundred = new BigDecimal("500");
 				if (submitScale.compareTo(fiveHundred) >=0 ){
-					return "送审规模达到A级项目标准,无法进行导入";
-				}
-				if(submitScale.compareTo(twoHundred) >=0 && ("101".equals(projectRecords.getProjectProperties()) || "5".equals(projectRecords.getProjectProperties()))){
-					return "送审规模达到A级项目标准,无法进行导入";
+					return "项目名称:" + importBRuralProjectRecords.getProjectName() + " 的送审规模达到A级项目标准,无法进行导入";
 				}
+				//101 是 政府财政投资 ,5 是 部队投资。两者超过200w 都定为A类项目
+				/*if(submitScale.compareTo(twoHundred) >=0 && ("101".equals(projectRecords.getProjectProperties()) || "5".equals(projectRecords.getProjectProperties()))){
+					return "项目名称:" + importBRuralProjectRecords.getProjectName() + " 的送审规模达到A级项目标准,无法进行导入";
+				}*/
 				//添加送审规模
 				projectRecords.setSubmitScale(submitScale);
 
-				//处理项目责任人
-				User userLeader = UserUtils.getByUserName(importBRuralProjectRecords.getLeaderName());  //根据姓名转换为ID
-				if(null == userLeader){
-					return "无法查询到项目责任人";
+				if(StringUtils.isBlank(importBRuralProjectRecords.getLeaderName())){
+					//处理项目责任人
+					User userLeader = UserUtils.getUser();  //根据姓名转换为ID
+					if(null == userLeader){
+						return "无法查询到项目责任人";
+					}
+					List<User> userLeaderList = Lists.newArrayList();
+					userLeaderList.add(userLeader);
+					projectRecords.setProjectLeaders(userLeaderList);
+				}else{
+					//处理项目责任人
+					User userLeader = UserUtils.getByUserName(importBRuralProjectRecords.getLeaderName());  //根据姓名转换为ID
+					if(null == userLeader){
+						return "无法查询到项目责任人";
+					}
+					List<User> userLeaderList = Lists.newArrayList();
+					userLeaderList.add(userLeader);
+					projectRecords.setProjectLeaders(userLeaderList);
 				}
-				List<User> userLeaderList = Lists.newArrayList();
-				userLeaderList.add(userLeader);
-				projectRecords.setProjectLeaders(userLeaderList);
 
 
 				//判断项目负责人
@@ -4169,19 +4211,77 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 				//添加项目编号
 				synchronized (SYN_BYTE) {
 					if (StringUtils.isBlank(projectRecords.getProjectId())) {
-						if ("1".equals(projectRecords.getProjectType())) {
-							if(projectRecords.getAttachmentProjectSort().equals("6")){
+						if ("1".equals(projectRecords.getProjectType())) {	//工程咨询
+							if ("6".equals(projectRecords.getAttachmentProjectSort())) {
+								//工程造价鉴定 需要纸质归档
+								assert createBy != null;
+								projectRecords.setPaperFilingStatus("");
 								projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.PROJECT_COST_APPRAISAL));
-							}else if(projectRecords.getAttachmentProjectSort().equals("7")){
+							} else if ("7".equals(projectRecords.getAttachmentProjectSort())) {
+								assert createBy != null;
+								projectRecords.setPaperFilingStatus("10");
 								projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.ECONOMIC_EVALUATION));
-							}else{
+							} else if ("10".equals(projectRecords.getAttachmentProjectSort())) {	//工程咨询 配合类
+								assert createBy != null;
+								projectRecords.setPaperFilingStatus("10");
+								projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.COORDINATE_BIZCODE));
+							} else {
+								assert createBy != null;
+								projectRecords.setPaperFilingStatus("10");
 								projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.SERIAL_BIZCODE));
 							}
-						} else if ("2".equals(projectRecords.getProjectType())) {
-							projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.SERIAL_COST_BIZCODE));
+						} else if ("2".equals(projectRecords.getProjectType())) {	//造价审核
+							//预算审核、结算审核、分包审核 需要纸质归档
+							if ("2".equals(projectRecords.getAttachmentProjectSort()) || "4".equals(projectRecords.getAttachmentProjectSort()) || "7".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort()) || "10".equals(projectRecords.getAttachmentProjectSort()) || "11".equals(projectRecords.getAttachmentProjectSort())) {
+								assert createBy != null;
+								projectRecords.setPaperFilingStatus("");
+								projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.SERIAL_COST_BIZCODE));
+							}else{
+								assert createBy != null;
+								projectRecords.setPaperFilingStatus("10");
+								projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.SERIAL_COST_BIZCODE));
+							}
+						}
+					} else{
+
+						if ("1".equals(projectRecords.getProjectType())) {	//工程咨询
+							if ("6".equals(projectRecords.getAttachmentProjectSort())) {
+								//工程造价鉴定 需要纸质归档
+								projectRecords.setPaperFilingStatus(null);
+							} else if ("7".equals(projectRecords.getAttachmentProjectSort())) {
+								projectRecords.setPaperFilingStatus("10");
+							} else if ("10".equals(projectRecords.getAttachmentProjectSort())) {	//工程咨询 配合类
+								projectRecords.setPaperFilingStatus("10");
+							} else {
+								projectRecords.setPaperFilingStatus("10");
+							}
+						} else if ("2".equals(projectRecords.getProjectType())) {	//造价审核
+							//预算审核、结算审核、分包审核 需要纸质归档
+							if ("2".equals(projectRecords.getAttachmentProjectSort()) || "4".equals(projectRecords.getAttachmentProjectSort()) || "7".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort()) || "10".equals(projectRecords.getAttachmentProjectSort()) || "11".equals(projectRecords.getAttachmentProjectSort()) || "12".equals(projectRecords.getAttachmentProjectSort())) {
+								projectRecords.setPaperFilingStatus(null);
+							}else{
+								projectRecords.setPaperFilingStatus("10");
+							}
 						}
 					}
 				}
+				//判断项目类型并判断项目类别
+				switch (projectRecords.getProjectType()){
+					case "1":
+						if("8".equals(projectRecords.getAttachmentProjectSort())){
+							projectRecords.setReportedState("10");
+						}else{
+							projectRecords.setReportedState(null);
+						}
+						break;
+					case "2":
+						if("5".equals(projectRecords.getAttachmentProjectSort()) || "6".equals(projectRecords.getAttachmentProjectSort()) || "8".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort()) || "10".equals(projectRecords.getAttachmentProjectSort())){
+							projectRecords.setReportedState("10");
+						}else{
+							projectRecords.setReportedState(null);
+						}
+						break;
+				}
 				//判断是否需要生成报告号
 				if("是".equals(importBRuralProjectRecords.getWhetherReportNumber())){
 
@@ -6152,7 +6252,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 
 	/**
 	 * 获取苏州分公司下的所有项目信息
-	 * @param id
+	 * @param officeId
 	 * @return
 	 */
     public List<RuralProjectRecords> getListByOffice(String officeId) {

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

@@ -1411,7 +1411,7 @@ public class RuralCostProjectMessageNewController extends BaseController {
             addMessage(redirectAttributes, "保存报告归档暂存失败");
             logger.error("保存报告归档暂存失败",e);
         }
-        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
     }
 
     /**

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

@@ -228,7 +228,10 @@ public class RuralCostProjectRecordsController extends BaseController {
 	public String form(RuralProjectRecords projectRecords, Model model) {
 		if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
 			projectRecords = projectRecordsService.get(projectRecords.getId());
-
+			if (null != projectRecords.getCreateBy() && StringUtils.isNotBlank(projectRecords.getCreateBy().getId())) {
+				User user = UserUtils.get(projectRecords.getCreateBy().getId());
+				projectRecords.setCreateBy(user);
+			}
 			//根据归属部门Id查询归属部门名称显示
 			String belongingDepartmentName = projectRecordsService.getBelongingDepartmentNameByBelongingDepartment(projectRecords.getBelongingDepartment());
 			model.addAttribute("belongingDepartmentName",belongingDepartmentName);
@@ -812,9 +815,9 @@ public class RuralCostProjectRecordsController extends BaseController {
 	public String importFileTemplateB(HttpServletResponse response, HttpServletRequest request) {
 		try {
 			ThisLocalityDownloadUtil download = new ThisLocalityDownloadUtil();
-			download.download("审核类项目批量导入模板.xlsx",request,response);
+			download.download("造价B类项目批量导入模板.xlsx",request,response);
 		} catch (Exception e) {
-			logger.error("审核类项目批量导入模板下载失败!",e);
+			logger.error("造价B类项目批量导入模板!",e);
 		}
 		return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectRecords/?repage";
 	}

+ 8 - 0
src/main/java/com/jeeplus/modules/sys/web/LoginController.java

@@ -512,6 +512,14 @@ public class LoginController extends BaseController{
 	 */
 	@RequestMapping(value = "${adminPath}/home")
 	public String home(String type, HttpServletRequest request, HttpServletResponse response, Model model) throws Exception {
+
+		// 获取并设置从重定向传递过来的消息
+		String message = (String) model.asMap().get("message");
+
+		// 将消息添加到模型中,以便在页面上显示
+		if (message != null) {
+			model.addAttribute("message", message);
+		}
 		long s1 = System.currentTimeMillis();
 		User user = UserUtils.getUser();
 		OaNotify oaNotify = new OaNotify();

+ 39 - 0
src/main/java/com/jeeplus/modules/sys/web/RegisterController.java

@@ -473,6 +473,45 @@ public class RegisterController extends BaseController {
 			return "false";
 		}
 	}
+
+
+
+	/**
+	 * web端ajax验证密码是否正确
+	 */
+	@ResponseBody
+	@RequestMapping(value = "changePasswordValidatePassword")
+	public String changePasswordValidatePassword(HttpServletRequest request,
+								   String password, String loginName) {
+//		User user1 = new User();
+//		user1.setName(loginName);
+//		List<User> list = userDao.getByName(user1);
+//		if(list != null && list.size()>1){
+//			return "cf";
+//		}
+		User user = UserUtils.getByLoginName(loginName);
+		if (user ==null || org.apache.commons.lang3.StringUtils.isBlank(user.getId())){
+			return "false";
+		}
+		//从redis中获取当前用户登陆失败的次数
+		String key = "loginFailNum:"+user.getLoginName();
+		String loginFailNum = JedisUtils.getResource().get(key);
+		if (StringUtils.isNotBlank(loginFailNum)){
+			int num = Integer.parseInt(loginFailNum);
+			if (num >= 10){
+				return "false1";
+			}
+		}
+		//password = SystemService.encrypeString(password);
+		//判断 当前登陆人登陆密码和数据库的是否一样或者 登陆密码是否为字典表中通用登陆密码
+		if (SystemService.validatePassword(password, user.getPassword())) {
+			return "true";
+		} else {
+			return "false";
+		}
+	}
+
+
 	/**
 	 * web端ajax验证密码是否正确
 	 */

+ 21 - 25
src/main/java/com/jeeplus/modules/sys/web/UserController.java

@@ -848,45 +848,41 @@ public class UserController extends BaseController {
      */
     @RequiresPermissions("user")
     @RequestMapping(value = "modifyPwd")
-    public String modifyPwd(String oldPassword, String newPassword, Model model,HttpServletRequest request) {
+    public String modifyPwd(String oldPassword, String newPassword, Model model, HttpServletRequest request, RedirectAttributes redirectAttributes) {
         User user = UserUtils.getUser();
         String home = request.getParameter("home");
-        if (StringUtils.isNotBlank(oldPassword) && StringUtils.isNotBlank(newPassword)){
-            if(Global.isDemoMode()){
-                model.addAttribute("message", "演示模式,不允许操作!");
-                return "modules/sys/userInfo";
+
+        if (StringUtils.isNotBlank(oldPassword) && StringUtils.isNotBlank(newPassword)) {
+            if (Global.isDemoMode()) {
+                redirectAttributes.addFlashAttribute("message", "演示模式,不允许操作!");
+                return "redirect:/sys/userInfo"; // 使用重定向传递消息
             }
+
             oldPassword = SystemService.encrypeString(oldPassword);
-            if (SystemService.validatePassword(oldPassword, user.getPassword())){
+            if (SystemService.validatePassword(oldPassword, user.getPassword())) {
                 newPassword = SystemService.encrypeString(newPassword);
-
-                NewPassword psd = new NewPassword().newpassword(newPassword);
                 systemService.updatePasswordById(user.getId(), user.getLoginName(), newPassword);
-                model.addAttribute("message", "修改密码成功,请重新登录");
-            }else{
-                model.addAttribute("message", "修改密码失败,旧密码错误");
+                redirectAttributes.addFlashAttribute("message", "修改密码成功,请重新登录");
+            } else {
+                redirectAttributes.addFlashAttribute("message", "修改密码失败,旧密码错误");
             }
-            if("home".equals(request.getParameter("home"))){
-//                model.addAttribute("message", "修改密码成功,请重新登录");
-//                SecurityUtils.getSubject().logout();
-
-                Subject subject = SecurityUtils.getSubject();
-                SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) subject.getPrincipal();
-                PrincipalCollection principalCollection = subject.getPrincipals();
-                principal.setFirstFlag(false);
-                String realmName = principalCollection.getRealmNames().iterator().next();
-                PrincipalCollection newPrincipalCollection =
-                        new SimplePrincipalCollection(principal, realmName);
-                subject.runAs(newPrincipalCollection);
-                return  "redirect:/a/home";
+
+            if ("home".equals(request.getParameter("home"))) {
+                // 重定向到首页,同时携带消息
+                redirectAttributes.addFlashAttribute("message", "修改密码成功,请重新登录");
+                return "redirect:/a/home"; // 重定向到首页
             }
-            return "modules/sys/userInfo";
+
+            return "redirect:/sys/userInfo"; // 如果没有跳转到首页,则返回用户信息页面
         }
+
+        // 如果没有提交密码,返回修改密码页面
         user.setHome(request.getParameter("home"));
         model.addAttribute("user", user);
         model.addAttribute("home", home);
         return "modules/sys/userModifyPwd";
     }
+
     /**
      * 更换手机号
      */

+ 11 - 0
src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientInfo.java

@@ -9,6 +9,7 @@ import com.google.common.collect.Lists;
 import com.jeeplus.common.persistence.DataEntity;
 import com.jeeplus.common.utils.excel.annotation.ExcelField;
 import com.jeeplus.modules.sys.entity.Area;
+import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.utils.DictUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -91,6 +92,16 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 	private Date endDate;
 	private String createMobile;
 
+	private Office office;
+
+	public Office getOffice() {
+		return office;
+	}
+
+	public void setOffice(Office office) {
+		this.office = office;
+	}
+
 	public String getCreateMobile() {
 		return createMobile;
 	}

+ 23 - 4
src/main/java/com/jeeplus/modules/workclientinfo/service/WorkClientInfoAllService.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.modules.workclientinfo.service;
 
+import com.google.common.collect.Lists;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.oss.OSSClientUtil;
 import com.jeeplus.common.persistence.Page;
@@ -13,11 +14,9 @@ import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
 import com.jeeplus.modules.sys.dao.AreaDao;
 import com.jeeplus.modules.sys.dao.MainDictDetailDao;
-import com.jeeplus.modules.sys.entity.Area;
-import com.jeeplus.modules.sys.entity.MainDict;
-import com.jeeplus.modules.sys.entity.MainDictDetail;
-import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.*;
 import com.jeeplus.modules.sys.service.MainDictService;
+import com.jeeplus.modules.sys.service.OfficeService;
 import com.jeeplus.modules.sys.service.WorkattachmentService;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
@@ -71,6 +70,9 @@ public class WorkClientInfoAllService extends CrudService<WorkClientInfoDao, Wor
     @Autowired
     private AreaDao areaDao;
 
+    @Autowired
+    private OfficeService officeService;
+
     private static MainDictService mainDictService = SpringContextHolder.getBean(MainDictService.class);
 
     private static MainDictDetailDao mainDictDetailDao = SpringContextHolder.getBean(MainDictDetailDao.class);
@@ -192,6 +194,23 @@ public class WorkClientInfoAllService extends CrudService<WorkClientInfoDao, Wor
             workClientInfo.setOfficeId(UserUtils.getSelectOffice().getId());
             workClientInfo.getSqlMap().put("dsf", dataScopeFilter(workClientInfo.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_CLIENT_INFO.getValue()));
         }*/
+
+
+        if(null!= workClientInfo.getOffice() && StringUtils.isNotBlank(workClientInfo.getOffice().getId())){
+            if ("一部本部".equals(workClientInfo.getOffice().getId())) {
+                List<String> officeIdList = Lists.newArrayList();
+                Office office = officeService.getByName("工程一部");
+                officeIdList.add(office.getId());
+                workClientInfo.setOfficeIdList(officeIdList);
+            } else {
+                //查询该选择节点下所有的部门Id
+                List<String> officeIdList = officeService.getChildrenOffice(workClientInfo.getOffice().getId());
+                officeIdList.add(workClientInfo.getOffice().getId());
+                workClientInfo.setOfficeIdList(officeIdList);
+            }
+
+        }
+
         long t1 = System.currentTimeMillis();
         //根据项目类型获取对应的客户id个数
         int count = workClientInfoDao.queryCount(workClientInfo);

+ 11 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractInfo.java

@@ -8,6 +8,7 @@ import com.google.common.collect.Lists;
 import com.jeeplus.common.persistence.ActEntity;
 import com.jeeplus.common.utils.excel.annotation.ExcelField;
 import com.jeeplus.modules.alterinfo.entity.AlterInfo;
+import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.workbidproject.entity.WorkBidProject;
@@ -187,6 +188,16 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 	private String isProject;     //是否关联项目(0:否;1:是)
 	private String createUserMobile;
 
+	private Office office;
+
+	public Office getOffice() {
+		return office;
+	}
+
+	public void setOffice(Office office) {
+		this.office = office;
+	}
+
 	public String getCreateUserMobile() {
 		return createUserMobile;
 	}

+ 19 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoAllService.java

@@ -100,6 +100,9 @@ public class WorkContractInfoAllService extends CrudService<WorkContractInfoDao,
 	@Autowired
 	private WorkClientInfoService workClientInfoService;
 
+	@Autowired
+	private OfficeService officeService;
+
 	public List<WorkContractInfo> findList(WorkContractInfo workContractInfo) {
 		if (StringUtils.isNotBlank(workContractInfo.getTotalContractIds())){
 			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
@@ -111,6 +114,22 @@ public class WorkContractInfoAllService extends CrudService<WorkContractInfoDao,
 		if (StringUtils.isNotBlank(workContractInfo.getTotalContractIds())){
 			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
 		}
+
+		if(null!= workContractInfo.getOffice() && StringUtils.isNotBlank(workContractInfo.getOffice().getId())){
+			if ("一部本部".equals(workContractInfo.getOffice().getId())) {
+				List<String> officeIdList = Lists.newArrayList();
+				Office office = officeService.getByName("工程一部");
+				officeIdList.add(office.getId());
+				workContractInfo.setOfficeIdList(officeIdList);
+			} else {
+				//查询该选择节点下所有的部门Id
+				List<String> officeIdList = officeService.getChildrenOffice(workContractInfo.getOffice().getId());
+				officeIdList.add(workContractInfo.getOffice().getId());
+				workContractInfo.setOfficeIdList(officeIdList);
+			}
+
+		}
+
 		String companyId = UserUtils.getUser().getComId();
 		int count = dao.queryCount(workContractInfo);
 		page.setCount(count);

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

@@ -462,7 +462,7 @@
 		/*,ifnull(pfp.status,0) as "filingProjectStatus"*/
 		,(case when a.paper_filing_status = '10' then 10 when a.paper_filing_status = '6' then '6' when a.paper_filing_status = '7' then '7' else ifnull(pfp.status,0) end) as "filingProjectStatus"
 		,pfp.audit_pass_date as "filingBatchAuditPassDate"
-		,prd.audit_pass_date as "prdAuditDate"
+		,prd.first_audit_date as "prdAuditDate"
 		,cb.case_process_id as "caseProcessId"
 		,cb.case_type as "caseType"
 		,cb.case_create_by as "caseCreateBy"

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

@@ -2264,8 +2264,8 @@
 	<select id="getProjectReportedListByAdvent" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords" >
 		SELECT
 			<include refid="projectRecordsColumns"/>
-			,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
-			,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
+			,date_add(date_format(prd.first_audit_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
+			,date_add(date_format(prd.first_audit_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
 			,a.project_type as "projectType"
 			FROM rural_project_records a
 			left join work_contract_info wci on a.contract_id = wci.id
@@ -2687,8 +2687,8 @@
 	<select id="getProjectRecordListByAdventExamine" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords" >
 		SELECT
 		<include refid="projectRecordsColumns"/>
-		,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
-		,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
+		,date_add(date_format(prd.first_audit_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
+		,date_add(date_format(prd.first_audit_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
 		,a.project_type as "projectType"
 		FROM rural_project_records a
 		left join work_contract_info wci on a.contract_id = wci.id
@@ -4989,8 +4989,8 @@
 	<select id="getBatchArchiveProjectReportedList" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords" >
 		SELECT
 		<include refid="projectRecordsColumns"/>
-		,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
-		,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
+		,date_add(date_format(prd.first_audit_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
+		,date_add(date_format(prd.first_audit_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
 		,ifnull(pfp.status,0) as "batchArchiveStatus"
 		FROM rural_project_records a
 		LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id and pfp.del_flag = 0

+ 2 - 1
src/main/resources/mappings/modules/sys/OfficeDao.xml

@@ -374,6 +374,7 @@
 		<if test="oldName != null and oldName != ''">
 			and a.name like concat('%',#{oldName},'%')
 		</if>
+		and a.id not in ('5c38f1ce85224d74bd9d110ea6fab976','eb6879557ca8497fb18864eb7ac13809','876aaf31050d4829a8c916aaf2184487')
 		ORDER BY a.code
 	</select>
 	<select id="findByParentIdsByProjectId" resultType="Office">
@@ -799,7 +800,7 @@
 		FROM sys_office a
 		<include refid="officeJoins"/>
 		WHERE a.del_flag = #{DEL_FLAG_NORMAL} AND a.useable = '1' AND (
-		a.id = #{id} or (a.CODE BETWEEN 10001008 AND 10001014 or a.code = 10001020) and a.code != 10001012)
+		a.id = #{id} OR ( a.CODE BETWEEN 10001008 AND 10001014 OR a.CODE = 10001019 OR a.CODE = 10001020 )  and a.code != 10001012)
 		<if test="oldName != null and oldName != ''">
 			and a.name like concat('%',#{oldName},'%')
 		</if>

+ 28 - 4
src/main/resources/mappings/modules/workclientinfo/WorkClientInfoDao.xml

@@ -82,6 +82,7 @@
 		<include refid="workClientInfoJoinsLink"/>
 		left join sys_user su on su.id = a.create_by
 		left join sys_office so on so.id = su.office_id
+		left join sys_office o on o.id = a.office_id
 		<if test="workClientLinkman != null and workClientLinkman.name !=null and workClientLinkman.name !=''">
 			LEFT JOIN work_client_linkman b ON a.id = b.client_id
 		</if>
@@ -116,6 +117,17 @@
             <if test="workClientLinkman != null and workClientLinkman.linkPhone != null and workClientLinkman.linkPhone !=''">
 				AND b.link_phone LIKE concat('%',#{workClientLinkman.linkPhone},'%')
             </if>
+
+			<if test="office!=null and office.id=='' and office.name!=null and office.name!='' ">
+				and  o.name like concat('%',#{office.name},'%')
+			</if>
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+
 			<if test="address != null and address != ''">
 				AND a.address LIKE
 					<if test="dbName == 'oracle'">'%'||#{address}||'%'</if>
@@ -137,9 +149,9 @@
 			<if test="(createId != null and createId != '') or (createNameStr != null and createNameStr != '')">
 				AND (a.create_by = #{createId} or su.name like concat('%',#{createNameStr},'%'))
 			</if>
-			<if test="officeId != null and officeId != ''">
+			<!--<if test="officeId != null and officeId != ''">
 				AND so.id = #{officeId}
-			</if>
+			</if>-->
             AND a.company_id = #{currentUser.company.id}
 			${sqlMap.dsf}
 			<choose>
@@ -340,6 +352,7 @@
 		left join work_client_job_type_info c on c.work_client_id=a.id
 		left join sys_user su on su.id = a.create_by
 		left join sys_office so on so.id = su.office_id
+		left join sys_office o on o.id = a.office_id
         <where>
             a.del_flag = #{DEL_FLAG_NORMAL}
             <if test="name != null and name != ''">
@@ -366,6 +379,17 @@
             <if test="workClientLinkman != null and workClientLinkman.linkPhone != null and workClientLinkman.linkPhone !=''">
                 AND b.link_phone LIKE concat('%',#{workClientLinkman.linkPhone},'%')
             </if>
+
+			<if test="office!=null and office.id=='' and office.name!=null and office.name!='' ">
+				and  o.name like concat('%',#{office.name},'%')
+			</if>
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+
             <if test="address != null and address != ''">
                 AND a.address LIKE
                 <if test="dbName == 'oracle'">'%'||#{address}||'%'</if>
@@ -387,9 +411,9 @@
 			<if test="(createId != null and createId != '') or (createNameStr != null and createNameStr != '')">
 				AND (a.create_by = #{createId} or su.name = #{createNameStr})
 			</if>
-			<if test="officeId != null and officeId != ''">
+			<!--<if test="officeId != null and officeId != ''">
 				AND so.id = #{officeId}
-			</if>
+			</if>-->
             AND a.company_id = #{currentUser.company.id}
 			${sqlMap.dsf}
             <choose>

+ 22 - 0
src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml

@@ -295,6 +295,17 @@
 			<if test="beginContractDate != null and endContractDate != null and beginContractDate != '' and endContractDate != ''">
 				AND a.contract_date BETWEEN #{beginContractDate} AND #{endContractDate}
 			</if>
+
+			<if test="office!=null and office.id=='' and office.name!=null and office.name!='' ">
+				and  o.name like concat('%',#{office.name},'%')
+			</if>
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+
 			<if test="name != null and name != ''">
 				AND a.name LIKE
 					<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
@@ -478,6 +489,17 @@
 			<if test="beginContractDate != null and endContractDate != null and beginContractDate != '' and endContractDate != ''">
 				AND a.contract_date BETWEEN #{beginContractDate} AND #{endContractDate}
 			</if>
+
+			<if test="office!=null and office.id=='' and office.name!=null and office.name!='' ">
+				and  o.name like concat('%',#{office.name},'%')
+			</if>
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+
 			<if test="name != null and name != ''">
 				AND a.name LIKE
 				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>

BIN
src/main/webapp/dot/审核类项目批量导入模板.xlsx


BIN
src/main/webapp/dot/造价B类项目批量导入模板.xlsx


+ 1 - 1
src/main/webapp/webpage/modules/collectAccessory/collectAccessoryCompanyList.jsp

@@ -300,7 +300,7 @@
 					</div>
 					<div id="moresees" style="clear:both;display:none;" class="lw6">
 						<div class="layui-item query athird">
-							<label class="layui-form-label">收藏分类:</label>
+							<label class="layui-form-label">收藏分类</label>
 							<div class="layui-input-block with-icon">
 								<span style="width: 100%;text-align: left;position: relative;" id="demo100">
 									<input htmlEscape="false" name="classification" id="classification" maxlength="60" class="form-control layui-input" value="${collectAccessoryInfo.classification}"/>

+ 1 - 1
src/main/webapp/webpage/modules/collectAccessory/collectAccessoryList.jsp

@@ -370,7 +370,7 @@
 					</div>
 					<div id="moresees" style="clear:both;display:none;" class="lw6">
 						<div class="layui-item query athird">
-							<label class="layui-form-label">收藏分类:</label>
+							<label class="layui-form-label">收藏分类</label>
 							<div class="layui-input-block with-icon">
 								<span style="width: 100%;text-align: left;position: relative;" id="demo100">
 									<input htmlEscape="false" name="classification" id="classification" maxlength="60" class="form-control layui-input" value="${collectAccessoryInfo.classification}"/>

+ 1 - 1
src/main/webapp/webpage/modules/collectAccessory/collectAccessoryOfficeList.jsp

@@ -301,7 +301,7 @@
 					</div>
 					<div id="moresees" style="clear:both;display:none;" class="lw6">
 						<div class="layui-item query athird">
-							<label class="layui-form-label">收藏分类:</label>
+							<label class="layui-form-label">收藏分类</label>
 							<div class="layui-input-block with-icon">
 								<span style="width: 100%;text-align: left;position: relative;" id="demo100">
 									<input htmlEscape="false" name="classification" id="classification" maxlength="60" class="form-control layui-input" value="${collectAccessoryInfo.classification}"/>

+ 6 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageList.jsp

@@ -897,6 +897,9 @@
 									xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 线上重新归档</a>";
 								}
 							}
+							if((d.projectReportRecordStatus == 5 || d.projectReportRecordStatus == 7) && (d.downProjectReportRecordStatus !=5 && d.downProjectReportRecordStatus != 7)) {
+								xml+="<a href=\"#\" onclick=\"openDialogre('重新发起电子归档申请', '${ctx}/ruralProject/ruralCostProjectMessageNewTwo/formRecord?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{
@@ -925,6 +928,9 @@
 								xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 线上重新归档</a>";
 							}
 						}
+						if((d.projectReportRecordStatus == 5 || d.projectReportRecordStatus == 7) && (d.paperFilingStatus !=5 && d.paperFilingStatus != 7)) {
+							xml+="<a href=\"#\" onclick=\"openDialogre('重新发起电子归档申请', '${ctx}/ruralProject/ruralCostProjectMessageNewTwo/formRecord?reportId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 线上重新归档</a>";
+						}
 					}
 				}
 				//归档资料缺失说明

+ 10 - 10
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordModify.jsp

@@ -185,7 +185,7 @@
 <body>
 <div class="single-form">
 	<div class="container">
-		<form:form id="inputForm" modelAttribute="projectReportRecord" method="post" class="form-horizontal">
+		<form:form id="inputForm" modelAttribute="projectReportRecord" method="post" class="form-horizontal layui-form">
 			<form:hidden path="id"/>
 			<form:hidden path="view"/>
 			<form:hidden path="numberCount"/>
@@ -292,8 +292,8 @@
 								<%-- <th>序号</th>--%>
 									<th width="30%">文件类型</th>
 									<th width="">文件描述/文件</th>
-									<th width="100px">文件大小(M)</th>
-									<th width="150px">操作</th>
+									<th width="120px">文件大小(M)</th>
+									<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
@@ -311,7 +311,7 @@
 								</c:choose>
 								<td>
 <%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-									<div><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}</div>
+									<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
 								</td>
 								<td></td>
 								<td class="op-td">
@@ -469,8 +469,8 @@
 								<%-- <th>序号</th>--%>
 									<th width="30%">文件类型</th>
 									<th width="">文件描述/文件</th>
-									<th width="100px">文件大小(M)</th>
-									<th width="150px">操作</th>
+									<th width="120px">文件大小(M)</th>
+									<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
@@ -489,7 +489,7 @@
 								</c:choose>
 								<td>
 <%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-									<div><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}</div>
+									<div><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M; </div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
 								</td>
 								<td></td>
 
@@ -650,8 +650,8 @@
 								<%-- <th>序号</th>--%>
 									<th width="30%">文件类型</th>
 									<th width="">文件描述/文件</th>
-									<th width="100px">文件大小(M)</th>
-									<th width="150px">操作</th>
+									<th width="120px">文件大小(M)</th>
+									<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
@@ -670,7 +670,7 @@
 								</c:choose>
 								<td>
 <%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-									<div><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;  ${fileOther.attachTypes}</div>
+									<div><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M; </div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
 								</td>
 								<td></td>
 								<td class="op-td">

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

@@ -1099,9 +1099,11 @@
 
 
 						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
-						<div class=" layui-btn-sm" style="float: right;width: 300px">
-							<span style="color: #999999">咨询营业收入:${moneyAll}(万元)</span>
-						</div>
+						<shiro:hasPermission name="ruralProject:ruralCostProjectMessage:leader">
+							<div class=" layui-btn-sm" style="float: right;width: 300px">
+								<span style="color: #999999">咨询营业收入:${moneyAll}(万元)</span>
+							</div>
+						</shiro:hasPermission>
 					</div>
 					<shiro:hasPermission name="ruralProject:ruralCostProjectMessage:reportSwitch">
 						<div style="float: right;margin-right: 30px;">

+ 6 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp

@@ -827,6 +827,9 @@
 									xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\"  style='height: 32px;margin-top: 5px;margin-bottom: 5px;'> 线上重新归档</a>";
 								}
 							}
+							if((d.projectReportRecordStatus == 5 || d.projectReportRecordStatus == 7) && (d.downProjectReportRecordStatus !=5 && d.downProjectReportRecordStatus != 7)) {
+								xml+="<a href=\"#\" onclick=\"openDialogre('重新发起电子归档申请', '${ctx}/ruralProject/ruralCostProjectMessageNewTwo/formRecord?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{
@@ -854,6 +857,9 @@
 								xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\"  style='height: 32px;margin-top: 5px;margin-bottom: 5px;'> 线上重新归档</a>";
 							}
 						}
+						if((d.projectReportRecordStatus == 5 || d.projectReportRecordStatus == 7) && (d.paperFilingStatus !=5 && d.paperFilingStatus != 7)) {
+							xml+="<a href=\"#\" onclick=\"openDialogre('重新发起电子归档申请', '${ctx}/ruralProject/ruralCostProjectMessageNewTwo/formRecord?reportId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 线上重新归档</a>";
+						}
 					}
 				}
 				//归档资料缺失说明

+ 1 - 0
src/main/webapp/webpage/modules/sys/sysIndex.jsp

@@ -180,6 +180,7 @@
                         },
                         submitHandler: function(form){
                             loading('正在提交,请稍等...');
+                            console.log(123213123)
                             form.submit();
 
                         },

+ 5 - 2
src/main/webapp/webpage/modules/sys/userModifyPwd.jsp

@@ -59,7 +59,7 @@
                 var password = $.md5(($("#oldPassword").val()));
                 $.ajax({
                     type: "post",
-                    url: "${ctx}/sys/register/validatePassword",
+                    url: "${ctx}/sys/register/changePasswordValidatePassword",
                     data: {'loginName':'${user.loginName}','password':password},
                     dataType:"text",
                     success: function(data) {
@@ -92,7 +92,10 @@
 	<form:form id="inputForm" modelAttribute="user" action="${ctx}/sys/user/modifyPwd"  method="post" class="form-horizontal form-group">
 		<form:hidden path="id"/>
 		<form:hidden path="home"/>
-		<sys:message hideType="1" content="${message}"/>
+		<!-- 显示后端返回的 message -->
+		<div th:if="${message}">
+			<span th:text="${message}"></span>
+		</div>
 		<div class="container1">
 			<c:if test="${ not empty home}">
 				<div  style="margin-top: 10px">

+ 8 - 1
src/main/webapp/webpage/modules/workclientinfo/all/workClientInfoList.jsp

@@ -201,7 +201,7 @@
 							</div>
 						</div>
 						<div class="layui-item query athird">
-							<label class="layui-form-label">统一社会信用代码:</label>
+							<label class="layui-form-label" style="line-height:20px">统一社会信用代码:</label>
 							<div class="layui-input-block">
                                 <form:input path="uscCode" htmlEscape="false"  class="form-control layui-input"/>
 							</div>
@@ -214,6 +214,13 @@
 							</div>
 						</div>
 						<div class="layui-item query athird">
+							<label class="layui-form-label">部门:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselectMoHu id="officeId" name="office.id" value="${workClientInfo.office.id}" labelName="office.name" labelValue="${workClientInfo.office.name}"
+													title="部门" url="/sys/office/treeDataAll?type=6" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
 							<label class="layui-form-label">代表方:</label>
 							<div class="layui-input-block">
 								<form:select path="jobTypeShow" class="form-control layui-input">

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

@@ -213,7 +213,7 @@
 							</div>
 						</div>
 						<div class="layui-item query athird">
-							<label class="layui-form-label">统一社会信用代码:</label>
+							<label class="layui-form-label"  style="line-height:20px">统一社会信用代码:</label>
 							<div class="layui-input-block">
                                 <form:input path="uscCode" htmlEscape="false"  class="form-control layui-input"/>
 							</div>

+ 21 - 3
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoAllList.jsp

@@ -624,6 +624,13 @@
 						</div>
 					</div>
 					<div class="layui-item query athird">
+						<label class="layui-form-label">部门:</label>
+						<div class="layui-input-block with-icon">
+							<sys:treeselectMoHu id="officeId" name="office.id" value="${workContractInfo.office.id}" labelName="office.name" labelValue="${workContractInfo.office.name}"
+												title="部门" url="/sys/office/treeDataAll?type=6" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false"/>
+						</div>
+					</div>
+					<div class="layui-item query athird">
 						<label class="layui-form-label">中标通知书:</label>
 						<div class="layui-input-block with-icon">
 							<form:select path="letterOfAcceptanceFlag" class="form-control simple-select">
@@ -715,6 +722,9 @@
                 ,{field:'createBy',align:'center', title: '创建人',  width:80,templet:function(d){
                         return "<span title='"+ d.createBy +"'>" + d.createBy + "</span>";
                     }}
+                ,{field:'createUserOfficeName',align:'center', title: '部门',  width:80,templet:function(d){
+                        return "<span title='"+ d.createUserOfficeName +"'>" + d.createUserOfficeName + "</span>";
+                    }}
                 ,{field:'signDate',align:'center', title: '签订日期',  width:80}
                 ,{align:'center', title: '状态',  width:70,templet:function(d){
                         <%--var st = getAuditState(d.status);--%>
@@ -846,7 +856,7 @@
 								xml +="<a href=\"${ctx}/workcontractrecord/workContractRecord/delete?id=" + d.contrractRecordId + "\" onclick=\"return confirmx('确认要删除该合同归档申请吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";*/
 						}
                         //合同借用
-                        else if(d.contrractRecordStatus =="5"){
+                        else if(d.contrractRecordStatus =="5" && d.leader != undefined && d.leader == "1"){
 							if((d.borrowStatus != undefined && d.borrowStatus == "0")|| d.borrowStatus == "4" || (d.giveStatus != undefined && d.giveStatus == "5"))
 							{
 								xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('借用申请', '${ctx}/workContractBorrow/workContractBorrow/form?id="+ d.id +"&tabId=4&pageFlag=contractAll','95%','95%')\" style='background-color: #1E9FFF' class=\"layui-btn layui-btn-xs layui-bg-orange\" > 借用</a>";
@@ -865,8 +875,11 @@
 							if(d.giveBorrow != undefined && d.giveBorrow == "1"){
 								xml +="<a href=\"${ctx}/workContractBorrow/workContractBorrow/updateGiveDate?id=" + d.borrowId + "&home=contractAll&pageFlag=contractAll\" onclick=\"return confirmx('确认归还该合同信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-orange\"> 归还合同</a>";
 							}
-							//统计按钮
-							xml += "<a href=\"javascript:void(0)\" onclick=\"openDialogView('开票数据统计', '${ctx}/workcontractinfo/workContractInfo/getWorkContractStatisticDetailList?id="+ d.id +"','95%','95%')\" style='background-color: #1E9FFF' class=\"layui-btn layui-btn-xs\" > 统计</a>";
+
+							if(d.leader != undefined && d.leader == "1"){
+								//统计按钮
+								xml += "<a href=\"javascript:void(0)\" onclick=\"openDialogView('开票数据统计', '${ctx}/workcontractinfo/workContractInfo/getWorkContractStatisticDetailList?id="+ d.id +"','95%','95%')\" style='background-color: #1E9FFF' class=\"layui-btn layui-btn-xs\" > 统计</a>";
+							}
 						}
                         xml+="</div>"
                         return xml;
@@ -896,6 +909,7 @@
                     ,"borrowStatus":"${workContractInfo.borrowStatus}"
                     ,"giveStatus":"${workContractInfo.giveStatus}"
                     ,"borrowId":"${workContractInfo.borrowId}"
+                    ,"createUserOfficeName":"${workContractInfo.createUserOfficeName}"
                     ,"flagAdmin":"${workContractInfo.flagAdmin}"
 					,"notifyFlag":"${workContractInfo.notifyFlag}"
 					,"newContractNotifyFlagAudit":"${workContractInfo.newContractNotifyFlagAudit}"
@@ -951,6 +965,10 @@
 						</c:choose>
 					</shiro:hasPermission>
 					<shiro:hasPermission name="workcontractrecord:workContractRecord:revert">,"giveBorrow":	<c:choose><c:when test="${workContractInfo.borrowStatus == '5' && workContractInfo.giveStatus != '5'}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+					<shiro:hasPermission name="workcontractinfo:workContractInfo:leader">,
+					"leader":"1"
+					</shiro:hasPermission>
+
                 }
                 </c:forEach>
                 </c:if>

+ 4 - 0
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoList.jsp

@@ -721,6 +721,9 @@
                 ,{field:'createBy',align:'center', title: '创建人',  width:80,templet:function(d){
                         return "<span title='"+ d.createBy +"'>" + d.createBy + "</span>";
                     }}
+				,{field:'createUserOfficeName',align:'center', title: '部门',  width:80,templet:function(d){
+						return "<span title='"+ d.createUserOfficeName +"'>" + d.createUserOfficeName + "</span>";
+					}}
                 ,{field:'signDate',align:'center', title: '签订日期',  width:80}
                 ,{align:'center', title: '状态',  width:70,templet:function(d){
                         <%--var st = getAuditState(d.status);--%>
@@ -908,6 +911,7 @@
                     ,"contrractRecordStatus":"${workContractInfo.contrractRecordStatus}"
                     ,"contrractRecordId":"${workContractInfo.contrractRecordId}"
                     ,"recordNum":"${workContractInfo.recordNum}"
+                    ,"createUserOfficeName":"${workContractInfo.createUserOfficeName}"
                     ,"borrowStatus":"${workContractInfo.borrowStatus}"
                     ,"giveStatus":"${workContractInfo.giveStatus}"
                     ,"borrowId":"${workContractInfo.borrowId}"