This commit is contained in:
钱涛 2022-06-15 17:53:12 +08:00
parent 3c13b90a4d
commit 17dbef3ef2
5 changed files with 18 additions and 6 deletions

View File

@ -1,13 +1,14 @@
package com.engine.salary.entity.salaryacct.bo;
import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldListDTO;
import com.engine.salary.entity.salaryformula.ExpressFormula;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.entity.salaryformula.ExpressFormula;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
import com.engine.salary.entity.salarysob.po.SalarySobAdjustRulePO;
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Accessors;
@ -34,6 +35,11 @@ public class SalaryAcctCalculateBO {
*/
private SalaryAcctRecordPO salaryAcctRecordPO;
/**
* 账套
*/
private SalarySobPO salarySobPO;
/**
* 当前薪资核算记录的薪资周期考勤周期
*/

View File

@ -184,7 +184,7 @@ public interface SIAccountService {
* @param employeeIds
* @return
*/
List<Map<String, Object>> welfareData(String billMonth, List<Long> employeeIds);
List<Map<String, Object>> welfareData(String billMonth, List<Long> employeeIds,Long taxAgentId);
/**
* 给套账提供字段名对应字段释义

View File

@ -608,8 +608,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
}
@Override
public List<Map<String, Object>> welfareData(String billMonth, List<Long> employeeIds) {
InsuranceAccountBatchPO insuranceAccountBatchPO = MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class).getByBillMonth(billMonth, null);
public List<Map<String, Object>> welfareData(String billMonth, List<Long> employeeIds,Long taxAgentId) {
InsuranceAccountBatchPO insuranceAccountBatchPO = MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class).getByBillMonth(billMonth, taxAgentId);
insuranceAccountBatchPO = SiAccountEncrypt.decryptInsuranceAccountBatch(insuranceAccountBatchPO);
if (insuranceAccountBatchPO == null || Objects.equals(BillStatusEnum.NOT_ARCHIVED.getValue(), insuranceAccountBatchPO.getBillStatus())) {
return Lists.newArrayList();

View File

@ -125,7 +125,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
// 5查询其他免税扣除
List<OtherDeductionPO> otherDeductionPOS = getOtherDeductionService(user).getOtherDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds);
//6查询社保福利
List<Map<String, Object>> welfareData = getSIAccountService(user).welfareData(salarySobCycleDTO.getSocialSecurityCycle().toString(), employeeIds);
List<Map<String, Object>> welfareData = getSIAccountService(user).welfareData(salarySobCycleDTO.getSocialSecurityCycle().toString(), employeeIds,salaryAcctCalculateBO.getSalarySobPO().getTaxAgentId());
// 7查询考勤数据
List<AttendQuoteDataDTO> attendQuoteDataDTOS = getAttendQuoteDataService(user).getAttendQuoteData(salarySobCycleDTO.getSalaryMonth(), salarySobCycleDTO.getSalarySobId(), employeeIds);
// 8查询薪资核算人员的薪资核算结果

View File

@ -401,13 +401,18 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
@Override
public void calculate(SalaryAcctCalculateParam calculateParam, DataCollectionEmployee simpleEmployee) {
log.info("开始核算V2{}",calculateParam);
log.info("开始核算V2{}", calculateParam);
try {
// 1查询薪资核算记录
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(calculateParam.getSalaryAcctRecordId());
if (Objects.isNull(salaryAcctRecordPO)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98747, "薪资核算记录不存在或已被删除"));
}
//查询对应账套
SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId());
if (Objects.isNull(salarySobPO)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98747, "薪资账套不存在或已被删除"));
}
// 1.1如果薪资核算记录已经归档了就不能继续核算
if (!Objects.equals(salaryAcctRecordPO.getStatus(), SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99148, "当前薪资核算记录已归档,请重新打开后再进行核算"));
@ -467,6 +472,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
for (List<SalaryAcctEmployeePO> acctEmployeePOS : partition) {
SalaryAcctCalculateBO salaryAcctCalculateBO = new SalaryAcctCalculateBO()
.setSalaryAcctRecordPO(salaryAcctRecordPO)
.setSalarySobPO(salarySobPO)
.setSalarySobCycleDTO(salarySobCycleDTO)
.setOtherSalaryAcctRecordPOS(otherSalaryAcctRecordPOS)
.setSalarySobItemPOS(salarySobItemPOS)