From 6d9a283accb86c067960b7a1ea604e88930ec042 Mon Sep 17 00:00:00 2001 From: liujun Date: Thu, 20 Jun 2024 16:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BB=A3=E7=A0=81=E5=9B=9E?= =?UTF-8?q?=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/xgf/impl/XgfUserServiceImpl.java | 47 +++++++------------ 1 file changed, 17 insertions(+), 30 deletions(-) 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 4fd0fa17..f2408266 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -992,37 +992,24 @@ public class XgfUserServiceImpl implements XgfUserService { @Override 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); + 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); } @Override