薪酬系统-福利台账,社保调差列表查询功能优化
This commit is contained in:
parent
d3d2074aed
commit
5436742c74
|
|
@ -48,7 +48,7 @@ public class InsuranceCompensationDTO {
|
|||
/**
|
||||
* 统计调差福利
|
||||
*/
|
||||
private String welfareType;
|
||||
private Integer welfareType;
|
||||
|
||||
/**
|
||||
* 统计调差福利类型
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ public interface InsuranceCompensationConfigMapper {
|
|||
|
||||
void deleteByPayOrg(Long paymentOrganization);
|
||||
|
||||
List<InsuranceCompensationConfigPO> queryByBillMonthAndPayOrg(String billMonth, Long paymentOrganization);
|
||||
List<InsuranceCompensationConfigPO> queryByPayOrg(@Param("paymentOrganization") Long paymentOrganization);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,12 +160,11 @@
|
|||
AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
<select id="queryByBillMonthAndPayOrg" resultMap="BaseResultMap" parameterType="Long">
|
||||
<select id="queryByPayOrg" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
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
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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> weaTableColumn = getColumnBuildService(user).buildCompensationColumns();
|
||||
WeaTable table = new WeaTable();
|
||||
table.setPageUID(UUID.randomUUID().toString());
|
||||
table.setColumns(weaTableColumn);
|
||||
List<Column> columns = weaTableColumn.stream().map(v -> new Column(v.getText(), v.getColumn(), v.getColumn())).collect(Collectors.toList());
|
||||
|
||||
//处理调差数据
|
||||
List<InsuranceCompensationDTO> 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<InsuranceCompensationPO> compensationPOList = getInsuranceCompensationMapper().queryByBillMonthAndPayOrg(billMonth, paymentOrganization);
|
||||
//获取调差配置数据
|
||||
List<InsuranceCompensationConfigPO> compensationConfigPOList = getInsuranceCompensationConfigMapper().queryByBillMonthAndPayOrg(billMonth, paymentOrganization);
|
||||
List<InsuranceCompensationConfigPO> compensationConfigPOList = getInsuranceCompensationConfigMapper().queryByPayOrg(paymentOrganization);
|
||||
|
||||
List<InsuranceCompensationDTO> compensationDTOList = new ArrayList<>();
|
||||
|
||||
|
|
@ -468,14 +474,16 @@ public class SICompensationServiceImpl extends Service implements SICompensation
|
|||
//设置categoryTypeOptions
|
||||
List<Map<String,String>> categoryTypeOptions = new ArrayList<>();
|
||||
List<String> categoryTypeList = Arrays.asList(po.getCategoryType().split(","));
|
||||
Map<String,String> categoryTypeMap = new HashMap<>();
|
||||
|
||||
for (String categoryType : categoryTypeList) {
|
||||
Map<String,String> 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<Map<String,String>> categoryTypeOptions = new ArrayList<>();
|
||||
List<String> categoryTypeList = Arrays.asList(configPO.getCategoryType().split(","));
|
||||
Map<String,String> categoryTypeMap = new HashMap<>();
|
||||
|
||||
for (String categoryType : categoryTypeList) {
|
||||
Map<String,String> categoryTypeMap = new HashMap<>();
|
||||
categoryTypeMap.put("id", categoryType);
|
||||
categoryTypeMap.put("content", categoryNameMap.get(Long.valueOf(categoryType)));
|
||||
categoryTypeOptions.add(categoryTypeMap);
|
||||
}
|
||||
|
||||
dto.setCategoryTypeOptions(categoryTypeOptions);
|
||||
|
||||
compensationDTOList.add(dto);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue