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 61bd48c2..115371f8 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -207,6 +207,7 @@ public class XgfUserServiceImpl implements XgfUserService { } else { condition.clear(); condition.put("FLOW_ID", flow.getString("FLOW_ID")); + condition.put("STEP_FLAG", "1"); PageData currentNode = flowDetailMapper.selectOne(condition); PageData nextNode = new PageData(); nextNode.putAll(currentNode); @@ -344,27 +345,47 @@ public class XgfUserServiceImpl implements XgfUserService { private String handle(PageData info, PageData flows) throws Exception { PageData condition = new PageData(); switch (Integer.parseInt(flows.get("FLOWS_STEP").toString())) { - case 0:// 相关方端推送数据至企业端 - flows.put("APPOINT_ZERO_TIME", DateUtil.getTime()); - flows.put("APPOINT_ZERO_STATUS", info.getString("STATUS")); - flows.put("APPOINT_ZERO_OPINION", info.getString("OPINION")); - - flows.put("APPOINT_ONE_CORP_TYPE", "0"); - flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID")); - flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME")); - flows.put("APPOINT_ONE_USER_ID", info.getString("APPOINT_USER_ID")); - flows.put("APPOINT_ONE_USER_NAME", info.getString("APPOINT_USER_NAME")); - flows.put("APPOINT_ONE_CORP_ID", flows.getString("APPOINT_ZERO_CORP_ID")); - flows.put("APPOINT_ONE_CORP_NAME", flows.getString("APPOINT_ZERO_CORP_NAME")); - flows.put("FLOWS_STEP", 1); - xgfFlowsMapper.edit(flows); + case 0: {// 相关方端推送数据至企业端 condition.clear(); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); - PageData user = xgfUserMapper.findById(condition); - user.put("CHECK_STEP", 1); - xgfUserMapper.edit(user); - return "0"; - // 相关方选择的审批人审批,并指定下一位监管部门审批人,不过打回相关方端 + PageData entity = xgfUserMapper.findById(condition); + if ("0".equals(info.getString("STATUS"))) { + 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"); + 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); + return "0"; + } else { + flows.put("APPOINT_ZERO_TIME", DateUtil.getTime()); + flows.put("APPOINT_ZERO_STATUS", info.getString("STATUS")); + flows.put("APPOINT_ZERO_OPINION", info.getString("OPINION")); + + flows.put("APPOINT_ONE_CORP_TYPE", "0"); + flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID")); + flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME")); + flows.put("APPOINT_ONE_USER_ID", info.getString("APPOINT_USER_ID")); + flows.put("APPOINT_ONE_USER_NAME", info.getString("APPOINT_USER_NAME")); + flows.put("APPOINT_ONE_CORP_ID", flows.getString("APPOINT_ZERO_CORP_ID")); + flows.put("APPOINT_ONE_CORP_NAME", flows.getString("APPOINT_ZERO_CORP_NAME")); + flows.put("FLOWS_STEP", 1); + xgfFlowsMapper.edit(flows); + condition.clear(); + condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); + PageData user = xgfUserMapper.findById(condition); + user.put("CHECK_STEP", 1); + xgfUserMapper.edit(user); + return "0"; + } + + } // 相关方选择的审批人审批,并指定下一位监管部门审批人,不过打回相关方端 case 1: { condition.clear(); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); @@ -376,7 +397,7 @@ public class XgfUserServiceImpl implements XgfUserService { PageData key = new PageData(); key.putAll(entity); key.put("USER_ID", condition.get("XGF_USER_ID")); - key.put("STATUS", info.getString("STATUS")); + key.put("STATUS", "1"); Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); if (result == null || !"succeed".equals(result.get("result"))) { throw new RuntimeException("请求失败"); @@ -432,7 +453,7 @@ public class XgfUserServiceImpl implements XgfUserService { PageData key = new PageData(); key.putAll(entity); key.put("USER_ID", condition.get("XGF_USER_ID")); - key.put("STATUS", info.getString("STATUS")); + key.put("STATUS", "1"); Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); if (result == null || !"succeed".equals(result.get("result"))) { throw new RuntimeException("请求失败"); @@ -483,7 +504,7 @@ public class XgfUserServiceImpl implements XgfUserService { PageData key = new PageData(); key.putAll(entity); key.put("USER_ID", condition.get("XGF_USER_ID")); - key.put("STATUS", info.getString("STATUS")); + key.put("STATUS", "1"); Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); if (result == null || !"succeed".equals(result.get("result"))) { throw new RuntimeException("请求失败"); @@ -534,7 +555,7 @@ public class XgfUserServiceImpl implements XgfUserService { PageData key = new PageData(); key.putAll(entity); key.put("USER_ID", condition.get("XGF_USER_ID")); - key.put("STATUS", info.getString("STATUS")); + key.put("STATUS", "1"); Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); if (result == null || !"succeed".equals(result.get("result"))) { throw new RuntimeException("请求失败"); @@ -581,7 +602,7 @@ public class XgfUserServiceImpl implements XgfUserService { PageData key = new PageData(); key.putAll(entity); key.put("USER_ID", condition.get("XGF_USER_ID")); - key.put("STATUS", info.getString("STATUS")); + key.put("STATUS", "1"); Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); if (result == null || !"succeed".equals(result.get("result"))) { throw new RuntimeException("请求失败"); @@ -678,7 +699,7 @@ public class XgfUserServiceImpl implements XgfUserService { String jituandanwei = "1e6dbbe16004402f8d2c0e52afd9a676,3a854eefa7894e06aaa1a2611bca80f6,020578a4c1f04bc692ee25145c2efbe5,90966974de3c4b83aca6f8fd6432d5c2"; if (jituandanwei.contains(corpInfoId)) { return "1"; - }else { + } else { return "0"; } }