Commit cc780621 authored by huyuchen's avatar huyuchen

缴费库 代码修改

parent 59b0523e
...@@ -65,7 +65,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -65,7 +65,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/** /**
* @Author huyc * @Author huyc
* @Description 档案划转 * @Description 档案划转
* @Date 2022/6/22 * @Date 2022/6/22
**/ **/
@Override @Override
...@@ -73,8 +73,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -73,8 +73,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//待划转员工已在目标项目下不可划转 //待划转员工已在目标项目下不可划转
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda() TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,tEmpChangeInfo.getDeptNo()) .eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptNo, tEmpChangeInfo.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL)); .eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tEmployeeProject)) { if (Common.isNotNull(tEmployeeProject)) {
return R.failed("待划转员工已在目标项目下不可划转"); return R.failed("待划转员工已在目标项目下不可划转");
} }
...@@ -85,8 +85,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -85,8 +85,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//划转,更新项目信息 //划转,更新项目信息
TEmployeeProject updateTEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda() TEmployeeProject updateTEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptName,tEmpChangeInfo.getOldSettle()) .eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptName, tEmpChangeInfo.getOldSettle())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)); .eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
if (Common.isNotNull(updateTEmployeeProject)) { if (Common.isNotNull(updateTEmployeeProject)) {
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda() TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
...@@ -116,9 +116,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -116,9 +116,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
public R<List<ErrorMessage>> batchChangeArc(List<TEmpChangeInfoVO> excelVOList, BindingResult bindingResult) { public R<List<ErrorMessage>> batchChangeArc(List<TEmpChangeInfoVO> excelVOList, BindingResult bindingResult) {
// 通用校验获取失败的数据 // 通用校验获取失败的数据
List<ErrorMessage> errorMessageList = (List<ErrorMessage>) bindingResult.getTarget(); List<ErrorMessage> errorMessageList = (List<ErrorMessage>) bindingResult.getTarget();
Map<Long,ErrorMessage> errorMsgMap = new HashMap<>(); Map<Long, ErrorMessage> errorMsgMap = new HashMap<>();
if (Common.isNotNull(errorMessageList)){ if (Common.isNotNull(errorMessageList)) {
errorMessageList.stream().forEach(errorMessage -> errorMsgMap.put(errorMessage.getLineNum(),errorMessage)); errorMessageList.stream().forEach(errorMessage -> errorMsgMap.put(errorMessage.getLineNum(), errorMessage));
} }
List<TEmployeeProject> updateList = new ArrayList<>(); List<TEmployeeProject> updateList = new ArrayList<>();
...@@ -126,7 +126,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -126,7 +126,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
// 执行数据插入操作 组装 // 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
// 已有验证报错直接下一个 // 已有验证报错直接下一个
if (Common.isNotNull(errorMsgMap.get(i+2))){ if (Common.isNotNull(errorMsgMap.get(i + 2))) {
continue; continue;
} }
errorMsg = new HashSet<>(); errorMsg = new HashSet<>();
...@@ -159,9 +159,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -159,9 +159,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//待划转员工已在目标项目下不可划转 //待划转员工已在目标项目下不可划转
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda() TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getNewSettleCode()) .eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo, excel.getNewSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL) .eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)); .eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
if (Common.isNotNull(tEmployeeProject)) { if (Common.isNotNull(tEmployeeProject)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.CHECKS_CHANGE_EMP_PROJECT, excel.getNewSettleCode())); errorMsg.add(MsgUtils.getMessage(ErrorCodes.CHECKS_CHANGE_EMP_PROJECT, excel.getNewSettleCode()));
} }
...@@ -169,8 +169,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -169,8 +169,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if (CollUtil.isEmpty(errorMsg)) { if (CollUtil.isEmpty(errorMsg)) {
//划转,更新项目信息 //划转,更新项目信息
TEmployeeProject updateTEmployeePro = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda() TEmployeeProject updateTEmployeePro = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getOldSettleCode()) .eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo, excel.getOldSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL)); .eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(updateTEmployeePro)) { if (Common.isNotNull(updateTEmployeePro)) {
if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) { if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode())); errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode()));
...@@ -211,6 +211,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -211,6 +211,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/** /**
* 获取所有项目名称 * 获取所有项目名称
*
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
...@@ -218,12 +219,13 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -218,12 +219,13 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
@Override @Override
public R<List<TSettleDomain>> getAllDept() { public R<List<TSettleDomain>> getAllDept() {
List<TSettleDomain> list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL) List<TSettleDomain> list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL)); .eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL));
return R.ok(list); return R.ok(list);
} }
/** /**
* 获取所有单位名称 * 获取所有单位名称
*
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
...@@ -236,6 +238,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -236,6 +238,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/** /**
* 分页获取所有项目名称 * 分页获取所有项目名称
*
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-07-26 * @Date 2022-07-26
...@@ -243,9 +246,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -243,9 +246,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
@Override @Override
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName) { public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName) {
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
wrapper.likeRight(TSettleDomain::getDepartName,deptName); wrapper.likeRight(TSettleDomain::getDepartName, deptName);
wrapper.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING); wrapper.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING);
wrapper.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING); wrapper.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING);
return tSettleDomainMapper.selectPage(page,wrapper); return tSettleDomainMapper.selectPage(page, wrapper);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment