Commit 269c6cca authored by chenyuxi's avatar chenyuxi

feat: 薪酬的薪资导入——加日志

parent d511ed7a
...@@ -342,12 +342,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -342,12 +342,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
Map<String, Boolean> bankMap = new HashMap<>(); Map<String, Boolean> bankMap = new HashMap<>();
Map<String, Boolean> phoneMap = new HashMap<>(); Map<String, Boolean> phoneMap = new HashMap<>();
if (!bankList.isEmpty()) { if (!bankList.isEmpty()) {
log.error("走到了》》》》批量校验 卡号与手机号"); log.error("走到了》》》》批量校验 卡号");
R<CheckBatchVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId() R<CheckBatchVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
bankMap = checkListR.getData().getCheckMap(); bankMap = checkListR.getData().getCheckMap();
log.error("走到了》》》》bankMap",bankMap.toString()); log.error("走到了》》》》bankMap>>{}",bankMap.toString());
} }
} }
if (!phoneList.isEmpty()) { if (!phoneList.isEmpty()) {
...@@ -368,7 +368,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -368,7 +368,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
|| 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())))) {
if (bankMap.get(employee.getBankNo()) != null) { if (bankMap.get(employee.getBankNo()) != null) {
log.error("走到了》》》》校验银行卡号",bankMap.get(employee.getBankNo())); log.error("走到了》》》》校验银行卡号>>{}",bankMap.get(employee.getBankNo()));
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;
...@@ -405,6 +405,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -405,6 +405,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TCheckBankNo checkBankNo; TCheckBankNo checkBankNo;
for (TSalaryEmployee employee : updateEmployeeBankList) { for (TSalaryEmployee employee : updateEmployeeBankList) {
// cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号 // cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
log.error("走到了》》》》updateEmployeeBankList");
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))
) { ) {
...@@ -428,9 +429,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -428,9 +429,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
String areaCity; String areaCity;
TSalaryEmployee oldEmp; TSalaryEmployee oldEmp;
ExcelUtil<TSalaryEmployee> util = new ExcelUtil<>(TSalaryEmployee.class); ExcelUtil<TSalaryEmployee> util = new ExcelUtil<>(TSalaryEmployee.class);
TSalaryEmpModLog log; TSalaryEmpModLog empLog;
List<TSalaryEmpModLog> saveLogList = new ArrayList<>(); List<TSalaryEmpModLog> saveLogList = new ArrayList<>();
for (TSalaryEmployee employee : updateEmployeeBankList) { for (TSalaryEmployee employee : updateEmployeeBankList) {
log.error("走到了》》》》updateEmployeeBankList2");
if (Common.isNotNull(employee.getBankNo())) { if (Common.isNotNull(employee.getBankNo())) {
// cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号 // cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
//if (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT)) { //if (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT)) {
...@@ -455,7 +457,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -455,7 +457,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
isFalse = true; isFalse = true;
} }
} }
log.error("走到了》》》》updateEmployeeBank校验银行卡号>>{}",bankMap.get(employee.getBankNo()));
log.error("走到了》》》》updateEmployeeBank校验银行卡号>>employee>>{}",employee.toString());
// 有变更才更新 // 有变更才更新
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()))
...@@ -473,9 +476,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -473,9 +476,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
isFalse = true; isFalse = true;
} }
if (!isFalse) { if (!isFalse) {
log = logService.checkEditToLog(employee, oldEmp, CommonConstants.FOUR_STRING, employee.getCreateName(), util); empLog = logService.checkEditToLog(employee, oldEmp, CommonConstants.FOUR_STRING, employee.getCreateName(), util);
if (log != null) { if (empLog != null) {
saveLogList.add(log); saveLogList.add(empLog);
} }
} }
...@@ -1177,7 +1180,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -1177,7 +1180,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TSalaryEmployee old = baseMapper.selectById(tSalaryEmployee.getId()); TSalaryEmployee old = baseMapper.selectById(tSalaryEmployee.getId());
// 2024-2-4 16:05:56 hgw 银行卡需要校验 // 2024-2-4 16:05:56 hgw 银行卡需要校验
String pre = getCheckBankNo(tSalaryEmployee, old); String pre = getCheckBankNo(tSalaryEmployee, old);
if (pre != null) return R.failed(pre); if (pre != null) {return R.failed(pre);}
// 变更日志 fxj 2023-10-24 // 变更日志 fxj 2023-10-24
logService.initModLog(tSalaryEmployee,old,CommonConstants.ZERO_STRING,user.getNickname(),null); logService.initModLog(tSalaryEmployee,old,CommonConstants.ZERO_STRING,user.getNickname(),null);
......
...@@ -632,13 +632,16 @@ public class SalaryAccountUtil implements Serializable { ...@@ -632,13 +632,16 @@ public class SalaryAccountUtil implements Serializable {
} }
if (canSave) { if (canSave) {
log.error("走到了》》》》canSave"); log.error("走到了》》》》canSave");
log.error("走到了》》》》saveNewEmpList>>>{}",saveNewEmpList.toString());
// 新增 // 新增
if (!saveNewEmpList.isEmpty()) { if (!saveNewEmpList.isEmpty()) {
log.error("走到了》》》》saveNewEmpList"); log.error("走到了》》》》saveNewEmpList");
tSalaryEmployeeService.saveNewEmployeeList(saveNewEmpList, errorList); tSalaryEmployeeService.saveNewEmployeeList(saveNewEmpList, errorList);
} }
log.error("走到了》》》》updateEmpBankList>>>{}",updateEmpBankList.toString());
// 更新人员信息 // 更新人员信息
if (!updateEmpBankList.isEmpty()) { if (!updateEmpBankList.isEmpty()) {
log.error("走到了》》》》updateEmpBankList");
tSalaryEmployeeService.updateEmployeeBankList(updateEmpBankList, updateEmpBankMap, errorList); tSalaryEmployeeService.updateEmployeeBankList(updateEmpBankList, updateEmpBankMap, errorList);
} }
} }
......
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