Browse Source

cpa流程详情、审核操作分发

lizhenhao 2 years atrás
parent
commit
29ac1c915e

+ 6 - 4
src/main/java/com/jeeplus/modules/centerservice/service/cpa/reimbursement/ReimbursementRequest.java

@@ -22,11 +22,12 @@ public class ReimbursementRequest {
      * @param id
      * @return
      */
-    public Object getById(String id) {
+    public Object getById(String id, String processDefKey) {
         String token = "";
         Map<String, Object> paramMap = new HashMap<>();
         paramMap.put("id", id);
-        Object res = restTemplateService.getCPA("/reimbursement/info/findById", token, paramMap);
+        paramMap.put("processDefKey", processDefKey);
+        Object res = restTemplateService.getCPA("/transpond/detailDistribute", token, paramMap);
         return res;
     }
 
@@ -37,13 +38,14 @@ public class ReimbursementRequest {
      * @param comment 审核意见
      * @return
      */
-    public Object auditFunc(String id, String flag, String comment) {
+    public Object auditFunc(String id, String flag, String comment, String processDefKey) {
         String token = "";
         Map<String, Object> bodyMap = new HashMap<>();
         bodyMap.put("id", id);
         bodyMap.put("flag", flag);
         bodyMap.put("comment", comment);
-        Object res = restTemplateService.postCPA("/reimbursement/info/auditFunc", token, null, bodyMap);
+        bodyMap.put("processDefKey", processDefKey);
+        Object res = restTemplateService.postCPA("/transpond/auditDistribute", token, null, bodyMap);
         return res;
     }
 

+ 5 - 4
src/main/java/com/jeeplus/modules/centerservice/service/cpa/reimbursement/ReimbursementService.java

@@ -35,13 +35,14 @@ public class ReimbursementService {
      * @return
      * @throws Exception
      */
-    public WorkReimbursement getReimbursementById(String id) throws Exception{
+    public WorkReimbursement getReimbursementById(String id, String processDefKey) throws Exception{
         WorkReimbursement workReimbursement = new WorkReimbursement();
         if (StringUtils.isNotBlank(id)) {
-            Object res = reimbursementRequest.getById(id);
+            Object res = reimbursementRequest.getById(id, processDefKey);
             if(Objects.nonNull(res)) {
                 Map<String,Object> reim = JSONObject.parseObject(JSON.toJSONString(res));
                 workReimbursement = convertReimbursement(reim); // 格式转换
+                workReimbursement.setType(processDefKey);
             }
         }
         return workReimbursement;
@@ -222,9 +223,9 @@ public class ReimbursementService {
      * 报销审核
      * @return
      */
-    public Map<String,Object> auditFunc(String id,String flag,String comment) {
+    public Map<String,Object> auditFunc(String id,String flag,String comment, String processDefKey) {
         Map<String,Object> res = new HashMap<>();
-        Object o = reimbursementRequest.auditFunc(id, flag, comment);
+        Object o = reimbursementRequest.auditFunc(id, flag, comment, processDefKey);
         if (Objects.nonNull(o)) {
             res.putAll(JSONObject.parseObject(JSON.toJSONString(o)));
         }

+ 1 - 1
src/main/java/com/jeeplus/modules/centerservice/web/cpa/reimbursement/ReimbursementController.java

@@ -33,7 +33,7 @@ public class ReimbursementController {
     public String saveAudit(WorkReimbursement workReimbursement, RedirectAttributes redirectAttributes) {
         Map<String, Object> res = new HashMap<>();
         if (Objects.nonNull(workReimbursement.getAct())) {
-            res = reimbursementService.auditFunc(workReimbursement.getId(), workReimbursement.getAct().getFlag(),workReimbursement.getComment());
+            res = reimbursementService.auditFunc(workReimbursement.getId(), workReimbursement.getAct().getFlag(),workReimbursement.getComment(),workReimbursement.getType());
             if (MapUtils.isEmpty(res)) {
                 addMessage(redirectAttributes, "操作失败");
             }

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

@@ -1248,7 +1248,7 @@ public class WorkProjectNotifyController extends BaseController {
 				if ("cpa".equals(workProjectNotify.getBelongProject())) {
 					if ("13".equals(workProjectNotify.getType())) {
 						model.addAttribute("projectNotifyType", "评估-报销审批");
-						WorkReimbursement workReimbursement = reimbursementService.getReimbursementById(workProjectNotify.getNotifyId());
+						WorkReimbursement workReimbursement = reimbursementService.getReimbursementById(workProjectNotify.getNotifyId(),workProjectNotify.getType());
 						if(StringUtils.isNotBlank(workProjectNotify.getHome())){
 							workReimbursement.setHome(workProjectNotify.getHome());
 						}else{

+ 1 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAuditCpa.jsp

@@ -91,6 +91,7 @@
 		<form:hidden path="processInstanceId"/>
 <%--		<form:hidden path="act.procDefId"/>--%>
 		<form:hidden id="flag" path="act.flag"/>
+		<form:hidden id="type" path="type"/>
 <%--		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">--%>
 		<div class="form-group layui-row first ">
 			<div class="form-group-label"><h2>基础信息</h2></div>