在线获取累计专项附加扣除

This commit is contained in:
钱涛 2023-09-04 16:18:02 +08:00
parent 96bfdf05ed
commit 9867728d2e
6 changed files with 21 additions and 17 deletions

View File

@ -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")

View File

@ -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;

View File

@ -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;

View File

@ -145,6 +145,7 @@ public class TaxAgentTaxReturnPO implements Serializable {
//查询条件
private Collection<Long> ids;
private Collection<Long> taxAgentIds;
private Collection<String> taxCodes;
}

View File

@ -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<List<AddUpDeduction>> insertPartition = Lists.partition(requestWrapper.getInsertList(), 1000);
List<List<AddUpDeduction>> insertPartition = Lists.partition(requestWrapper.getInsertList(), 100);
insertPartition.forEach(list -> {
list = encryptUtil.encryptList(list, AddUpDeduction.class);
getAddUpDeductionMapper().insertData(list);
});
}
if (!requestWrapper.getUpdateList().isEmpty()) {
List<List<AddUpDeduction>> updatePartition = Lists.partition(requestWrapper.getUpdateList(), 1000);
List<List<AddUpDeduction>> updatePartition = Lists.partition(requestWrapper.getUpdateList(), 100);
updatePartition.forEach(list -> {
list = encryptUtil.encryptList(list, AddUpDeduction.class);
getAddUpDeductionMapper().updateData(list);
});
}
if (!requestWrapper.getFailPOList().isEmpty()) {
List<List<AddUpDeductionRequestFailPO>> failPartition = Lists.partition(requestWrapper.getFailPOList(), 1000);
List<List<AddUpDeductionRequestFailPO>> 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<AddUpDeductionRequestPO> requestPOList,
List<SalaryArchivePO> salaryArchiveList,
List<TaxAgentPO> taxAgents) {
List<TaxAgentPO> 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);
}