Commit 56a26ee2 authored by hongguangwu's avatar hongguangwu

MVP1.6.8-优化薪资

parent c6f2e69b
...@@ -420,28 +420,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -420,28 +420,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TSalaryEmpModLog log; TSalaryEmpModLog log;
List<TSalaryEmpModLog> saveLogList = new ArrayList<>(); List<TSalaryEmpModLog> saveLogList = new ArrayList<>();
for (TSalaryEmployee employee : updateEmployeeBankList) { for (TSalaryEmployee employee : updateEmployeeBankList) {
if (Common.isNotNull(employee.getBankNo()) && Common.isNotNull(employee.getBankProvince())) { if (Common.isNotNull(employee.getBankNo())) {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim()); if (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT)) {
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);
}
}
if (Common.isNotNull(employee.getBankNo())
&& (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())) {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim()); areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
if (Common.isNotNull(areaProvince)) { if (Common.isNotNull(areaProvince)) {
...@@ -451,19 +433,19 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -451,19 +433,19 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (Common.isNotNull(areaCity)) { if (Common.isNotNull(areaCity)) {
employee.setBankCity(areaCity); employee.setBankCity(areaCity);
} else { } else {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【" + SalaryConstants.CITY_ERROR + "】")); errorList.add(new ErrorMessage((employee.getLineNums()), "第" + (employee.getLineNums()) + "行:该员工更新失败:【" + SalaryConstants.CITY_ERROR + "】"));
isFalse = true; isFalse = true;
} }
} }
employee.setBankProvince(areaProvince); employee.setBankProvince(areaProvince);
} else { } else {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【" + SalaryConstants.PROVINCE_ERROR + "】")); errorList.add(new ErrorMessage((employee.getLineNums()), "第" + (employee.getLineNums()) + "行:该员工更新失败:【" + SalaryConstants.PROVINCE_ERROR + "】"));
isFalse = true; isFalse = true;
} }
} }
// 有变更才更新 // 有变更才更新
if ( (Common.isNotNull(employee.getBankNo()) && !employee.getBankNo().equals(oldEmp.getBankNo())) if ((Common.isNotNull(employee.getBankNo()) && !employee.getBankNo().equals(oldEmp.getBankNo()))
|| (Common.isNotNull(employee.getBankProvince()) && !employee.getBankProvince().equals(oldEmp.getBankProvince())) || (Common.isNotNull(employee.getBankProvince()) && !employee.getBankProvince().equals(oldEmp.getBankProvince()))
|| (Common.isNotNull(employee.getBankCity()) && !employee.getBankCity().equals(oldEmp.getBankCity())) || (Common.isNotNull(employee.getBankCity()) && !employee.getBankCity().equals(oldEmp.getBankCity()))
|| (Common.isNotNull(employee.getBankName()) && !employee.getBankName().equals(oldEmp.getBankName())) || (Common.isNotNull(employee.getBankName()) && !employee.getBankName().equals(oldEmp.getBankName()))
...@@ -471,15 +453,15 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -471,15 +453,15 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
) { ) {
if (bankMap.get(employee.getBankNo()) != null) { if (bankMap.get(employee.getBankNo()) != null) {
if (Boolean.FALSE.equals(bankMap.get(employee.getBankNo()))) { if (Boolean.FALSE.equals(bankMap.get(employee.getBankNo()))) {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【姓名与卡号验证:认证不一致】")); errorList.add(new ErrorMessage((employee.getLineNums()), "第" + (employee.getLineNums()) + "行:该员工更新失败:【姓名与卡号验证:认证不一致】"));
isFalse = true; isFalse = true;
} }
} else { } else {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【姓名与卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】")); errorList.add(new ErrorMessage((employee.getLineNums()), "第" + (employee.getLineNums()) + "行:该员工更新失败:【姓名与卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
isFalse = true; isFalse = true;
} }
if (!isFalse) { if (!isFalse) {
log = logService.checkEditToLog(employee,oldEmp,CommonConstants.FOUR_STRING,employee.getCreateName(), util); log = logService.checkEditToLog(employee, oldEmp, CommonConstants.FOUR_STRING, employee.getCreateName(), util);
if (log != null) { if (log != null) {
saveLogList.add(log); saveLogList.add(log);
} }
...@@ -487,6 +469,23 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -487,6 +469,23 @@ 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);
}
}
} }
} }
if (isFalse) { if (isFalse) {
......
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