parent
6d5e848a65
commit
e9c95918eb
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.salary.entity.salaryacct.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 薪资核算结果的表头
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SalaryAcctResultListColumnDTO {
|
||||
|
||||
//薪资项目名称
|
||||
private String columnName;
|
||||
|
||||
//公式id
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long formulaId;
|
||||
|
||||
//公式内容
|
||||
private String formulaContent;
|
||||
|
||||
//是否需要展示锁定标识
|
||||
private boolean showLock;
|
||||
}
|
||||
|
|
@ -5,20 +5,19 @@ import com.engine.salary.entity.salaryformula.ExpressFormula;
|
|||
import com.engine.salary.entity.salaryformula.dto.SalaryFormulaEmployeeDTO;
|
||||
import com.engine.salary.entity.salaryitem.bo.SalaryItemBO;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobEmpFieldDTO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobItemAggregateDTO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobItemDTO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobItemGroupDTO;
|
||||
import com.engine.salary.entity.salarysob.dto.*;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobEmpFieldPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobItemGroupPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
|
|
@ -122,11 +121,29 @@ public class SalarySobItemAggregateBO {
|
|||
});
|
||||
// 薪资账套的员工信息字段po转换成dto
|
||||
List<SalarySobEmpFieldDTO> salarySobEmpFieldDTOS = buildEmpField(salarySobEmpFields);
|
||||
|
||||
List<SalarySobItemIncomeCategoryDTO> incomeCategories = Lists.newArrayList();
|
||||
// List<Integer> incomeCategoryValues = JsonUtil.parseList(salarySob.getIncomeCategory(), Integer.class);
|
||||
Integer incomeCategory = salarySob.getIncomeCategory();
|
||||
List<Integer> incomeCategoryValues = Lists.newArrayList(incomeCategory);
|
||||
for (Integer incomeCategoryValue : incomeCategoryValues) {
|
||||
IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(incomeCategoryValue);
|
||||
SalarySobItemIncomeCategoryDTO salarySobItemIncomeCategoryDTO = new SalarySobItemIncomeCategoryDTO()
|
||||
.setId(incomeCategoryValue.longValue())
|
||||
.setName(Optional.ofNullable(incomeCategoryEnum)
|
||||
.map(e -> SalaryI18nUtil.getI18nLabel(e.getLabelId(), e.getDefaultLabel()))
|
||||
.orElse(StringUtils.EMPTY))
|
||||
.setItemGroups(sortItemGroup(salarySobItemGroupDTOS))
|
||||
.setItems(sortItem(itemsWithoutGroup));
|
||||
incomeCategories.add(salarySobItemIncomeCategoryDTO);
|
||||
}
|
||||
|
||||
return SalarySobItemAggregateDTO.builder()
|
||||
.salarySobId(salarySob.getId())
|
||||
.empFields(salarySobEmpFieldDTOS)
|
||||
.items(sortItem(itemsWithoutGroup))
|
||||
.itemGroups(sortItemGroup(salarySobItemGroupDTOMap.values()))
|
||||
.incomeCategories(incomeCategories)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,4 +36,7 @@ public class SalarySobItemAggregateDTO {
|
|||
|
||||
//薪资账套的薪资项目详情-薪资项目(未分类)
|
||||
private List<SalarySobItemDTO> items;
|
||||
|
||||
//薪资账套的薪资项目按薪资类型分类(账套目前只含一个类型,只给核算表头带出公式使用。未来若账套包含多类型时,可用于扩展)
|
||||
private List<SalarySobItemIncomeCategoryDTO> incomeCategories;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ public class SalarySobItemDTO {
|
|||
//名称
|
||||
private String name;
|
||||
|
||||
//是否是薪资档案引用
|
||||
private Integer useInEmployeeSalary;
|
||||
|
||||
//是否是系统内置的薪资项目 @see SalarySystemTypeEnum
|
||||
private Integer systemType;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
package com.engine.salary.entity.salarysob.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 薪资账套下的薪资项目按薪资类型分类
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
//薪资账套下的薪资项目按薪资类型分类
|
||||
public class SalarySobItemIncomeCategoryDTO {
|
||||
|
||||
//薪资类型的id
|
||||
private Long id;
|
||||
|
||||
//薪资类型的名称
|
||||
private String name;
|
||||
|
||||
//薪资账套的薪资项目详情-薪资项目分类
|
||||
private List<SalarySobItemGroupDTO> itemGroups;
|
||||
|
||||
//薪资账套的薪资项目详情-薪资项目(未分类)
|
||||
private List<SalarySobItemDTO> items;
|
||||
|
||||
}
|
||||
|
|
@ -11,7 +11,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
*
|
||||
* @Date 2022/4/11
|
||||
* @Version V1.0
|
||||
**/
|
||||
|
|
@ -19,21 +18,24 @@ public interface InsuranceAccountDetailMapper {
|
|||
|
||||
/**
|
||||
* 查询正常缴纳列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
List<InsuranceAccountDetailPO> list(@Param("param")InsuranceAccountDetailParam queryParam);
|
||||
List<InsuranceAccountDetailPO> list(@Param("param") InsuranceAccountDetailParam queryParam);
|
||||
|
||||
/**
|
||||
* 根据账单月份获取所有员工
|
||||
*
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
List<Long> selectAccountIds(@Param("time") String time,@Param("paymentOrganization") Long paymentOrganization);
|
||||
List<Long> selectAccountIds(@Param("time") String time, @Param("paymentOrganization") Long paymentOrganization);
|
||||
|
||||
|
||||
/**
|
||||
* 根据缴纳组织获取员工id
|
||||
*
|
||||
* @param paymentOrganization
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -41,17 +43,19 @@ public interface InsuranceAccountDetailMapper {
|
|||
|
||||
/**
|
||||
* 根据id删除
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void deleteById(@Param("id")Long id);
|
||||
void deleteById(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
void batchDelAccountDetails(@Param("employeeIds") Collection<Long> employeeIds, @Param("billMonth") String billMonth,@Param("paymentOrganization") Long paymentOrganization);
|
||||
void batchDelAccountDetails(@Param("employeeIds") Collection<Long> employeeIds, @Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization);
|
||||
|
||||
/**
|
||||
* 批量保存
|
||||
*
|
||||
* @param accounts
|
||||
*/
|
||||
void batchSaveAccountDetails(@Param("accounts") Collection<InsuranceAccountDetailPO> accounts);
|
||||
|
|
@ -59,23 +63,26 @@ public interface InsuranceAccountDetailMapper {
|
|||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @param billMonth
|
||||
* @return
|
||||
*/
|
||||
List<InsuranceAccountDetailPO> selectList(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization);
|
||||
|
||||
List<InsuranceAccountDetailPO> queryList(@Param("billMonth") String billMonth,@Param("employeeIds") Collection<Long> employeeIds);
|
||||
List<InsuranceAccountDetailPO> queryList(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization, @Param("employeeIds") Collection<Long> employeeIds);
|
||||
|
||||
|
||||
/**
|
||||
* 根据账单月份删除
|
||||
*
|
||||
* @param billMonth
|
||||
*/
|
||||
void batchDeleteNotFile(@Param("billMonth") String billMonth,@Param("paymentOrganization") Long paymentOrganization);
|
||||
void batchDeleteNotFile(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization);
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param pos
|
||||
*/
|
||||
void batchDelSupplementAccountDetails(@Param("pos") Collection<InsuranceAccountDetailPO> pos);
|
||||
|
|
@ -83,6 +90,7 @@ public interface InsuranceAccountDetailMapper {
|
|||
|
||||
/**
|
||||
* 根据员工id批量删除
|
||||
*
|
||||
* @param pos
|
||||
*/
|
||||
void batchDelSupplementDetailsByIds(@Param("pos") Collection<SupplementAccountBaseParam> pos);
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@
|
|||
hrsa_bill_detail t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.bill_month = #{billMonth}
|
||||
AND t.payment_organization = #{paymentOrganization}
|
||||
<if test="employeeIds != null and employeeIds.size()>0">
|
||||
AND employee_id IN
|
||||
<foreach collection="employeeIds" open="(" item="employeeId" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.engine.salary.service;
|
|||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryacct.dto.ConsolidatedTaxDetailDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultDetailDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultListColumnDTO;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctCalculateParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctResultQueryParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctResultSaveParam;
|
||||
|
|
@ -88,6 +89,14 @@ public interface SalaryAcctResultService {
|
|||
*/
|
||||
ConsolidatedTaxDetailDTO getConsolidatedTaxDetail(Long salaryAcctEmployeeId);
|
||||
|
||||
/**
|
||||
* 根据薪资核算记录id获取表头数据
|
||||
*
|
||||
* @param salaryAcctRecordId
|
||||
* @return
|
||||
*/
|
||||
Map<String, SalaryAcctResultListColumnDTO> getColumnBySalaryAcctRecordId(Long salaryAcctRecordId);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
|
|
|
|||
|
|
@ -87,6 +87,14 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private InsuranceAccountBatchMapper getInsuranceAccountBatchMapper() {
|
||||
return MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class);
|
||||
}
|
||||
|
||||
private InsuranceAccountDetailMapper getInsuranceAccountDetailMapper() {
|
||||
return MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listPage(InsuranceAccountBatchParam queryParam) {
|
||||
Long employeeId = (long) user.getUID();
|
||||
|
|
@ -223,7 +231,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
//补缴缴纳列表
|
||||
queryParam.setPaymentStatus(PaymentStatusEnum.REPAIR.getValue());
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<InsuranceAccountDetailPO> list = MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).list(queryParam);
|
||||
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
|
||||
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
|
||||
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
|
||||
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS);
|
||||
|
|
@ -277,7 +285,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
datePickerItem.getOtherParams().put("minDate", minDate);
|
||||
datePickerItem.getOtherParams().put("maxDate", maxDate);
|
||||
|
||||
List<InsuranceAccountBatchPO> billMonthList = MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class).listByTimeRange(minDate, maxDate);
|
||||
List<InsuranceAccountBatchPO> billMonthList = getInsuranceAccountBatchMapper().listByTimeRange(minDate, maxDate);
|
||||
SiAccountEncrypt.decryptInsuranceAccountBatchList(billMonthList);
|
||||
if (CollectionUtils.isEmpty(billMonthList)) {
|
||||
datePickerItem.getOtherParams().put("disabledData", Collections.emptyList());
|
||||
|
|
@ -367,7 +375,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class).getByInspectStatusAndIds(InspectStatusEnum.COMFORED.getValue(), ids);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(insuranceAccountInspectPOS)) {
|
||||
MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).batchUnConfirmedInspectDetails(insuranceAccountInspectPOS.stream().map(InsuranceAccountInspectPO::getId).collect(Collectors.toList()));
|
||||
getInsuranceAccountDetailMapper().batchUnConfirmedInspectDetails(insuranceAccountInspectPOS.stream().map(InsuranceAccountInspectPO::getId).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -389,14 +397,14 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class).getByInspectStatusAndIds(InspectStatusEnum.IGNORE.getValue(), ids);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(insuranceAccountInspectPOS)) {
|
||||
MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).batchIgnoreInspectDetails(insuranceAccountInspectPOS.stream().map(InsuranceAccountInspectPO::getId).collect(Collectors.toList()));
|
||||
getInsuranceAccountDetailMapper().batchIgnoreInspectDetails(insuranceAccountInspectPOS.stream().map(InsuranceAccountInspectPO::getId).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InsuranceAccountTabDTO tabList(AccountParam build) {
|
||||
InsuranceAccountTabDTO insuranceAccountTabDTO = InsuranceAccountTabDTO.builder().build();
|
||||
InsuranceAccountBatchPO insuranceAccountBatchPO = MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class).getByBillMonth(build.getBillMonth(), build.getPaymentOrganization());
|
||||
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(build.getBillMonth(), build.getPaymentOrganization());
|
||||
insuranceAccountBatchPO = SiAccountEncrypt.decryptInsuranceAccountBatch(insuranceAccountBatchPO);
|
||||
boolean isShow = false;
|
||||
if (insuranceAccountBatchPO == null || insuranceAccountBatchPO.getBillStatus() == BillStatusEnum.NOT_ARCHIVED.getValue()) {
|
||||
|
|
@ -436,7 +444,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
Map<String, Object> datas = new HashMap<>();
|
||||
Long employeeId = (long) user.getUID();
|
||||
SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
|
||||
List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS = MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).changeList(param.getUserName());
|
||||
List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS = getInsuranceAccountDetailMapper().changeList(param.getUserName());
|
||||
PageInfo<InsuranceArchivesEmployeePO> pageInfo = new PageInfo<>(insuranceArchivesEmployeePOS);
|
||||
|
||||
List<Map<String, Object>> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS);
|
||||
|
|
@ -617,12 +625,12 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
@Override
|
||||
public List<Map<String, Object>> welfareData(String billMonth, List<Long> employeeIds, Long taxAgentId) {
|
||||
InsuranceAccountBatchPO insuranceAccountBatchPO = MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class).getByBillMonth(billMonth, taxAgentId);
|
||||
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, taxAgentId);
|
||||
insuranceAccountBatchPO = SiAccountEncrypt.decryptInsuranceAccountBatch(insuranceAccountBatchPO);
|
||||
if (insuranceAccountBatchPO == null || Objects.equals(BillStatusEnum.NOT_ARCHIVED.getValue(), insuranceAccountBatchPO.getBillStatus())) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
List<InsuranceAccountDetailPO> list = queryList(billMonth, employeeIds);
|
||||
List<InsuranceAccountDetailPO> list = queryList(billMonth, taxAgentId, employeeIds);
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
list.stream().forEach(item -> {
|
||||
Map<String, Object> record = new HashMap<>();
|
||||
|
|
@ -663,7 +671,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
if (StringUtils.isNotEmpty(item.getOtherComJson())) {
|
||||
Map<String, Object> fundComJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, Object>().getClass());
|
||||
if (fundComJson!=null){
|
||||
if (fundComJson != null) {
|
||||
|
||||
}
|
||||
fundComJson.forEach((k, v) -> {
|
||||
|
|
@ -741,8 +749,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
|
||||
|
||||
public List<InsuranceAccountDetailPO> queryList(String billMonth, List<Long> employeeIds) {
|
||||
List<InsuranceAccountDetailPO> list = buildNewInsuranceDetailPOS(MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).queryList(billMonth, employeeIds));
|
||||
public List<InsuranceAccountDetailPO> queryList(String billMonth, Long taxAgentId, List<Long> employeeIds) {
|
||||
List<InsuranceAccountDetailPO> list = buildNewInsuranceDetailPOS(getInsuranceAccountDetailMapper().queryList(billMonth, taxAgentId, employeeIds));
|
||||
// InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list);
|
||||
return list;
|
||||
}
|
||||
|
|
@ -793,7 +801,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
comSum = comSum.add(comSumItem);
|
||||
if (StringUtils.isNotBlank(item.getSocialPerJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, String>().getClass());
|
||||
if (socialJson!=null){
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (socialPerMap.get(insuranceId) == null) {
|
||||
socialPerMap.put(insuranceId, num);
|
||||
|
|
@ -811,7 +819,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
if (StringUtils.isNotBlank(item.getSocialComJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, String>().getClass());
|
||||
if (socialJson!=null){
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (socialComMap.get(insuranceId) == null) {
|
||||
socialComMap.put(insuranceId, num);
|
||||
|
|
@ -829,7 +837,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
if (StringUtils.isNotBlank(item.getFundPerJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, String>().getClass());
|
||||
if (fundJson!=null){
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
if (fundPerMap.get(insuranceId) == null) {
|
||||
fundPerMap.put(insuranceId, num);
|
||||
|
|
@ -847,7 +855,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
if (StringUtils.isNotBlank(item.getFundComJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, String>().getClass());
|
||||
if (fundJson!=null){
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
if (fundComMap.get(insuranceId) == null) {
|
||||
fundComMap.put(insuranceId, num);
|
||||
|
|
@ -865,7 +873,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherPerJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, String>().getClass());
|
||||
if (otherJson!=null){
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
if (otherPerMap.get(insuranceId) == null) {
|
||||
otherPerMap.put(insuranceId, num);
|
||||
|
|
@ -883,7 +891,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherComJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, String>().getClass());
|
||||
if (otherJson!=null){
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
if (otherComMap.get(insuranceId) == null) {
|
||||
otherComMap.put(insuranceId, num);
|
||||
|
|
@ -939,7 +947,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
public void socialSecurityBenefitsRecalculate(InsuranceAccountBatchPO param) {
|
||||
int num = getSiAccountBiz(user).checkIfBusinessaccounting(param);
|
||||
//表示已经被核算过不能重新核算
|
||||
if (num > 0){
|
||||
if (num > 0) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98831, "已被薪酬核算给核算过,无法重新核算!"));
|
||||
}
|
||||
param.setBillStatus(0);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import com.engine.salary.entity.salaryacct.bo.SalaryAcctResultBO;
|
|||
import com.engine.salary.entity.salaryacct.dto.ConsolidatedTaxDetailDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctProgressDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultDetailDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultListColumnDTO;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctCalculateParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeQueryParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctResultQueryParam;
|
||||
|
|
@ -25,7 +26,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
|||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultTempPO;
|
||||
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.dto.*;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobAdjustRulePO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobEmpFieldPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
|
||||
|
|
@ -42,6 +43,7 @@ import com.engine.salary.util.SalaryI18nUtil;
|
|||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.weaver.util.threadPool.ThreadPoolUtil;
|
||||
import com.weaver.util.threadPool.constant.ModulePoolEnum;
|
||||
import com.weaver.util.threadPool.entity.LocalRunnable;
|
||||
|
|
@ -49,6 +51,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -334,6 +337,40 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
return SalaryAcctResultBO.convert2ConsolidatedTaxDetailDTO(simpleEmployee, taxAgentPO, salarySobEmpFieldPOS, salaryItemPOS, salaryAcctEmployeePOS, salarySobPOS, salaryAcctRecordPOS, salaryAcctResultPOS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, SalaryAcctResultListColumnDTO> getColumnBySalaryAcctRecordId(Long salaryAcctRecordId) {
|
||||
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(salaryAcctRecordId);
|
||||
if (Objects.isNull(salaryAcctRecordPO)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98747, "薪资核算记录不存在或已被删除"));
|
||||
}
|
||||
Map<String, SalaryAcctResultListColumnDTO> resultMap = Maps.newHashMap();
|
||||
// 查询薪资核算使用的薪资账套下的薪资项目
|
||||
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateBySalarySobId(salaryAcctRecordPO.getSalarySobId());
|
||||
for (SalarySobItemIncomeCategoryDTO incomeCategoryDTO : salarySobItemAggregateDTO.getIncomeCategories()) {
|
||||
for (SalarySobItemGroupDTO salarySobItemGroupDTO : incomeCategoryDTO.getItemGroups()) {
|
||||
for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) {
|
||||
SalaryAcctResultListColumnDTO salaryAcctResultListColumnDTO = new SalaryAcctResultListColumnDTO()
|
||||
.setColumnName(salarySobItemDTO.getName())
|
||||
.setFormulaId(salarySobItemDTO.getFormulaId())
|
||||
.setFormulaContent(salarySobItemDTO.getFormulaContent())
|
||||
.setShowLock((!Objects.equals(salarySobItemDTO.getFormulaId(), NumberUtils.LONG_ZERO) && salarySobItemDTO.isCanEdit())
|
||||
|| Objects.equals(salarySobItemDTO.getUseInEmployeeSalary(), NumberUtils.INTEGER_ONE));
|
||||
resultMap.put("" + salarySobItemDTO.getSalaryItemId(), salaryAcctResultListColumnDTO);
|
||||
}
|
||||
}
|
||||
for (SalarySobItemDTO salarySobItemDTO : incomeCategoryDTO.getItems()) {
|
||||
SalaryAcctResultListColumnDTO salaryAcctResultListColumnDTO = new SalaryAcctResultListColumnDTO()
|
||||
.setColumnName(salarySobItemDTO.getName())
|
||||
.setFormulaId(salarySobItemDTO.getFormulaId())
|
||||
.setFormulaContent(salarySobItemDTO.getFormulaContent())
|
||||
.setShowLock((!Objects.equals(salarySobItemDTO.getFormulaId(), NumberUtils.LONG_ZERO) && salarySobItemDTO.isCanEdit())
|
||||
|| Objects.equals(salarySobItemDTO.getUseInEmployeeSalary(), NumberUtils.INTEGER_ONE));
|
||||
resultMap.put("" + salarySobItemDTO.getSalaryItemId(), salaryAcctResultListColumnDTO);
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(SalaryAcctResultSaveParam saveParam) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
package com.engine.salary.web;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.salaryacct.dto.ConsolidatedTaxDetailDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAccEmployeeListDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctImportFieldDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultDetailDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.*;
|
||||
import com.engine.salary.entity.salaryacct.param.*;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
||||
import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
|
||||
|
|
@ -354,6 +351,15 @@ public class SalaryAcctController {
|
|||
return new ResponseResult<Long, ConsolidatedTaxDetailDTO>(user).run(getSalaryAcctResultWrapper(user)::getConsolidatedTaxDetail, salaryAcctEmpId);
|
||||
}
|
||||
|
||||
//根据薪资核算记录id获取表头数据
|
||||
@GET
|
||||
@Path("/acctresult/getColumnDesc")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getColumnDesc(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "salaryAcctRecordId") Long salaryAcctRecordId) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Long, Map<String, SalaryAcctResultListColumnDTO>>(user).run(getSalaryAcctResultWrapper(user)::getColumnBySalaryAcctRecordId, salaryAcctRecordId);
|
||||
}
|
||||
|
||||
//编辑薪资核算结果
|
||||
@POST
|
||||
@Path("/acctresult/save")
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
|||
import com.engine.salary.entity.salaryacct.dto.ConsolidatedTaxDetailDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctProgressDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultDetailDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultListColumnDTO;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctCalculateParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctResultQueryParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctResultSaveParam;
|
||||
|
|
@ -172,6 +173,16 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
return getSalaryAcctResultService(user).getConsolidatedTaxDetail(salaryAcctEmployeeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据薪资核算记录id获取表头数据
|
||||
*
|
||||
* @param salaryAcctRecordId
|
||||
* @return
|
||||
*/
|
||||
public Map<String, SalaryAcctResultListColumnDTO> getColumnBySalaryAcctRecordId(Long salaryAcctRecordId) {
|
||||
return getSalaryAcctResultService(user).getColumnBySalaryAcctRecordId(salaryAcctRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存薪资核算结果
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue