Commit c180b2d3 authored by hongguangwu's avatar hongguangwu

MVP1.7.1 优化预入职

parent 371b5256
......@@ -240,6 +240,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
empId = employee.getId();
tPreEmployeeInfo = new TPreEmployeeInfo();
BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID);
// MVP1.9.1新逻辑:在项信息存在,则去薪资人员里的银行等信息
setNewSalaryEmpBankInfo(tSalaryEmployee, tPreEmployeeInfo);
tPreEmployeeInfo.setOldId(employee.getId());
}
if (employee == null) {
......@@ -252,6 +254,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (empFirst) {
empId = employee.getId();
BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID);
// MVP1.9.1新逻辑:在项信息存在,则去薪资人员里的银行等信息
setNewSalaryEmpBankInfo(tSalaryEmployee, tPreEmployeeInfo);
tPreEmployeeInfo.setOldId(employee.getId());
}
tPreEmployeeInfo.setEmpIdcard(main.getEmpIdcard());
......@@ -351,28 +355,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
vo.setTpreEmployeeProject(tPreEmployeeProject);
// MVP1.9.1新逻辑:在项信息存在,则去薪资人员里的银行等信息
if (tSalaryEmployee != null) {
tPreEmployeeInfo.setBankNo(tSalaryEmployee.getBankNo());
if (Common.isEmpty(tSalaryEmployee.getBankNo())) {
tPreEmployeeInfo.setBankName(null);
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
} else {
tPreEmployeeInfo.setBankName(tSalaryEmployee.getBankName());
tPreEmployeeInfo.setBankSubName(tSalaryEmployee.getBankSubName());
tPreEmployeeInfo.setBankProvince(tSalaryEmployee.getBankProvince());
tPreEmployeeInfo.setBankCity(tSalaryEmployee.getBankCity());
tPreEmployeeInfo.setTaxMonth(tSalaryEmployee.getTaxMonth());
}
} else {
tPreEmployeeInfo.setBankName(null);
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
}
setNewSalaryEmpBankInfo(tSalaryEmployee, tPreEmployeeInfo);
tPreEmployeeInfoService.updateById(tPreEmployeeInfo);
}
} else {
......@@ -1060,6 +1043,39 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
/**
* @param tSalaryEmployee
* @param tPreEmployeeInfo
* @Description: 用薪资的人员信息
* @Author: hgw
* @Date: 2024/11/12 14:28
* @return: void
**/
private void setNewSalaryEmpBankInfo(TSalaryEmployee tSalaryEmployee, TPreEmployeeInfo tPreEmployeeInfo) {
if (tSalaryEmployee != null) {
tPreEmployeeInfo.setBankNo(tSalaryEmployee.getBankNo());
if (Common.isEmpty(tSalaryEmployee.getBankNo())) {
tPreEmployeeInfo.setBankName(null);
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
} else {
tPreEmployeeInfo.setBankName(tSalaryEmployee.getBankName());
tPreEmployeeInfo.setBankSubName(tSalaryEmployee.getBankSubName());
tPreEmployeeInfo.setBankProvince(tSalaryEmployee.getBankProvince());
tPreEmployeeInfo.setBankCity(tSalaryEmployee.getBankCity());
tPreEmployeeInfo.setTaxMonth(tSalaryEmployee.getTaxMonth());
}
} else {
tPreEmployeeInfo.setBankName(null);
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
}
}
/**
* @Description: 详情
* @Author: hgw
......
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