拓扑图显示非薪资项目数据
This commit is contained in:
parent
0b27d47d30
commit
595fceddaa
|
|
@ -41,15 +41,16 @@ import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
|
|||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.SalaryValueTypeEnum;
|
||||
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
|
||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||
import com.engine.salary.enums.salaryformula.SalaryFormulaReferenceEnum;
|
||||
import com.engine.salary.enums.salaryformula.SalarySQLReferenceEnum;
|
||||
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.salarysob.SalarySobDefaultItemMapper;
|
||||
import com.engine.salary.mapper.salarysob.SalarySobEmpFieldMapper;
|
||||
import com.engine.salary.mapper.salarysob.SalarySobItemMapper;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
|
|
@ -992,8 +993,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
|
||||
List<Long> employeeIds = Collections.singletonList(acctEmployeePO.getEmployeeId());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
Long taxAgentId = salaryAcctCalculateBO.getSalarySobPO().getTaxAgentId();
|
||||
List<SalaryArchiveDataDTO> salaryArchiveData = getSalaryArchiveService(user).getSalaryArchiveData(salarySobCycleDTO.getSalaryCycle(), employeeIds, taxAgentId);
|
||||
List<Long> taxAgentIds = salaryAcctCalculateBO.getSalarySobPO().getTaxAgentIds();
|
||||
List<SalaryArchiveDataDTO> salaryArchiveData = getSalaryArchiveService(user).getSalaryArchiveData(salarySobCycleDTO.getSalaryCycle(), employeeIds, taxAgentIds);
|
||||
List<AddUpSituation> addUpSituationPOS;
|
||||
if (salarySobCycleDTO.getTaxCycle().getMonth() == Month.JANUARY) {
|
||||
// 3.1、如果当前税款所属期是本年度第一个税款所属期,就不需要查询往期累计情况
|
||||
|
|
@ -1001,15 +1002,16 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
} else {
|
||||
addUpSituationPOS = getAddUpSituationService(user).getAddUpSituationList(salarySobCycleDTO.getTaxCycle().plusMonths(-1), employeeIds);
|
||||
}
|
||||
List<AddUpDeduction> addUpDeductionPOS = getAddUpDeductionService(user).getAddUpDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentId);
|
||||
List<OtherDeductionPO> otherDeductionPOS = getOtherDeductionService(user).getOtherDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentId);
|
||||
List<AddUpDeduction> addUpDeductionPOS = getAddUpDeductionService(user).getAddUpDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentIds);
|
||||
List<OtherDeductionPO> otherDeductionPOS = getOtherDeductionService(user).getOtherDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentIds);
|
||||
List<Map<String, Object>> welfareData = new ArrayList<>();
|
||||
welfareData.addAll(getSIAccountService(user).welfareData(salarySobCycleDTO.getSocialSecurityCycle().toString(), employeeIds, taxAgentId));
|
||||
taxAgentIds.forEach(id -> {
|
||||
welfareData.addAll(getSIAccountService(user).welfareData(salarySobCycleDTO.getSocialSecurityCycle().toString(), employeeIds, id));
|
||||
});
|
||||
List<AttendQuoteDataDTO> attendQuoteDataDTOS = getAttendQuoteDataService(user).getAttendQuoteData(salarySobCycleDTO.getSalaryMonth(), salarySobCycleDTO.getSalarySobId(), employeeIds);
|
||||
List<Long> salaryAcctEmployeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getId, Collectors.toList());
|
||||
List<SalaryAcctResultPO> salaryAcctResultPOS = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
|
||||
Map<String, String> empItemValueMap = SalaryEntityUtil.convert2Map(salaryAcctResultPOS, p -> p.getSalaryAcctEmpId() + "_" + p.getSalaryItemId(), SalaryAcctResultPO::getResultValue);
|
||||
List<Map<String, Object>> variableArchiveList = getVariableArchiveService(user).listBySalaryMonthAndEmployeeIds(salarySobCycleDTO.getSalaryMonth(), employeeIds, taxAgentId);
|
||||
List<Map<String, Object>> variableArchiveList = getVariableArchiveService(user).listBySalaryMonthAndEmployeeIds(salarySobCycleDTO.getSalaryMonth(), employeeIds, taxAgentIds);
|
||||
Map<String, List<SalaryAcctResultPO>> collect = salaryAcctResultPOS.stream().collect(Collectors.groupingBy(k -> k.getEmployeeId() + "-" + k.getTaxAgentId() + "-" + k.getSalaryItemId()));
|
||||
Map<String, String> salaryAcctResultPOMap = new HashMap<>();
|
||||
for (Map.Entry<String, List<SalaryAcctResultPO>> et : collect.entrySet()) {
|
||||
|
|
@ -1020,8 +1022,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
Map<String, List<SalaryAcctResultPO>> otherSalaryAcctResultPOMap = SalaryEntityUtil.group2Map(otherSalaryAcctResultPOS, e -> e.getEmployeeId() + "_" + e.getTaxAgentId());
|
||||
List<SalaryAcctEmployeePO> otherSalaryAcctEmployeePOS = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordIdsAndEmployeeIds(otherSalaryAcctRecordIds, employeeIds);
|
||||
Map<String, List<SalaryAcctEmployeePO>> otherSalaryAcctEmployeePOMap = SalaryEntityUtil.group2Map(otherSalaryAcctEmployeePOS, salaryAcctEmployeePO -> salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId());
|
||||
// List<SalaryAcctResultPO> lastMonthResultPOS = getSalaryAcctResultService(user).listBySobSalaryMonth(SalaryDateUtil.toDate(salarySobCycleDTO.getSalaryMonth().minusMonths(1), 1), salaryAcctCalculateBO.getSalarySobPO().getId(), employeeIds);
|
||||
CalculateFormulaVarBO calculateFormulaVarBO = new CalculateFormulaVarBO(simpleEmployees, salaryArchiveData, addUpSituationPOS, addUpDeductionPOS, otherDeductionPOS, welfareData, attendQuoteDataDTOS, salaryAcctResultPOS, variableArchiveList);
|
||||
List<SalaryAcctResultPO> lastMonthResultPOS = getSalaryAcctResultService(user).listBySobSalaryMonth(SalaryDateUtil.toDate(salarySobCycleDTO.getSalaryMonth().minusMonths(1), 1), salaryAcctCalculateBO.getSalarySobPO().getId(), employeeIds);
|
||||
CalculateFormulaVarBO calculateFormulaVarBO = new CalculateFormulaVarBO(simpleEmployees, salaryArchiveData, addUpSituationPOS, addUpDeductionPOS, otherDeductionPOS, welfareData, attendQuoteDataDTOS, salaryAcctResultPOS, variableArchiveList,lastMonthResultPOS);
|
||||
Map<String, List<CalculateFormulaVarBO.FormulaVarValue>> formulaVarMap = calculateFormulaVarBO.convert2FormulaVar(salaryAcctCalculateBO);
|
||||
|
||||
Map<String, String> resultMap = new HashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue