Commit 3aa83e4c authored by hongguangwu's avatar hongguangwu

MVP1.7.0 导入

parent 45c1eec3
...@@ -883,7 +883,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -883,7 +883,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TPreEmployeeInfo tPreEmployee = vo.getTpreEmployeeInfo(); TPreEmployeeInfo tPreEmployee = vo.getTpreEmployeeInfo();
TPreEmployeeInfo oldPreEmployee = tPreEmployeeInfoService.getTPreEmployeeInfoList(preMain.getId()); TPreEmployeeInfo oldPreEmployee = tPreEmployeeInfoService.getTPreEmployeeInfoList(preMain.getId());
TPreEmployeeProject project = vo.getTpreEmployeeProject(); TPreEmployeeProject project = vo.getTpreEmployeeProject();
if (preMain == null || tPreEmployee == null || project == null || if (tPreEmployee == null || project == null || oldPreEmployee == null ||
Common.isEmpty(preMain.getId()) || Common.isEmpty(tPreEmployee.getId()) || Common.isEmpty(project.getId())) { Common.isEmpty(preMain.getId()) || Common.isEmpty(tPreEmployee.getId()) || Common.isEmpty(project.getId())) {
return R.failed("请传主表ID与人员ID与项目ID"); return R.failed("请传主表ID与人员ID与项目ID");
} }
...@@ -910,8 +910,16 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -910,8 +910,16 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (!taxMonth.matches(taxMonthRegex)) { if (!taxMonth.matches(taxMonthRegex)) {
return R.failed("计税月份为6位年月,例如:202407!"); return R.failed("计税月份为6位年月,例如:202407!");
} }
if (Common.isNotNull(tPreEmployee.getTaxMonthFlag()) && CommonConstants.ZERO_STRING.equals(tPreEmployee.getTaxMonthFlag()) // 校验:
&& oldPreEmployee != null && !oldPreEmployee.getTaxMonth().equals(tPreEmployee.getTaxMonth())) { R<String> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/getEmpTaxMonth", oldPreEmployee.getEmpIdcard(), String.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null && !CommonConstants.ZERO_STRING.equals(sdr.getData())) {
taxMonth = sdr.getData();
oldPreEmployee.setTaxMonth(taxMonth);
oldPreEmployee.setTaxMonthFlag(CommonConstants.ZERO_STRING);
}
if (Common.isNotNull(tPreEmployee.getTaxMonthFlag()) && CommonConstants.ZERO_STRING.equals(oldPreEmployee.getTaxMonthFlag())
&& !oldPreEmployee.getTaxMonth().equals(tPreEmployee.getTaxMonth())) {
return R.failed("本年度有发薪纪录,计税月份不可编辑!"); return R.failed("本年度有发薪纪录,计税月份不可编辑!");
} }
} }
...@@ -927,13 +935,31 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -927,13 +935,31 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
main.setEmpNatrue(tPreEmployee.getEmpNatrue()); main.setEmpNatrue(tPreEmployee.getEmpNatrue());
main.setStatus(CommonConstants.TWO_STRING); main.setStatus(CommonConstants.TWO_STRING);
// 可以变更状态:
if (Common.isNotNull(preMain.getStatus())) {
if (CommonConstants.ONE_STRING.equals(preMain.getStatus())) {
main.setStatus(CommonConstants.ONE_STRING);
} else if (CommonConstants.TWO_STRING.equals(preMain.getStatus())) {
main.setStatus(CommonConstants.TWO_STRING);
}
if (CommonConstants.FOUR_STRING.equals(preMain.getStatus())) {
// 先变成待审核
main.setStatus(CommonConstants.TWO_STRING);
this.updateById(main); this.updateById(main);
// 再调用审核通过的逻辑:
this.doAudit(main.getId(), CommonConstants.FOUR_STRING, null);
} else {
this.updateById(main);
}
} else {
this.updateById(main);
}
if (CommonConstants.ONE_STRING.equals(main.getSourType())) { if (CommonConstants.ONE_STRING.equals(main.getSourType())) {
// 更新其他附件信息 fxj 2024-09-09 // 更新其他附件信息 fxj 2024-09-09
updateOtherAtta(main); updateOtherAtta(preMain);
// 更新附件信息 hgw 2024-10-15 // 更新附件信息 hgw 2024-10-15
updateAtta(main); updateAtta(preMain);
} }
return R.ok("已完善!"); return R.ok("已完善!");
} }
...@@ -2186,7 +2212,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -2186,7 +2212,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfoService.updateById(employee); tPreEmployeeInfoService.updateById(employee);
tPreEmployeeProjectService.updateById(project); tPreEmployeeProjectService.updateById(project);
main.setEmpNatrue(excel.getEmpNatrue()); main.setEmpNatrue(excel.getEmpNatrue());
// PC导入的,不更新为待审核
if (Common.isEmpty(main.getSourType()) || CommonConstants.ZERO_STRING.equals(main.getSourType())) {
main.setStatus(CommonConstants.TWO_STRING); main.setStatus(CommonConstants.TWO_STRING);
}
this.updateById(main); this.updateById(main);
} }
} }
......
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