Commit 8299e40d authored by chenyuxi's avatar chenyuxi

feat: 薪酬的薪资导入——配置代发户的项目需进行银行卡号验证

parent 7037d7d5
...@@ -306,7 +306,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -306,7 +306,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
@Override @Override
public String saveNewSalaryEmployee(boolean notLabour,TSalaryEmployee employee) { public String saveNewSalaryEmployee(boolean notLabour,TSalaryEmployee employee) {
String pre = this.checkNewEmpBankAndPhone(employee, false); String pre = this.checkNewEmpBankAndPhone(employee, false);
if (pre != null) return pre; if (pre != null) {return pre;}
if (notLabour) { if (notLabour) {
this.save(employee); this.save(employee);
} }
...@@ -321,8 +321,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -321,8 +321,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
List<String> phoneList = new ArrayList<>(); List<String> phoneList = new ArrayList<>();
TCheckBankNo checkBankNo; TCheckBankNo checkBankNo;
for (TSalaryEmployee employee : saveNewEmpList) { for (TSalaryEmployee employee : saveNewEmpList) {
// cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
if (Common.isNotNull(employee.getBankNo()) if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT)) //&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
&& (Common.isEmpty(employee.getSalaryGiveTime()) && (Common.isEmpty(employee.getSalaryGiveTime())
|| CommonConstants.ZERO_STRING.equals(employee.getSalaryGiveTime()) || CommonConstants.ZERO_STRING.equals(employee.getSalaryGiveTime())
|| (CommonConstants.ONE_STRING.equals(employee.getSalaryGiveTime()) && Common.isNotNull(employee.getBankNo())))) { || (CommonConstants.ONE_STRING.equals(employee.getSalaryGiveTime()) && Common.isNotNull(employee.getBankNo())))) {
...@@ -356,8 +357,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -356,8 +357,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
boolean isFalse = false; boolean isFalse = false;
for (TSalaryEmployee employee : saveNewEmpList) { for (TSalaryEmployee employee : saveNewEmpList) {
// cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
if (Common.isNotNull(employee.getBankNo()) if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT)) //&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
&& (Common.isEmpty(employee.getSalaryGiveTime()) && (Common.isEmpty(employee.getSalaryGiveTime())
|| CommonConstants.ZERO_STRING.equals(employee.getSalaryGiveTime()) || CommonConstants.ZERO_STRING.equals(employee.getSalaryGiveTime())
|| (CommonConstants.ONE_STRING.equals(employee.getSalaryGiveTime()) && Common.isNotNull(employee.getBankNo())))) { || (CommonConstants.ONE_STRING.equals(employee.getSalaryGiveTime()) && Common.isNotNull(employee.getBankNo())))) {
...@@ -397,8 +399,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -397,8 +399,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
List<TCheckBankNo> bankList = new ArrayList<>(); List<TCheckBankNo> bankList = new ArrayList<>();
TCheckBankNo checkBankNo; TCheckBankNo checkBankNo;
for (TSalaryEmployee employee : updateEmployeeBankList) { for (TSalaryEmployee employee : updateEmployeeBankList) {
// cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
if (Common.isNotNull(employee.getBankNo()) if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) { //&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
) {
checkBankNo = new TCheckBankNo(); checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName()); checkBankNo.setName(employee.getEmpName());
checkBankNo.setBankNo(employee.getBankNo()); checkBankNo.setBankNo(employee.getBankNo());
...@@ -423,7 +427,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -423,7 +427,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
List<TSalaryEmpModLog> saveLogList = new ArrayList<>(); List<TSalaryEmpModLog> saveLogList = new ArrayList<>();
for (TSalaryEmployee employee : updateEmployeeBankList) { for (TSalaryEmployee employee : updateEmployeeBankList) {
if (Common.isNotNull(employee.getBankNo())) { if (Common.isNotNull(employee.getBankNo())) {
if (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT)) { // cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
//if (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT)) {
oldEmp = updateEmpBankMap.get(employee.getEmpIdcard()); oldEmp = updateEmpBankMap.get(employee.getEmpIdcard());
if (oldEmp != null) { if (oldEmp != null) {
if (Common.isNotNull(employee.getBankProvince())) { if (Common.isNotNull(employee.getBankProvince())) {
...@@ -471,23 +476,24 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -471,23 +476,24 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} }
} }
} else if (employee.getIssueStatus().equals(CommonConstants.ONE_INT) && Common.isNotNull(employee.getBankProvince())) { //}
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim()); // else if (employee.getIssueStatus().equals(CommonConstants.ONE_INT) && Common.isNotNull(employee.getBankProvince())) {
if (Common.isNotNull(areaProvince)) { // areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
if (Common.isNotNull(employee.getBankCity())) { // if (Common.isNotNull(areaProvince)) {
areaCity = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankCity().trim() // if (Common.isNotNull(employee.getBankCity())) {
+ CommonConstants.DOWN_LINE_STRING + employee.getBankProvince().trim()); // areaCity = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankCity().trim()
if (Common.isNotNull(areaCity)) { // + CommonConstants.DOWN_LINE_STRING + employee.getBankProvince().trim());
employee.setBankCity(areaCity); // if (Common.isNotNull(areaCity)) {
} else { // employee.setBankCity(areaCity);
employee.setBankCity(null); // } else {
} // employee.setBankCity(null);
} // }
employee.setBankProvince(areaProvince); // }
} else { // employee.setBankProvince(areaProvince);
employee.setBankProvince(null); // } else {
} // employee.setBankProvince(null);
} // }
// }
} }
} }
for (TSalaryEmployee employee : updateEmployeeBankList) { for (TSalaryEmployee employee : updateEmployeeBankList) {
...@@ -557,7 +563,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -557,7 +563,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} }
// 银行卡 // 银行卡
// 代发户的,不校验卡号,下次使用的时候校验卡号 // 代发户的,不校验卡号,下次使用的时候校验卡号
if (Common.isNotNull(employee.getBankNo()) && (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) { // todo cyx-mvp1.7.0: 本次是代发户,是新员工,也要要校验银行卡(但是薪酬导入类型是劳务费才会走到这里)
if (Common.isNotNull(employee.getBankNo())) {
//if (Common.isNotNull(employee.getBankNo()) && (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
// 调用校验服务 // 调用校验服务
TCheckBankNo checkBankNo = new TCheckBankNo(); TCheckBankNo checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName()); checkBankNo.setName(employee.getEmpName());
......
...@@ -278,6 +278,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -278,6 +278,7 @@ public class SalaryAccountUtil implements Serializable {
newEmp.setEmpName(empName); newEmp.setEmpName(empName);
} }
// todo cyx-mvp1.7.0修复:去掉重复判断
if ((SalaryConstants.IF_NEW_EMPLOYEE.equals(dbFiedName) || SalaryConstants.IS_NEW_EMPLOYEE.equals(dbFiedName)) if ((SalaryConstants.IF_NEW_EMPLOYEE.equals(dbFiedName) || SalaryConstants.IS_NEW_EMPLOYEE.equals(dbFiedName))
&& SalaryConstants.IS_NEW.equals(cellValueStr)) { && SalaryConstants.IS_NEW.equals(cellValueStr)) {
isNewEmployee = true; isNewEmployee = true;
...@@ -555,6 +556,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -555,6 +556,7 @@ public class SalaryAccountUtil implements Serializable {
otherEmp = otherEmpMap.get(newEmps.getEmpIdcard()); otherEmp = otherEmpMap.get(newEmps.getEmpIdcard());
if (otherEmp == null) { if (otherEmp == null) {
if (CommonConstants.ONE_STRING.equals(entity.getIsNewEmployee())) { if (CommonConstants.ONE_STRING.equals(entity.getIsNewEmployee())) {
// 赋值新员工信息
if (!this.setNewEmpBase(newEmps, newEmps.getLineNums() + dataRow, errorList, notLabour if (!this.setNewEmpBase(newEmps, newEmps.getLineNums() + dataRow, errorList, notLabour
, entity, salaryType, dept, user, entity.getSalaryStyle() , entity, salaryType, dept, user, entity.getSalaryStyle()
, CommonConstants.ZERO_STRING.equals(entity.getSalaryGiveTime()), invoiceTitle , CommonConstants.ZERO_STRING.equals(entity.getSalaryGiveTime()), invoiceTitle
...@@ -731,6 +733,11 @@ public class SalaryAccountUtil implements Serializable { ...@@ -731,6 +733,11 @@ public class SalaryAccountUtil implements Serializable {
checkBankInfoEmpList.add(emp); checkBankInfoEmpList.add(emp);
} }
// cyx-mvp1.7.0: 新增:本次是代发户,是新员工,要校验银行卡
// if (isIssue == 1 && isNewEmployee && Common.isNotNull(emp.getBankNo())) {
// checkBankInfoEmpList.add(emp);
// }
entity.setEmpId(emp.getId()); entity.setEmpId(emp.getId());
entity.setEmpIdcard(emp.getEmpIdcard()); entity.setEmpIdcard(emp.getEmpIdcard());
entity.setEmpName(emp.getEmpName()); entity.setEmpName(emp.getEmpName());
......
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