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