From 9867728d2ed52c7be9e9d477ee6946a31838a016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 4 Sep 2023 16:18:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E8=8E=B7=E5=8F=96=E7=B4=AF?= =?UTF-8?q?=E8=AE=A1=E4=B8=93=E9=A1=B9=E9=99=84=E5=8A=A0=E6=89=A3=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacollection/bo/DataCollectionBO.java | 4 ++-- .../param/AddUpDeductionMonthTaxAgentParam.java | 2 ++ .../po/AddUpDeductionRequestFailPO.java | 4 ++-- .../po/AddUpDeductionRequestPO.java | 10 +++++----- .../entity/taxagent/po/TaxAgentTaxReturnPO.java | 1 + .../service/impl/AddUpDeductionServiceImpl.java | 17 +++++++++-------- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/com/engine/salary/entity/datacollection/bo/DataCollectionBO.java b/src/com/engine/salary/entity/datacollection/bo/DataCollectionBO.java index ace90158f..46cd04e6d 100644 --- a/src/com/engine/salary/entity/datacollection/bo/DataCollectionBO.java +++ b/src/com/engine/salary/entity/datacollection/bo/DataCollectionBO.java @@ -350,8 +350,8 @@ public class DataCollectionBO { boolean martyrDependents = SalaryOnOffEnum.ON.getValue().equals(employeeDeclarePO.getMartyrDependents()); employeeMap.computeIfAbsent("sfcj", e -> SalaryOnOffEnum.parseByValue(employeeDeclarePO.getDisability()).getDefaultLabel()); employeeMap.computeIfAbsent("cjzh", e -> disability ? employeeDeclarePO.getDisabilityCardNo() : null); - employeeMap.computeIfAbsent("sfls", e->SalaryOnOffEnum.parseByValue(employeeDeclarePO.getMartyrDependents()).getDefaultLabel()); - employeeMap.computeIfAbsent("lszh", e-> martyrDependents ? employeeDeclarePO.getMartyrDependentsCardNo() : null); + employeeMap.computeIfAbsent("sfls", e -> SalaryOnOffEnum.parseByValue(employeeDeclarePO.getMartyrDependents()).getDefaultLabel()); + employeeMap.computeIfAbsent("lszh", e -> martyrDependents ? employeeDeclarePO.getMartyrDependentsCardNo() : null); employeeMap.computeIfAbsent("sfgl", e -> SalaryOnOffEnum.parseByValue(employeeDeclarePO.getLonelyOld()).getDefaultLabel()); employeeMap.computeIfAbsent("sfzdw", e -> SalaryOnOffEnum.parseByValue(employeeDeclarePO.getDeductExpenses()).getDefaultLabel()); employeeList.add(employeeMap); diff --git a/src/com/engine/salary/entity/datacollection/param/AddUpDeductionMonthTaxAgentParam.java b/src/com/engine/salary/entity/datacollection/param/AddUpDeductionMonthTaxAgentParam.java index 843ecd238..b22d0fd84 100644 --- a/src/com/engine/salary/entity/datacollection/param/AddUpDeductionMonthTaxAgentParam.java +++ b/src/com/engine/salary/entity/datacollection/param/AddUpDeductionMonthTaxAgentParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -17,6 +18,7 @@ import java.util.Date; public class AddUpDeductionMonthTaxAgentParam { @ApiModelProperty("税款所属期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date declareMonth; @ApiModelProperty("个税扣缴义务人的主键id") diff --git a/src/com/engine/salary/entity/datacollection/po/AddUpDeductionRequestFailPO.java b/src/com/engine/salary/entity/datacollection/po/AddUpDeductionRequestFailPO.java index 7b0883452..a5baf15ca 100644 --- a/src/com/engine/salary/entity/datacollection/po/AddUpDeductionRequestFailPO.java +++ b/src/com/engine/salary/entity/datacollection/po/AddUpDeductionRequestFailPO.java @@ -38,10 +38,10 @@ public class AddUpDeductionRequestFailPO implements Serializable { private Date updateTime; //创建人id", ignore = true) - private long creator; + private Long creator; //是否删除", ignore = true) - private int deleteType; + private Integer deleteType; //租户KEY", ignore = true) private String tenantKey; diff --git a/src/com/engine/salary/entity/datacollection/po/AddUpDeductionRequestPO.java b/src/com/engine/salary/entity/datacollection/po/AddUpDeductionRequestPO.java index 6768edf3f..6894a68ed 100644 --- a/src/com/engine/salary/entity/datacollection/po/AddUpDeductionRequestPO.java +++ b/src/com/engine/salary/entity/datacollection/po/AddUpDeductionRequestPO.java @@ -27,7 +27,7 @@ public class AddUpDeductionRequestPO implements Serializable { private static final long serialVersionUID = 1452863635879051515L; //ID - private long id; + private Long id; //创建时间" private Date createTime; @@ -36,16 +36,16 @@ public class AddUpDeductionRequestPO implements Serializable { private Date updateTime; //创建人id" - private long creator; + private Long creator; //是否删除" - private int deleteType; + private Integer deleteType; //租户KEY" private String tenantKey; //乐观锁版本" - private int lockVersion; + private Integer lockVersion; //查询请求ID private Long requestId; @@ -57,7 +57,7 @@ public class AddUpDeductionRequestPO implements Serializable { * @see EnumAddUpDeductionRequestStatus */ //请求处理状态 - private int requestStatus; + private Integer requestStatus; //税款所属期 private Date taxYearMonth; diff --git a/src/com/engine/salary/entity/taxagent/po/TaxAgentTaxReturnPO.java b/src/com/engine/salary/entity/taxagent/po/TaxAgentTaxReturnPO.java index b338e53b6..717a5e960 100644 --- a/src/com/engine/salary/entity/taxagent/po/TaxAgentTaxReturnPO.java +++ b/src/com/engine/salary/entity/taxagent/po/TaxAgentTaxReturnPO.java @@ -145,6 +145,7 @@ public class TaxAgentTaxReturnPO implements Serializable { //查询条件 + private Collection ids; private Collection taxAgentIds; private Collection taxCodes; } diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index 70157b459..e89b31d36 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -1303,7 +1303,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue()) ); salaryArchiveList = salaryArchiveList.stream().filter(e -> taxAgentIdSet.contains(e.getTaxAgentId())).collect(Collectors.toList()); - AddUpDeductionOnlineRequestWrapper requestWrapper = new AddUpDeductionOnlineRequestWrapper(requestPOList, salaryArchiveList, taxAgents); + AddUpDeductionOnlineRequestWrapper requestWrapper = new AddUpDeductionOnlineRequestWrapper(requestPOList, salaryArchiveList, taxAgents, (long) user.getUID()); requestWrapper.setApiConfig(apiConfig); return requestWrapper; } @@ -1368,7 +1368,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction .tenantKey(DEFAULT_TENANT_KEY) .createTime(new Date()) .updateTime(new Date()) - .creator(user.getUID()) + .creator((long) user.getUID()) .lockVersion(0) .build(); getAddUpDeductionRequestMapper().insertIgnoreNull(po); @@ -1604,21 +1604,21 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction private void persistFeedbackData(AddUpDeductionOnlineRequestWrapper requestWrapper) { if (!requestWrapper.getInsertList().isEmpty()) { - List> insertPartition = Lists.partition(requestWrapper.getInsertList(), 1000); + List> insertPartition = Lists.partition(requestWrapper.getInsertList(), 100); insertPartition.forEach(list -> { list = encryptUtil.encryptList(list, AddUpDeduction.class); getAddUpDeductionMapper().insertData(list); }); } if (!requestWrapper.getUpdateList().isEmpty()) { - List> updatePartition = Lists.partition(requestWrapper.getUpdateList(), 1000); + List> updatePartition = Lists.partition(requestWrapper.getUpdateList(), 100); updatePartition.forEach(list -> { list = encryptUtil.encryptList(list, AddUpDeduction.class); getAddUpDeductionMapper().updateData(list); }); } if (!requestWrapper.getFailPOList().isEmpty()) { - List> failPartition = Lists.partition(requestWrapper.getFailPOList(), 1000); + List> failPartition = Lists.partition(requestWrapper.getFailPOList(), 100); failPartition.forEach(list -> getAddUpDeductionRequestFailMapper().batchInsert(list)); } } @@ -1643,7 +1643,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction .updateTime(new Date()) .oldStatus(oldStatus) .id(requestPO.getId()) - .oldLockVersion(oldStatus) + .oldLockVersion(requestPO.getLockVersion()) .build() ); // SalaryAssert.isTrue(update, SalaryI18nUtil.getI18nLabel(95828, "服务异常,请稍后重试")); @@ -1697,7 +1697,8 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction public AddUpDeductionOnlineRequestWrapper(List requestPOList, List salaryArchiveList, - List taxAgents) { + List taxAgents, + Long currentEmployeeId) { this.requestFeedBackMap = new HashMap<>(); this.requestPoMap = new HashMap<>(); this.insertList = new ArrayList<>(); @@ -1706,7 +1707,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction this.failPOList = new ArrayList<>(); this.salaryArchiveList = salaryArchiveList; this.requestPOList = requestPOList; - this.tenantKey = tenantKey; + this.tenantKey = DEFAULT_TENANT_KEY; this.currentEmployeeId = currentEmployeeId; this.taxAgentMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getId, TaxAgentPO::getName); }