相关方流程记录功能开发

2024年2月1日V1.0.53
liujun 2024-01-30 12:03:01 +08:00
parent 48a42cd173
commit e4dccddf68
1 changed files with 37 additions and 47 deletions

View File

@ -198,8 +198,8 @@ public class XgfUserServiceImpl implements XgfUserService {
flowDetail.put("APPROVER_ID", ""); flowDetail.put("APPROVER_ID", "");
flowDetail.put("APPROVER_NAME", ""); flowDetail.put("APPROVER_NAME", "");
flowDetail.put("APPROVER_TIME", DateUtil.getTime()); flowDetail.put("APPROVER_TIME", DateUtil.getTime());
flowDetail.put("APPROVER_CORPINFO_ID", ""); flowDetail.put("APPROVER_CORPINFO_ID", entity.getString("BELONG_TO_CORP"));
flowDetail.put("APPROVER_CORPINFO_NAME", ""); flowDetail.put("APPROVER_CORPINFO_NAME", entity.getString("BELONG_TO_CORP_NAME"));
flowDetail.put("PASS_FLAG", "1"); flowDetail.put("PASS_FLAG", "1");
flowDetail.put("END_FLAG", "0"); flowDetail.put("END_FLAG", "0");
flowDetail.put("ISDELETE", "0"); flowDetail.put("ISDELETE", "0");
@ -221,6 +221,8 @@ public class XgfUserServiceImpl implements XgfUserService {
nextNode.put("APPROVER_ID", ""); nextNode.put("APPROVER_ID", "");
nextNode.put("APPROVER_NAME", ""); nextNode.put("APPROVER_NAME", "");
nextNode.put("APPROVER_OPINION", ""); 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); flowDetailMapper.save(nextNode);
currentNode.put("STEP_FLAG", "0"); currentNode.put("STEP_FLAG", "0");
flowDetailMapper.edit(currentNode); flowDetailMapper.edit(currentNode);
@ -419,6 +421,14 @@ public class XgfUserServiceImpl implements XgfUserService {
PageData info = new PageData(); PageData info = new PageData();
info.put("info", list); info.put("info", list);
info.put("STEP", entity.getString("FLOWS_STEP")); 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; return info;
} }
@ -469,6 +479,9 @@ public class XgfUserServiceImpl implements XgfUserService {
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition); 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"))) { if ("0".equals(info.getString("STATUS"))) {
entity.put("STATUS", "0"); entity.put("STATUS", "0");
entity.put("VALID_FLAG", "0"); entity.put("VALID_FLAG", "0");
@ -482,25 +495,14 @@ public class XgfUserServiceImpl implements XgfUserService {
throw new RuntimeException("请求失败"); throw new RuntimeException("请求失败");
} }
xgfUserMapper.edit(entity); 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); xgfFlowsMapper.edit(flows);
return "0"; return "0";
} else { } 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_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID")); 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_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
flows.put("APPOINT_ONE_USER_ID", info.getString("APPOINT_USER_ID")); 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_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); flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows); xgfFlowsMapper.edit(flows);
condition.clear(); condition.clear();
@ -516,6 +518,11 @@ public class XgfUserServiceImpl implements XgfUserService {
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition); 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"))) { if ("0".equals(info.getString("STATUS"))) {
entity.put("STATUS", "0"); entity.put("STATUS", "0");
entity.put("VALID_FLAG", "0"); entity.put("VALID_FLAG", "0");
@ -529,10 +536,6 @@ public class XgfUserServiceImpl implements XgfUserService {
throw new RuntimeException("请求失败"); throw new RuntimeException("请求失败");
} }
xgfUserMapper.edit(entity); 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); xgfFlowsMapper.edit(flows);
return "0"; return "0";
} else { } 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_ID", info.getString("APPOINT_USER_ID"));
flows.put("APPOINT_TWO_USER_NAME", info.getString("APPOINT_USER_NAME")); flows.put("APPOINT_TWO_USER_NAME", info.getString("APPOINT_USER_NAME"));
flows.put("FLOWS_STEP", 2); 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); xgfFlowsMapper.edit(flows);
return "0"; return "0";
} else { } else {
@ -561,12 +559,7 @@ public class XgfUserServiceImpl implements XgfUserService {
entity.put("STATUS", "2"); entity.put("STATUS", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
xgfUserMapper.edit(entity); 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); flows.put("FLOWS_STEP", 2);
xgfFlowsMapper.edit(flows); xgfFlowsMapper.edit(flows);
return "1"; return "1";
} }
@ -577,6 +570,11 @@ public class XgfUserServiceImpl implements XgfUserService {
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition); 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、判断是否通过审核 // 1、判断是否通过审核
if ("0".equals(info.getString("STATUS"))) { if ("0".equals(info.getString("STATUS"))) {
entity.put("STATUS", "0"); entity.put("STATUS", "0");
@ -591,9 +589,6 @@ public class XgfUserServiceImpl implements XgfUserService {
throw new RuntimeException("请求失败"); throw new RuntimeException("请求失败");
} }
xgfUserMapper.edit(entity); 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); xgfFlowsMapper.edit(flows);
return "0"; return "0";
} else { } else {
@ -605,6 +600,7 @@ public class XgfUserServiceImpl implements XgfUserService {
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("STATUS", "2"); entity.put("STATUS", "2");
xgfUserMapper.edit(entity); xgfUserMapper.edit(entity);
xgfFlowsMapper.edit(flows);
return "1"; return "1";
case "1":// 集团单位审批,需要指定下一位人员进行审批 case "1":// 集团单位审批,需要指定下一位人员进行审批
entity.put("CHECK_STATUS", 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_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
flows.put("APPOINT_THREE_USER_ID", info.getString("APPOINT_USER_ID")); 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_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); flows.put("FLOWS_STEP", 3);
xgfFlowsMapper.edit(flows); xgfFlowsMapper.edit(flows);
return "0"; return "0";
@ -634,6 +627,11 @@ public class XgfUserServiceImpl implements XgfUserService {
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition); 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、判断是否通过审核 // 1、判断是否通过审核
if ("0".equals(info.getString("STATUS"))) { if ("0".equals(info.getString("STATUS"))) {
entity.put("STATUS", "0"); entity.put("STATUS", "0");
@ -648,9 +646,6 @@ public class XgfUserServiceImpl implements XgfUserService {
throw new RuntimeException("请求失败"); throw new RuntimeException("请求失败");
} }
xgfUserMapper.edit(entity); 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); xgfFlowsMapper.edit(flows);
return "0"; return "0";
} else { } 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_ID", info.getString("APPOINT_USER_ID"));
flows.put("APPOINT_FOUR_USER_NAME", info.getString("APPOINT_USER_NAME")); flows.put("APPOINT_FOUR_USER_NAME", info.getString("APPOINT_USER_NAME"));
flows.put("FLOWS_STEP", 4); 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); xgfFlowsMapper.edit(flows);
return "0"; return "0";
default: default:
@ -691,6 +682,11 @@ public class XgfUserServiceImpl implements XgfUserService {
condition.clear(); condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition); 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、判断是否通过审核 // 1、判断是否通过审核
if ("0".equals(info.getString("STATUS"))) { if ("0".equals(info.getString("STATUS"))) {
entity.put("STATUS", "0"); entity.put("STATUS", "0");
@ -705,9 +701,6 @@ public class XgfUserServiceImpl implements XgfUserService {
throw new RuntimeException("请求失败"); throw new RuntimeException("请求失败");
} }
xgfUserMapper.edit(entity); 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); xgfFlowsMapper.edit(flows);
return "0"; return "0";
} else { } else {
@ -719,6 +712,7 @@ public class XgfUserServiceImpl implements XgfUserService {
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("STATUS", "2"); entity.put("STATUS", "2");
xgfUserMapper.edit(entity); xgfUserMapper.edit(entity);
xgfFlowsMapper.edit(flows);
return "1"; return "1";
case "1":// 辖区单位审批,需要指定审批人 case "1":// 辖区单位审批,需要指定审批人
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 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("VALID_FLAG", "1");
entity.put("STATUS", "2"); entity.put("STATUS", "2");
xgfUserMapper.edit(entity); 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); flows.put("FLOWS_STEP", 5);
xgfFlowsMapper.edit(flows); xgfFlowsMapper.edit(flows);
return "1"; return "1";