Merge branch 'feature/个税2312版本功能' into feature/艾志-正常申报补足年终奖人员

This commit is contained in:
钱涛 2023-12-28 18:49:05 +08:00
commit 8456692b29
3 changed files with 10 additions and 9 deletions

View File

@ -3,7 +3,6 @@ package com.engine.salary.entity.employeedeclare.bo;
import com.engine.salary.entity.employeedeclare.dto.EmployeeDeclareExcelDTO;
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
import com.engine.salary.enums.employeedeclare.CardTypeEnum;
import com.engine.salary.enums.employeedeclare.EmploymentTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryI18nUtil;
@ -27,7 +26,7 @@ public class EmployeeDeclareBO {
.cardType(dto.getCardType() == null ? null :CardTypeEnum.RESIDENT_IDENTITY_CARDS.getValue())
.cardNum(dto.getCardNum())
.employmentStatus(StringUtils.isBlank(dto.getEmploymentStatus()) ? null : new Integer(dto.getEmploymentStatus()))
.employmentType(EmploymentTypeEnum.getValueByDefaultLabel(dto.getEmploymentType()))
.employmentType(StringUtils.isBlank(dto.getEmploymentType()) ? null : new Integer(dto.getEmploymentType()))
.employmentFirstYear(dto.getEmploymentFirstYear())
.mobile(dto.getMobile())
.employmentDate(StringUtils.isBlank(dto.getEmploymentDate()) ? null : SalaryDateUtil.stringToDate(dto.getEmploymentDate()) )

View File

@ -452,8 +452,7 @@
update_time
)
VALUES
(
<foreach collection="collection" item="item" separator=",">
<foreach collection="collection" item="item" separator=",">(
#{item.birthday},
#{item.cardNum},
#{item.cardType},
@ -486,8 +485,8 @@
#{item.taxCycle},
#{item.tenantKey},
#{item.updateTime}
</foreach>
)
</foreach>
</insert>

View File

@ -105,7 +105,7 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
row.add(CardTypeEnum.RESIDENT_IDENTITY_CARDS.getDefaultLabel());
row.add(employeeDeclare.getCardNum());
row.add(employmentStatusEnum == null ? "" : employmentStatusEnum.getDefaultLabel());
row.add(employmentTypeEnum == null ? "" : employmentTypeEnum.getDefaultLabel());
row.add(employmentTypeEnum == null ? EmploymentTypeEnum.EMPLOYEE.getDefaultLabel() : employmentTypeEnum.getDefaultLabel());
row.add(employeeDeclare.getEmploymentFirstYear());
row.add(employeeDeclare.getMobile());
row.add(SalaryDateUtil.getFormatDate(employeeDeclare.getEmploymentDate()));
@ -327,6 +327,9 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
errorData.add(errorMessageMap);
}
} else {
if (StringUtils.isNotBlank(dataValue) && dataValue.length() >= 10) {
dataValue = dataValue.substring(0,10);
}
if (!SalaryDateUtil.checkDay(dataValue)) {
isError = true;
Map<String, String> errorMessageMap = Maps.newHashMap();
@ -440,7 +443,8 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
} else {
EmployeeDeclarePO newEmployeeDeclare = new EmployeeDeclarePO();
BeanUtils.copyProperties(employeeDeclare, newEmployeeDeclare);
BeanUtils.copyProperties(employeeDeclareExcel, newEmployeeDeclare);
EmployeeDeclarePO employeeDeclarePO = EmployeeDeclareBO.convert2PO(employeeDeclareExcel);
BeanUtils.copyProperties(employeeDeclarePO, newEmployeeDeclare, getNullPropertyNames(employeeDeclarePO));
newEmployeeDeclare.setNewEmployeeInfo(StringUtils.equals(employeeDeclare.toCompareString(), newEmployeeDeclare.toCompareString()) ? 0 : 1);
newEmployeeDeclare.setUpdateTime(now);
needUpdateEmployeeDeclares.add(newEmployeeDeclare);
@ -481,7 +485,6 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
if (isError) {
failCount++;
failRowIndex++;
errorData.add(map);
continue;
}
successCount++;
@ -496,7 +499,7 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee
apidatas.put("successCount", successCount);
apidatas.put("errorCount", failCount);
apidatas.put("errorNotice", errorData);
apidatas.put("errorData", errorData);
// 发送导入回调信息
// salaryBatchService.sendImportCallBackInfo(message, successCount, errorCount, errorExcelSheets);