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 b881982f..ba0b55c6 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -78,7 +78,7 @@ public class XgfUserServiceImpl implements XgfUserService { x.put("VALID_FLAG", "1"); x.put("STATUS", "1"); x.put("CHECK_STATUS", "0"); - x.put("CHECK_STEP", 1); + x.put("CHECK_STEP", 0); x.put("CREATED_TIME", DateUtil.getTime()); x.put("OPERATOR_TIME", DateUtil.getTime()); x.put("IS_DELETE", "0"); @@ -126,7 +126,7 @@ public class XgfUserServiceImpl implements XgfUserService { x.put("VALID_FLAG", "1"); x.put("STATUS", "1"); x.put("CHECK_STATUS", "0"); - x.put("CHECK_STEP", 1); + x.put("CHECK_STEP", 0); if ("2".equals(x.getString("STUDY_STATUS"))) { x.put("STUDY_STATUS", "2"); } else { @@ -144,34 +144,25 @@ public class XgfUserServiceImpl implements XgfUserService { if (flows == null || flows.size() <= 0) { flows = new PageData(); flows.put("FLOWS_ID", x.getString("USER_ID")); - flows.put("FLOWS_STEP", 1); + flows.put("FLOWS_STEP", 0); flows.put("FOREIGN_KEY_ID", x.getString("USER_ID")); flows.put("FOREIGN_KEY_NAME", "xgf_user=>XGF_USER_ID"); - flows.put("APPOINT_ZERO_CORP_ID", x.getString("CORPINFO_ID")); - condition.clear(); - condition.put("CORPINFO_ID", x.getString("CORPINFO_ID")); - PageData corpInfo = corpInfoMapper.findById(condition); - if (corpInfo != null && corpInfo.size() > 0) { - flows.put("APPOINT_ZERO_CORP_NAME", corpInfo.getString("NAME")); - } - flows.put("APPOINT_ZERO_DEPARTMENT_ID", x.getString("APPOINT_ZERO_DEPARTMENT_ID")); - flows.put("APPOINT_ZERO_DEPARTMENT_NAME", x.getString("APPOINT_ZERO_DEPARTMENT_NAME")); - flows.put("APPOINT_ZERO_USER_ID", x.getString("APPOINT_ZERO_USER_ID")); - flows.put("APPOINT_ZERO_USER_NAME", x.getString("APPOINT_ZERO_USER_NAME")); + flows.put("IS_DELETE", "0"); + flows.put("APPOINT_ZERO_CORP_ID", x.getString("APPOINT_CORP_ID")); + flows.put("APPOINT_ZERO_CORP_NAME", x.getString("APPOINT_CORP_NAME")); + flows.put("APPOINT_ZERO_DEPARTMENT_ID", x.getString("APPOINT_DEPARTMENT_ID")); + flows.put("APPOINT_ZERO_DEPARTMENT_NAME", x.getString("APPOINT_DEPARTMENT_NAME")); + flows.put("APPOINT_ZERO_USER_ID", x.getString("APPOINT_USER_ID")); + flows.put("APPOINT_ZERO_USER_NAME", x.getString("APPOINT_USER_NAME")); xgfFlowsMapper.save(flows); } else { - flows.put("APPOINT_ZERO_CORP_ID", x.getString("CORPINFO_ID")); - flows.put("FLOWS_STEP", 1); - condition.clear(); - condition.put("CORPINFO_ID", x.getString("CORPINFO_ID")); - PageData corpInfo = corpInfoMapper.findById(condition); - if (corpInfo != null && corpInfo.size() > 0) { - flows.put("APPOINT_ZERO_CORP_NAME", corpInfo.getString("NAME")); - } - flows.put("APPOINT_ZERO_DEPARTMENT_ID", x.getString("APPOINT_ZERO_DEPARTMENT_ID")); - flows.put("APPOINT_ZERO_DEPARTMENT_NAME", x.getString("APPOINT_ZERO_DEPARTMENT_NAME")); - flows.put("APPOINT_ZERO_USER_ID", x.getString("APPOINT_ZERO_USER_ID")); - flows.put("APPOINT_ZERO_USER_NAME", x.getString("APPOINT_ZERO_USER_NAME")); + flows.put("FLOWS_STEP", 0); + flows.put("APPOINT_ZERO_CORP_NAME", x.getString("APPOINT_CORP_NAME")); + flows.put("APPOINT_ZERO_CORP_ID", x.getString("APPOINT_CORP_ID")); + flows.put("APPOINT_ZERO_DEPARTMENT_ID", x.getString("APPOINT_DEPARTMENT_ID")); + flows.put("APPOINT_ZERO_DEPARTMENT_NAME", x.getString("APPOINT_DEPARTMENT_NAME")); + flows.put("APPOINT_ZERO_USER_ID", x.getString("APPOINT_USER_ID")); + flows.put("APPOINT_ZERO_USER_NAME", x.getString("APPOINT_USER_NAME")); xgfFlowsMapper.edit(flows); } /* 3、流程记录 */ @@ -372,6 +363,19 @@ public class XgfUserServiceImpl implements XgfUserService { void handle(PageData info, PageData flows) throws Exception{ switch (Integer.parseInt(flows.get("FLOWS_STEP").toString())) { + case 0: + flows.put("APPOINT_ZERO_CORP_ID", info.getString("APPOINT_CORP_ID")); + flows.put("APPOINT_ZERO_CORP_NAME", info.getString("APPOINT_CORP_NAME")); + flows.put("APPOINT_ZERO_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID")); + flows.put("APPOINT_ZERO_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME")); + flows.put("APPOINT_ZERO_USER_ID", info.getString("APPOINT_USER_ID")); + flows.put("APPOINT_ZERO_USER_NAME", info.getString("APPOINT_USER_NAME")); + 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("FLOWS_STEP", 1); + xgfFlowsMapper.edit(flows); + break; case 1: flows.put("APPOINT_ONE_CORP_ID", info.getString("APPOINT_CORP_ID")); flows.put("APPOINT_ONE_CORP_NAME", info.getString("APPOINT_CORP_NAME")); diff --git a/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml b/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml index 4a663f1e..238c3b06 100644 --- a/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml @@ -28,7 +28,8 @@ f.END_FLAG, f.ISDELETE, f.PARENT_ID, - f.FOREIGN_KEY + f.FOREIGN_KEY, + f.SORT @@ -47,7 +48,8 @@ END_FLAG, ISDELETE, PARENT_ID, - FOREIGN_KEY + FOREIGN_KEY, + SORT @@ -66,7 +68,8 @@ #{END_FLAG}, #{ISDELETE}, #{PARENT_ID}, - #{FOREIGN_KEY} + #{FOREIGN_KEY}, + #{SORT} @@ -104,8 +107,9 @@ END_FLAG = #{END_FLAG}, ISDELETE = #{ISDELETE}, PARENT_ID = #{PARENT_ID}, - FOREIGN_ID = #{FOREIGN_ID}, + FOREIGN_KEY = #{FOREIGN_KEY}, STEP_NAME = #{STEP_NAME}, + SORT = #{SORT} where FLOW_DETAIL_ID = #{FLOW_DETAIL_ID} @@ -125,8 +129,8 @@ and a.PARENT_ID = #{PARENT_ID} - - and a.FOREIGN_ID = #{FOREIGN_ID} + + and a.FOREIGN_KEY = #{FOREIGN_KEY} diff --git a/src/main/resources/mybatis/datasource/xgf/FlowMapper.xml b/src/main/resources/mybatis/datasource/xgf/FlowMapper.xml index 94da1851..c0ab1b4e 100644 --- a/src/main/resources/mybatis/datasource/xgf/FlowMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/FlowMapper.xml @@ -20,7 +20,8 @@ f.CREATOR_NAME, f.CREATOR_TIME, f.VALID_FLAG, - f.FOREIGN_KEY + f.FOREIGN_KEY, + f.ISDELETE @@ -31,7 +32,8 @@ CREATOR_NAME, CREATOR_TIME, VALID_FLAG, - FOREIGN_KEY + FOREIGN_KEY, + ISDELETE @@ -42,7 +44,8 @@ #{CREATOR_NAME}, #{CREATOR_TIME}, #{VALID_FLAG}, - #{FOREIGN_KEY} + #{FOREIGN_KEY}, + #{ISDELETE} @@ -74,6 +77,7 @@ CREATOR_NAME = #{CREATOR_NAME}, CREATOR_TIME = #{CREATOR_TIME}, VALID_FLAG = #{VALID_FLAG}, + ISDELETE = #{ISDELETE}, FOREIGN_KEY = FOREIGN_KEY where FLOW_ID = #{FLOW_ID} diff --git a/src/main/resources/mybatis/datasource/xgf/XgfFlowsMapper.xml b/src/main/resources/mybatis/datasource/xgf/XgfFlowsMapper.xml index a9f52371..ff7f5e4a 100644 --- a/src/main/resources/mybatis/datasource/xgf/XgfFlowsMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/XgfFlowsMapper.xml @@ -1,6 +1,6 @@ - + xgf_flows @@ -320,7 +320,7 @@ APPOINT_SEVEN_USER_NAME = #{APPOINT_SEVEN_USER_NAME}, APPOINT_SEVEN_STATUS = #{APPOINT_SEVEN_STATUS}, APPOINT_SEVEN_OPINION = #{APPOINT_SEVEN_OPINION} - where a.FLOWS_ID = #{FLOWS_ID} + where FLOWS_ID = #{FLOWS_ID} diff --git a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml index 9a021c38..fd91dc5a 100644 --- a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml @@ -325,11 +325,13 @@ a.BELONG_TO_CORP_NAME, a.USERNAME, a.NAME, + a.CHECK_STEP, c.* from xgf_user a left join xgf_flows c on a.XGF_USER_ID = c.FLOWS_ID where a.IS_DELETE = '0' - and (c.APPOINT_ONE_USER_ID = #{pd.USER_ID} + and (c.APPOINT_ZERO_USER_ID = #{pd.USER_ID} + or c.APPOINT_ONE_USER_ID = #{pd.USER_ID} or c.APPOINT_TWO_USER_ID = #{pd.USER_ID} or c.APPOINT_THREE_USER_ID = #{pd.USER_ID} or c.APPOINT_FOUR_USER_ID = #{pd.USER_ID}