Commit 518dda86 authored by hongguangwu's avatar hongguangwu

MVP1.6.7-薪资导入相关

parent c7b11685
...@@ -20,9 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity; ...@@ -20,9 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -417,6 +415,7 @@ public class TPreEmployeeInfo extends BaseEntity { ...@@ -417,6 +415,7 @@ public class TPreEmployeeInfo extends BaseEntity {
/** /**
* 开户行省 * 开户行省
*/ */
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "开户行省",isArea = true) @ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省") @ExcelProperty("开户行省")
...@@ -424,6 +423,7 @@ public class TPreEmployeeInfo extends BaseEntity { ...@@ -424,6 +423,7 @@ public class TPreEmployeeInfo extends BaseEntity {
/** /**
* 开户行市 * 开户行市
*/ */
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince") @ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市") @ExcelProperty("开户行市")
...@@ -447,6 +447,7 @@ public class TPreEmployeeInfo extends BaseEntity { ...@@ -447,6 +447,7 @@ public class TPreEmployeeInfo extends BaseEntity {
/** /**
* 计税月份 * 计税月份
*/ */
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "计税月份", maxLength = 6) @ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符") @Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
......
...@@ -523,7 +523,9 @@ public class SalaryAccountUtil implements Serializable { ...@@ -523,7 +523,9 @@ public class SalaryAccountUtil implements Serializable {
} }
// 统一处理连接查询 // 统一处理连接查询
if (updateEmpList != null && !updateEmpList.isEmpty()) {
tSalaryEmployeeService.updateBatchById(updateEmpList); tSalaryEmployeeService.updateBatchById(updateEmpList);
}
if (!checkBankInfoEmpList.isEmpty()) { if (!checkBankInfoEmpList.isEmpty()) {
// 本次不为代发户,并且薪资人员里的代发户标记没去掉,要校验银行卡 // 本次不为代发户,并且薪资人员里的代发户标记没去掉,要校验银行卡
tSalaryEmployeeService.checkBankInfoList(checkBankInfoEmpList, errorList); tSalaryEmployeeService.checkBankInfoList(checkBankInfoEmpList, errorList);
...@@ -702,6 +704,8 @@ public class SalaryAccountUtil implements Serializable { ...@@ -702,6 +704,8 @@ public class SalaryAccountUtil implements Serializable {
} else { } else {
entity.setBankName(emp.getBankName()); entity.setBankName(emp.getBankName());
} }
} else {
emp.setBankName(entity.getBankName());
} }
if (Common.isEmpty(entity.getBankNo())) { if (Common.isEmpty(entity.getBankNo())) {
if (Common.isEmpty(emp.getBankNo())) { if (Common.isEmpty(emp.getBankNo())) {
...@@ -711,6 +715,8 @@ public class SalaryAccountUtil implements Serializable { ...@@ -711,6 +715,8 @@ public class SalaryAccountUtil implements Serializable {
} else { } else {
entity.setBankNo(emp.getBankNo()); entity.setBankNo(emp.getBankNo());
} }
} else {
emp.setBankNo(entity.getBankNo());
} }
if (Common.isEmpty(entity.getBankProvince())) { if (Common.isEmpty(entity.getBankProvince())) {
if (Common.isEmpty(emp.getBankProvince())) { if (Common.isEmpty(emp.getBankProvince())) {
...@@ -720,6 +726,8 @@ public class SalaryAccountUtil implements Serializable { ...@@ -720,6 +726,8 @@ public class SalaryAccountUtil implements Serializable {
} else { } else {
entity.setBankProvince(String.valueOf(emp.getBankProvince())); entity.setBankProvince(String.valueOf(emp.getBankProvince()));
} }
} else {
emp.setBankProvince(entity.getBankProvince());
} }
if (Common.isEmpty(emp.getBankCity())) { if (Common.isEmpty(emp.getBankCity())) {
if (Common.isEmpty(emp.getBankCity())) { if (Common.isEmpty(emp.getBankCity())) {
...@@ -729,15 +737,22 @@ public class SalaryAccountUtil implements Serializable { ...@@ -729,15 +737,22 @@ public class SalaryAccountUtil implements Serializable {
} else { } else {
entity.setBankCity(String.valueOf(emp.getBankCity())); entity.setBankCity(String.valueOf(emp.getBankCity()));
} }
} else {
emp.setBankCity(entity.getBankCity());
} }
if (Common.isEmpty(entity.getBankSubName()) && Common.isNotNull(emp.getBankSubName())) { if (Common.isEmpty(entity.getBankSubName()) ){
if (Common.isNotNull(emp.getBankSubName())) {
entity.setBankSubName(emp.getBankSubName()); entity.setBankSubName(emp.getBankSubName());
} }
} else {
emp.setBankSubName(entity.getBankSubName());
}
if (bankMap.get(entity.getBankName()) == null) { 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)); errorList.add(new ErrorMessage(i, error));
return true; return true;
} }
updateEmpList.add(emp);
} else if (salaryGiveTimeFlag) { } else if (salaryGiveTimeFlag) {
if (Common.isEmpty(emp.getBankName())) { if (Common.isEmpty(emp.getBankName())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行-为空,请去薪酬人员查询处更新!"; 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