Commit cb287e20 authored by huyuchen's avatar huyuchen

缴费库 代码修改

parent 8fb377e1
...@@ -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,7 +211,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -211,7 +211,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/** /**
* 获取所有项目名称 * 获取所有项目名称
*
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
...@@ -219,13 +218,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -219,13 +218,12 @@ 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
...@@ -238,17 +236,21 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -238,17 +236,21 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/** /**
* 分页获取所有项目名称 * 分页获取所有项目名称
*
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-07-26 * @Date 2022-07-26
*/ */
@Override @Override
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName) { public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName);
return tSettleDomainMapper.selectPage(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(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 wrapper;
} }
} }
...@@ -383,16 +383,14 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -383,16 +383,14 @@ public class TPreDispatchInfo extends BaseEntity {
* 公积金个人比例 * 公积金个人比例
*/ */
@Schema(description ="公积金个人比例") @Schema(description ="公积金个人比例")
@ExcelAttribute(name = "公积金个人比例", isFloat = true) @ExcelAttribute(name = "公积金个人比例", isFloat = true,max = "99.99")
@DecimalMax(value = "100.00",message = "公积金个人比例不能大于100.00")
private BigDecimal fundPersonalPer; private BigDecimal fundPersonalPer;
/** /**
* 公积金企业比例 * 公积金企业比例
*/ */
@Schema(description ="公积金企业比例") @Schema(description ="公积金企业比例")
@ExcelAttribute(name = "公积金企业比例", isFloat = true) @ExcelAttribute(name = "公积金企业比例", isFloat = true,max = "99.99")
@DecimalMax(value = "100.00",message = "公积金企业比例不能大于100.00")
private BigDecimal fundCompanyPer; private BigDecimal fundCompanyPer;
/** /**
......
...@@ -333,14 +333,14 @@ public class TPreDispatchReduceVo { ...@@ -333,14 +333,14 @@ public class TPreDispatchReduceVo {
* 公积金个人比例 * 公积金个人比例
*/ */
@Schema(description ="公积金个人比例") @Schema(description ="公积金个人比例")
@ExcelAttribute(name = "公积金个人比例", isFloat = true) @ExcelAttribute(name = "公积金个人比例", isFloat = true,max = "99.99")
private BigDecimal fundPersonalPer; private BigDecimal fundPersonalPer;
/** /**
* 公积金企业比例 * 公积金企业比例
*/ */
@Schema(description ="公积金企业比例") @Schema(description ="公积金企业比例")
@ExcelAttribute(name = "公积金企业比例", isFloat = true) @ExcelAttribute(name = "公积金企业比例", isFloat = true,max = "99.99")
private BigDecimal fundCompanyPer; private BigDecimal fundCompanyPer;
/** /**
......
...@@ -264,14 +264,12 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo { ...@@ -264,14 +264,12 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/** /**
* 公积金个人比例 * 公积金个人比例
*/ */
@ExcelAttribute(name = "公积金个人比例", isFloat = true) @ExcelAttribute(name = "公积金个人比例", isFloat = true,max = "99.99")
@DecimalMax(value = "100.00",message = "公积金个人比例不能大于100.00")
private BigDecimal fundPersonalPer; private BigDecimal fundPersonalPer;
/** /**
* 公积金企业比例 * 公积金企业比例
*/ */
@ExcelAttribute(name = "公积金企业比例", isFloat = true) @ExcelAttribute(name = "公积金企业比例", isFloat = true,max = "99.99")
@DecimalMax(value = "100.00",message = "公积金企业比例不能大于100.00")
private BigDecimal fundCompanyPer; private BigDecimal fundCompanyPer;
/** /**
* 派单分公司 * 派单分公司
......
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