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 54c5ad9c..b629a65a 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -502,16 +502,17 @@ public class XgfUserServiceImpl implements XgfUserService { entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); xgfUserMapper.edit(entity); - flows.put("APPOINT_THREE_CORP_ID", info.getString("APPOINT_CORP_ID")); - flows.put("APPOINT_THREE_CORP_NAME", info.getString("APPOINT_CORP_NAME")); - flows.put("APPOINT_THREE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID")); - 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_FOUR_CORP_ID", info.getString("APPOINT_CORP_ID")); + flows.put("APPOINT_FOUR_CORP_NAME", info.getString("APPOINT_CORP_NAME")); + flows.put("APPOINT_FOUR_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID")); + flows.put("APPOINT_FOUR_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME")); + 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")); - flows.put("FLOWS_STEP", 4); xgfFlowsMapper.edit(flows); return "0"; default: @@ -540,21 +541,30 @@ public class XgfUserServiceImpl implements XgfUserService { } return "0"; } else { - entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); - xgfUserMapper.edit(entity); + // TODO 根据是否委托辖区单位进行处理(前端传回来) + switch (flows.getString("FLOWS_TYPE")) { + case "0":// 由股份端审批 + entity.put("CHECK_STATUS", 2); + entity.put("VALID_FLAG", "1"); + entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); + xgfUserMapper.edit(entity); + return "1"; + case "1":// 辖区单位审批,需要指定审批人 + entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); + entity.put("CHECK_STATUS", 2); + entity.put("VALID_FLAG", "1"); + entity.put("STATUS", "2"); + xgfUserMapper.edit(entity); - flows.put("APPOINT_FOUR_CORP_ID", info.getString("APPOINT_CORP_ID")); - flows.put("APPOINT_FOUR_CORP_NAME", info.getString("APPOINT_CORP_NAME")); - flows.put("APPOINT_FOUR_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID")); - flows.put("APPOINT_FOUR_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME")); - 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_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 "0"; + 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", 4); + xgfFlowsMapper.edit(flows); + return "1"; + default: + throw new RuntimeException("未知的审批类型"); + } } }