Commit c5537002 authored by hongguangwu's avatar hongguangwu

MVP1.4-导出-薪资人员导入

parent ef574799
...@@ -570,10 +570,15 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -570,10 +570,15 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (Common.isNotNull(emp)) { if (Common.isNotNull(emp)) {
if (canUpdate) { if (canUpdate) {
curTaxMonth = false; curTaxMonth = false;
if (Common.isNotNull(emp.getTaxMonth()) && Common.isNotNull(excel.getTaxMonth()) && emp.getTaxMonth().length() == 6) { if (Common.isNotNull(emp.getTaxMonth())) {
curTaxMonth = true; curTaxMonth = true;
} else if (Common.isNotNull(excel.getTaxMonth())) { } else if (Common.isNotNull(excel.getTaxMonth())) {
emp.setTaxMonth(excel.getTaxMonth()); if (excel.getTaxMonth().length() == 6) {
emp.setTaxMonth(excel.getTaxMonth());
} else {
errorMessageList.add(new ErrorMessage((i + 2), SalaryConstants.TAX_MONTH_LENGTH));
continue;
}
} }
if (Common.isNotNull(excel.getBankName())) { if (Common.isNotNull(excel.getBankName())) {
emp.setBankName(excel.getBankName()); emp.setBankName(excel.getBankName());
...@@ -609,6 +614,13 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -609,6 +614,13 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (Common.isNotNull(excel.getEmpName())) { if (Common.isNotNull(excel.getEmpName())) {
emp.setEmpName(excel.getEmpName()); emp.setEmpName(excel.getEmpName());
} }
emp.setUnitId(dept.getCustomerId());
emp.setUnitName(dept.getCustomerName());
emp.setUnitNo(dept.getCustomerNo());
emp.setDeptId(dept.getId());
emp.setDeptName(dept.getDepartName());
emp.setDeptNo(dept.getDepartNo());
emp.setInvoiceTitle(dept.getInvoiceTitleSalary());
updateList.add(emp); updateList.add(emp);
if (curTaxMonth) { if (curTaxMonth) {
errorMessageList.add(new ErrorMessage((i + 2), SalaryConstants.CUR_TAX_INFO)); errorMessageList.add(new ErrorMessage((i + 2), SalaryConstants.CUR_TAX_INFO));
...@@ -625,10 +637,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -625,10 +637,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
|| Common.isEmpty(excel.getBankNo()) || Common.isEmpty(excel.getBankProvince()) || Common.isEmpty(excel.getBankNo()) || Common.isEmpty(excel.getBankProvince())
|| Common.isEmpty(excel.getBankCity()) || Common.isEmpty(excel.getTaxMonth())) { || Common.isEmpty(excel.getBankCity()) || Common.isEmpty(excel.getTaxMonth())) {
errorMessageList.add(new ErrorMessage((i + 2), "新增员工,除了支行,其他必填")); errorMessageList.add(new ErrorMessage((i + 2), "新增员工,除了支行,其他必填"));
continue;
} else { } else {
String pre = this.checkNewEmpBankAndPhone(excel, true); String pre = this.checkNewEmpBankAndPhone(excel, true);
if (pre != null) { if (pre != null) {
errorMessageList.add(new ErrorMessage((i + 2), "新增员工,除了支行,其他必填")); errorMessageList.add(new ErrorMessage((i + 2), pre));
continue;
} else { } else {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getBankProvince().trim()); areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getBankProvince().trim());
if (Common.isNotNull(areaProvince)) { if (Common.isNotNull(areaProvince)) {
...@@ -651,6 +665,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -651,6 +665,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
excel.setDeptId(dept.getId()); excel.setDeptId(dept.getId());
excel.setDeptName(dept.getDepartName()); excel.setDeptName(dept.getDepartName());
excel.setDeptNo(dept.getDepartNo()); excel.setDeptNo(dept.getDepartNo());
excel.setInvoiceTitle(dept.getInvoiceTitleSalary());
saveList.add(excel); saveList.add(excel);
errorMessageList.add(new ErrorMessage((i + 2), CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorMessage((i + 2), CommonConstants.SAVE_SUCCESS));
} }
......
...@@ -188,4 +188,5 @@ public class SalaryConstants { ...@@ -188,4 +188,5 @@ public class SalaryConstants {
public static final String CITY_ERROR = "开户行市错误!"; public static final String CITY_ERROR = "开户行市错误!";
public static final String CUR_TAX_INFO = "当前项目薪酬人员已维护计税月份,计税月份沿用系统原值,其他字段已更新!"; public static final String CUR_TAX_INFO = "当前项目薪酬人员已维护计税月份,计税月份沿用系统原值,其他字段已更新!";
public static final String EKP_NO_RETURN = "推送EKP无结果返回"; public static final String EKP_NO_RETURN = "推送EKP无结果返回";
public static final String TAX_MONTH_LENGTH = "计税月份错误";
} }
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