Commit b69335d0 authored by hongguangwu's avatar hongguangwu

MVP1.6.7-薪资导入相关

parent 0c66d60f
......@@ -923,8 +923,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private R<String> saveBase(PreEmpMainDetailVo vo, String status) {
YifuUser user = getNewYifuUser();
TPreEmpMain main = vo.getMain();
try {
YifuUser user = getNewYifuUser();
String idCard = main.getEmpIdcard();
if (Common.isNotNull(idCard)) {
TPreEmployeeProject tPreEmployeeProject = vo.getTpreEmployeeProject();
......@@ -984,7 +985,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (tPreEmpEducation.getAttaList() != null && !tPreEmpEducation.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = tPreEmpEducation.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainIdAndType(tPreEmpEducation.getId(),0);
tAttaInfoService.deleteByDomainIdAndType(tPreEmpEducation.getId(), 0);
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(tPreEmpEducation.getId());
......@@ -1066,7 +1067,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (info.getAttaList() != null && !info.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = info.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainIdAndType(info.getId(),1);
tAttaInfoService.deleteByDomainIdAndType(info.getId(), 1);
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(info.getId());
......@@ -1092,7 +1093,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (info.getAttaList() != null && !info.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = info.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainIdAndType(info.getId(),2);
tAttaInfoService.deleteByDomainIdAndType(info.getId(), 2);
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(info.getId());
......@@ -1138,6 +1139,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} else {
return R.failed("身份证不可为空!");
}
} catch (Exception e) {
log.error("档案预入职C端保存异常:", e);
throw new RuntimeException("保存失败,请联系管理员!!主键【" + main.getId() +"】详细信息:"+ e.getMessage());
}
}
/**
......@@ -1675,7 +1680,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
isNew = true;
emp = new TEmployeeInfo();
}
BeanUtil.copyProperties(tPreEmployeeInfo, emp, ID);
String[] ignoreProperties = new String[]{"id", "empCode"};
BeanUtil.copyProperties(tPreEmployeeInfo, emp, ignoreProperties);
if (isNew) {
// 新员工塞基本属性
this.setNewEmpBaseData(emp, user);
......@@ -2027,6 +2033,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
return R.failed("id、status不可为空!");
}
TPreEmpMain preEmpMain = this.getById(id);
try {
if (preEmpMain == null || Common.isEmpty(preEmpMain.getStatus()) || !CommonConstants.TWO_STRING.equals(preEmpMain.getStatus())) {
return R.failed("请确认ID与状态!");
}
......@@ -2071,6 +2078,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} else {
return R.failed("未找到信息,未审核!");
}
} catch (Exception e) {
log.error("档案预入职审核异常:", e);
throw new RuntimeException("保存失败,请联系管理员!!主键【" + preEmpMain.getId() +"】详细信息:"+ e.getMessage());
}
}
......
......@@ -58,13 +58,13 @@ public class TSalaryEmpModLog extends BaseEntity {
@Schema(description = "content")
private String content;
/**
* 0编辑、1批量更新、2EKP变更银行卡号;3预入职更新
* 0编辑、1批量更新、2EKP变更银行卡号;3预入职更新;4导入更新银行信息
*/
@ExcelAttribute(name = "0编辑、1批量更新、2EKP变更银行卡号", isNotEmpty = true, errorInfo = "0编辑、1批量更新、2EKP变更银行卡号不能为空", maxLength = 1)
@NotBlank(message = "0编辑、1批量更新、2EKP变更银行卡号不能为空")
@Length(max = 1, message = "0编辑、1批量更新、2EKP变更银行卡号不能超过1个字符")
@ExcelProperty("0编辑、1批量更新、2EKP变更银行卡号")
@Schema(description = "0编辑、1批量更新、2EKP变更银行卡号;3预入职更新")
@ExcelAttribute(name = "类型", isNotEmpty = true, errorInfo = "类型不能为空", maxLength = 1)
@NotBlank(message = "类型不能为空")
@Length(max = 1, message = "类型不能超过1个字符")
@ExcelProperty("类型")
@Schema(description = "0编辑、1批量更新、2EKP变更银行卡号;3预入职更新;4导入更新银行信息")
private String type;
/**
......
......@@ -45,4 +45,6 @@ public interface TSalaryEmpModLogService extends IService<TSalaryEmpModLog> {
List<TSalaryEmpModLog> noPageDiy(TSalaryEmpModLogSearchVo searchVo);
void initModLog(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type, String userName, ExcelUtil<TSalaryEmployee> util);
TSalaryEmpModLog checkEditToLog(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type, String userName, ExcelUtil<TSalaryEmployee> util);
}
......@@ -73,6 +73,14 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
**/
String saveNewEmployeeList(List<TSalaryEmployee> saveNewEmpList, List<ErrorMessage> errorList);
/**
* @Description: 更新卡号等信息
* @Author: hgw
* @Date: 2024/7/22 10:27
* @return: java.lang.String
**/
String updateEmployeeBankList(List<TSalaryEmployee> updateEmpBankList, Map<String, TSalaryEmployee> updateEmpBankMap, List<ErrorMessage> errorList);
/**
* @param inputStream
* @Description: 批量更新-薪资人员信息
......
......@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
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.esotericsoftware.minlog.Log;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
......@@ -77,8 +76,22 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
**/
@Override
public void initModLog(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type,String userName,ExcelUtil<TSalaryEmployee> util) {
TSalaryEmpModLog log = doCheckModCore(newEntity, oldEntity, type, userName, util);
if (log != null && Common.isNotNull(log.getContent())){
baseMapper.insert(log);
}
}
@Override
public TSalaryEmpModLog checkEditToLog(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type,String userName
, ExcelUtil<TSalaryEmployee> util) {
return doCheckModCore(newEntity, oldEntity, type, userName, util);
}
private TSalaryEmpModLog doCheckModCore(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type, String userName, ExcelUtil<TSalaryEmployee> util) {
TSalaryEmpModLog log = null;
if (Common.isNotNull(newEntity) && Common.isNotNull(oldEntity)){
TSalaryEmpModLog log = new TSalaryEmpModLog();
log = new TSalaryEmpModLog();
log.setIdNum(newEntity.getEmpIdcard());
log.setParentId(newEntity.getId());
log.setType(type);
......@@ -102,26 +115,23 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
if (Common.isNotNull(newEntity.getBankProvince())
&& Common.isNotNull(oldEntity.getBankProvince()) && !oldEntity.getBankProvince().equals(newEntity.getBankProvince())){
str.append("开户行省:");
str.append(Common.isEmpty(oldEntity.getBankProvince())?"":util.getAreaLabelPublic(oldEntity.getBankProvince()));
str.append(Common.isEmpty(oldEntity.getBankProvince())?"": util.getAreaLabelPublic(oldEntity.getBankProvince()));
str.append("->");
str.append(Common.isEmpty(newEntity.getBankProvince())?"":util.getAreaLabelPublic(newEntity.getBankProvince()));
str.append(Common.isEmpty(newEntity.getBankProvince())?"": util.getAreaLabelPublic(newEntity.getBankProvince()));
str.append(" ");
}
//开户行市
if (Common.isNotNull(newEntity.getBankCity())
&& Common.isNotNull(oldEntity.getBankCity()) && !oldEntity.getBankCity().equals(newEntity.getBankCity())){
str.append("开户行市:");
str.append(Common.isEmpty(oldEntity.getBankCity())?"":util.getAreaLabelPublic(oldEntity.getBankCity()));
str.append(Common.isEmpty(oldEntity.getBankCity())?"": util.getAreaLabelPublic(oldEntity.getBankCity()));
str.append("->");
str.append(Common.isEmpty(newEntity.getBankCity())?"":util.getAreaLabelPublic(newEntity.getBankCity()));
str.append(Common.isEmpty(newEntity.getBankCity())?"": util.getAreaLabelPublic(newEntity.getBankCity()));
str.append(" ");
}
log.setContent(str.toString());
Log.error("薪资人员变更记录表:"+str.toString());
if (Common.isNotNull(log.getContent())){
baseMapper.insert(log);
}
}
return log;
}
private void extracted(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, StringBuilder str) {
......
......@@ -46,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmpModLog;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper;
......@@ -386,6 +387,100 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return null;
}
@Override
public String updateEmployeeBankList(List<TSalaryEmployee> updateEmployeeBankList
, Map<String, TSalaryEmployee> updateEmpBankMap, List<ErrorMessage> errorList) {
if (updateEmployeeBankList != null && !updateEmployeeBankList.isEmpty()) {
// 银行卡
List<TCheckBankNo> bankList = new ArrayList<>();
TCheckBankNo checkBankNo;
for (TSalaryEmployee employee : updateEmployeeBankList) {
if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName());
checkBankNo.setBankNo(employee.getBankNo());
bankList.add(checkBankNo);
}
}
// 批量校验 卡号与手机号
Map<String, Boolean> bankMap = new HashMap<>();
if (!bankList.isEmpty()) {
R<CheckBatchVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
bankMap = checkListR.getData().getCheckMap();
}
}
boolean isFalse = false;
String areaProvince;
String areaCity;
TSalaryEmployee oldEmp;
ExcelUtil<TSalaryEmployee> util = new ExcelUtil<>(TSalaryEmployee.class);
TSalaryEmpModLog log;
List<TSalaryEmpModLog> saveLogList = new ArrayList<>();
for (TSalaryEmployee employee : updateEmployeeBankList) {
if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
oldEmp = updateEmpBankMap.get(employee.getEmpIdcard());
if (oldEmp != null) {
// 有变更才更新
if ( (Common.isNotNull(employee.getBankNo()) && !employee.getBankNo().equals(oldEmp.getBankNo()))
|| (Common.isNotNull(employee.getBankProvince()) && !employee.getBankProvince().equals(oldEmp.getBankProvince()))
|| (Common.isNotNull(employee.getBankCity()) && !employee.getBankCity().equals(oldEmp.getBankCity()))
|| (Common.isNotNull(employee.getBankName()) && !employee.getBankName().equals(oldEmp.getBankName()))
|| (Common.isNotNull(employee.getBankSubName()) && !employee.getBankSubName().equals(oldEmp.getBankSubName()))
) {
if (bankMap.get(employee.getBankNo()) != null) {
if (Boolean.FALSE.equals(bankMap.get(employee.getBankNo()))) {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【姓名与卡号验证:认证不一致】"));
isFalse = true;
}
} else {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【姓名与卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
isFalse = true;
}
if (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 {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【" + SalaryConstants.CITY_ERROR + "】"));
isFalse = true;
}
}
employee.setBankProvince(areaProvince);
} else {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【" + SalaryConstants.PROVINCE_ERROR + "】"));
isFalse = true;
}
}
if (!isFalse) {
log = logService.checkEditToLog(employee,oldEmp,CommonConstants.FOUR_STRING,employee.getCreateName(), util);
if (log != null) {
saveLogList.add(log);
}
}
}
}
}
}
if (isFalse) {
return null;
}
// 更新人员
this.updateBatchById(updateEmployeeBankList);
// 新增日志
logService.saveBatch(saveLogList);
}
return null;
}
/**
* @param employee
* @Description: 校验卡号与手机号
......
package com.yifu.cloud.plus.v1.yifu.salary.util;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
......@@ -142,6 +143,11 @@ public class SalaryAccountUtil implements Serializable {
boolean notLabour = !CommonConstants.THREE_STRING.equals(salaryType);
// 连接查询的数据集合
List<TSalaryEmployee> updateEmpList = new ArrayList<>();
// 2024-7-22 10:16:42 hgw 更新卡号等信息
List<TSalaryEmployee> updateEmpBankList = new ArrayList<>();
// 2024-7-22 10:16:42 hgw 更新卡号等信息,存储旧人员信息,以增加更新记录使用
Map<String, TSalaryEmployee> updateEmpBankMap = new HashMap<>();
List<TSalaryEmployee> checkBankInfoEmpList = new ArrayList<>();
List<TSalaryEmployee> newEmpList = new ArrayList<>();
Map<String, TSalaryAccountVo> entityMap = new HashMap<>();
......@@ -477,7 +483,8 @@ public class SalaryAccountUtil implements Serializable {
// newEmpUpdateFlag = CommonConstants.ZERO_STRING
if (setEntityByEmpInfo(dept, ownEmployeeMap, ownDeptMap, salaryType, isIssue, errorList
, entity, emp, saiList, salaryGiveTimeFlag, isNewEmployee, empName, salaryStyle
, nowMonth, updateEmpList, checkBankInfoEmpList, i + dataRow, bankMap, newEmpUpdateFlag))
, nowMonth, updateEmpList, checkBankInfoEmpList, i + dataRow, bankMap
, newEmpUpdateFlag, updateEmpBankList, updateEmpBankMap))
continue;
}
if (saiList != null && !saiList.isEmpty()) {
......@@ -575,7 +582,8 @@ public class SalaryAccountUtil implements Serializable {
, CommonConstants.ZERO_STRING.equals(entity.getSalaryGiveTime())
, CommonConstants.ONE_STRING.equals(entity.getIsNewEmployee())
, otherEmp.getEmpName(), entity.getSalaryStyle()
, nowMonth, updateEmpList, checkBankInfoEmpList, newEmps.getLineNums() + dataRow, bankMap, newEmpUpdateFlag)) {
, nowMonth, updateEmpList, checkBankInfoEmpList, newEmps.getLineNums() + dataRow
, bankMap, newEmpUpdateFlag, updateEmpBankList, updateEmpBankMap)) {
isContinue = false;
}
}
......@@ -603,10 +611,33 @@ public class SalaryAccountUtil implements Serializable {
}
}
}
if (!updateEmpBankList.isEmpty()) {
TSalaryEmployee saveNewEmp;
for (int i = 0; i < updateEmpBankList.size(); i++) {
saveNewEmp = updateEmpBankList.get(i);
// 新员工校验计税月
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
entity = entityMap.get(saveNewEmp.getEmpIdcard());
minTaxMonth = minTaxMonthMap.get(saveNewEmp.getEmpIdcard());
if (Common.isNotNull(minTaxMonth)
&& !minTaxMonth.equals(entity.getTaxMonth())) {
error = "第" + (saveNewEmp.getLineNums() + dataRow) + "行:该员工已有发薪记录,计税月份请填写:【" + minTaxMonth + "】" + ",你填写了计税月:【" + entity.getTaxMonth() + "】";
errorList.add(new ErrorMessage((saveNewEmp.getLineNums() + dataRow), error));
canSave = false;
}
}
}
}
if (canSave) {
// 新增
if (!saveNewEmpList.isEmpty()) {
tSalaryEmployeeService.saveNewEmployeeList(saveNewEmpList, errorList);
}
// 更新人员信息
if (!updateEmpBankList.isEmpty()) {
tSalaryEmployeeService.updateEmployeeBankList(updateEmpBankList, updateEmpBankMap, errorList);
}
}
}
}
} catch (Exception e) {
......@@ -618,14 +649,25 @@ public class SalaryAccountUtil implements Serializable {
this.setErrorInfo(errorList);
}
// updateEmpBankList hgw 2024-7-22 10:18:02 更新开户行卡号等信息,以表导入为准
private boolean setEntityByEmpInfo(TSettleDomainSelectVo dept, Map<String, Integer> ownEmployeeMap
, Map<String, Integer> ownDeptMap, String salaryType, Integer isIssue, List<ErrorMessage> errorList
, TSalaryAccountVo entity, TSalaryEmployee emp, List<TSalaryAccountItemVo> saiList
, boolean salaryGiveTimeFlag, boolean isNewEmployee, String empName, String salaryStyle, String nowMonth
, List<TSalaryEmployee> updateEmpList, List<TSalaryEmployee> checkBankInfoEmpList, int i
, Map<String, String> bankMap, String newEmpUpdateFlag) {
, Map<String, String> bankMap, String newEmpUpdateFlag, List<TSalaryEmployee> updateEmpBankList
, Map<String, TSalaryEmployee> updateEmpBankMap) {
TSalaryAccountItemVo sai;
String error;
emp.setLineNums(i);
if (dept != null && dept.getId() != null && !dept.getId().equals(emp.getDeptId())) {
emp.setDeptId(dept.getId());
emp.setDeptName(dept.getDepartName());
emp.setDeptNo(dept.getDepartNo());
emp.setUnitId(dept.getCustomerId());
emp.setUnitNo(dept.getCustomerNo());
emp.setUnitName(dept.getCustomerName());
}
if (Common.isEmpty(emp.getEmpName())) {
error = "第" + i + "行:薪酬人员查询处-员工姓名-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
......@@ -696,9 +738,12 @@ public class SalaryAccountUtil implements Serializable {
// hgs 2024-7-19 09:33:29 新增按照页面开关与新员工字段,来更新员工信息:
if (SalaryConstants.SALARY_STYLE_BANK.equals(salaryStyle)) {
if (CommonConstants.ONE_STRING.equals(newEmpUpdateFlag) && isNewEmployee) {
TSalaryEmployee oldEmp = new TSalaryEmployee();
BeanUtil.copyProperties(emp,oldEmp);
updateEmpBankMap.put(emp.getEmpIdcard(), oldEmp);
if (Common.isEmpty(entity.getBankName())) {
if (Common.isEmpty(emp.getBankName())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行总行-为空,请在工资模板填写!";
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行总行-为空,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
} else {
......@@ -709,7 +754,7 @@ public class SalaryAccountUtil implements Serializable {
}
if (Common.isEmpty(entity.getBankNo())) {
if (Common.isEmpty(emp.getBankNo())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-银行卡号-为空,请在工资模板填写!";
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-银行卡号-为空,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
} else {
......@@ -720,7 +765,7 @@ public class SalaryAccountUtil implements Serializable {
}
if (Common.isEmpty(entity.getBankProvince())) {
if (Common.isEmpty(emp.getBankProvince())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行省-为空,请在工资模板填写!";
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行省-为空,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
} else {
......@@ -731,7 +776,7 @@ public class SalaryAccountUtil implements Serializable {
}
if (Common.isEmpty(emp.getBankCity())) {
if (Common.isEmpty(emp.getBankCity())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行市-为空,请在工资模板填写!";
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行市-为空,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
} else {
......@@ -740,6 +785,22 @@ public class SalaryAccountUtil implements Serializable {
} else {
emp.setBankCity(entity.getBankCity());
}
if (Common.isNotNull(emp.getBankProvince())) {
String areaInt = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + emp.getBankProvince().trim());
if (Common.isNotNull(areaInt)) {
entity.setBankProvince(areaInt);
}
String areaCityInt = null;
if (Common.isNotNull(emp.getBankCity())) {
areaCityInt = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + emp.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + emp.getBankProvince().trim());
if (Common.isNotNull(areaCityInt)) {
entity.setBankCity(areaCityInt);
}
}
}
if (Common.isEmpty(entity.getBankSubName()) ){
if (Common.isNotNull(emp.getBankSubName())) {
entity.setBankSubName(emp.getBankSubName());
......@@ -748,11 +809,11 @@ public class SalaryAccountUtil implements Serializable {
emp.setBankSubName(entity.getBankSubName());
}
if (bankMap.get(entity.getBankName()) == null) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行总行-不符合财务要求,请在工资模板填写!";
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行总行-不符合财务要求,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
}
updateEmpList.add(emp);
updateEmpBankList.add(emp);
} else if (salaryGiveTimeFlag) {
if (Common.isEmpty(emp.getBankName())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行-为空,请去薪酬人员查询处更新!";
......
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