Commit e3e1aa19 authored by hongguangwu's avatar hongguangwu

薪资批量更新

parent 6feb364c
...@@ -440,15 +440,19 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -440,15 +440,19 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TSalaryEmployee emp; TSalaryEmployee emp;
// 开户行省市的区域暂存 // 开户行省市的区域暂存
String areaStr; String areaStr;
boolean curTaxMonth;
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
excel = excelVOList.get(i); excel = excelVOList.get(i);
if (excel != null) { if (excel != null) {
if (Common.isNotNull(excel.getEmpIdcard()) && Common.isNotNull(excel.getDeptNo())) { if (Common.isNotNull(excel.getEmpIdcard()) && Common.isNotNull(excel.getDeptNo())) {
emp = empMap.get(excel.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + excel.getDeptNo()); emp = empMap.get(excel.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + excel.getDeptNo());
if (Common.isNotNull(emp)) { if (Common.isNotNull(emp)) {
curTaxMonth = false;
if (Common.isNotNull(emp.getTaxMonth()) && Common.isNotNull(excel.getTaxMonth()) && emp.getTaxMonth().length()==6) { if (Common.isNotNull(emp.getTaxMonth()) && Common.isNotNull(excel.getTaxMonth()) && emp.getTaxMonth().length()==6) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SalaryConstants.TAX_MONTH_CUR)); curTaxMonth = true;
} else { } else if (Common.isNotNull(excel.getTaxMonth())) {
emp.setTaxMonth(excel.getTaxMonth());
}
if (Common.isNotNull(excel.getBankName())) { if (Common.isNotNull(excel.getBankName())) {
emp.setBankName(excel.getBankName()); emp.setBankName(excel.getBankName());
} }
...@@ -480,10 +484,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -480,10 +484,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (Common.isNotNull(excel.getEmpPhone())) { if (Common.isNotNull(excel.getEmpPhone())) {
emp.setEmpPhone(excel.getEmpPhone()); emp.setEmpPhone(excel.getEmpPhone());
} }
if (Common.isNotNull(excel.getTaxMonth())) {
emp.setTaxMonth(excel.getTaxMonth());
}
baseMapper.updateById(emp); baseMapper.updateById(emp);
if (curTaxMonth) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SalaryConstants.CUR_TAX_INFO));
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
} }
} else { } else {
......
...@@ -173,4 +173,5 @@ public class SalaryConstants { ...@@ -173,4 +173,5 @@ public class SalaryConstants {
public static final String TAX_MONTH_CUR = "计税月份已存在,不可更新,请清空计税月份单元格内容!"; public static final String TAX_MONTH_CUR = "计税月份已存在,不可更新,请清空计税月份单元格内容!";
public static final String PROVINCE_ERROR = "开户行省错误!"; public static final String PROVINCE_ERROR = "开户行省错误!";
public static final String CITY_ERROR = "开户行市错误!"; public static final String CITY_ERROR = "开户行市错误!";
public static final String CUR_TAX_INFO = "当前项目薪酬人员已维护计税月份,计税月份沿用系统原值,其他字段已更新!";
} }
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