Commit e3cfbf34 authored by hongguangwu's avatar hongguangwu

Merge branch 'develop'

parents f0d308b4 9749728c
...@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl; ...@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain; import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
......
...@@ -387,6 +387,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -387,6 +387,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (isFalse) { if (isFalse) {
return null; return null;
} }
doSetIntegerArea(saveNewEmpList);
this.saveBatch(saveNewEmpList); this.saveBatch(saveNewEmpList);
} }
return null; return null;
...@@ -498,24 +499,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -498,24 +499,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
// } // }
} }
} }
for (TSalaryEmployee employee : updateEmployeeBankList) {
if (Common.isNotNull(employee.getBankProvince()) && regNumber(employee.getBankProvince())) {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
if (Common.isNotNull(areaProvince)) {
if (Common.isNotNull(employee.getBankCity()) && regNumber(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);
}
}
employee.setBankProvince(areaProvince);
}
}
}
if (isFalse) { if (isFalse) {
return null; return null;
} }
doSetIntegerArea(updateEmployeeBankList);
// 更新人员 // 更新人员
this.updateBatchById(updateEmployeeBankList); this.updateBatchById(updateEmployeeBankList);
// 新增日志 // 新增日志
...@@ -524,6 +511,32 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -524,6 +511,32 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return null; return null;
} }
// 批量处理字段为汉字的区域
private void doSetIntegerArea(List<TSalaryEmployee> updateEmpList) {
for (TSalaryEmployee employee : updateEmpList) {
doSetIntegerAreaByEmp(employee);
}
}
// 批量处理字段为汉字的区域-单个员工
private void doSetIntegerAreaByEmp(TSalaryEmployee employee) {
String areaProvince;
String areaCity;
if (Common.isNotNull(employee.getBankProvince()) && regNumber(employee.getBankProvince())) {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
if (Common.isNotNull(areaProvince)) {
if (Common.isNotNull(employee.getBankCity()) && regNumber(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);
}
}
employee.setBankProvince(areaProvince);
}
}
}
private static boolean regNumber(String content) { private static boolean regNumber(String content) {
boolean flag = true; boolean flag = true;
Pattern p = Pattern.compile("^[0-9]*$"); Pattern p = Pattern.compile("^[0-9]*$");
...@@ -830,6 +843,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -830,6 +843,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TCheckBankNo check = (null == vo.getRes()) ? null : vo.getRes().getData(); TCheckBankNo check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (check != null && check.getResult().equals(CommonConstants.ZERO_ONE)) { if (check != null && check.getResult().equals(CommonConstants.ZERO_ONE)) {
employee.setIssueStatus(CommonConstants.ZERO_INT); employee.setIssueStatus(CommonConstants.ZERO_INT);
doSetIntegerAreaByEmp(employee);
this.updateById(employee); this.updateById(employee);
return true; return true;
} else { } else {
...@@ -869,6 +883,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -869,6 +883,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} }
} }
doSetIntegerArea(empList);
this.saveOrUpdateBatch(empList); this.saveOrUpdateBatch(empList);
} }
return true; return true;
...@@ -1085,13 +1100,14 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -1085,13 +1100,14 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
for (TSalaryEmployee employee : updateList) { for (TSalaryEmployee employee : updateList) {
if (bankCheckMap.get(employee.getBankNo()) != null && Boolean.FALSE.equals(bankCheckMap.get(employee.getBankNo()))) { if (bankCheckMap.get(employee.getBankNo()) != null && Boolean.FALSE.equals(bankCheckMap.get(employee.getBankNo()))) {
errorMessageList.add(new ErrorMessage(employee.getLineNums(), "第" + employee.getLineNums() errorMessageList.add(new ErrorMessage(employee.getLineNums(), "第" + employee.getLineNums()
+ "行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!")); + "行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!"));
} else { } else {
employee.setIssueStatus(CommonConstants.ZERO_INT); employee.setIssueStatus(CommonConstants.ZERO_INT);
employee.setLineNums(null); employee.setLineNums(null);
newUpdateList.add(employee); newUpdateList.add(employee);
} }
} }
doSetIntegerArea(newUpdateList);
this.updateBatchById(newUpdateList); this.updateBatchById(newUpdateList);
} }
if (!saveList.isEmpty()) { if (!saveList.isEmpty()) {
...@@ -1099,13 +1115,14 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -1099,13 +1115,14 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
for (TSalaryEmployee employee : saveList) { for (TSalaryEmployee employee : saveList) {
if (bankCheckMap.get(employee.getBankNo()) != null && Boolean.FALSE.equals(bankCheckMap.get(employee.getBankNo()))) { if (bankCheckMap.get(employee.getBankNo()) != null && Boolean.FALSE.equals(bankCheckMap.get(employee.getBankNo()))) {
errorMessageList.add(new ErrorMessage(employee.getLineNums(), "第" + employee.getLineNums() errorMessageList.add(new ErrorMessage(employee.getLineNums(), "第" + employee.getLineNums()
+ "行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!")); + "行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!!!"));
} else { } else {
employee.setIssueStatus(CommonConstants.ZERO_INT); employee.setIssueStatus(CommonConstants.ZERO_INT);
employee.setLineNums(null); employee.setLineNums(null);
newSaveList.add(employee); newSaveList.add(employee);
} }
} }
doSetIntegerArea(newSaveList);
this.saveBatch(newSaveList); this.saveBatch(newSaveList);
} }
boolean isTrue = true; boolean isTrue = true;
...@@ -1280,8 +1297,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -1280,8 +1297,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
// 变更日志 hgw 2024-7-16 18:19:57 // 变更日志 hgw 2024-7-16 18:19:57
logService.initModLog(newEmp,employee,CommonConstants.THREE_STRING,newEmp.getCreateName(), null); logService.initModLog(newEmp,employee,CommonConstants.THREE_STRING,newEmp.getCreateName(), null);
BeanUtil.copyProperties(newEmp, employee, ignoreProperties); BeanUtil.copyProperties(newEmp, employee, ignoreProperties);
doSetIntegerAreaByEmp(employee);
this.updateById(employee); this.updateById(employee);
} else { } else {
doSetIntegerAreaByEmp(newEmp);
this.save(newEmp); this.save(newEmp);
} }
return CommonConstants.SAVE_SUCCESS; return CommonConstants.SAVE_SUCCESS;
......
...@@ -27,7 +27,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; ...@@ -27,7 +27,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo; import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
...@@ -339,7 +338,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -339,7 +338,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
//更新社保状态为-待结算 //更新社保状态为-待结算
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tpaymentinfo/inner/updatePaymentSocialStatusToNoSettle", stringList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN); , "/tpaymentinfo/inner/updatePaymentSocialStatusToNoSettle", stringList, Integer.class, SecurityConstants.FROM_IN);
} }
if (fundList != null && !fundList.isEmpty()) { if (fundList != null && !fundList.isEmpty()) {
stringList = new ArrayList<>(); stringList = new ArrayList<>();
...@@ -348,7 +347,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -348,7 +347,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
//更新公积金状态为-待结算 //更新公积金状态为-待结算
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tpaymentinfo/inner/updatePaymentFundStatusToNoSettle", stringList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN); , "/tpaymentinfo/inner/updatePaymentFundStatusToNoSettle", stringList, Integer.class, SecurityConstants.FROM_IN);
} }
if (forecastSocialList != null && !forecastSocialList.isEmpty()) { if (forecastSocialList != null && !forecastSocialList.isEmpty()) {
stringList = new ArrayList<>(); stringList = new ArrayList<>();
...@@ -357,7 +356,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -357,7 +356,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
//更新社保状态为-待结算 //更新社保状态为-待结算
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tforecastlibrary/inner/updateForecastSocialStatusToNoSettle", stringList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN); , "/tforecastlibrary/inner/updateForecastSocialStatusToNoSettle", stringList, Integer.class, SecurityConstants.FROM_IN);
} }
if (forecastFundList != null && !forecastFundList.isEmpty()) { if (forecastFundList != null && !forecastFundList.isEmpty()) {
stringList = new ArrayList<>(); stringList = new ArrayList<>();
...@@ -366,7 +365,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -366,7 +365,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
//更新公积金状态为-待结算 //更新公积金状态为-待结算
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tforecastlibrary/inner/updateForecastFundStatusToNoSettle", stringList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN); , "/tforecastlibrary/inner/updateForecastFundStatusToNoSettle", stringList, Integer.class, SecurityConstants.FROM_IN);
} }
} }
......
...@@ -533,23 +533,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -533,23 +533,7 @@ public class SalaryAccountUtil implements Serializable {
// 统一处理连接查询 // 统一处理连接查询
if (updateEmpList != null && !updateEmpList.isEmpty()) { if (updateEmpList != null && !updateEmpList.isEmpty()) {
String areaProvince; doSetIntegerArea(updateEmpList);
String areaCity;
for (TSalaryEmployee employee : updateEmpList) {
if (Common.isNotNull(employee.getBankProvince()) && regNumber(employee.getBankProvince())) {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
if (Common.isNotNull(areaProvince)) {
if (Common.isNotNull(employee.getBankCity()) && regNumber(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);
}
}
employee.setBankProvince(areaProvince);
}
}
}
tSalaryEmployeeService.updateBatchById(updateEmpList); tSalaryEmployeeService.updateBatchById(updateEmpList);
} }
if (!checkBankInfoEmpList.isEmpty()) { if (!checkBankInfoEmpList.isEmpty()) {
...@@ -669,6 +653,27 @@ public class SalaryAccountUtil implements Serializable { ...@@ -669,6 +653,27 @@ public class SalaryAccountUtil implements Serializable {
this.setErrorInfo(errorList); this.setErrorInfo(errorList);
} }
// 批量处理字段为汉字的区域
private void doSetIntegerArea(List<TSalaryEmployee> updateEmpList) {
String areaProvince;
String areaCity;
for (TSalaryEmployee employee : updateEmpList) {
if (Common.isNotNull(employee.getBankProvince()) && regNumber(employee.getBankProvince())) {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
if (Common.isNotNull(areaProvince)) {
if (Common.isNotNull(employee.getBankCity()) && regNumber(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);
}
}
employee.setBankProvince(areaProvince);
}
}
}
}
private static boolean regNumber(String content) { private static boolean regNumber(String content) {
boolean flag = true; boolean flag = true;
Pattern p = Pattern.compile("^[0-9]*$"); Pattern p = Pattern.compile("^[0-9]*$");
......
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