sql
This commit is contained in:
parent
3c13b90a4d
commit
17dbef3ef2
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* 当前薪资核算记录的薪资周期、考勤周期……
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
/**
|
||||
* 给套账提供字段名对应字段释义
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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、查询薪资核算人员的薪资核算结果
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue