Quellcode durchsuchen

修改项目归档三种状态 并重写查询sql

user5 vor 4 Jahren
Ursprung
Commit
a82bf9a5f7

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

@@ -292,9 +292,18 @@
 				AND prd.status = #{projectReportStatus}
 			</if>
 
-			<if test="projectReportRecordStatus != null and projectReportRecordStatus != ''">
-				AND prr.status = #{projectReportRecordStatus}
-			</if>
+			<choose>
+				<when test="projectReportRecordStatus != null and projectReportRecordStatus != '' and projectReportRecordStatus != 0">
+					AND prr.status = #{projectReportRecordStatus}
+				</when>
+				<otherwise>
+					<choose>
+						<when test="projectReportRecordStatus == 0">
+							AND prr.status is null
+						</when>
+					</choose>
+				</otherwise>
+			</choose>
 
 			<if test="projectType != null and projectType != ''">
 				AND a.project_type = #{projectType}
@@ -394,9 +403,18 @@
 				AND prd.status = #{projectReportStatus}
 			</if>
 
-			<if test="projectReportRecordStatus != null and projectReportRecordStatus != ''">
-				AND prr.status = #{projectReportRecordStatus}
-			</if>
+			<choose>
+				<when test="projectReportRecordStatus != null and projectReportRecordStatus != '' and projectReportRecordStatus != 0">
+					AND prr.status = #{projectReportRecordStatus}
+				</when>
+				<otherwise>
+					<choose>
+						<when test="projectReportRecordStatus == 0">
+							AND prr.status is null
+						</when>
+					</choose>
+				</otherwise>
+			</choose>
 
 			<if test="projectType != null and projectType != ''">
 				AND a.project_type = #{projectType}

+ 20 - 0
src/main/webapp/static/common/jeeplus.js

@@ -442,6 +442,26 @@ function getruralProjectState(id)
     return result;
 }
 
+function getRuralProjectArchiveState(id)
+{
+    var result ={};
+    result.action = true;
+    switch(id)
+    {
+        case "0":result.label = "tempstore";result.status="未归档";result.action = false;break;
+        case "1":result.label = "tempstore";result.status="暂存";result.action = false;break;
+        case "2":result.label = "auditing";result.status="归档中";break;
+        case "3":result.label = "cancel";result.status="撤回";break;
+        case "4":result.label = "reject";result.status="驳回";break;
+        case "5":result.label = "signed";result.status="已归档";break;
+        case "8":result.label = "changing";result.status="变更中";break;
+        case "10":result.label = "unknown";result.status="待发起";result.action = false;break;
+        default:
+            result.label = "unknown";result.status="未知";break;
+    }
+    return result;
+}
+
 function getAuditState(id)
 {
     var result ={};

+ 7 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageList.jsp

@@ -234,7 +234,7 @@
 							<div class="layui-input-block">
 								<form:select path="projectReportRecordStatus" class=" form-control  simple-select">
 									<form:option value="" label=""/>
-									<form:options items="${fns:getDictList('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									<form:options items="${fns:getDictList('archive_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
 								</form:select>
 							</div>
 						</div>
@@ -303,7 +303,7 @@
                         return xml;
                     }}
                 ,{align:'center', title: '归档状态',  width:70,templet:function(d){
-                        var st = getAuditState(d.projectReportRecordStatus);
+                        var st = getRuralProjectArchiveState(d.projectReportRecordStatus);
                         if(st.action)
                             var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getReportRecordProcessOne?processInstanceId=" + d.prrProcessInstanceId + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         else
@@ -366,6 +366,11 @@
 								xml+="<a href=\"${ctx}/ruralProject/ruralCostProjectMessage/cancelInvalidate?id=" + d.prrId + "&processInstanceId=" + d.prrProcessInstanceId + "\" onclick=\"return confirmx('确认要撤回该报告归档审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回归档信息</a>";
 							}
                         }
+
+						/*上报相关按钮*/
+						if(d.projectReportRecordStatus == 5){
+								xml+="<a href=\"javascript:void(0)\" style='background-color: #5FB878' class=\"op-btn\" ><i class=\"fa fa-plus\"></i> 上报</a>";
+						}
                         return xml;
 
                     }}

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

@@ -235,7 +235,7 @@
 							<div class="layui-input-block">
 								<form:select path="projectReportRecordStatus" class=" form-control  simple-select">
 									<form:option value="" label=""/>
-									<form:options items="${fns:getDictList('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									<form:options items="${fns:getDictList('archive_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
 								</form:select>
 							</div>
 						</div>
@@ -304,7 +304,7 @@
                         return xml;
                     }}
                 ,{align:'center', title: '归档状态',  width:70,templet:function(d){
-                        var st = getAuditState(d.projectReportRecordStatus);
+                        var st = getRuralProjectArchiveState(d.projectReportRecordStatus);
                         if(st.action)
                             var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralProjectMessage/getReportRecordProcessOne?processInstanceId=" + d.prrProcessInstanceId + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         else
@@ -367,6 +367,10 @@
 								xml+="<a href=\"${ctx}/ruralProject/ruralProjectMessage/cancelInvalidate?id=" + d.prrId + "&processInstanceId=" + d.prrProcessInstanceId + "\" onclick=\"return confirmx('确认要撤回该报告归档审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回归档信息</a>";
 							}
                         }
+						/*上报相关按钮*/
+						if(d.projectReportRecordStatus == 5){
+							xml+="<a href=\"javascript:void(0)\" style='background-color: #5FB878' class=\"op-btn\" ><i class=\"fa fa-plus\"></i> 上报</a>";
+						}
                         return xml;
 
                     }}