Przeglądaj źródła

管理员修改项目类别功能调整

user5 1 rok temu
rodzic
commit
73dd90c9ee

+ 42 - 7
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -992,13 +992,6 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	}
 
 	/**
-	 * 处理项目中上传文件的其他文件中的咨询合同列表(将项目合同中的附件信息添加进去)
-	 */
-	private void disposeWorkContractFile(){
-
-	}
-
-	/**
 	 * 管理员修改项目信息
 	 * @param projectRecords
 	 * @throws Exception
@@ -1018,6 +1011,48 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 			company.setId(UserUtils.getUser().getCompany().getId());
 			office.setId(UserUtils.getUser().getOffice().getId());
 		}
+
+		//根据项目类型进行调整
+		synchronized (SYN_BYTE) {
+			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())) {
+					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;
+		}
+
+
 		projectRecords.setCompany(company);
 		projectRecords.setOffice(office);
 		projectRecords.preUpdate();

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

@@ -1633,6 +1633,27 @@
 			<if test="projectProperties != null and projectProperties != ''">
 				,project_properties =#{projectProperties}
 			</if>
+
+			<if test="projectMasterId != null and projectMasterId != ''">
+				,project_master_id = #{projectMasterId}
+			</if>
+			<choose>
+				<when test="paperFilingStatus ==null or paperFilingStatus == ''">
+					,paper_filing_status = null
+				</when>
+				<otherwise>
+					,paper_filing_status = #{paperFilingStatus}
+				</otherwise>
+			</choose>
+
+			<choose>
+				<when test="reportedState ==null or reportedState == ''">
+					,reported_state = null
+				</when>
+				<otherwise>
+					,reported_state = #{reportedState}
+				</otherwise>
+			</choose>
 		WHERE id = #{id}
 	</update>
 

+ 3 - 3
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp

@@ -270,11 +270,11 @@
                         if(d.cancancel != undefined && d.cancancel == "1")
                             xml += "<a href=\"${ctx}/workreimbursement/workReimbursementAll/cancelInvalidate?id=" + d.id + "\" onclick=\"return confirmx('确认要强制撤回?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\">撤回</a>";
                         if(d.canedit1 != undefined && d.canedit1 == "1")
-                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改报销单', '${ctx}/workreimbursement/workReimbursementAll/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\">修改</a>";
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改报销单', '${ctx}/workReimbursementNew/workReimbursementNew/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\">修改</a>";
                         if(d.canedit2 != undefined && d.canedit2 == "1")
-                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreModify('修改报销单', '${ctx}/workreimbursement/workReimbursementAll/form?id="+ d.id + "&tabId=3','"+ d.id +"','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\">修改</a>";
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreModify('修改报销单', '${ctx}/workReimbursementNew/workReimbursementNew/form?id="+ d.id + "&tabId=3','"+ d.id +"','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\">修改</a>";
                         if(d.canedit3 != undefined && d.canedit3 == "1")
-                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请报销单', '${ctx}/workreimbursement/workReimbursementAll/form?id=" + d.id + "&tabId=4','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" >修改</a>";
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请报销单', '${ctx}/workReimbursementNew/workReimbursementNew/form?id=" + d.id + "&tabId=4','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" >修改</a>";
                         if(d.candelete != undefined && d.candelete == "1")
                             xml +="<a href=\"${ctx}/workreimbursement/workReimbursementAll/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该报销单吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\">删除</a>";
                         if(<%=admin%> && d.status == "5"){