薪酬系统-福利档案,档案明细信息接口(社保、公积金、其他福利)
This commit is contained in:
parent
7c5af2166e
commit
f7b30cfbf6
|
|
@ -433,7 +433,13 @@ public class SIArchivesBiz {
|
|||
.build());
|
||||
encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class);
|
||||
InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherList.size() != 0 ? otherList.get(0) : null;
|
||||
InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId);
|
||||
String schemeName = "";
|
||||
if (insuranceArchivesOtherSchemePO.getOtherSchemeId() != null) {
|
||||
SISchemeBiz siSchemeBiz = new SISchemeBiz();
|
||||
InsuranceSchemePO insuranceSchemePO = siSchemeBiz.getById(insuranceArchivesOtherSchemePO.getOtherSchemeId());
|
||||
schemeName = insuranceSchemePO != null ? insuranceSchemePO.getSchemeName() : "";
|
||||
}
|
||||
InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId, schemeName);
|
||||
if (insuranceArchivesOtherSchemePO == null) {
|
||||
data.setEmployeeId(employeeId);
|
||||
data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString());
|
||||
|
|
@ -464,7 +470,13 @@ public class SIArchivesBiz {
|
|||
.build());
|
||||
encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class);
|
||||
InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundList.size() != 0 ? fundList.get(0) : null;
|
||||
InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId);
|
||||
String schemeName = "";
|
||||
if (insuranceArchivesFundSchemePO.getFundSchemeId() != null) {
|
||||
SISchemeBiz siSchemeBiz = new SISchemeBiz();
|
||||
InsuranceSchemePO insuranceSchemePO = siSchemeBiz.getById(insuranceArchivesFundSchemePO.getFundSchemeId());
|
||||
schemeName = insuranceSchemePO != null ? insuranceSchemePO.getSchemeName() : "";
|
||||
}
|
||||
InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId, schemeName);
|
||||
if (insuranceArchivesFundSchemePO == null) {
|
||||
data.setEmployeeId(employeeId);
|
||||
data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString());
|
||||
|
|
@ -485,7 +497,13 @@ public class SIArchivesBiz {
|
|||
*/
|
||||
public InsuranceArchivesSocialSchemeDTO buildSocialForm(Long employeeId, Long operateId, Long paymentOrganization) {
|
||||
InsuranceArchivesSocialSchemePO insuranceArchivesSocialSchemePO = getSocialByEmployeeId(employeeId, paymentOrganization);
|
||||
InsuranceArchivesSocialSchemeDTO data = InsuranceArchivesBO.convertSocialPOtoDTO(insuranceArchivesSocialSchemePO, employeeId);
|
||||
String schemeName = "";
|
||||
if (insuranceArchivesSocialSchemePO.getSocialSchemeId() != null) {
|
||||
SISchemeBiz siSchemeBiz = new SISchemeBiz();
|
||||
InsuranceSchemePO insuranceSchemePO = siSchemeBiz.getById(insuranceArchivesSocialSchemePO.getSocialSchemeId());
|
||||
schemeName = insuranceSchemePO != null ? insuranceSchemePO.getSchemeName() : "";
|
||||
}
|
||||
InsuranceArchivesSocialSchemeDTO data = InsuranceArchivesBO.convertSocialPOtoDTO(insuranceArchivesSocialSchemePO, employeeId, schemeName);
|
||||
if (insuranceArchivesSocialSchemePO == null) {
|
||||
data.setEmployeeId(employeeId);
|
||||
data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString());
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.biz;
|
||||
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.encrypt.AESEncryptUtil;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
|
|
@ -36,7 +37,7 @@ import java.util.stream.Collectors;
|
|||
* @Date 2022/3/7
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class SISchemeBiz {
|
||||
public class SISchemeBiz extends Service {
|
||||
|
||||
private SIAccountUtilMapper getSIAccountUtilMapper() {
|
||||
return SqlProxyHandle.getProxy(SIAccountUtilMapper.class);
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ import java.util.Objects;
|
|||
**/
|
||||
public class InsuranceArchivesBO {
|
||||
|
||||
public static InsuranceArchivesSocialSchemeDTO convertSocialPOtoDTO(InsuranceArchivesSocialSchemePO po, Long employeeId) {
|
||||
public static InsuranceArchivesSocialSchemeDTO convertSocialPOtoDTO(InsuranceArchivesSocialSchemePO po, Long employeeId, String schemeName) {
|
||||
if (Objects.isNull(po)) {
|
||||
return InsuranceArchivesSocialSchemeDTO.builder().build();
|
||||
}
|
||||
return InsuranceArchivesSocialSchemeDTO.builder()
|
||||
.socialName(po.getSocialSchemeId() == null ? null : String.valueOf(po.getSocialSchemeId()))
|
||||
.socialName(schemeName)
|
||||
.socialSchemeId(po.getSocialSchemeId())
|
||||
.welfareType(SalaryEnumUtil.enumMatchByValue(po.getWelfareType(), WelfareTypeEnum.values(), WelfareTypeEnum.class))
|
||||
.id(po.getId())
|
||||
|
|
@ -40,7 +40,7 @@ public class InsuranceArchivesBO {
|
|||
}
|
||||
|
||||
|
||||
public static InsuranceArchivesFundSchemeDTO convertFundPOtoDTO(InsuranceArchivesFundSchemePO po, Long employeeId) {
|
||||
public static InsuranceArchivesFundSchemeDTO convertFundPOtoDTO(InsuranceArchivesFundSchemePO po, Long employeeId, String schemeName) {
|
||||
if (Objects.isNull(po)) {
|
||||
return InsuranceArchivesFundSchemeDTO.builder().build();
|
||||
}
|
||||
|
|
@ -57,10 +57,11 @@ public class InsuranceArchivesBO {
|
|||
.nonPayment(po.getNonPayment())
|
||||
.underTake(po.getUnderTake() == null ? null : String.valueOf(po.getUnderTake()))
|
||||
.welfareType(SalaryEnumUtil.enumMatchByValue(po.getWelfareType(), WelfareTypeEnum.values(), WelfareTypeEnum.class))
|
||||
.fundName(schemeName)
|
||||
.build();
|
||||
}
|
||||
|
||||
public static InsuranceArchivesOtherSchemeDTO convertOtherPOtoDTO(InsuranceArchivesOtherSchemePO po, Long employeeId) {
|
||||
public static InsuranceArchivesOtherSchemeDTO convertOtherPOtoDTO(InsuranceArchivesOtherSchemePO po, Long employeeId, String schemeName) {
|
||||
if (Objects.isNull(po)) {
|
||||
return InsuranceArchivesOtherSchemeDTO.builder().build();
|
||||
}
|
||||
|
|
@ -76,6 +77,7 @@ public class InsuranceArchivesBO {
|
|||
.otherEndTime(po.getOtherEndTime())
|
||||
.paymentOrganization(po.getPaymentOrganization())
|
||||
.welfareType(SalaryEnumUtil.enumMatchByValue(po.getWelfareType(), WelfareTypeEnum.values(), WelfareTypeEnum.class))
|
||||
.otherName(schemeName)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class InsuranceArchivesFundSchemeDTO {
|
|||
|
||||
|
||||
//公积金方案名称
|
||||
private Long fundName;
|
||||
private String fundName;
|
||||
|
||||
//公积金方案id
|
||||
private Long fundSchemeId;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
package com.engine.salary.entity.siarchives.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: sy
|
||||
* @Description: 福利档案明细信息查询
|
||||
* @Date: 2023/9/25
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class InsuranceArchivesDetailListParam extends BaseQueryParam {
|
||||
|
||||
//员工id
|
||||
private Long employeeId;
|
||||
|
||||
//个税扣缴义务人
|
||||
private Long paymentOrganization;
|
||||
|
||||
//福利执行状态
|
||||
private List<String> runStatuses;
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.mapper.siarchives;
|
||||
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesDetailListParam;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -127,4 +128,11 @@ public interface InsuranceBaseInfoMapper {
|
|||
* @return
|
||||
*/
|
||||
List<InsuranceArchivesBaseInfoPO> listEndDateIsNull(@Param("employeeIds") List<Long> employeeIds);
|
||||
|
||||
/**
|
||||
* 根据人员id、个税扣缴义务人、社保执行状态获取基础信息列表
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
List<InsuranceArchivesBaseInfoPO> getListByEmpId(@Param("param") InsuranceArchivesDetailListParam param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -370,4 +370,23 @@
|
|||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getListByEmpId" resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_insurance_base_info t
|
||||
WHERE t.delete_type = 0
|
||||
AND employee_id = #{param.employeeId}
|
||||
<!-- 档案状态 -->
|
||||
<if test="param.runStatuses != null and param.runStatuses.size()>0">
|
||||
AND t.run_status IN
|
||||
<foreach collection="param.runStatuses" open="(" item="runStatus" separator="," close=")">
|
||||
#{runStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.paymentOrganization != null">
|
||||
AND
|
||||
t.payment_organization = #{param.paymentOrganization}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesDetailListParam;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesSaveParam;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO;
|
||||
|
|
@ -103,4 +104,6 @@ public interface SIArchivesService {
|
|||
void deleteArchive(Collection<Long> longs);
|
||||
|
||||
void handleStayDelData(long currentEmployeeId);
|
||||
|
||||
List<Map<String, Object>> getWelTableDetail(InsuranceArchivesDetailListParam param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.cloudstore.dev.api.util.Util_DataCache;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
|
|
@ -7,6 +10,11 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.salary.biz.SIArchivesBiz;
|
||||
import com.engine.salary.cmd.siarchives.SIArchivesTipsCmd;
|
||||
import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBaseInfoBO;
|
||||
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseDTO;
|
||||
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesFundSchemeDTO;
|
||||
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesOtherSchemeDTO;
|
||||
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesSocialSchemeDTO;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesDetailListParam;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesSaveParam;
|
||||
import com.engine.salary.entity.siarchives.po.*;
|
||||
|
|
@ -1133,5 +1141,86 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getWelTableDetail(InsuranceArchivesDetailListParam param) {
|
||||
if (param.getEmployeeId() == null) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "员工id必填!"));
|
||||
}
|
||||
List<InsuranceArchivesBaseInfoPO> baseInfoPOList = getInsuranceBaseInfoMapper().getListByEmpId(param);
|
||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||
if (baseInfoPOList.size() > 0) {
|
||||
for (InsuranceArchivesBaseInfoPO base : baseInfoPOList) {
|
||||
Map<String, Object> itemResult = new HashMap<>();
|
||||
//获取社保档案详细信息
|
||||
Map<String, Object> socialQueryParam = new HashMap<>();
|
||||
socialQueryParam.put("welfareTypeEnum", WelfareTypeEnum.SOCIAL_SECURITY);
|
||||
socialQueryParam.put("employeeId", param.getEmployeeId());
|
||||
socialQueryParam.put("paymentOrganization", base.getPaymentOrganization());
|
||||
Map<String, Object> socialBaseMap = getBaseForm(socialQueryParam);
|
||||
|
||||
}
|
||||
if (socialBaseMap.get("data") != null) {
|
||||
InsuranceArchivesSocialSchemeDTO socialBaseInfo = (InsuranceArchivesSocialSchemeDTO) socialBaseMap.get("data");
|
||||
itemResult.putAll(JSON.parseObject(JSON.toJSONString(socialBaseInfo), HashMap.class));
|
||||
if (socialBaseInfo.getSocialSchemeId() != null && StringUtils.isNotBlank(socialBaseInfo.getSchemePaymentBaseString())) {
|
||||
// socialQueryParam.put("schemeId", socialBaseInfo.getSocialSchemeId());
|
||||
// Map<String, Object> socialBaseDetailMap = getPaymentForm(socialQueryParam);
|
||||
// if (socialBaseDetailMap.get("data") != null) {
|
||||
// Map<String, Object> socialBaseNumMap = (Map<String, Object>) socialBaseDetailMap.get("data");
|
||||
// itemResult.putAll(socialBaseNumMap);
|
||||
// }
|
||||
// }
|
||||
itemResult.putAll(JSONObject.parseObject(socialBaseInfo.getSchemePaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
}));
|
||||
}
|
||||
}
|
||||
//获取公积金档案详细信息
|
||||
Map<String, Object> fundQueryParam = new HashMap<>();
|
||||
fundQueryParam.put("welfareTypeEnum", WelfareTypeEnum.ACCUMULATION_FUND);
|
||||
fundQueryParam.put("employeeId", param.getEmployeeId());
|
||||
fundQueryParam.put("paymentOrganization", base.getPaymentOrganization());
|
||||
Map<String, Object> fundBaseMap = getBaseForm(fundQueryParam);
|
||||
|
||||
if (fundBaseMap.get("data") != null) {
|
||||
InsuranceArchivesFundSchemeDTO fundBaseInfo = (InsuranceArchivesFundSchemeDTO) fundBaseMap.get("data");
|
||||
itemResult.putAll(JSON.parseObject(JSON.toJSONString(fundBaseInfo), HashMap.class));
|
||||
if (fundBaseInfo.getFundSchemeId() != null && StringUtils.isNotBlank(fundBaseInfo.getFundPaymentBaseString())) {
|
||||
// fundQueryParam.put("schemeId", fundBaseInfo.getFundSchemeId());
|
||||
// Map<String, Object> fundBaseDetailMap = getPaymentForm(fundQueryParam);
|
||||
// if (fundBaseDetailMap.get("data") != null) {
|
||||
// Map<String, Object> fundBaseNumMap = (Map<String, Object>) fundBaseDetailMap.get("data");
|
||||
// itemResult.putAll(fundBaseNumMap);
|
||||
// }
|
||||
itemResult.putAll(JSONObject.parseObject(fundBaseInfo.getFundPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
//获取其他福利档案详细信息
|
||||
Map<String, Object> otherQueryParam = new HashMap<>();
|
||||
otherQueryParam.put("welfareTypeEnum", WelfareTypeEnum.OTHER);
|
||||
otherQueryParam.put("employeeId", param.getEmployeeId());
|
||||
otherQueryParam.put("paymentOrganization", base.getPaymentOrganization());
|
||||
Map<String, Object> otherBaseMap = getBaseForm(otherQueryParam);
|
||||
|
||||
if (otherBaseMap.get("data") != null) {
|
||||
InsuranceArchivesOtherSchemeDTO otherBaseInfo = (InsuranceArchivesOtherSchemeDTO) otherBaseMap.get("data");
|
||||
itemResult.putAll(JSON.parseObject(JSON.toJSONString(otherBaseInfo), HashMap.class));
|
||||
if (otherBaseInfo.getOtherSchemeId() != null && StringUtils.isNotBlank(otherBaseInfo.getOtherPaymentBaseString())) {
|
||||
// otherQueryParam.put("schemeId", otherBaseInfo.getOtherSchemeId());
|
||||
// Map<String, Object> otherBaseDetailMap = getPaymentForm(otherQueryParam);
|
||||
// if (otherBaseDetailMap.get("data") != null) {
|
||||
// Map<String, Object> otherBaseNumMap = (Map<String, Object>) otherBaseDetailMap.get("data");
|
||||
// itemResult.putAll(otherBaseNumMap);
|
||||
// }
|
||||
itemResult.putAll(JSONObject.parseObject(otherBaseInfo.getOtherPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
}));
|
||||
}
|
||||
}
|
||||
itemResult.remove("id");
|
||||
resultList.add(itemResult);
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.web;
|
|||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesDetailListParam;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesSaveParam;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO;
|
||||
|
|
@ -19,6 +20,7 @@ import javax.ws.rs.*;
|
|||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -131,6 +133,21 @@ public class SIArchivesController {
|
|||
return new ResponseResult<InsuranceArchivesListParam,Map<String,Object>>(user).run(getService(user)::listPage, param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询档案列表
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/getWelTableDetail")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getWelTableDetail(@Context HttpServletRequest request, @Context HttpServletResponse response,@RequestBody InsuranceArchivesDetailListParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<InsuranceArchivesDetailListParam, List<Map<String, Object>>>(user).run(getService(user)::getWelTableDetail, param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取福利档案各tab总人数
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue