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