From 729c6c7d3aeffcda1b8e291c14a612dd91b3fe8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 7 Mar 2024 14:12:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/taxdeclaration/bo/TaxDeclarationDetailBO.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationDetailBO.java b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationDetailBO.java index 81010fb7b..0fe5a0815 100644 --- a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationDetailBO.java +++ b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationDetailBO.java @@ -13,6 +13,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import weaver.general.Util; import java.util.*; @@ -166,9 +167,9 @@ public class TaxDeclarationDetailBO { .setAnnualTaxSavings(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.ANNUAL_TAX_SAVINGS)) .setAnnualRemark(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.ANNUAL_REMARK)); if (dto.getEmployeeType() == null || Objects.equals(dto.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())) { - DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(dto.getEmployeeId()); - taxDeclarationLaborListDTO.setJobNum(simpleEmployee.getWorkcode()) - .setUsername(simpleEmployee.getUsername()) + DataCollectionEmployee simpleEmployee = simpleEmployeeMap.getOrDefault(dto.getEmployeeId(),new DataCollectionEmployee()); + taxDeclarationLaborListDTO.setJobNum(Util.null2String(simpleEmployee.getWorkcode())) + .setUsername(Util.null2String(simpleEmployee.getUsername())) .setCardNum(Optional.ofNullable(simpleEmployee).map(DataCollectionEmployee::getIdNo).orElse(StringUtils.EMPTY)); } else {