diff --git a/src/com/engine/salary/entity/siaccount/dto/InsuranceCompensationDTO.java b/src/com/engine/salary/entity/siaccount/dto/InsuranceCompensationDTO.java index e100e69ed..312a52344 100644 --- a/src/com/engine/salary/entity/siaccount/dto/InsuranceCompensationDTO.java +++ b/src/com/engine/salary/entity/siaccount/dto/InsuranceCompensationDTO.java @@ -48,7 +48,7 @@ public class InsuranceCompensationDTO { /** * 统计调差福利 */ - private String welfareType; + private Integer welfareType; /** * 统计调差福利类型 diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceCompensationConfigMapper.java b/src/com/engine/salary/mapper/siaccount/InsuranceCompensationConfigMapper.java index 2228e7f37..e9756492f 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceCompensationConfigMapper.java +++ b/src/com/engine/salary/mapper/siaccount/InsuranceCompensationConfigMapper.java @@ -14,6 +14,6 @@ public interface InsuranceCompensationConfigMapper { void deleteByPayOrg(Long paymentOrganization); - List queryByBillMonthAndPayOrg(String billMonth, Long paymentOrganization); + List queryByPayOrg(@Param("paymentOrganization") Long paymentOrganization); } diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceCompensationConfigMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceCompensationConfigMapper.xml index 8153657d8..fda8f1f01 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceCompensationConfigMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceCompensationConfigMapper.xml @@ -160,12 +160,11 @@ AND delete_type = 0 - SELECT FROM hrsa_compensation_config t - WHERE t.bill_month = #{billMonth} - AND t.payment_organization = #{paymentOrganization} + WHERE t.payment_organization = #{paymentOrganization} AND t.delete_type = 0 \ No newline at end of file diff --git a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java index 9c008d7a2..64a053093 100644 --- a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java @@ -395,6 +395,7 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic WeaTableColumn weaTableNameColumn = new WeaTableColumn("300px",SalaryI18nUtil.getI18nLabel( 87000, "调差对象"), "target"); weaTableNameColumn.setFixed("left"); + list.add(weaTableNameColumn); list.add(new WeaTableColumn("100px",SalaryI18nUtil.getI18nLabel( 87001, "统计调差福利"), "welfareType")); list.add(new WeaTableColumn("200px",SalaryI18nUtil.getI18nLabel( 87001, "统计调差福利类型(单位)"), "categoryType")); diff --git a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java index a61e27a44..8e9ff27b6 100644 --- a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java @@ -2,6 +2,7 @@ package com.engine.salary.service.impl; import com.alibaba.fastjson.JSON; import com.alipay.oceanbase.jdbc.StringUtils; +import com.cloudstore.eccom.pc.table.WeaTable; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; @@ -32,6 +33,7 @@ import com.engine.salary.util.SalaryAssert; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; +import com.engine.salary.util.page.Column; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.google.common.collect.Lists; @@ -303,7 +305,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation insuranceCompensationPO.setPaymentOrganization(insuranceAccountDetailPO.getPaymentOrganization()); insuranceCompensationPO.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); - insuranceCompensationPO.setWelfareType(Integer.valueOf(param.getWelfareType())); + insuranceCompensationPO.setWelfareType(param.getWelfareType()); insuranceCompensationPO.setUpdateTime(new Date()); getInsuranceCompensationMapper().insert(insuranceCompensationPO); @@ -344,7 +346,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation .updateTime(new Date()) .categoryType(config.getCategoryType()) .paymentOrganization(config.getPaymentOrganization()) - .welfareType(Integer.valueOf(config.getWelfareType())) + .welfareType(config.getWelfareType()) .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) .creator(currentEmployeeId).build(); }).collect(Collectors.toList()); @@ -423,11 +425,15 @@ public class SICompensationServiceImpl extends Service implements SICompensation //设置调差详情列表头 List weaTableColumn = getColumnBuildService(user).buildCompensationColumns(); + WeaTable table = new WeaTable(); + table.setPageUID(UUID.randomUUID().toString()); + table.setColumns(weaTableColumn); + List columns = weaTableColumn.stream().map(v -> new Column(v.getText(), v.getColumn(), v.getColumn())).collect(Collectors.toList()); //处理调差数据 List compensationDTOList = dealCompensationData(billMonth, paymentOrganization); - datas.put("columns", weaTableColumn); + datas.put("columns", columns); datas.put("data", compensationDTOList); return datas; @@ -438,7 +444,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation //获取调差历史记录数据 List compensationPOList = getInsuranceCompensationMapper().queryByBillMonthAndPayOrg(billMonth, paymentOrganization); //获取调差配置数据 - List compensationConfigPOList = getInsuranceCompensationConfigMapper().queryByBillMonthAndPayOrg(billMonth, paymentOrganization); + List compensationConfigPOList = getInsuranceCompensationConfigMapper().queryByPayOrg(paymentOrganization); List compensationDTOList = new ArrayList<>(); @@ -468,14 +474,16 @@ public class SICompensationServiceImpl extends Service implements SICompensation //设置categoryTypeOptions List> categoryTypeOptions = new ArrayList<>(); List categoryTypeList = Arrays.asList(po.getCategoryType().split(",")); - Map categoryTypeMap = new HashMap<>(); + for (String categoryType : categoryTypeList) { + Map categoryTypeMap = new HashMap<>(); categoryTypeMap.put("id", categoryType); categoryTypeMap.put("content", categoryNameMap.get(Long.valueOf(categoryType))); categoryTypeOptions.add(categoryTypeMap); } - dto.setCategoryTypeOptions(categoryTypeOptions); + + compensationDTOList.add(dto); } } //不存在调差历史记录时,输出调差配置数据 @@ -494,14 +502,16 @@ public class SICompensationServiceImpl extends Service implements SICompensation //设置categoryTypeOptions List> categoryTypeOptions = new ArrayList<>(); List categoryTypeList = Arrays.asList(configPO.getCategoryType().split(",")); - Map categoryTypeMap = new HashMap<>(); + for (String categoryType : categoryTypeList) { + Map categoryTypeMap = new HashMap<>(); categoryTypeMap.put("id", categoryType); categoryTypeMap.put("content", categoryNameMap.get(Long.valueOf(categoryType))); categoryTypeOptions.add(categoryTypeMap); } - dto.setCategoryTypeOptions(categoryTypeOptions); + + compensationDTOList.add(dto); } }