查看bug修复

pull/5/head
liujun 2023-12-21 19:55:08 +08:00
parent f59d2b0500
commit 644ee59398
4 changed files with 359 additions and 332 deletions

View File

@ -28,363 +28,384 @@ import java.util.stream.Collectors;
@Transactional //开启事物 @Transactional //开启事物
public class TrainingBatchServiceImpl implements TrainingBatchService { public class TrainingBatchServiceImpl implements TrainingBatchService {
@Resource @Resource
private TrainingBatchMapper trainingbatchMapper; private TrainingBatchMapper trainingbatchMapper;
@Resource @Resource
private TrainUsersMapper trainUsersMapper; private TrainUsersMapper trainUsersMapper;
@Resource @Resource
private XgfUserMapper xgfUserMapper; private XgfUserMapper xgfUserMapper;
@Resource @Resource
private FlowMapper flowMapper; private FlowMapper flowMapper;
@Resource @Resource
private FlowDetailMapper flowDetailMapper; private FlowDetailMapper flowDetailMapper;
@Resource @Resource
private UsersMapper usersMapper; private UsersMapper usersMapper;
@Resource @Resource
private DepartmentMapper departmentMapper; private DepartmentMapper departmentMapper;
/** /**
* @param pd *
* @throws Exception *
*/ * @param pd
public void save(PageData pd)throws Exception{ * @throws Exception
/* 保存主题信息 */ */
String batch_id=UuidUtil.get32UUID(); public void save(PageData pd) throws Exception {
String train_area=pd.getString("TRAIN_AREA"); /* 保存主题信息 */
pd.put("TRAINING_BATCH_ID", batch_id); //主键 String batch_id = UuidUtil.get32UUID();
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人 String train_area = pd.getString("TRAIN_AREA");
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("TRAINING_BATCH_ID", batch_id); //主键
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人 pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("ISDELETE", 0); //是否删除 1-是 0-否 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("ISDELETE", 0); //是否删除 1-是 0-否
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
DecimalFormat dft=new DecimalFormat("00"); DecimalFormat dft = new DecimalFormat("00");
int year = calendar.get(Calendar.YEAR); int year = calendar.get(Calendar.YEAR);
String month = dft.format(calendar.get(Calendar.MONTH) + 1); String month = dft.format(calendar.get(Calendar.MONTH) + 1);
pd.put("CREATDATE",year + "-" + month); pd.put("CREATDATE", year + "-" + month);
PageData cpd = trainingbatchMapper.getCode(pd); //根据ID读取 PageData cpd = trainingbatchMapper.getCode(pd); //根据ID读取
String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString())+1)); String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString()) + 1));
pd.put("BATCH_NAME",code); pd.put("BATCH_NAME", code);
/*翻译*/ /*翻译*/
PageData condition = new PageData(); PageData condition = new PageData();
condition.put("USER_ID",pd.get("SUPERVISION_USER_ID")); condition.put("USER_ID", pd.get("SUPERVISION_USER_ID"));
PageData supUser = usersMapper.getUserInfo(condition); PageData supUser = usersMapper.getUserInfo(condition);
pd.put("SUPERVISION_USER_NAME",supUser.get("NAME")); pd.put("SUPERVISION_USER_NAME", supUser.get("NAME"));
condition.clear(); condition.clear();
condition.put("DEPARTMENT_ID",pd.get("SUPERVISION")); condition.put("DEPARTMENT_ID", pd.get("SUPERVISION"));
PageData supDepartment = departmentMapper.getInfo(condition); PageData supDepartment = departmentMapper.getInfo(condition);
pd.put("SUPERVISION_DEPARTMENT_NAME",supDepartment.get("NAME")); pd.put("SUPERVISION_DEPARTMENT_NAME", supDepartment.get("NAME"));
condition.clear(); condition.clear();
condition.put("USER_ID",pd.get("MANAGER_USER_ID")); condition.put("USER_ID", pd.get("MANAGER_USER_ID"));
PageData manUser = usersMapper.getUserInfo(condition); PageData manUser = usersMapper.getUserInfo(condition);
pd.put("MANAGER_USER_NAME",manUser.get("NAME")); pd.put("MANAGER_USER_NAME", manUser.get("NAME"));
condition.clear(); condition.clear();
condition.put("DEPARTMENT_ID",pd.get("MANAGER")); condition.put("DEPARTMENT_ID", pd.get("MANAGER"));
PageData manDepartment = departmentMapper.getInfo(condition); PageData manDepartment = departmentMapper.getInfo(condition);
pd.put("MANAGER_DEPARTMENT_NAME",manDepartment.get("NAME")); pd.put("MANAGER_DEPARTMENT_NAME", manDepartment.get("NAME"));
condition.clear(); // 2023-12-21 相关方功能限制,暂时移除集团单位审批节点 created by sparrow
condition.put("USER_ID",pd.get("TERRITORIALITY_USER_ID")); if (StringUtils.isNotEmpty(pd.getString("TERRITORIALITY_USER_ID"))) {
PageData terUser = usersMapper.getUserInfo(condition); condition.clear();
pd.put("TERRITORIALITY_USER_NAME",terUser.get("NAME")); condition.put("USER_ID", pd.get("TERRITORIALITY_USER_ID"));
PageData terUser = usersMapper.getUserInfo(condition);
pd.put("TERRITORIALITY_USER_NAME", terUser == null ? "" : terUser.get("NAME"));
condition.clear(); condition.clear();
condition.put("DEPARTMENT_ID",pd.get("TERRITORIALITY")); condition.put("DEPARTMENT_ID", pd.get("TERRITORIALITY"));
PageData terDepartment = departmentMapper.getInfo(condition); PageData terDepartment = departmentMapper.getInfo(condition);
pd.put("TERRITORIALITY_DEPARTMENT_NAME",terDepartment.get("NAME")); pd.put("TERRITORIALITY_DEPARTMENT_NAME", terDepartment == null ? "" : terDepartment.get("NAME"));
pd.put("IS_DELETE","0"); }
pd.put("STEP_STATUS","0");
trainingbatchMapper.save(pd);
String arrayDATA_ids[] = pd.getString("users").split(","); pd.put("IS_DELETE", "0");
Arrays.asList(arrayDATA_ids).forEach(id -> { pd.put("STEP_STATUS", "1");
PageData user = new PageData(); trainingbatchMapper.save(pd);
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);
user.put("SUPERVISION_STATE", 9);
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);
});
/* 保存审批流程信息 */ String arrayDATA_ids[] = pd.getString("users").split(",");
PageData flow = new PageData(); Arrays.asList(arrayDATA_ids).forEach(id -> {
flow.put("FLOW_ID", Warden.get32UUID()); PageData user = new PageData();
flow.put("TYPE", "0"); user.put("TRAIN_USERS_ID", UuidUtil.get32UUID());
flow.put("CREATOR",Jurisdiction.getUSER_ID()); user.put("TRAINING_BATCH_ID", batch_id);
flow.put("CREATOR_NAME",Jurisdiction.getName()); user.put("USER_ID", id);
flow.put("CREATOR_TIME", DateUtil.getTime()); user.put("TRAIN_AREA", train_area);
flow.put("VALID_FLAG", "1"); user.put("STATUS", 0);
flow.put("FOREIGN_KEY",pd.getString("TRAINING_BATCH_ID")); user.put("SUPERVISION_STATE", 9);
flow.put("ISDELETE", "0"); user.put("MANAGER_STATE", 9);
flowMapper.save(flow); user.put("TERRITORIALITY_STATE", 9);
/* 保存审批流程明细信息 */ user.put("STEP_STATUS", "1");
PageData flowDetail = new PageData(); user.put("BELONG_TO_CORP", pd.get("BELONG_TO_CORP"));
flowDetail.put("FLOW_DETAIL_ID", Warden.get32UUID()); user.put("BELONG_TO_CORP_NAME", pd.get("BELONG_TO_CORP_NAME"));
flowDetail.put("FLOW_ID", flow.getString("FLOW_ID")); user.put("IS_DELETE", "0");
flowDetail.put("STEP_FLAG", "1"); user.put("RESULT_STATUS", "1");
flowDetail.put("SORT",0); trainUsersMapper.save(user);
flowDetail.put("APPROVER_ID",Jurisdiction.getUSER_ID()); condition.clear();
flowDetail.put("APPROVER_NAME",Jurisdiction.getName()); condition.put("XGF_USER_ID", id);
flowDetail.put("APPROVER_TIME", DateUtil.getTime()); PageData userEntity = xgfUserMapper.findById(condition);
flowDetail.put("APPROVER_CORPINFO_ID",Jurisdiction.getCORPINFO_ID()); userEntity.put("STATUS", "3");
// TODO 未完成 userEntity.put("STUDY_STATUS", "9");
flowDetail.put("APPROVER_CORPINFO_NAME",""); xgfUserMapper.edit(userEntity);
flowDetail.put("PASS_FLAG", "1"); });
flowDetail.put("END_FLAG", "0");
flowDetail.put("ISDELETE", "0");
flowDetail.put("PARENT_ID","0");
flowDetailMapper.save(flowDetail);
}
/** /* 保存审批流程信息 */
* @param pd PageData flow = new PageData();
* @throws Exception flow.put("FLOW_ID", Warden.get32UUID());
*/ flow.put("TYPE", "0");
public void unflowTrain(PageData pd)throws Exception{ flow.put("CREATOR", Jurisdiction.getUSER_ID());
PageData trainBatch = new PageData(); flow.put("CREATOR_NAME", Jurisdiction.getName());
String batch_id = UuidUtil.get32UUID(); flow.put("CREATOR_TIME", DateUtil.getTime());
trainBatch.put("TRAINING_BATCH_ID", batch_id); //主键 flow.put("VALID_FLAG", "1");
trainBatch.put("CREATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //添加人 flow.put("FOREIGN_KEY", pd.getString("TRAINING_BATCH_ID"));
trainBatch.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 flow.put("ISDELETE", "0");
trainBatch.put("OPERATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //修改人 flowMapper.save(flow);
trainBatch.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 /* 保存审批流程明细信息 */
trainBatch.put("ISDELETE", 0); //是否删除 1-是 0-否 PageData flowDetail = new PageData();
trainBatch.put("TYPE", 1); flowDetail.put("FLOW_DETAIL_ID", Warden.get32UUID());
trainBatch.put("USER_COUNT", pd.getString("USER_COUNT")); flowDetail.put("FLOW_ID", flow.getString("FLOW_ID"));
trainBatch.put("AUDIT_STATUS", 0); flowDetail.put("STEP_FLAG", "1");
trainBatch.put("TRAIN_CORP_DEPT", pd.getString("TRAIN_CORP_DEPT")); flowDetail.put("SORT", 0);
trainBatch.put("TRAIN_CORP_LEADER", pd.getString("TRAIN_CORP_LEADER")); flowDetail.put("APPROVER_ID", Jurisdiction.getUSER_ID());
flowDetail.put("APPROVER_NAME", Jurisdiction.getName());
flowDetail.put("APPROVER_TIME", DateUtil.getTime());
flowDetail.put("APPROVER_CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
// TODO 未完成
flowDetail.put("APPROVER_CORPINFO_NAME", "");
flowDetail.put("PASS_FLAG", "1");
flowDetail.put("END_FLAG", "0");
flowDetail.put("ISDELETE", "0");
flowDetail.put("PARENT_ID", "0");
flowDetailMapper.save(flowDetail);
}
Calendar calendar = Calendar.getInstance(); /**
DecimalFormat dft = new DecimalFormat("00"); *
int year = calendar.get(Calendar.YEAR); *
String month = dft.format(calendar.get(Calendar.MONTH) + 1); * @param pd
trainBatch.put("CREATDATE", year + "-" + month); * @throws Exception
PageData cpd = trainingbatchMapper.getCode(trainBatch); //根据ID读取 */
String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString()) + 1)); public void unflowTrain(PageData pd) throws Exception {
trainBatch.put("BATCH_NAME", code); PageData trainBatch = new PageData();
String batch_id = UuidUtil.get32UUID();
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")); //修改人
trainBatch.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
trainBatch.put("ISDELETE", 0); //是否删除 1-是 0-否
trainBatch.put("TYPE", 1);
trainBatch.put("USER_COUNT", pd.getString("USER_COUNT"));
trainBatch.put("AUDIT_STATUS", 0);
trainBatch.put("TRAIN_CORP_DEPT", pd.getString("TRAIN_CORP_DEPT"));
trainBatch.put("TRAIN_CORP_LEADER", pd.getString("TRAIN_CORP_LEADER"));
trainingbatchMapper.save(trainBatch); Calendar calendar = Calendar.getInstance();
trainBatch.put("AUDIT_STATUS", "2"); DecimalFormat dft = new DecimalFormat("00");
this.audit(trainBatch); int year = calendar.get(Calendar.YEAR);
String month = dft.format(calendar.get(Calendar.MONTH) + 1);
trainBatch.put("CREATDATE", year + "-" + month);
PageData cpd = trainingbatchMapper.getCode(trainBatch); //根据ID读取
String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString()) + 1));
trainBatch.put("BATCH_NAME", code);
String arrayDATA_IDS[] = pd.getString("users").split(","); trainingbatchMapper.save(trainBatch);
Arrays.asList(arrayDATA_IDS).forEach(id -> { trainBatch.put("AUDIT_STATUS", "2");
PageData user = new PageData(); this.audit(trainBatch);
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);
user.put("START_DATE", DateUtil.date2Str(new Date()));
user.put("SUPERVISION_STATE", 9);
user.put("MANAGER_STATE", 9);
user.put("TERRITORIALITY_STATE", 9);
user.put("STEP_STATUS", "0");
trainUsersMapper.save(user);
});
xgfUserMapper.bantchUpdateStatus(1,arrayDATA_IDS);
} String arrayDATA_IDS[] = pd.getString("users").split(",");
Arrays.asList(arrayDATA_IDS).forEach(id -> {
PageData user = new PageData();
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);
user.put("START_DATE", DateUtil.date2Str(new Date()));
user.put("SUPERVISION_STATE", 9);
user.put("MANAGER_STATE", 9);
user.put("TERRITORIALITY_STATE", 9);
user.put("STEP_STATUS", "0");
trainUsersMapper.save(user);
});
xgfUserMapper.bantchUpdateStatus(1, arrayDATA_IDS);
/** }
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
trainingbatchMapper.delete(pd);
}
/** /**
* @param pd *
* @throws Exception *
*/ * @param pd
public void edit(PageData pd)throws Exception{ * @throws Exception
trainingbatchMapper.edit(pd); */
} public void delete(PageData pd) throws Exception {
trainingbatchMapper.delete(pd);
}
public void audit(PageData pd)throws Exception{ /**
if(Integer.parseInt(pd.getString("AUDIT_STATUS")) == -1){ *
pd.put("STATUS",0); *
pd.put("ENTRUST_TIME", DateUtil.date2Str(new Date())); * @param pd
xgfUserMapper.updateStatusByFlowTrain(pd); * @throws Exception
trainingbatchMapper.audit(pd); */
}else if(Integer.parseInt(pd.getString("AUDIT_STATUS")) == 2){ public void edit(PageData pd) throws Exception {
pd.put("STATUS",1); trainingbatchMapper.edit(pd);
pd.put("START_DATE",DateUtil.date2Str(new Date())); }
pd.put("AUDIT_TIME", DateUtil.date2Str(new Date()));
xgfUserMapper.updateStatusByFlowTrain(pd);
trainUsersMapper.updateStatusByFlowTrain(pd);
trainingbatchMapper.audit(pd);
}else if(Integer.parseInt(pd.getString("AUDIT_STATUS")) == 3){
pd.put("STATUS",2);
pd.put("END_DATE",DateUtil.date2Str(new Date()));
pd.put("VERIFY_TIME",DateUtil.date2Str(new Date()));
xgfUserMapper.updateStatusByFlowTrain(pd);
trainUsersMapper.updateStatusByFlowTrain(pd);
trainingbatchMapper.audit(pd);
}else{
pd.put("ENTRUST_TIME", DateUtil.date2Str(new Date()));
trainingbatchMapper.audit(pd);
}
}
/** public void audit(PageData pd) throws Exception {
* @param page if (Integer.parseInt(pd.getString("AUDIT_STATUS")) == -1) {
* @throws Exception pd.put("STATUS", 0);
*/ pd.put("ENTRUST_TIME", DateUtil.date2Str(new Date()));
public List<PageData> list(Page page)throws Exception{ xgfUserMapper.updateStatusByFlowTrain(pd);
return trainingbatchMapper.datalistPage(page); trainingbatchMapper.audit(pd);
} } else if (Integer.parseInt(pd.getString("AUDIT_STATUS")) == 2) {
pd.put("STATUS", 1);
pd.put("START_DATE", DateUtil.date2Str(new Date()));
pd.put("AUDIT_TIME", DateUtil.date2Str(new Date()));
xgfUserMapper.updateStatusByFlowTrain(pd);
trainUsersMapper.updateStatusByFlowTrain(pd);
trainingbatchMapper.audit(pd);
} else if (Integer.parseInt(pd.getString("AUDIT_STATUS")) == 3) {
pd.put("STATUS", 2);
pd.put("END_DATE", DateUtil.date2Str(new Date()));
pd.put("VERIFY_TIME", DateUtil.date2Str(new Date()));
xgfUserMapper.updateStatusByFlowTrain(pd);
trainUsersMapper.updateStatusByFlowTrain(pd);
trainingbatchMapper.audit(pd);
} else {
pd.put("ENTRUST_TIME", DateUtil.date2Str(new Date()));
trainingbatchMapper.audit(pd);
}
}
/**() /**
* @param pd *
* @throws Exception *
*/ * @param page
public List<PageData> listAll(PageData pd)throws Exception{ * @throws Exception
return trainingbatchMapper.listAll(pd); */
} public List<PageData> list(Page page) throws Exception {
return trainingbatchMapper.datalistPage(page);
}
/**id /**
* @param pd * ()
* @throws Exception *
*/ * @param pd
public PageData findById(PageData pd)throws Exception{ * @throws Exception
return trainingbatchMapper.findById(pd); */
} public List<PageData> listAll(PageData pd) throws Exception {
return trainingbatchMapper.listAll(pd);
}
/** /**
* @param ArrayDATA_IDS * id
* @throws Exception *
*/ * @param pd
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ * @throws Exception
trainingbatchMapper.deleteAll(ArrayDATA_IDS); */
} public PageData findById(PageData pd) throws Exception {
return trainingbatchMapper.findById(pd);
}
/** /**
* *
* @param pd *
* @return * @param ArrayDATA_IDS
*/ * @throws Exception
@Override */
public PageData getCode(PageData pd) throws Exception{ public void deleteAll(String[] ArrayDATA_IDS) throws Exception {
return trainingbatchMapper.getCode(pd); trainingbatchMapper.deleteAll(ArrayDATA_IDS);
} }
public List<PageData> batchUserlistPage(Page page)throws Exception{ /**
return trainingbatchMapper.batchUserlistPage(page); *
} *
* @param pd
* @return
*/
@Override
public PageData getCode(PageData pd) throws Exception {
return trainingbatchMapper.getCode(pd);
}
@Override public List<PageData> batchUserlistPage(Page page) throws Exception {
public List<PageData> passUserlistPage(Page page) throws Exception { return trainingbatchMapper.batchUserlistPage(page);
return trainingbatchMapper.passUserlistPage(page); }
}
@Override @Override
public void graduation(PageData condition) { public List<PageData> passUserlistPage(Page page) throws Exception {
trainingbatchMapper.graduation(condition); return trainingbatchMapper.passUserlistPage(page);
xgfUserMapper.graduation(condition); }
}
@Override @Override
public void openClass(PageData info) { public void graduation(PageData condition) {
List<PageData> list = Warden.getList(info.getString("list")); trainingbatchMapper.graduation(condition);
PageData condition = new PageData(); xgfUserMapper.graduation(condition);
condition.put("STATUS",info.getString("userStatus")); }
condition.put("list", list.stream().filter(n -> "1".equals(n.getString("STATUS"))).map(n -> n.getString("USER_ID")).collect(Collectors.toList()));
xgfUserMapper.graduation(condition);
condition.clear(); @Override
condition.put("STATUS",info.getString("detailsStatus")); public void openClass(PageData info) {
condition.put("list",list.stream().filter(n -> "1".equals(n.getString("STATUS"))).map(n -> n.getString("TRAIN_USERS_ID")).collect(Collectors.toList())); List<PageData> list = Warden.getList(info.getString("list"));
trainUsersMapper.graduation(condition); PageData condition = new PageData();
condition.put("STATUS", info.getString("userStatus"));
condition.put("list", list.stream().filter(n -> "1".equals(n.getString("STATUS"))).map(n -> n.getString("USER_ID")).collect(Collectors.toList()));
xgfUserMapper.graduation(condition);
} condition.clear();
condition.put("STATUS", info.getString("detailsStatus"));
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);
@Override }
public void openStudentClass(PageData info) {
@Override
public void openStudentClass(PageData info) {
// List<PageData> list = Warden.getList(info.getString("list")); // List<PageData> list = Warden.getList(info.getString("list"));
PageData condition = new PageData(); PageData condition = new PageData();
condition.put("STATUS",info.getString("userStatus")); condition.put("STATUS", info.getString("userStatus"));
condition.put("USER_ID", info.getString("USER_ID")); condition.put("USER_ID", info.getString("USER_ID"));
xgfUserMapper.graduationstudent(condition); xgfUserMapper.graduationstudent(condition);
condition.clear(); condition.clear();
condition.put("STATUS",info.getString("detailsStatus")); condition.put("STATUS", info.getString("detailsStatus"));
condition.put("TRAIN_USERS_ID", info.getString("TRAIN_USERS_ID")); condition.put("TRAIN_USERS_ID", info.getString("TRAIN_USERS_ID"));
trainUsersMapper.graduationstudent(condition); trainUsersMapper.graduationstudent(condition);
} }
@Override @Override
public void updateClassMessage(PageData info) { public void updateClassMessage(PageData info) {
List<PageData> list = Warden.getList(info.getString("list")); List<PageData> list = Warden.getList(info.getString("list"));
PageData condition = new PageData(); PageData condition = new PageData();
condition.put("list", list.stream().map(n -> n.getString("TRAIN_USERS_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"))){ if (StringUtils.isNotEmpty(info.getString("START_DATE"))) {
condition.put("START_DATE",DateUtil.getTime()); condition.put("START_DATE", DateUtil.getTime());
} }
if (StringUtils.isNotEmpty(info.getString("END_DATE"))){ if (StringUtils.isNotEmpty(info.getString("END_DATE"))) {
condition.put("END_DATE",DateUtil.getTime()); condition.put("END_DATE", DateUtil.getTime());
} }
trainUsersMapper.updateDate(condition); trainUsersMapper.updateDate(condition);
} }
@Override @Override
public void saveFlow(PageData request) throws Exception { public void saveFlow(PageData request) throws Exception {
/* 保存审批流程明细信息 */ /* 保存审批流程明细信息 */
PageData condition = new PageData(); PageData condition = new PageData();
condition.put("FLOW_ID", request.getString("FLOW_ID")); condition.put("FLOW_ID", request.getString("FLOW_ID"));
condition.put("STEP_FLAG", "1"); condition.put("STEP_FLAG", "1");
PageData flow = flowDetailMapper.selectOne(condition); PageData flow = flowDetailMapper.selectOne(condition);
flow.put("STEP_FLAG", "0"); flow.put("STEP_FLAG", "0");
flowDetailMapper.edit(flow); flowDetailMapper.edit(flow);
PageData next_flow = new PageData(); PageData next_flow = new PageData();
next_flow.put("FLOW_DETAIL_ID", Warden.get32UUID()); next_flow.put("FLOW_DETAIL_ID", Warden.get32UUID());
next_flow.put("FLOW_ID", flow.getString("FLOW_ID")); next_flow.put("FLOW_ID", flow.getString("FLOW_ID"));
next_flow.put("STEP_FLAG", "1"); next_flow.put("STEP_FLAG", "1");
next_flow.put("SORT",(Integer)flow.get("SORT")+1); next_flow.put("SORT", (Integer) flow.get("SORT") + 1);
next_flow.put("APPROVER_ID",request.get("APPROVER_ID")); next_flow.put("APPROVER_ID", request.get("APPROVER_ID"));
next_flow.put("APPROVER_NAME",request.get("APPROVER_NAME")); next_flow.put("APPROVER_NAME", request.get("APPROVER_NAME"));
next_flow.put("APPROVER_TIME", DateUtil.getTime()); next_flow.put("APPROVER_TIME", DateUtil.getTime());
next_flow.put("APPROVER_CORPINFO_ID",request.get("APPROVER_CORPINFO_ID")); next_flow.put("APPROVER_CORPINFO_ID", request.get("APPROVER_CORPINFO_ID"));
next_flow.put("APPROVER_CORPINFO_NAME",request.get("APPROVER_CORPINFO_NAME")); next_flow.put("APPROVER_CORPINFO_NAME", request.get("APPROVER_CORPINFO_NAME"));
next_flow.put("PASS_FLAG", "1"); next_flow.put("PASS_FLAG", "1");
next_flow.put("END_FLAG", "0"); next_flow.put("END_FLAG", "0");
next_flow.put("ISDELETE", "0"); next_flow.put("ISDELETE", "0");
next_flow.put("PARENT_ID",flow.getString("FLOW_DETAIL_ID")); next_flow.put("PARENT_ID", flow.getString("FLOW_DETAIL_ID"));
flowDetailMapper.save(next_flow); flowDetailMapper.save(next_flow);
} }
@Override @Override
public List<PageData> findByUserId(PageData condition) throws Exception { public List<PageData> findByUserId(PageData condition) throws Exception {
return trainingbatchMapper.findByUserId(condition); return trainingbatchMapper.findByUserId(condition);
} }
} }

View File

@ -61,11 +61,13 @@ public class XgfUserServiceImpl implements XgfUserService {
if (entity == null || entity.size() <= 0) { if (entity == null || entity.size() <= 0) {
x.put("XGF_USER_ID", x.get("USER_ID")); x.put("XGF_USER_ID", x.get("USER_ID"));
x.put("XGF_USER_DETAILS_ID", x.get("USER_ID")); x.put("XGF_USER_DETAILS_ID", x.get("USER_ID"));
x.put("ISDELETE", "0"); x.put("XGF_USER_NAME", x.get("NAME"));
x.put("VALID_FLAG", "1"); x.put("VALID_FLAG", "1");
x.put("STATUS", "2"); x.put("STATUS", "2");
x.put("CREATED_TIME", DateUtil.getTime()); x.put("CREATED_TIME", DateUtil.getTime());
x.put("OPERATOR_TIME", DateUtil.getTime()); x.put("OPERATOR_TIME", DateUtil.getTime());
x.put("IS_DELETE", "0");
x.put("CREATE_TIME", DateUtil.getTime());
condition.clear(); condition.clear();
condition.put("DEPARTMENT_ID",x.get("MANAGER_DEPARTMENT_ID")); condition.put("DEPARTMENT_ID",x.get("MANAGER_DEPARTMENT_ID"));
PageData regDepartmentEntity = departmentService.getCorpDepartment(condition); PageData regDepartmentEntity = departmentService.getCorpDepartment(condition);
@ -75,7 +77,8 @@ public class XgfUserServiceImpl implements XgfUserService {
} else { } else {
x.put("XGF_USER_ID", x.get("USER_ID")); x.put("XGF_USER_ID", x.get("USER_ID"));
x.put("XGF_USER_DETAILS_ID", x.get("USER_ID")); x.put("XGF_USER_DETAILS_ID", x.get("USER_ID"));
x.put("ISDELETE", "0"); x.put("IS_DELETE", "0");
x.put("CREATE_TIME", DateUtil.getTime());
x.put("OPERATOR_TIME", DateUtil.getTime()); x.put("OPERATOR_TIME", DateUtil.getTime());
condition.clear(); condition.clear();
condition.put("DEPARTMENT_ID",x.get("MANAGER_DEPARTMENT_ID")); condition.put("DEPARTMENT_ID",x.get("MANAGER_DEPARTMENT_ID"));

View File

@ -15,7 +15,7 @@
f.BELONG_TO_CORP, f.BELONG_TO_CORP,
f.BELONG_TO_CORP_NAME, f.BELONG_TO_CORP_NAME,
f.PHONE, f.PHONE,
f.CREAT_TIME, f.CREATE_TIME,
f.DEPART_STATE, f.DEPART_STATE,
f.ISDELETE, f.ISDELETE,
f.AGE, f.AGE,
@ -69,7 +69,7 @@
BELONG_TO_CORP, BELONG_TO_CORP,
BELONG_TO_CORP_NAME, BELONG_TO_CORP_NAME,
PHONE, PHONE,
CREAT_TIME, CREATE_TIME,
DEPART_STATE, DEPART_STATE,
ISDELETE, ISDELETE,
AGE, AGE,
@ -124,7 +124,7 @@
#{BELONG_TO_CORP}, #{BELONG_TO_CORP},
#{BELONG_TO_CORP_NAME}, #{BELONG_TO_CORP_NAME},
#{PHONE}, #{PHONE},
#{CREAT_TIME}, #{CREATE_TIME},
#{DEPART_STATE}, #{DEPART_STATE},
#{ISDELETE}, #{ISDELETE},
#{AGE}, #{AGE},
@ -203,7 +203,7 @@
BELONG_TO_CORP = #{BELONG_TO_CORP}, BELONG_TO_CORP = #{BELONG_TO_CORP},
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME}, BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
PHONE = #{PHONE}, PHONE = #{PHONE},
CREAT_TIME = #{CREAT_TIME}, CREATE_TIME = #{CREATE_TIME},
DEPART_STATE = #{DEPART_STATE}, DEPART_STATE = #{DEPART_STATE},
ISDELETE = #{ISDELETE}, ISDELETE = #{ISDELETE},
AGE = #{AGE}, AGE = #{AGE},

View File

@ -15,8 +15,8 @@
f.VALID_FLAG, f.VALID_FLAG,
f.BELONG_TO_CORP, f.BELONG_TO_CORP,
f.BELONG_TO_CORP_NAME, f.BELONG_TO_CORP_NAME,
f.ISDELETE, f.IS_DELETE,
f.CREATED_TIME, f.CREATE_TIME,
f.CORPINFO_ID, f.CORPINFO_ID,
f.STATUS, f.STATUS,
f.OPERATOR_TIME, f.OPERATOR_TIME,
@ -32,8 +32,8 @@
VALID_FLAG, VALID_FLAG,
BELONG_TO_CORP, BELONG_TO_CORP,
BELONG_TO_CORP_NAME, BELONG_TO_CORP_NAME,
ISDELETE, IS_DELETE,
CREATED_TIME, CREATE_TIME,
CORPINFO_ID, CORPINFO_ID,
STATUS, STATUS,
OPERATOR_TIME, OPERATOR_TIME,
@ -49,8 +49,8 @@
#{VALID_FLAG}, #{VALID_FLAG},
#{BELONG_TO_CORP}, #{BELONG_TO_CORP},
#{BELONG_TO_CORP_NAME}, #{BELONG_TO_CORP_NAME},
#{ISDELETE}, #{IS_DELETE},
#{CREATED_TIME}, #{CREATE_TIME},
#{CORPINFO_ID}, #{CORPINFO_ID},
#{STATUS}, #{STATUS},
#{OPERATOR_TIME}, #{OPERATOR_TIME},
@ -90,7 +90,7 @@
BELONG_TO_CORP = #{BELONG_TO_CORP}, BELONG_TO_CORP = #{BELONG_TO_CORP},
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME}, BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
ISDELETE = #{ISDELETE}, ISDELETE = #{ISDELETE},
CREATED_TIME = #{CREATED_TIME}, CREATE_TIME = #{CREATE_TIME},
CORPINFO_ID = #{CORPINFO_ID}, CORPINFO_ID = #{CORPINFO_ID},
STATUS = #{STATUS}, STATUS = #{STATUS},
OPERATOR_TIME = #{OPERATOR_TIME}, OPERATOR_TIME = #{OPERATOR_TIME},
@ -155,7 +155,7 @@
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 --> <if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and(f.BELONG_TO_CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')) and(f.BELONG_TO_CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%'))
</if> </if>
ORDER BY f.CREATED_TIME DESC ORDER BY f.CREATE_TIME DESC
</select> </select>
<!-- 列表(全部) --> <!-- 列表(全部) -->
@ -204,6 +204,9 @@
<if test="pd.STATUS != null and pd.STATUS != ''"> <if test="pd.STATUS != null and pd.STATUS != ''">
and a.STATUS = #{pd.STATUS} and a.STATUS = #{pd.STATUS}
</if> </if>
<if test="pd.UN_STUDY_STATUS != null and pd.UN_STUDY_STATUS != ''">
and a.STUDY_STATUS != #{pd.UN_STUDY_STATUS}
</if>
</select> </select>
<select id="getInfoById" resultType="com.zcloud.entity.PageData"> <select id="getInfoById" resultType="com.zcloud.entity.PageData">
select a.XGF_USER_ID, select a.XGF_USER_ID,
@ -215,7 +218,7 @@
b.BELONG_TO_CORP, b.BELONG_TO_CORP,
b.BELONG_TO_CORP_NAME, b.BELONG_TO_CORP_NAME,
b.PHONE, b.PHONE,
b.CREAT_TIME, b.CREATE_TIME,
b.DEPART_STATE, b.DEPART_STATE,
b.ISDELETE, b.ISDELETE,
b.AGE, b.AGE,