فهرست منبع

归档批次管理0.2.2

[user3] 4 سال پیش
والد
کامیت
5ef8de5021

+ 18 - 2
src/main/java/com/jeeplus/modules/projectFilingBatch/web/ProjectFilingBatchController.java

@@ -264,8 +264,24 @@ public class ProjectFilingBatchController extends BaseController {
         }
         return "redirect:" + Global.getAdminPath() + "/projectFilingBatch/projectFilingBatchInfo/?repage";
     }
-
-
+    /**
+     * 撤回
+     * @param projectFilingBatch
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = "delete")
+    public String delete(ProjectFilingBatch projectFilingBatch, RedirectAttributes redirectAttributes) {
+        int status = projectFilingBatch.getFilingStatus();
+        if(status== ProjectStatusEnum.TSTORE.getValue()||status== ProjectStatusEnum.REJECTED.getValue()||status== ProjectStatusEnum.RECALL.getValue()){
+            projectFilingBatchService.delete(projectFilingBatch);
+            addMessage(redirectAttributes, "归档作废成功");
+            return "redirect:"+Global.getAdminPath()+"/projectFilingBatch/projectFilingBatchInfo/?repage";
+        }else {
+            addMessage(redirectAttributes, "归档作废失败,只有“暂存”、“驳回”、“撤回”状态的项目才能作废");
+        }
+        return "redirect:" + Global.getAdminPath() + "/projectFilingBatch/projectFilingBatchInfo/?repage";
+    }
     /**
      * 线下归档员进行归档审批——项目审批
      * 修改

+ 5 - 0
src/main/resources/mappings/modules/projectGuidang/ProjectFilingBatchDao.xml

@@ -116,4 +116,9 @@
 		WHERE a.id = #{id}
 		order by a.create_date desc
 	</select>
+	<delete id="delete">
+		UPDATE project_filingbatch SET
+			filing_status= 7
+		WHERE id = #{id}
+	</delete>
 </mapper>

+ 1 - 1
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchList.jsp

@@ -271,7 +271,7 @@
                         }
                         if(d.candel != undefined && d.candel =="1")
                         {
-                            xml+="<a href=\"${ctx}/project/projectRecords/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该项目信息吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+                            xml+="<a href=\"${ctx}/projectFilingBatch/projectFilingBatchInfo/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该项目信息吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
                         }
                         if(d.cancancel != undefined && d.cancancel =="1")
                         {