From e4dccddf68d2a4c69aebee11ca2ea57a563a813d Mon Sep 17 00:00:00 2001 From: liujun Date: Tue, 30 Jan 2024 12:03:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=96=B9=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/xgf/impl/XgfUserServiceImpl.java | 84 ++++++++----------- 1 file changed, 37 insertions(+), 47 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 c04e767b..628efef2 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -198,8 +198,8 @@ public class XgfUserServiceImpl implements XgfUserService { flowDetail.put("APPROVER_ID", ""); flowDetail.put("APPROVER_NAME", ""); flowDetail.put("APPROVER_TIME", DateUtil.getTime()); - flowDetail.put("APPROVER_CORPINFO_ID", ""); - flowDetail.put("APPROVER_CORPINFO_NAME", ""); + flowDetail.put("APPROVER_CORPINFO_ID", entity.getString("BELONG_TO_CORP")); + flowDetail.put("APPROVER_CORPINFO_NAME", entity.getString("BELONG_TO_CORP_NAME")); flowDetail.put("PASS_FLAG", "1"); flowDetail.put("END_FLAG", "0"); flowDetail.put("ISDELETE", "0"); @@ -221,6 +221,8 @@ public class XgfUserServiceImpl implements XgfUserService { nextNode.put("APPROVER_ID", ""); nextNode.put("APPROVER_NAME", ""); nextNode.put("APPROVER_OPINION", ""); + nextNode.put("APPROVER_CORPINFO_ID", entity.getString("BELONG_TO_CORP")); + nextNode.put("APPROVER_CORPINFO_NAME", entity.getString("BELONG_TO_CORP_NAME")); flowDetailMapper.save(nextNode); currentNode.put("STEP_FLAG", "0"); flowDetailMapper.edit(currentNode); @@ -419,6 +421,14 @@ public class XgfUserServiceImpl implements XgfUserService { PageData info = new PageData(); info.put("info", list); info.put("STEP", entity.getString("FLOWS_STEP")); + + condition.clear(); + condition.put("XGF_USER_ID", request.getString("XGF_USER_ID")); + PageData userInfo = xgfUserMapper.findById(condition); + if (userInfo == null || userInfo.size() == 0) { + throw new RuntimeException("未找到该用户详细信息"); + } + info.put("endFlag", userInfo.getString("CHECK_STATUS")); return info; } @@ -469,6 +479,9 @@ public class XgfUserServiceImpl implements XgfUserService { condition.clear(); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); PageData entity = xgfUserMapper.findById(condition); + flows.put("APPOINT_ZERO_TIME", DateUtil.getTime()); + flows.put("APPOINT_ZERO_STATUS", info.getString("STATUS")); + flows.put("APPOINT_ZERO_OPINION", info.getString("OPINION")); if ("0".equals(info.getString("STATUS"))) { entity.put("STATUS", "0"); entity.put("VALID_FLAG", "0"); @@ -482,25 +495,14 @@ public class XgfUserServiceImpl implements XgfUserService { throw new RuntimeException("请求失败"); } xgfUserMapper.edit(entity); - - flows.put("APPOINT_ZERO_TIME", DateUtil.getTime()); - flows.put("APPOINT_ZERO_STATUS", info.getString("STATUS")); - flows.put("APPOINT_ZERO_OPINION", info.getString("OPINION")); xgfFlowsMapper.edit(flows); 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")); - // TODO 企业端审批人 - flows.put("APPOINT_ONE_CORP_ID", ""); - flows.put("APPOINT_ONE_CORP_NAME", ""); flows.put("FLOWS_STEP", 1); xgfFlowsMapper.edit(flows); condition.clear(); @@ -516,6 +518,11 @@ public class XgfUserServiceImpl implements XgfUserService { condition.clear(); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); PageData entity = xgfUserMapper.findById(condition); + flows.put("APPOINT_ONE_CORP_ID", "1"); + flows.put("APPOINT_ONE_CORP_NAME", "秦港股份公司"); + flows.put("APPOINT_ONE_TIME", DateUtil.getTime()); + flows.put("APPOINT_ONE_STATUS", info.getString("STATUS")); + flows.put("APPOINT_ONE_OPINION", info.getString("OPINION")); if ("0".equals(info.getString("STATUS"))) { entity.put("STATUS", "0"); entity.put("VALID_FLAG", "0"); @@ -529,10 +536,6 @@ public class XgfUserServiceImpl implements XgfUserService { throw new RuntimeException("请求失败"); } xgfUserMapper.edit(entity); - - flows.put("APPOINT_ONE_TIME", DateUtil.getTime()); - flows.put("APPOINT_ONE_STATUS", info.getString("STATUS")); - flows.put("APPOINT_ONE_OPINION", info.getString("OPINION")); xgfFlowsMapper.edit(flows); return "0"; } else { @@ -548,11 +551,6 @@ public class XgfUserServiceImpl implements XgfUserService { flows.put("APPOINT_TWO_USER_ID", info.getString("APPOINT_USER_ID")); flows.put("APPOINT_TWO_USER_NAME", info.getString("APPOINT_USER_NAME")); flows.put("FLOWS_STEP", 2); - - flows.put("APPOINT_ONE_TIME", DateUtil.getTime()); - flows.put("APPOINT_ONE_STATUS", info.getString("STATUS")); - flows.put("APPOINT_ONE_OPINION", info.getString("OPINION")); - xgfFlowsMapper.edit(flows); return "0"; } else { @@ -561,12 +559,7 @@ public class XgfUserServiceImpl implements XgfUserService { entity.put("STATUS", "2"); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); xgfUserMapper.edit(entity); - - flows.put("APPOINT_ONE_TIME", DateUtil.getTime()); - flows.put("APPOINT_ONE_STATUS", info.getString("STATUS")); - flows.put("APPOINT_ONE_OPINION", info.getString("OPINION")); flows.put("FLOWS_STEP", 2); - xgfFlowsMapper.edit(flows); return "1"; } @@ -577,6 +570,11 @@ public class XgfUserServiceImpl implements XgfUserService { condition.clear(); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); PageData entity = xgfUserMapper.findById(condition); + flows.put("APPOINT_TWO_CORP_ID", Jurisdiction.getCORPINFO_ID()); + flows.put("APPOINT_TWO_CORP_NAME", "秦港股份公司"); + flows.put("APPOINT_TWO_TIME", DateUtil.getTime()); + flows.put("APPOINT_TWO_STATUS", info.getString("STATUS")); + flows.put("APPOINT_TWO_OPINION", info.getString("OPINION")); // 1、判断是否通过审核 if ("0".equals(info.getString("STATUS"))) { entity.put("STATUS", "0"); @@ -591,9 +589,6 @@ public class XgfUserServiceImpl implements XgfUserService { throw new RuntimeException("请求失败"); } xgfUserMapper.edit(entity); - flows.put("APPOINT_TWO_TIME", DateUtil.getTime()); - flows.put("APPOINT_TWO_STATUS", info.getString("STATUS")); - flows.put("APPOINT_TWO_OPINION", info.getString("OPINION")); xgfFlowsMapper.edit(flows); return "0"; } else { @@ -605,6 +600,7 @@ public class XgfUserServiceImpl implements XgfUserService { entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); entity.put("STATUS", "2"); xgfUserMapper.edit(entity); + xgfFlowsMapper.edit(flows); return "1"; case "1":// 集团单位审批,需要指定下一位人员进行审批 entity.put("CHECK_STATUS", 1); @@ -619,9 +615,6 @@ public class XgfUserServiceImpl implements XgfUserService { flows.put("APPOINT_THREE_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME")); flows.put("APPOINT_THREE_USER_ID", info.getString("APPOINT_USER_ID")); flows.put("APPOINT_THREE_USER_NAME", info.getString("APPOINT_USER_NAME")); - flows.put("APPOINT_TWO_TIME", DateUtil.getTime()); - flows.put("APPOINT_TWO_STATUS", info.getString("STATUS")); - flows.put("APPOINT_TWO_OPINION", info.getString("OPINION")); flows.put("FLOWS_STEP", 3); xgfFlowsMapper.edit(flows); return "0"; @@ -634,6 +627,11 @@ public class XgfUserServiceImpl implements XgfUserService { condition.clear(); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); PageData entity = xgfUserMapper.findById(condition); + flows.put("APPOINT_THREE_CORP_ID", "1"); + flows.put("APPOINT_THREE_CORP_NAME", "秦港股份公司"); + flows.put("APPOINT_THREE_TIME", DateUtil.getTime()); + flows.put("APPOINT_THREE_STATUS", info.getString("STATUS")); + flows.put("APPOINT_THREE_OPINION", info.getString("OPINION")); // 1、判断是否通过审核 if ("0".equals(info.getString("STATUS"))) { entity.put("STATUS", "0"); @@ -648,9 +646,6 @@ public class XgfUserServiceImpl implements XgfUserService { throw new RuntimeException("请求失败"); } xgfUserMapper.edit(entity); - flows.put("APPOINT_THREE_TIME", DateUtil.getTime()); - flows.put("APPOINT_THREE_STATUS", info.getString("STATUS")); - flows.put("APPOINT_THREE_OPINION", info.getString("OPINION")); xgfFlowsMapper.edit(flows); return "0"; } else { @@ -674,10 +669,6 @@ public class XgfUserServiceImpl implements XgfUserService { flows.put("APPOINT_FOUR_USER_ID", info.getString("APPOINT_USER_ID")); flows.put("APPOINT_FOUR_USER_NAME", info.getString("APPOINT_USER_NAME")); flows.put("FLOWS_STEP", 4); - - flows.put("APPOINT_THREE_TIME", DateUtil.getTime()); - flows.put("APPOINT_THREE_STATUS", info.getString("STATUS")); - flows.put("APPOINT_THREE_OPINION", info.getString("OPINION")); xgfFlowsMapper.edit(flows); return "0"; default: @@ -691,6 +682,11 @@ public class XgfUserServiceImpl implements XgfUserService { condition.clear(); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); PageData entity = xgfUserMapper.findById(condition); + flows.put("APPOINT_FOUR_CORP_ID", "1"); + flows.put("APPOINT_FOUR_CORP_NAME", "秦港股份公司"); + flows.put("APPOINT_FOUR_TIME", DateUtil.getTime()); + flows.put("APPOINT_FOUR_STATUS", info.getString("STATUS")); + flows.put("APPOINT_FOUR_OPINION", info.getString("OPINION")); // 1、判断是否通过审核 if ("0".equals(info.getString("STATUS"))) { entity.put("STATUS", "0"); @@ -705,9 +701,6 @@ public class XgfUserServiceImpl implements XgfUserService { throw new RuntimeException("请求失败"); } xgfUserMapper.edit(entity); - flows.put("APPOINT_FOUR_TIME", DateUtil.getTime()); - flows.put("APPOINT_FOUR_STATUS", info.getString("STATUS")); - flows.put("APPOINT_FOUR_OPINION", info.getString("OPINION")); xgfFlowsMapper.edit(flows); return "0"; } else { @@ -719,6 +712,7 @@ public class XgfUserServiceImpl implements XgfUserService { entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); entity.put("STATUS", "2"); xgfUserMapper.edit(entity); + xgfFlowsMapper.edit(flows); return "1"; case "1":// 辖区单位审批,需要指定审批人 entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); @@ -726,10 +720,6 @@ public class XgfUserServiceImpl implements XgfUserService { entity.put("VALID_FLAG", "1"); entity.put("STATUS", "2"); xgfUserMapper.edit(entity); - - flows.put("APPOINT_FOUR_TIME", DateUtil.getTime()); - flows.put("APPOINT_FOUR_STATUS", info.getString("STATUS")); - flows.put("APPOINT_FOUR_OPINION", info.getString("OPINION")); flows.put("FLOWS_STEP", 5); xgfFlowsMapper.edit(flows); return "1";