Commit 8299e40d authored by chenyuxi's avatar chenyuxi

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

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