刷新账套和扣缴义务人自关联
This commit is contained in:
parent
cb38a3fa9b
commit
165a775074
|
|
@ -58,6 +58,7 @@ public class SalarySobPO {
|
|||
@Deprecated
|
||||
private Long taxAgentId;
|
||||
|
||||
@XStreamOmitField
|
||||
List<Long> taxAgentIds;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
|
|
@ -992,14 +993,10 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
|
||||
@Override
|
||||
public void handleHistory() {
|
||||
|
||||
int count = getSobTaxLinkMapper().count();
|
||||
if (count > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<SalarySobPO> salarySobPOS = getSalarySobMapper().listAll();
|
||||
salarySobPOS.forEach(sobPO -> {
|
||||
List<SobTaxLinkPO> sobTaxLinkPOS = getSobTaxLinkMapper().listSome(SobTaxLinkPO.builder().sobId(sobPO.getId()).build());
|
||||
if(CollUtil.isEmpty(sobTaxLinkPOS)){
|
||||
SobTaxLinkPO taxLinkPO = SobTaxLinkPO.builder()
|
||||
.id(IdGenerator.generate())
|
||||
.taxAgentId(sobPO.getTaxAgentId())
|
||||
|
|
@ -1011,6 +1008,7 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.build();
|
||||
getSobTaxLinkMapper().insertIgnoreNull(taxLinkPO);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue