查看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

@ -49,14 +49,16 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
@Resource
private DepartmentMapper departmentMapper;
/**
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
public void save(PageData pd) throws Exception {
/* 保存主题信息 */
String batch_id=UuidUtil.get32UUID();
String train_area=pd.getString("TRAIN_AREA");
String batch_id = UuidUtil.get32UUID();
String train_area = pd.getString("TRAIN_AREA");
pd.put("TRAINING_BATCH_ID", batch_id); //主键
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
@ -66,45 +68,49 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
pd.put("ISDELETE", 0); //是否删除 1-是 0-否
Calendar calendar = Calendar.getInstance();
DecimalFormat dft=new DecimalFormat("00");
DecimalFormat dft = new DecimalFormat("00");
int year = calendar.get(Calendar.YEAR);
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读取
String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString())+1));
pd.put("BATCH_NAME",code);
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"));
condition.put("USER_ID", pd.get("SUPERVISION_USER_ID"));
PageData supUser = usersMapper.getUserInfo(condition);
pd.put("SUPERVISION_USER_NAME",supUser.get("NAME"));
pd.put("SUPERVISION_USER_NAME", supUser.get("NAME"));
condition.clear();
condition.put("DEPARTMENT_ID",pd.get("SUPERVISION"));
condition.put("DEPARTMENT_ID", pd.get("SUPERVISION"));
PageData supDepartment = departmentMapper.getInfo(condition);
pd.put("SUPERVISION_DEPARTMENT_NAME",supDepartment.get("NAME"));
pd.put("SUPERVISION_DEPARTMENT_NAME", supDepartment.get("NAME"));
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);
pd.put("MANAGER_USER_NAME",manUser.get("NAME"));
pd.put("MANAGER_USER_NAME", manUser.get("NAME"));
condition.clear();
condition.put("DEPARTMENT_ID",pd.get("MANAGER"));
condition.put("DEPARTMENT_ID", pd.get("MANAGER"));
PageData manDepartment = departmentMapper.getInfo(condition);
pd.put("MANAGER_DEPARTMENT_NAME",manDepartment.get("NAME"));
pd.put("MANAGER_DEPARTMENT_NAME", manDepartment.get("NAME"));
// 2023-12-21 相关方功能限制,暂时移除集团单位审批节点 created by sparrow
if (StringUtils.isNotEmpty(pd.getString("TERRITORIALITY_USER_ID"))) {
condition.clear();
condition.put("USER_ID",pd.get("TERRITORIALITY_USER_ID"));
condition.put("USER_ID", pd.get("TERRITORIALITY_USER_ID"));
PageData terUser = usersMapper.getUserInfo(condition);
pd.put("TERRITORIALITY_USER_NAME",terUser.get("NAME"));
pd.put("TERRITORIALITY_USER_NAME", terUser == null ? "" : terUser.get("NAME"));
condition.clear();
condition.put("DEPARTMENT_ID",pd.get("TERRITORIALITY"));
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");
pd.put("TERRITORIALITY_DEPARTMENT_NAME", terDepartment == null ? "" : terDepartment.get("NAME"));
}
pd.put("IS_DELETE", "0");
pd.put("STEP_STATUS", "1");
trainingbatchMapper.save(pd);
String arrayDATA_ids[] = pd.getString("users").split(",");
@ -118,17 +124,17 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
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("STEP_STATUS", "1");
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");
user.put("RESULT_STATUS", "1");
trainUsersMapper.save(user);
condition.clear();
condition.put("XGF_USER_ID",id);
condition.put("XGF_USER_ID", id);
PageData userEntity = xgfUserMapper.findById(condition);
userEntity.put("STATUS","3");
userEntity.put("STUDY_STATUS","9");
userEntity.put("STATUS", "3");
userEntity.put("STUDY_STATUS", "9");
xgfUserMapper.edit(userEntity);
});
@ -136,11 +142,11 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
PageData flow = new PageData();
flow.put("FLOW_ID", Warden.get32UUID());
flow.put("TYPE", "0");
flow.put("CREATOR",Jurisdiction.getUSER_ID());
flow.put("CREATOR_NAME",Jurisdiction.getName());
flow.put("CREATOR", Jurisdiction.getUSER_ID());
flow.put("CREATOR_NAME", Jurisdiction.getName());
flow.put("CREATOR_TIME", DateUtil.getTime());
flow.put("VALID_FLAG", "1");
flow.put("FOREIGN_KEY",pd.getString("TRAINING_BATCH_ID"));
flow.put("FOREIGN_KEY", pd.getString("TRAINING_BATCH_ID"));
flow.put("ISDELETE", "0");
flowMapper.save(flow);
/* 保存审批流程明细信息 */
@ -148,25 +154,27 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
flowDetail.put("FLOW_DETAIL_ID", Warden.get32UUID());
flowDetail.put("FLOW_ID", flow.getString("FLOW_ID"));
flowDetail.put("STEP_FLAG", "1");
flowDetail.put("SORT",0);
flowDetail.put("APPROVER_ID",Jurisdiction.getUSER_ID());
flowDetail.put("APPROVER_NAME",Jurisdiction.getName());
flowDetail.put("SORT", 0);
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());
flowDetail.put("APPROVER_CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
// TODO 未完成
flowDetail.put("APPROVER_CORPINFO_NAME","");
flowDetail.put("APPROVER_CORPINFO_NAME", "");
flowDetail.put("PASS_FLAG", "1");
flowDetail.put("END_FLAG", "0");
flowDetail.put("ISDELETE", "0");
flowDetail.put("PARENT_ID","0");
flowDetail.put("PARENT_ID", "0");
flowDetailMapper.save(flowDetail);
}
/**
/**
*
*
* @param pd
* @throws Exception
*/
public void unflowTrain(PageData pd)throws Exception{
public void unflowTrain(PageData pd) throws Exception {
PageData trainBatch = new PageData();
String batch_id = UuidUtil.get32UUID();
trainBatch.put("TRAINING_BATCH_ID", batch_id); //主键
@ -209,95 +217,108 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
user.put("STEP_STATUS", "0");
trainUsersMapper.save(user);
});
xgfUserMapper.bantchUpdateStatus(1,arrayDATA_IDS);
xgfUserMapper.bantchUpdateStatus(1, arrayDATA_IDS);
}
/**
/**
*
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
public void delete(PageData pd) throws Exception {
trainingbatchMapper.delete(pd);
}
/**
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
public void edit(PageData pd) throws Exception {
trainingbatchMapper.edit(pd);
}
public void audit(PageData pd)throws Exception{
if(Integer.parseInt(pd.getString("AUDIT_STATUS")) == -1){
pd.put("STATUS",0);
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()));
xgfUserMapper.updateStatusByFlowTrain(pd);
trainingbatchMapper.audit(pd);
}else if(Integer.parseInt(pd.getString("AUDIT_STATUS")) == 2){
pd.put("STATUS",1);
pd.put("START_DATE",DateUtil.date2Str(new Date()));
} 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()));
} 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{
} else {
pd.put("ENTRUST_TIME", DateUtil.date2Str(new Date()));
trainingbatchMapper.audit(pd);
}
}
/**
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
public List<PageData> list(Page page) throws Exception {
return trainingbatchMapper.datalistPage(page);
}
/**()
/**
* ()
*
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
public List<PageData> listAll(PageData pd) throws Exception {
return trainingbatchMapper.listAll(pd);
}
/**id
/**
* id
*
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
public PageData findById(PageData pd) throws Exception {
return trainingbatchMapper.findById(pd);
}
/**
/**
*
*
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
public void deleteAll(String[] ArrayDATA_IDS) throws Exception {
trainingbatchMapper.deleteAll(ArrayDATA_IDS);
}
/**
*
*
* @param pd
* @return
*/
@Override
public PageData getCode(PageData pd) throws Exception{
public PageData getCode(PageData pd) throws Exception {
return trainingbatchMapper.getCode(pd);
}
public List<PageData> batchUserlistPage(Page page)throws Exception{
public List<PageData> batchUserlistPage(Page page) throws Exception {
return trainingbatchMapper.batchUserlistPage(page);
}
@ -316,13 +337,13 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
public void openClass(PageData info) {
List<PageData> list = Warden.getList(info.getString("list"));
PageData condition = new PageData();
condition.put("STATUS",info.getString("userStatus"));
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()));
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);
}
@ -331,12 +352,12 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
public void openStudentClass(PageData info) {
// List<PageData> list = Warden.getList(info.getString("list"));
PageData condition = new PageData();
condition.put("STATUS",info.getString("userStatus"));
condition.put("STATUS", info.getString("userStatus"));
condition.put("USER_ID", info.getString("USER_ID"));
xgfUserMapper.graduationstudent(condition);
condition.clear();
condition.put("STATUS",info.getString("detailsStatus"));
condition.put("STATUS", info.getString("detailsStatus"));
condition.put("TRAIN_USERS_ID", info.getString("TRAIN_USERS_ID"));
trainUsersMapper.graduationstudent(condition);
@ -347,11 +368,11 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
List<PageData> list = Warden.getList(info.getString("list"));
PageData condition = new PageData();
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());
if (StringUtils.isNotEmpty(info.getString("START_DATE"))) {
condition.put("START_DATE", DateUtil.getTime());
}
if (StringUtils.isNotEmpty(info.getString("END_DATE"))){
condition.put("END_DATE",DateUtil.getTime());
if (StringUtils.isNotEmpty(info.getString("END_DATE"))) {
condition.put("END_DATE", DateUtil.getTime());
}
trainUsersMapper.updateDate(condition);
}
@ -369,16 +390,16 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
next_flow.put("FLOW_DETAIL_ID", Warden.get32UUID());
next_flow.put("FLOW_ID", flow.getString("FLOW_ID"));
next_flow.put("STEP_FLAG", "1");
next_flow.put("SORT",(Integer)flow.get("SORT")+1);
next_flow.put("APPROVER_ID",request.get("APPROVER_ID"));
next_flow.put("APPROVER_NAME",request.get("APPROVER_NAME"));
next_flow.put("SORT", (Integer) flow.get("SORT") + 1);
next_flow.put("APPROVER_ID", request.get("APPROVER_ID"));
next_flow.put("APPROVER_NAME", request.get("APPROVER_NAME"));
next_flow.put("APPROVER_TIME", DateUtil.getTime());
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_ID", request.get("APPROVER_CORPINFO_ID"));
next_flow.put("APPROVER_CORPINFO_NAME", request.get("APPROVER_CORPINFO_NAME"));
next_flow.put("PASS_FLAG", "1");
next_flow.put("END_FLAG", "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);
}

View File

@ -61,11 +61,13 @@ public class XgfUserServiceImpl implements XgfUserService {
if (entity == null || entity.size() <= 0) {
x.put("XGF_USER_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("STATUS", "2");
x.put("CREATED_TIME", DateUtil.getTime());
x.put("OPERATOR_TIME", DateUtil.getTime());
x.put("IS_DELETE", "0");
x.put("CREATE_TIME", DateUtil.getTime());
condition.clear();
condition.put("DEPARTMENT_ID",x.get("MANAGER_DEPARTMENT_ID"));
PageData regDepartmentEntity = departmentService.getCorpDepartment(condition);
@ -75,7 +77,8 @@ public class XgfUserServiceImpl implements XgfUserService {
} else {
x.put("XGF_USER_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());
condition.clear();
condition.put("DEPARTMENT_ID",x.get("MANAGER_DEPARTMENT_ID"));

View File

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

View File

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