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;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
......
......@@ -387,6 +387,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (isFalse) {
return null;
}
doSetIntegerArea(saveNewEmpList);
this.saveBatch(saveNewEmpList);
}
return null;
......@@ -498,7 +499,29 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
// }
}
}
for (TSalaryEmployee employee : updateEmployeeBankList) {
if (isFalse) {
return null;
}
doSetIntegerArea(updateEmployeeBankList);
// 更新人员
this.updateBatchById(updateEmployeeBankList);
// 新增日志
logService.saveBatch(saveLogList);
}
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)) {
......@@ -513,16 +536,6 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
}
}
if (isFalse) {
return null;
}
// 更新人员
this.updateBatchById(updateEmployeeBankList);
// 新增日志
logService.saveBatch(saveLogList);
}
return null;
}
private static boolean regNumber(String content) {
boolean flag = true;
......@@ -830,6 +843,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TCheckBankNo check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (check != null && check.getResult().equals(CommonConstants.ZERO_ONE)) {
employee.setIssueStatus(CommonConstants.ZERO_INT);
doSetIntegerAreaByEmp(employee);
this.updateById(employee);
return true;
} else {
......@@ -869,6 +883,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
}
doSetIntegerArea(empList);
this.saveOrUpdateBatch(empList);
}
return true;
......@@ -1085,13 +1100,14 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
for (TSalaryEmployee employee : updateList) {
if (bankCheckMap.get(employee.getBankNo()) != null && Boolean.FALSE.equals(bankCheckMap.get(employee.getBankNo()))) {
errorMessageList.add(new ErrorMessage(employee.getLineNums(), "第" + employee.getLineNums()
+ "行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!"));
+ "行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!"));
} else {
employee.setIssueStatus(CommonConstants.ZERO_INT);
employee.setLineNums(null);
newUpdateList.add(employee);
}
}
doSetIntegerArea(newUpdateList);
this.updateBatchById(newUpdateList);
}
if (!saveList.isEmpty()) {
......@@ -1099,13 +1115,14 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
for (TSalaryEmployee employee : saveList) {
if (bankCheckMap.get(employee.getBankNo()) != null && Boolean.FALSE.equals(bankCheckMap.get(employee.getBankNo()))) {
errorMessageList.add(new ErrorMessage(employee.getLineNums(), "第" + employee.getLineNums()
+ "行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!"));
+ "行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!!!"));
} else {
employee.setIssueStatus(CommonConstants.ZERO_INT);
employee.setLineNums(null);
newSaveList.add(employee);
}
}
doSetIntegerArea(newSaveList);
this.saveBatch(newSaveList);
}
boolean isTrue = true;
......@@ -1280,8 +1297,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
// 变更日志 hgw 2024-7-16 18:19:57
logService.initModLog(newEmp,employee,CommonConstants.THREE_STRING,newEmp.getCreateName(), null);
BeanUtil.copyProperties(newEmp, employee, ignoreProperties);
doSetIntegerAreaByEmp(employee);
this.updateById(employee);
} else {
doSetIntegerAreaByEmp(newEmp);
this.save(newEmp);
}
return CommonConstants.SAVE_SUCCESS;
......
......@@ -27,7 +27,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
......@@ -339,7 +338,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
//更新社保状态为-待结算
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()) {
stringList = new ArrayList<>();
......@@ -348,7 +347,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
//更新公积金状态为-待结算
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()) {
stringList = new ArrayList<>();
......@@ -357,7 +356,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
//更新社保状态为-待结算
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()) {
stringList = new ArrayList<>();
......@@ -366,7 +365,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
//更新公积金状态为-待结算
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 {
// 统一处理连接查询
if (updateEmpList != null && !updateEmpList.isEmpty()) {
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);
}
}
}
doSetIntegerArea(updateEmpList);
tSalaryEmployeeService.updateBatchById(updateEmpList);
}
if (!checkBankInfoEmpList.isEmpty()) {
......@@ -669,6 +653,27 @@ public class SalaryAccountUtil implements Serializable {
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) {
boolean flag = true;
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