diff --git a/src/main/java/com/zcloud/controller/xgf/FlowTrainController.java b/src/main/java/com/zcloud/controller/xgf/FlowTrainController.java index 125f1f73..47df2e56 100644 --- a/src/main/java/com/zcloud/controller/xgf/FlowTrainController.java +++ b/src/main/java/com/zcloud/controller/xgf/FlowTrainController.java @@ -3,8 +3,10 @@ package com.zcloud.controller.xgf; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; +import com.zcloud.service.xgf.TrainUsersService; import com.zcloud.service.xgf.TrainingBatchService; import com.zcloud.util.*; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -29,9 +31,12 @@ public class FlowTrainController extends BaseController { @Resource private TrainingBatchService trainingbatchService; - @RequestMapping(value="/batchList") + @Resource + private TrainUsersService trainUsersService; + + @RequestMapping(value = "/batchList") @ResponseBody - public Object batchList(Page page) throws Exception{ + public Object batchList(Page page) throws Exception { Map map = new HashMap(); PageData pd = this.getPageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); @@ -45,37 +50,46 @@ public class FlowTrainController extends BaseController { return map; } - @RequestMapping(value="/batchUserList") + @RequestMapping(value = "/batchUserList") @ResponseBody - public Object batchUserList(Page page) throws Exception{ + public Object batchUserList(Page page) throws Exception { + PageData request = this.getPageData(); + PageData condition = new PageData(); + condition.put("TRAINING_BATCH_ID", request.get("TRAINING_BATCH_ID")); + page.setPd(condition); + List varList = trainingbatchService.batchUserlistPage(page); + + PageData response = new PageData(); + response.put("varList", varList); + response.put("page", page); + response.put("total", page.getTotalResult()); + response.put("result", "success"); + return response; + } + + @RequestMapping(value = "/batchAudit") + @ResponseBody + public Object batchAudit(Page page) throws Exception { PageData pd = new PageData(); pd = this.getPageData(); - Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/batchUserList" +getPageUrl(page), pd); + Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/audit", pd); return result; } - @RequestMapping(value="/batchAudit") - @ResponseBody - public Object batchAudit(Page page) throws Exception{ - PageData pd = new PageData(); - pd = this.getPageData(); - Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/audit" , pd); - return result; - } - - private String getPageUrl(Page page){ - return "?showCount=" +page.getShowCount() + "¤tPage=" + page.getUrlCurrentPage(); + private String getPageUrl(Page page) { + return "?showCount=" + page.getShowCount() + "¤tPage=" + page.getUrlCurrentPage(); } /** * 分公司端-相关方流动人员培训审核-查看用户信息 + * * @return * @throws Exception */ - @RequestMapping(value="/getUserDetailById") + @RequestMapping(value = "/getUserDetailById") @ResponseBody - public Object getCorpUserList() throws Exception{ - Map map = new HashMap(); + public Object getCorpUserList() throws Exception { + Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); @@ -83,24 +97,55 @@ public class FlowTrainController extends BaseController { return result; } - @RequestMapping(value="/approveUser") + @RequestMapping(value = "/approveUser") @ResponseBody - public Object approveUser() throws Exception{ - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("loginUserId",Jurisdiction.getUSER_ID()); - Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainusers/approveUser", pd); - return result; + public Object approveUser() throws Exception { + Map map = new HashMap(); + PageData pd = this.getPageData(); + trainUsersService.approveUser(pd); + map.put("result", "success"); + return map; } - @RequestMapping(value="/getDetailsById") + + @RequestMapping(value = "/getDetailsById") @ResponseBody - public Object getDetailsById() throws Exception{ - PageData pd = new PageData(); - pd = this.getPageData(); - if(!Jurisdiction.getUsername().equals("admin")){ - pd.put("AUDIT_USER_ID", Jurisdiction.getUSER_ID()); + public Object getDetailsById() throws Exception { + PageData request = this.getPageData(); + PageData condition = new PageData(); + condition.put("TRAINING_BATCH_ID", request.get("TRAINING_BATCH_ID")); + PageData entity = trainingbatchService.findById(condition); + switch (entity.getString("STEP_STATUS")) { + case "0": + if (entity.getString("TERRITORIALITY_USER_ID").equals(Jurisdiction.getUSER_ID())) { + entity.put("step", "TERRITORIALITY_STATE"); + } + break; + case "1": + if (entity.getString("MANAGER_USER_ID").equals(Jurisdiction.getUSER_ID())) { + entity.put("step", "MANAGER_STATE"); + } + break; + case "2": + if (entity.getString("SUPERVISION_USER_ID").equals(Jurisdiction.getUSER_ID())) { + entity.put("step", "SUPERVISION_STATE"); + } + break; + default: + break; } - Map result = HttpClientService.doPost(xgfUrl+ "/openApi/trainingbatch/getDetailsById", pd); - return result; + PageData response = new PageData(); + response.put("pd", entity); + response.put("result", "success"); + return response; + } + + @RequestMapping(value = "/endApproval") + @ResponseBody + public Object endApproval() throws Exception { + Map map = new HashMap(); + PageData pd = this.getPageData(); + trainUsersService.endApproval(pd); + map.put("result", "success"); + return map; } } diff --git a/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java b/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java index 20b35f30..d60b51cf 100644 --- a/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java @@ -57,7 +57,7 @@ public interface XgfUserMapper { void updateStatusByUnflowTrain(PageData pd); - void bantchUpdateStatus(int i, String[] userids); + void bantchUpdateStatus(int STATUS, String[] arrayDATA_ids); void updateStatusByFlowTrain(PageData pd); diff --git a/src/main/java/com/zcloud/service/xgf/TrainUsersService.java b/src/main/java/com/zcloud/service/xgf/TrainUsersService.java index b04c88f0..bba08ab6 100644 --- a/src/main/java/com/zcloud/service/xgf/TrainUsersService.java +++ b/src/main/java/com/zcloud/service/xgf/TrainUsersService.java @@ -92,8 +92,9 @@ public interface TrainUsersService{ * @param pd * @throws Exception */ - public Integer approveUser(PageData pd)throws Exception; + public void approveUser(PageData pd)throws Exception; List findinfoByCondition(PageData condition) throws Exception; + void endApproval(PageData pd) throws Exception; } diff --git a/src/main/java/com/zcloud/service/xgf/impl/TrainUsersServiceImpl.java b/src/main/java/com/zcloud/service/xgf/impl/TrainUsersServiceImpl.java index 786487f8..79aefcec 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/TrainUsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/TrainUsersServiceImpl.java @@ -144,162 +144,53 @@ public class TrainUsersServiceImpl implements TrainUsersService { } @Override - public Integer approveUser(PageData pd) throws Exception { - String type = pd.getString("type"); //1、集团单位,2、企业端,3、监管端 - String TRAINUSERS_ID = pd.getString("TRAINUSERS_ID"); //培训批次 详情id - String STATE = pd.getString("IS_STATE"); // 审批状态 0:不合格;1:合格; - - String OPINION = pd.getString("OPINION"); // 审批意见 - Integer userCount = Integer.parseInt(pd.getString("USER_COUNT")); // 批次的人数 - String[] userids = new String[1]; // 被审批人 - userids[0] = pd.getString("USER_ID"); - PageData trainusersPd = trainusersMapper.getPdById(pd); //培训 详情信息 - PageData appPd = new PageData(); - appPd.put("TRAINUSERS_ID", trainusersPd.getString("TRAINUSERS_ID")); - appPd.put("STATUS", "1"); - /*2023-12-06 liu jun 需求便跟*/ - PageData batch = trainingBatchMapper.findById(pd); - // 如果 - if ("0".equals(STATE)) { - appPd.put("STATUS", "-1"); - userids[0] = pd.getString("USER_ID"); - xgfUserMapper.bantchUpdateStatus(0, userids); - } - if (trainusersPd.get("STEP_STATUS") == null || trainusersPd.get("STEP_STATUS").equals("0")) { - if (pd.getString("loginUserId").equals(batch.getString("TERRITORIALITY_USER_ID"))) { - appPd.put("TERRITORIALITY_STATE", STATE); - appPd.put("TERRITORIALITY_OPINION", OPINION); - appPd.put("TERRITORIALITY_TIME", DateUtil.getTime()); - appPd.put("STEP_STATUS", "1"); - trainusersMapper.approveTerritoriality(appPd); - } else { - throw new RuntimeException("当前用户不是集团单位指定审批人,无法进行审批"); - } - } - if (trainusersPd.get("STEP_STATUS") != null && trainusersPd.get("STEP_STATUS").equals("1")) { - if (pd.getString("loginUserId").equals(batch.getString("MANAGER_USER_ID"))) { - appPd.put("MANAGER_STATE", STATE); - appPd.put("MANAGER_OPINION", OPINION); - appPd.put("MANAGER_TIME", DateUtil.getTime()); - appPd.put("STEP_STATUS", "2"); - trainusersMapper.approveManager(appPd); - } else { - throw new RuntimeException("当前用户不是股份主管部门指定审批人,无法进行审批"); - } - } - if (trainusersPd.get("STEP_STATUS") != null && trainusersPd.get("STEP_STATUS").equals("2")) { - if (pd.getString("loginUserId").equals(batch.getString("SUPERVISION_USER_ID"))) { - appPd.put("SUPERVISION_STATE", STATE); - appPd.put("SUPERVISION_OPINION", OPINION); - appPd.put("SUPERVISION_TIME", DateUtil.getTime()); - appPd.put("STEP_STATUS", "3"); - trainusersMapper.approveSupervision(appPd); - } else { - throw new RuntimeException("当前用户不是股份安监部门,无法进行审批"); - } - } - - /** 如果审批全部通过 */ - Integer stateCountInt = 0; //审批了几次, 如果是审批了3次.这个人审批完成 - Integer stateTongguoInt = 0; //审批通过次数 - String sate1 = trainusersPd.getString("SUPERVISION_STATE"); - String sate2 = trainusersPd.getString("MANAGER_STATE"); - String sate3 = trainusersPd.getString("TERRITORIALITY_STATE"); - if (!Tools.isEmpty(sate1)) { //如果有审批状态 就是审批过的数据 - stateCountInt++; - } - if (!Tools.isEmpty(sate2)) { //如果有审批状态 就是审批过的数据 - stateCountInt++; - } - if (!Tools.isEmpty(sate3)) { //如果有审批状态 就是审批过的数据 - stateCountInt++; - } - if ("1".equals(sate1)) { - stateTongguoInt++; - } - if ("1".equals(sate2)) { - stateTongguoInt++; - } - if ("1".equals(sate3)) { - stateTongguoInt++; - } - - //如果其中一个人打回,则结束审批流程 - if ("0".equals(STATE)) { - stateCountInt = 3; - } - if (3 == stateCountInt) { //这个人的审批全部 - PageData statePd = new PageData(); - statePd.put("TRAINUSERS_ID", TRAINUSERS_ID); - String STATUS = "-1"; //培训状态0未培训1培训中2培训通过-1培训未通过 - if (3 == stateTongguoInt) { - STATUS = "2"; - statePd.put("STATUS", STATUS); - trainusersMapper.updateStatus(statePd); - } - } - // 这个批次全部审批完成 - Integer wanchengPingshen = trainusersMapper.getCountByWanchengPingshen(trainusersPd); - - if (wanchengPingshen == userCount) { //已经审批的数据量 和 批次的人数一致的时候,修改批次的状态 - PageData trainingBatchPd = trainingBatchMapper.findById(trainusersPd); - trainingBatchPd.put("AUDIT_STATUS", "2"); //业务修改 ,现在只有 2培训中 3培训完成 - trainingBatchMapper.edit(trainingBatchPd); - } - - /*保存审批流*/ + public void approveUser(PageData pd) throws Exception { PageData condition = new PageData(); - condition.put("FOREIGN_KEY", trainusersPd.getString("TRAININGBATCH_ID")); - PageData flow = flowMapper.findByCondition(condition); - if (flow == null) { - System.out.println("历史数据======不做处理"); - } else { - condition.clear(); - condition.put("FLOW_ID", flow.getString("FLOW_ID")); - condition.put("FOREIGN_KEY", trainusersPd.getString("TRAINUSERS_ID")); - condition.put("STEP_FLAG", "1"); - PageData step = flowDetailMapper.selectOne(condition); - if (step == null) { - condition.clear(); - condition.put("FLOW_ID", flow.getString("FLOW_ID")); - condition.put("PARENT_ID", "0"); - step = flowDetailMapper.selectOne(condition); - } - step.put("STEP_FLAG", "0"); - flowDetailMapper.edit(step); - - PageData nextStep = new PageData(); - nextStep.put("FLOW_DETAIL_ID", Warden.get32UUID()); - nextStep.put("FLOW_ID", flow.getString("FLOW_ID")); - nextStep.put("STEP_FLAG", "1"); - nextStep.put("PARENT_ID", step.getString("FLOW_DETAIL_ID")); - nextStep.put("FOREIGN_KEY", trainusersPd.getString("TRAINUSERS_ID")); - nextStep.put("STEP_NAME", "培训审核"); - nextStep.put("SORT", (Integer) step.get("SORT") + 1); - nextStep.put("CREATE_TIME", DateUtil.date2Str(new Date())); - nextStep.put("APPROVER_ID", pd.getString("APPROVER_ID")); - nextStep.put("APPROVER_NAME", pd.getString("APPROVER_NAME")); - nextStep.put("APPROVER_OPINION", OPINION); - nextStep.put("APPROVER_TIME", DateUtil.getTime()); - nextStep.put("APPROVER_CORPINFO_ID", pd.getString("APPROVER_CORPINFO_ID")); - nextStep.put("APPROVER_CORPINFO_NAME", pd.getString("APPROVER_CORPINFO_NAME")); - nextStep.put("PASS_FLAG", STATE); - if (3 == stateCountInt) { - nextStep.put("IS_END", "1"); - } else { - nextStep.put("IS_END", "0"); - } - nextStep.put("ISDELETE", "0"); - nextStep.put("FOREIGN_KEY", trainusersPd.getString("TRAINUSERS_ID")); - flowDetailMapper.save(nextStep); + condition.put("TRAIN_USERS_ID", pd.get("TRAIN_USERS_ID")); + PageData userEntity = trainusersMapper.findById(condition); + switch (userEntity.getString("STEP_STATUS")){ + case "0": + userEntity.put("TERRITORIALITY_STATE", pd.getString("IS_STATE")); + userEntity.put("TERRITORIALITY_OPINION", pd.getString("OPINION")); + userEntity.put("TERRITORIALITY_TIME", DateUtil.getTime()); + break; + case "1": + userEntity.put("MANAGER_STATE", pd.getString("IS_STATE")); + userEntity.put("MANAGER_OPINION", pd.getString("OPINION")); + userEntity.put("MANAGER_TIME", DateUtil.getTime()); + break; + case "3": + userEntity.put("SUPERVISION_STATE", pd.getString("IS_STATE")); + userEntity.put("SUPERVISION_OPINION", pd.getString("OPINION")); + userEntity.put("SUPERVISION_TIME", DateUtil.getTime()); + break; } - - return 0; + if ("0".equals(pd.getString("IS_STATE"))) { + userEntity.put("STEP_STATUS", '-' + userEntity.getString("STEP_STATUS")); + userEntity.put("RESULT_STATUS","3"); + } else { + int stepNumber = Integer.parseInt(userEntity.getString("STEP_STATUS")) + 1; + if (stepNumber == 3){ + userEntity.put("RESULT_STATUS","2"); + } + userEntity.put("STEP_STATUS", Integer.toString(stepNumber)); + } + trainusersMapper.edit(userEntity); } @Override public List findinfoByCondition(PageData condition) throws Exception { return trainusersMapper.findinfoByCondition(condition); } + + @Override + public void endApproval(PageData pd) throws Exception { + PageData condition = new PageData(); + condition.put("TRAINING_BATCH_ID",pd.getString("TRAINING_BATCH_ID")); + PageData entity = trainingBatchMapper.findById(condition); + int stepNumber = Integer.parseInt(entity.getString("STEP_STATUS")); + entity.put("STEP_STATUS",++stepNumber); + trainingBatchMapper.edit(entity); + } } diff --git a/src/main/java/com/zcloud/service/xgf/impl/TrainingBatchServiceImpl.java b/src/main/java/com/zcloud/service/xgf/impl/TrainingBatchServiceImpl.java index a6d25eb7..71758050 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/TrainingBatchServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/TrainingBatchServiceImpl.java @@ -2,6 +2,7 @@ package com.zcloud.service.xgf.impl; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.system.DepartmentMapper; import com.zcloud.mapper.datasource.system.UsersMapper; import com.zcloud.mapper.datasource.xgf.*; import com.zcloud.service.xgf.TrainingBatchService; @@ -42,8 +43,11 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { @Resource private FlowDetailMapper flowDetailMapper; -// @Value("${prevention.api.url}") -// private String preventionUrl; + @Resource + private UsersMapper usersMapper; + + @Resource + private DepartmentMapper departmentMapper; /**新增 * @param pd @@ -53,7 +57,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { /* 保存主题信息 */ String batch_id=UuidUtil.get32UUID(); String train_area=pd.getString("TRAIN_AREA"); - pd.put("TRAININGBATCH_ID", batch_id); //主键 + pd.put("TRAINING_BATCH_ID", batch_id); //主键 pd.put("CREATOR", Jurisdiction.getUsername()); //添加人 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人 @@ -69,14 +73,45 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { PageData cpd = trainingbatchMapper.getCode(pd); //根据ID读取 String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString())+1)); pd.put("BATCH_NAME",code); + /*翻译*/ + PageData condition = new PageData(); + condition.put("USER_ID",pd.get("SUPERVISION_USER_ID")); + PageData supUser = usersMapper.getUserInfo(condition); + pd.put("SUPERVISION_USER_NAME",supUser.get("NAME")); + condition.clear(); + condition.put("DEPARTMENT_ID",pd.get("SUPERVISION")); + PageData supDepartment = departmentMapper.getInfo(condition); + pd.put("SUPERVISION_DEPARTMENT_NAME",supDepartment.get("NAME")); + + condition.clear(); + condition.put("USER_ID",pd.get("MANAGER_USER_ID")); + PageData manUser = usersMapper.getUserInfo(condition); + pd.put("MANAGER_USER_NAME",manUser.get("NAME")); + + condition.clear(); + condition.put("DEPARTMENT_ID",pd.get("MANAGER")); + PageData manDepartment = departmentMapper.getInfo(condition); + pd.put("MANAGER_DEPARTMENT_NAME",manDepartment.get("NAME")); + + condition.clear(); + condition.put("USER_ID",pd.get("TERRITORIALITY_USER_ID")); + PageData terUser = usersMapper.getUserInfo(condition); + pd.put("TERRITORIALITY_USER_NAME",terUser.get("NAME")); + + condition.clear(); + condition.put("DEPARTMENT_ID",pd.get("TERRITORIALITY")); + PageData terDepartment = departmentMapper.getInfo(condition); + pd.put("TERRITORIALITY_DEPARTMENT_NAME",terDepartment.get("NAME")); + pd.put("IS_DELETE","0"); + pd.put("STEP_STATUS","0"); trainingbatchMapper.save(pd); - String ArrayDATA_IDS[] = pd.getString("users").split(","); - Arrays.asList(ArrayDATA_IDS).forEach(id -> { + String arrayDATA_ids[] = pd.getString("users").split(","); + Arrays.asList(arrayDATA_ids).forEach(id -> { PageData user = new PageData(); - user.put("TRAINUSERS_ID", UuidUtil.get32UUID()); - user.put("TRAININGBATCH_ID", batch_id); + user.put("TRAIN_USERS_ID", UuidUtil.get32UUID()); + user.put("TRAINING_BATCH_ID", batch_id); user.put("USER_ID", id); user.put("TRAIN_AREA", train_area); user.put("STATUS", 0); @@ -84,9 +119,18 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { user.put("MANAGER_STATE", 9); user.put("TERRITORIALITY_STATE", 9); user.put("STEP_STATUS", "0"); + user.put("BELONG_TO_CORP",pd.get("BELONG_TO_CORP")); + user.put("BELONG_TO_CORP_NAME",pd.get("BELONG_TO_CORP_NAME")); + user.put("IS_DELETE", "0"); + user.put("RESULT_STATUS","1"); trainUsersMapper.save(user); + condition.clear(); + condition.put("XGF_USER_ID",id); + PageData userEntity = xgfUserMapper.findById(condition); + userEntity.put("STATUS","3"); + userEntity.put("STUDY_STATUS","9"); + xgfUserMapper.edit(userEntity); }); - xgfUserMapper.bantchUpdateStatus(9,ArrayDATA_IDS); /* 保存审批流程信息 */ PageData flow = new PageData(); @@ -96,7 +140,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { flow.put("CREATOR_NAME",Jurisdiction.getName()); flow.put("CREATOR_TIME", DateUtil.getTime()); flow.put("VALID_FLAG", "1"); - flow.put("FOREIGN_KEY",pd.getString("TRAININGBATCH_ID")); + flow.put("FOREIGN_KEY",pd.getString("TRAINING_BATCH_ID")); flow.put("ISDELETE", "0"); flowMapper.save(flow); /* 保存审批流程明细信息 */ @@ -125,7 +169,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { public void unflowTrain(PageData pd)throws Exception{ PageData trainBatch = new PageData(); String batch_id = UuidUtil.get32UUID(); - trainBatch.put("TRAININGBATCH_ID", batch_id); //主键 + trainBatch.put("TRAINING_BATCH_ID", batch_id); //主键 trainBatch.put("CREATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //添加人 trainBatch.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 trainBatch.put("OPERATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //修改人 @@ -150,11 +194,11 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { trainBatch.put("AUDIT_STATUS", "2"); this.audit(trainBatch); - String ArrayDATA_IDS[] = pd.getString("users").split(","); - Arrays.asList(ArrayDATA_IDS).forEach(id -> { + String arrayDATA_IDS[] = pd.getString("users").split(","); + Arrays.asList(arrayDATA_IDS).forEach(id -> { PageData user = new PageData(); - user.put("TRAINUSERS_ID", UuidUtil.get32UUID()); - user.put("TRAININGBATCH_ID", batch_id); + user.put("TRAIN_USERS_ID", UuidUtil.get32UUID()); + user.put("TRAINING_BATCH_ID", batch_id); user.put("USER_ID", id); user.put("TRAIN_CORPINFO_ID", pd.getString("FIRST_PARTY_ID")); user.put("STATUS", 1); @@ -165,7 +209,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { user.put("STEP_STATUS", "0"); trainUsersMapper.save(user); }); - xgfUserMapper.bantchUpdateStatus(1,ArrayDATA_IDS); + xgfUserMapper.bantchUpdateStatus(1,arrayDATA_IDS); } @@ -278,7 +322,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { condition.clear(); condition.put("STATUS",info.getString("detailsStatus")); - condition.put("list",list.stream().filter(n -> "1".equals(n.getString("STATUS"))).map(n -> n.getString("TRAINUSERS_ID")).collect(Collectors.toList())); + condition.put("list",list.stream().filter(n -> "1".equals(n.getString("STATUS"))).map(n -> n.getString("TRAIN_USERS_ID")).collect(Collectors.toList())); trainUsersMapper.graduation(condition); } @@ -293,7 +337,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { condition.clear(); condition.put("STATUS",info.getString("detailsStatus")); - condition.put("TRAINUSERS_ID", info.getString("TRAINUSERS_ID")); + condition.put("TRAIN_USERS_ID", info.getString("TRAIN_USERS_ID")); trainUsersMapper.graduationstudent(condition); } @@ -302,7 +346,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { public void updateClassMessage(PageData info) { List list = Warden.getList(info.getString("list")); PageData condition = new PageData(); - condition.put("list", list.stream().map(n -> n.getString("TRAINUSERS_ID")).collect(Collectors.toList())); + condition.put("list", list.stream().map(n -> n.getString("TRAIN_USERS_ID")).collect(Collectors.toList())); if (StringUtils.isNotEmpty(info.getString("START_DATE"))){ condition.put("START_DATE",DateUtil.getTime()); } diff --git a/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml b/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml index c3e402d7..4a663f1e 100644 --- a/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml @@ -1,6 +1,6 @@ - + diff --git a/src/main/resources/mybatis/datasource/xgf/TrainUsersMapper.xml b/src/main/resources/mybatis/datasource/xgf/TrainUsersMapper.xml index 1486b8ba..0c20cab8 100644 --- a/src/main/resources/mybatis/datasource/xgf/TrainUsersMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/TrainUsersMapper.xml @@ -4,7 +4,7 @@ - BUS_TRAINUSERS + xgf_train_users @@ -14,7 +14,7 @@ - f.TRAININGBATCH_ID, + f.TRAINING_BATCH_ID, f.USER_ID, f.START_DATE, f.END_DATE, @@ -30,13 +30,17 @@ f.TERRITORIALITY_STATE, f.TERRITORIALITY_OPINION, f.TERRITORIALITY_TIME, - f.TRAINUSERS_ID, - f.STEP_STATUS + f.TRAIN_USERS_ID, + f.STEP_STATUS, + f.BELONG_TO_CORP + f.BELONG_TO_CORP_NAME, + f.IS_DELETE, + f.RESULT_STATUS - TRAININGBATCH_ID, + TRAINING_BATCH_ID, USER_ID, START_DATE, END_DATE, @@ -52,13 +56,17 @@ TERRITORIALITY_STATE, TERRITORIALITY_OPINION, TERRITORIALITY_TIME, - TRAINUSERS_ID, - STEP_STATUS + TRAIN_USERS_ID, + STEP_STATUS, + BELONG_TO_CORP, + BELONG_TO_CORP_NAME, + IS_DELETE, + RESULT_STATUS - #{TRAININGBATCH_ID}, + #{TRAINING_BATCH_ID}, #{USER_ID}, #{START_DATE}, #{END_DATE}, @@ -74,8 +82,12 @@ #{TERRITORIALITY_STATE}, #{TERRITORIALITY_OPINION}, #{TERRITORIALITY_TIME}, - #{TRAINUSERS_ID}, - #{STEP_STATUS} + #{TRAIN_USERS_ID}, + #{STEP_STATUS}, + #{BELONG_TO_CORP}, + #{BELONG_TO_CORP_NAME}, + #{IS_DELETE}, + #{RESULT_STATUS} @@ -96,7 +108,7 @@ set ISDELETE = '1' where - TRAINUSERS_ID = #{TRAINUSERS_ID} + TRAIN_USERS_ID = #{TRAIN_USERS_ID} @@ -104,35 +116,34 @@ update set - TRAININGBATCH_ID = #{TRAININGBATCH_ID}, + TRAINING_BATCH_ID= #{TRAINING_BATCH_ID}, USER_ID = #{USER_ID}, START_DATE = #{START_DATE}, END_DATE = #{END_DATE}, STATUS = #{STATUS}, + TRAIN_CORPINFO_ID = #{TRAIN_CORPINFO_ID}, TRAIN_AREA = #{TRAIN_AREA}, + SUPERVISION_STATE = #{SUPERVISION_STATE}, + SUPERVISION_OPINION = #{SUPERVISION_OPINION}, + SUPERVISION_TIME = #{SUPERVISION_TINE}, + MANAGER_STATE = #{MANAGER_STATE}, + MANAGER_OPINION = #{MANAGER_OPINION}, + MANAGER_TIME = #{MANAGER_TIME}, + TERRITORIALITY_STATE = #{TERRITORIALITY_STATE}, + TERRITORIALITY_OPINION = #{TERRITORIALITY_OPINION}, + TERRITORIALITY_TIME = #{TERRITORIALITY_TIME}, STEP_STATUS = #{STEP_STATUS}, - TRAINUSERS_ID = TRAINUSERS_ID + BELONG_TO_CORP = #{BELONG_TO_CORP}, + BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME}, + IS_DELETE = #{IS_DELETE}, + RESULT_STATUS = #{RESULT_STATUS} where - TRAINUSERS_ID = #{TRAINUSERS_ID} + TRAIN_USERS_ID = #{TRAIN_USERS_ID} @@ -204,7 +215,7 @@ left join bus_corpinfo c on c.CORPINFO_ID = u.CORPINFO_ID left join vi_corp_info vc on vc.CORPINFO_ID = f.TRAIN_CORPINFO_ID left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID - where f.TRAININGBATCH_ID is null + where f.TRAINING_BATCH_ID is null and ( @@ -232,7 +243,7 @@ set ISDELETE = '1' where - TRAINUSERS_ID in + TRAIN_USERS_ID in #{item} @@ -249,15 +260,15 @@ END_DATE = #{END_DATE}, - TRAININGBATCH_ID = #{TRAININGBATCH_ID} + TRAINING_BATCH_ID = #{TRAINING_BATCH_ID} where - TRAININGBATCH_ID = #{TRAININGBATCH_ID} + TRAINING_BATCH_ID = #{TRAINING_BATCH_ID} @@ -421,7 +432,7 @@ f where - f.TRAINUSERS_ID = #{TRAINUSERS_ID} + f.TRAIN_USERS_ID = #{TRAIN_USERS_ID} @@ -299,7 +254,7 @@ set ISDELETE = '1' where - TRAININGBATCH_ID in + TRAINING_BATCH_ID in #{item} @@ -314,51 +269,27 @@ diff --git a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml index 3ab8dcc0..1517d39d 100644 --- a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml @@ -20,7 +20,8 @@ f.CORPINFO_ID, f.STATUS, f.OPERATOR_TIME, - f.ISFLOW + f.ISFLOW, + f.STUDY_STATUS @@ -36,7 +37,8 @@ CORPINFO_ID, STATUS, OPERATOR_TIME, - ISFLOW + ISFLOW, + STUDY_STATUS @@ -52,7 +54,8 @@ #{CORPINFO_ID}, #{STATUS}, #{OPERATOR_TIME}, - #{ISFLOW} + #{ISFLOW}, + #{STUDY_STATUS} @@ -91,7 +94,8 @@ CORPINFO_ID = #{CORPINFO_ID}, STATUS = #{STATUS}, OPERATOR_TIME = #{OPERATOR_TIME}, - ISFLOW = #{ISFLOW} + ISFLOW = #{ISFLOW}, + STUDY_STATUS = #{STUDY_STATUS} where XGF_USER_ID = #{XGF_USER_ID} @@ -106,7 +110,7 @@ update - set STATUS = #{STATUS} + set STUDY_STATUS = #{STATUS} where XGF_USER_ID in @@ -194,7 +198,7 @@