Commit 952cf2e3 authored by hongguangwu's avatar hongguangwu

MVP1.7.14-薪资人员导入校验优化

parent 066b1c04
...@@ -71,7 +71,7 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> { ...@@ -71,7 +71,7 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
* @Date: 2023/2/9 14:57 * @Date: 2023/2/9 14:57
* @return: java.lang.String * @return: java.lang.String
**/ **/
String saveNewEmployeeList(List<TSalaryEmployee> saveNewEmpList, List<ErrorMessage> errorList); String saveNewEmployeeList(List<TSalaryEmployee> saveNewEmpList, List<ErrorMessage> errorList, Map<String, Integer> phoneExcelMap);
/** /**
* @Description: 更新卡号等信息 * @Description: 更新卡号等信息
...@@ -79,7 +79,8 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> { ...@@ -79,7 +79,8 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
* @Date: 2024/7/22 10:27 * @Date: 2024/7/22 10:27
* @return: java.lang.String * @return: java.lang.String
**/ **/
String updateEmployeeBankList(List<TSalaryEmployee> updateEmpBankList, Map<String, TSalaryEmployee> updateEmpBankMap, List<ErrorMessage> errorList); String updateEmployeeBankList(List<TSalaryEmployee> updateEmpBankList, Map<String, TSalaryEmployee> updateEmpBankMap
, List<ErrorMessage> errorList, Map<String, Integer> phoneExcelMap);
/** /**
* @param inputStream * @param inputStream
......
...@@ -314,14 +314,13 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -314,14 +314,13 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} }
@Override @Override
public String saveNewEmployeeList(List<TSalaryEmployee> saveNewEmpList, List<ErrorMessage> errorList) { public String saveNewEmployeeList(List<TSalaryEmployee> saveNewEmpList, List<ErrorMessage> errorList, Map<String, Integer> phoneExcelMap) {
if (saveNewEmpList != null && !saveNewEmpList.isEmpty()) { if (saveNewEmpList != null && !saveNewEmpList.isEmpty()) {
// 银行卡 // 银行卡
List<TCheckBankNo> bankList = new ArrayList<>(); List<TCheckBankNo> bankList = new ArrayList<>();
List<String> phoneList = new ArrayList<>(); List<String> phoneList = new ArrayList<>();
TCheckBankNo checkBankNo; TCheckBankNo checkBankNo;
// 查本表重
Map<String, Integer> phoneExcelMap = new HashMap<>();
// 本表重复的手机号,不允许导入该行 // 本表重复的手机号,不允许导入该行
Map<String, Integer> phoneRepeatMap = new HashMap<>(); Map<String, Integer> phoneRepeatMap = new HashMap<>();
Integer phoneCount; Integer phoneCount;
...@@ -446,15 +445,14 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -446,15 +445,14 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
@Override @Override
public String updateEmployeeBankList(List<TSalaryEmployee> updateEmployeeBankList public String updateEmployeeBankList(List<TSalaryEmployee> updateEmployeeBankList
, Map<String, TSalaryEmployee> updateEmpBankMap, List<ErrorMessage> errorList) { , Map<String, TSalaryEmployee> updateEmpBankMap, List<ErrorMessage> errorList
, Map<String, Integer> phoneExcelMap) {
if (updateEmployeeBankList != null && !updateEmployeeBankList.isEmpty()) { if (updateEmployeeBankList != null && !updateEmployeeBankList.isEmpty()) {
// 银行卡 // 银行卡
List<TCheckBankNo> bankList = new ArrayList<>(); List<TCheckBankNo> bankList = new ArrayList<>();
TCheckBankNo checkBankNo; TCheckBankNo checkBankNo;
List<String> phoneList = new ArrayList<>(); List<String> phoneList = new ArrayList<>();
// 查本表重
Map<String, Integer> phoneExcelMap = new HashMap<>();
// 本表重复的手机号,不允许导入该行 // 本表重复的手机号,不允许导入该行
Map<String, Integer> phoneRepeatMap = new HashMap<>(); Map<String, Integer> phoneRepeatMap = new HashMap<>();
Integer phoneCount; Integer phoneCount;
......
...@@ -633,13 +633,18 @@ public class SalaryAccountUtil implements Serializable { ...@@ -633,13 +633,18 @@ public class SalaryAccountUtil implements Serializable {
} }
} }
if (canSave) { if (canSave) {
// 查本表重
Map<String, Integer> phoneExcelMap = new HashMap<>();
// 新增 // 新增
if (!saveNewEmpList.isEmpty()) { if (!saveNewEmpList.isEmpty()) {
tSalaryEmployeeService.saveNewEmployeeList(saveNewEmpList, errorList); tSalaryEmployeeService.saveNewEmployeeList(saveNewEmpList, errorList, phoneExcelMap);
} }
// 更新人员信息 // 更新人员信息
if (!updateEmpBankList.isEmpty()) { if (!updateEmpBankList.isEmpty()) {
tSalaryEmployeeService.updateEmployeeBankList(updateEmpBankList, updateEmpBankMap, errorList); tSalaryEmployeeService.updateEmployeeBankList(updateEmpBankList, updateEmpBankMap, errorList, phoneExcelMap);
}
if (phoneExcelMap != null && !phoneExcelMap.isEmpty()) {
phoneExcelMap.clear();
} }
} }
} }
......
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