From a6f36e8b439e200d46c0f8fd8b8f8784a41d41ed Mon Sep 17 00:00:00 2001 From: liujun Date: Tue, 11 Jun 2024 14:21:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=96=B9=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E5=8F=AF=E6=8C=87=E5=AE=9A=E6=89=93=E5=9B=9E?= =?UTF-8?q?=E8=87=B3=E7=89=B9=E6=AE=8A=E8=8A=82=E7=82=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zcloud/flow/xgf/GuFen/GuFenCharge.java | 2 +- .../zcloud/flow/xgf/GuFen/GuFenSupervise.java | 2 +- .../flow/xgf/GuFen/GuFenWeiTuoCharge.java | 2 +- .../flow/xgf/GuFen/GuFenWeiTuoSupervise.java | 2 +- .../zcloud/flow/xgf/JiTuan/JiTuanCharge.java | 2 +- .../flow/xgf/JiTuan/JiTuanSupervise.java | 2 +- .../flow/xgf/JiTuan/JiTuanWeiTuoCharge.java | 2 +- .../xgf/JiTuan/JiTuanWeiTuoSupervise.java | 2 +- .../zcloud/flow/xgf/YiBan/YiBanCharge.java | 2 +- .../zcloud/flow/xgf/YiBan/YiBanSupervise.java | 2 +- .../com/zcloud/flow/xgf/util/XgfFlowDto.java | 3 ++ .../zcloud/service/xgf/XgfUserService.java | 2 +- .../service/xgf/impl/XgfUserServiceImpl.java | 49 ++++++++++++------- 13 files changed, 45 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java index 08145546..8c529cba 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenCharge.java @@ -84,7 +84,7 @@ public class GuFenCharge extends NodeSwitchComponent { flows.put("OPINION", info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows, info); return ""; } else { xgfFlowsMapper.edit(flows); diff --git a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java index 59247bf3..43ed5672 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenSupervise.java @@ -70,7 +70,7 @@ public class GuFenSupervise extends NodeComponent { flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows,info); // 保存操作记录 xgfUserService.saveLog(info, info.getSTATUS(), "0"); diff --git a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoCharge.java b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoCharge.java index a9770a6f..28a0fd93 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoCharge.java @@ -93,7 +93,7 @@ public class GuFenWeiTuoCharge extends NodeComponent { if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows,info); } else { xgfFlowsMapper.edit(flows); condition.clear(); diff --git a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java index 61d80296..4c399549 100644 --- a/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/GuFen/GuFenWeiTuoSupervise.java @@ -73,7 +73,7 @@ public class GuFenWeiTuoSupervise extends NodeComponent { flows.put("OPINION", info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows,info); // 保存操作记录 xgfUserService.saveLog(info, info.getSTATUS(), "0"); } else { diff --git a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java index f869f160..70c82eb1 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanCharge.java @@ -84,7 +84,7 @@ public class JiTuanCharge extends NodeSwitchComponent { flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows,info); return ""; } else { xgfFlowsMapper.edit(flows); diff --git a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java index 18678083..03d76e6d 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanSupervise.java @@ -70,7 +70,7 @@ public class JiTuanSupervise extends NodeComponent { flows.put("OPINION", info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows,info); // 保存操作记录 xgfUserService.saveLog(info, info.getSTATUS(), "0"); diff --git a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoCharge.java b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoCharge.java index 166febba..7adb8cc1 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoCharge.java @@ -75,7 +75,7 @@ public class JiTuanWeiTuoCharge extends NodeComponent { if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows,info); } else { xgfFlowsMapper.edit(flows); condition.clear(); diff --git a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java index d925024b..783cf372 100644 --- a/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/JiTuan/JiTuanWeiTuoSupervise.java @@ -72,7 +72,7 @@ public class JiTuanWeiTuoSupervise extends NodeComponent { flows.put("OPINION", info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows,info); // 保存操作记录 xgfUserService.saveLog(info, info.getSTATUS(), "0"); } else { diff --git a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java index 51f2e8d6..2d9bfabb 100644 --- a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java +++ b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanCharge.java @@ -71,7 +71,7 @@ public class YiBanCharge extends NodeComponent { flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows,info); } else { xgfFlowsMapper.edit(flows); condition.clear(); diff --git a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java index 63c4e0b9..3f02448a 100644 --- a/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java +++ b/src/main/java/com/zcloud/flow/xgf/YiBan/YiBanSupervise.java @@ -105,7 +105,7 @@ public class YiBanSupervise extends NodeComponent { flows.put("OPINION",info.getOPINION()); if ("0".equals(info.getSTATUS())) { // 打回至相关方端 - xgfUserService.repulse(flows); + xgfUserService.repulse(flows,info); // 保存操作记录 xgfUserService.saveLog(info, info.getSTATUS(), "0"); } else { diff --git a/src/main/java/com/zcloud/flow/xgf/util/XgfFlowDto.java b/src/main/java/com/zcloud/flow/xgf/util/XgfFlowDto.java index a7ce4975..f27de069 100644 --- a/src/main/java/com/zcloud/flow/xgf/util/XgfFlowDto.java +++ b/src/main/java/com/zcloud/flow/xgf/util/XgfFlowDto.java @@ -46,4 +46,7 @@ public class XgfFlowDto { // 获取节点需要填写的信息 private Map map; + + // 打回节点游标 + private String BACK_STEP; } diff --git a/src/main/java/com/zcloud/service/xgf/XgfUserService.java b/src/main/java/com/zcloud/service/xgf/XgfUserService.java index 0509d206..56c2a876 100644 --- a/src/main/java/com/zcloud/service/xgf/XgfUserService.java +++ b/src/main/java/com/zcloud/service/xgf/XgfUserService.java @@ -39,7 +39,7 @@ public interface XgfUserService { void saveLog(PageData info, String status, String endFlag) throws Exception; void saveLog(XgfFlowDto info, String status, String endFlag) throws Exception; - void repulse(PageData flows) throws Exception; + void repulse(PageData flows, XgfFlowDto info) throws Exception; void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception; diff --git a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java index 99260734..4fd0fa17 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -991,25 +991,38 @@ public class XgfUserServiceImpl implements XgfUserService { } @Override - public void repulse(PageData flows) throws Exception { - PageData condition = new PageData(); - condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); - PageData entity = xgfUserMapper.findById(condition); - entity.put("STATUS", "0"); - entity.put("VALID_FLAG", "0"); - entity.put("CHECK_STATUS", "-2"); - PageData key = new PageData(); - key.putAll(entity); - key.put("USER_ID", condition.get("XGF_USER_ID")); - key.put("STATUS", "1"); - key.put("OPINION", flows.get("OPINION")); - Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); - if (result == null || !"succeed".equals(result.get("result"))) { - throw new RuntimeException("请求失败"); + public void repulse(PageData flows, XgfFlowDto info) throws Exception { + // add by liu jun 相关方可指定打回至指定节点 -1 为默认打回至相关方端 + if ("-1".equals(info.getBACK_STEP())){ + PageData condition = new PageData(); + condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); + PageData entity = xgfUserMapper.findById(condition); + entity.put("STATUS", "0"); + entity.put("VALID_FLAG", "0"); + entity.put("CHECK_STATUS", "-2"); + PageData key = new PageData(); + key.putAll(entity); + key.put("USER_ID", condition.get("XGF_USER_ID")); + key.put("STATUS", "1"); + key.put("OPINION", flows.get("OPINION")); + Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); + if (result == null || !"succeed".equals(result.get("result"))) { + throw new RuntimeException("请求失败"); + } + xgfUserMapper.edit(entity); + this.clearInfo(flows); + xgfFlowsMapper.edit(flows); + } else { + // 1、判断不能自己打回到自己 + PageData condition = new PageData(); + condition.put("FLOWS_ID",flows.getString("FLOWS_ID")); + PageData flowEntity = xgfFlowsMapper.findById(condition); + if (flowEntity != null && flowEntity.size() > 0 && flowEntity.getString("FLOWS_STEP").equals(info.getBACK_STEP())){ + throw new RuntimeException("不能自己打回到自己"); + } + flowEntity.put("FLOWS_STEP", info.getBACK_STEP()); + xgfFlowsMapper.edit(flowEntity); } - xgfUserMapper.edit(entity); - this.clearInfo(flows); - xgfFlowsMapper.edit(flows); } @Override