Commit 5cd2db19 authored by huyuchen's avatar huyuchen

明细接口改造

parent 320faa67
...@@ -5,6 +5,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo; ...@@ -5,6 +5,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprEkpProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprEkpProperties;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam; import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -27,7 +28,7 @@ public class EkpDaprUtils { ...@@ -27,7 +28,7 @@ public class EkpDaprUtils {
/** /**
* @Author huyc * @Author huyc
* @Description 更新结算信息 * @Description 新增社保明细数据
* @Date 16:18 2024/02/28 * @Date 16:18 2024/02/28
* @Param * @Param
* @return * @return
...@@ -35,4 +36,15 @@ public class EkpDaprUtils { ...@@ -35,4 +36,15 @@ public class EkpDaprUtils {
public R<EkpSocialPushInfoVo> pushSocialInfoToEkp(List<EkpPushSocialParam> unPushList) { public R<EkpSocialPushInfoVo> pushSocialInfoToEkp(List<EkpPushSocialParam> unPushList) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/ekpSocialPush/inner/pushSocialInfoToEkp", JSON.toJSONString(unPushList), EkpSocialPushInfoVo.class, SecurityConstants.FROM_IN); return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/ekpSocialPush/inner/pushSocialInfoToEkp", JSON.toJSONString(unPushList), EkpSocialPushInfoVo.class, SecurityConstants.FROM_IN);
} }
/**
* @Author huyc
* @Description 新增公积金明细数据
* @Date 10:22 2024/03/06
* @Param
* @return
**/
public R<EkpSocialPushInfoVo> pushFundInfoToEkp(List<EkpPushFundParam> unPushList) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/ekpFundPush/inner/pushFundInfoToEkp", JSON.toJSONString(unPushList), EkpSocialPushInfoVo.class, SecurityConstants.FROM_IN);
}
} }
...@@ -154,7 +154,7 @@ public class EkpPushFundParam implements Serializable { ...@@ -154,7 +154,7 @@ public class EkpPushFundParam implements Serializable {
private String fd_3b43922217c6f8; private String fd_3b43922217c6f8;
/** /**
* 公积金创建人姓名 * 缴纳地
**/ **/
private String fd_3b5cc487bb46fa; private String fd_3b5cc487bb46fa;
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.ekp.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 公积金明细表
*
* @author fxj
* @date 2024-03-06 09:33:55
*/
@Data
@TableName("ekp_fund_info")
@EqualsAndHashCode()
@Schema(description = "公积金明细表")
public class EkpFundInfo {
@TableId(type = IdType.ASSIGN_ID)
private String fd_id;
private String fd_3add9dd7833db8;
private String fd_3add9de0be85e4;
private String fd_3add9e1a670144;
private String fd_3adfe8c70d3fd4;
private String fd_3adfe8c8468e54;
private String fd_3adfe95c169c48;
private String fd_3adfe8c73cb5a4;
private String fd_3adfe8c81a0e42;
private String fd_3adfe8c79989d4;
private String fd_3adfe8c7e4cf7a;
private String fd_3adfe8cb96c41e;
private String fd_3adfe8cf632700;
private String fd_3adfe8cff746bc;
private Double fd_3adfeb4e8064a8;
private Double fd_3adfeb52a4d2e2;
private Double fd_3adfeb52fbe966;
private Double fd_3adfeb5366dd82;
private Double fd_3adfeb53c70f72;
private Double fd_3adfeb5413fb44;
private Double fd_3adfeb7b624f06;
private String fd_3add9ea428879a;
private String fd_3add9eaeed2560;
private String fd_3adfeb830523b6;
private String fd_3adfeb8489e6c2;
private Double fd_3adfeb7bd97464;
private String fd_3add9edfbc6f7e;
private String fd_3add9eed23894a;
private String fd_3adfeb83a704c8;
private String fd_3adfeb84175f28;
private String fd_3aeafa8cc144bc;
private String fd_3b13afd1ef7798;
private Date fd_3b13d8f8fdfb76;
private String fd_3b16e37baa5650_text;
private String fd_3b16e37baa5650;
private String fd_3b178ec510bf48;
private Double fd_3b35a6989dfde8;
private Double fd_3b35a6518b73b2;
private Double fd_3b35a6992a20a4;
private Double fd_3b35a65138a7fc;
private String fd_3b3cabbf094f1a;
private String fd_3b3e41ef8db782;
private String fd_3b439246fcdc7c;
private String fd_3b5cc4b2aae22a;
private String fd_3b10b38f90d138;
private String fd_3b01956c77864c ;
private Date createTime;
}
...@@ -7,7 +7,7 @@ import java.io.Serializable; ...@@ -7,7 +7,7 @@ import java.io.Serializable;
/** /**
* @Author huyc * @Author huyc
* @Date 2024/3/1 * @Date 2024/3/1
* @Description 获取项目明细信息 * @Description 获取社保公积金订单明细信息
* @Version 1.0 * @Version 1.0
*/ */
@Data @Data
......
package com.yifu.cloud.plus.v1.ekp.controller;
import com.yifu.cloud.plus.v1.ekp.service.EkpFundInfoService;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 社保明细推送
* @author huyc
* @date 2024-02-28 17:01:22
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/ekpFundPush" )
@Tag(name = "公积金明细推送")
public class TEkpFundInfoController {
private final EkpFundInfoService fundInfoService;
/**
* @param unPushList
* @Description: 推送公积金明细数据
* @Author: huyc
* @Date: 2024/3/6
* @return:
**/
@Inner
@PostMapping("/inner/pushFundInfoToEkp")
public EkpSocialPushInfoVo pushFundInfoToEkp(@RequestBody List<EkpPushFundParam> unPushList) {
return fundInfoService.pushFundInfoToEkp(unPushList);
}
}
package com.yifu.cloud.plus.v1.ekp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.ekp.entity.EkpFundInfo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 社保明细表
*
* @author huyc
* @date 2024-02-29 11:21:56
*/
@Mapper
public interface EkpFundInfoMapper extends BaseMapper<EkpFundInfo> {
/**
* 获取所有项目信息
* @param
* @return
*/
List<EkpDeptInfoVo> getAllEkpDeptInfo();
/**
* 根据身份证和生成月份获取费用合计
* @param
* @return
*/
EkpSocialSumInfoVo getCostSumInfo(@Param("card") String empIdCard, @Param("month") String createMonth);
/**
* 查询公积金id是否存在
* @param
* @return
*/
long getFundCount(@Param("fundId") String fundId);
}
package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpFundInfo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam;
import java.util.List;
/**
* 公积金明细表
*
* @author huyc
* @date 2024-02-29 11:21:56
*/
public interface EkpFundInfoService extends IService<EkpFundInfo> {
EkpSocialPushInfoVo pushFundInfoToEkp(List<EkpPushFundParam> unPushList);
}
package com.yifu.cloud.plus.v1.ekp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.ekp.entity.EkpFundInfo;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpFundInfoMapper;
import com.yifu.cloud.plus.v1.ekp.service.EkpFundInfoService;
import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
/**
//社保明细表
*
//@author huyc
//@date 2024-02-29 11:21:56
*/
@Log4j2
@Service
public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFundInfo> implements EkpFundInfoService {
/**
//@Description: 公积金明细推送至ekp
//@Author: huyc
//@Date: 2024-2-29
//@return: void
**/
@Override
public EkpSocialPushInfoVo pushFundInfoToEkp(List<EkpPushFundParam> unPushList) {
//插入数据集合
List<EkpFundInfo> fundInfoList = new ArrayList<>();
//社保id集合 用于更新社保状态
List<String> paymentIds = new ArrayList<>();
//获取ekp所有项目信息
List<EkpDeptInfoVo> deptInfoVoList = baseMapper.getAllEkpDeptInfo();
Map<String, EkpDeptInfoVo> map = new HashMap<>();
EkpDeptInfoVo deptInfo;
EkpSocialSumInfoVo socialSumInfo;
if (Optional.ofNullable(deptInfoVoList).isPresent()) {
map = deptInfoVoList.stream().collect(Collectors.toMap(EkpDeptInfoVo::getDeptNo, k -> k));
}
long fundCount;
try {
for (EkpPushFundParam fundParam : unPushList) {
//去重 防止重复推送
fundCount = baseMapper.getFundCount(fundParam.getFd_3b0afbaf10df2c());
if (fundCount > 0) {
continue;
}
EkpFundInfo fundInfo = new EkpFundInfo();
//对象信息赋值
copyFundProperties(fundParam, fundInfo);
//项目信息
deptInfo = map.get(fundInfo.getFd_3adfe8c70d3fd4());
fundInfo.setFd_3b16e37baa5650_text(deptInfo.getDeptName());
fundInfo.setFd_3b16e37baa5650(deptInfo.getFdId());
//实际结算月份
if ("生成月本月数据".equals(deptInfo.getSocialType())) {
fundInfo.setFd_3adfe8cff746bc(fundInfo.getFd_3adfe8cb96c41e());
} else if ("生成月上月数据".equals(deptInfo.getSocialType())) {
fundInfo.setFd_3adfe8cff746bc(DateUtil.dateToString(DateUtil.addMonthByDate(DateUtil.parseDate(fundInfo.getFd_3adfe8cb96c41e(), "yyyyMM"), -1), "yyyy-MM"));
} else if ("生成月次月数据".equals(deptInfo.getSocialType())) {
fundInfo.setFd_3adfe8cff746bc(DateUtil.dateToString(DateUtil.addMonthByDate(DateUtil.parseDate(fundInfo.getFd_3adfe8cb96c41e(), "yyyyMM"), 1), "yyyy-MM"));
}
//是否全部结算
if ("全量未结算数据".equals(deptInfo.getSocialType())) {
fundInfo.setFd_3b13afd1ef7798(CommonConstants.IS_TRUE);
} else {
fundInfo.setFd_3b13afd1ef7798(CommonConstants.IS_FALSE);
}
//获取社保订单明细合计
socialSumInfo = baseMapper.getCostSumInfo(fundInfo.getFd_3adfe8c7e4cf7a(), fundInfo.getFd_3adfe8cb96c41e());
//预估个人合计
Double ygPersonSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYgPersonSum();
//预估单位合计
Double ygDwSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYgDwSum();
//实缴单位合计
Double sjDwSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getSjDwSum();
//实缴个人合计
Double sjPersonSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getSjPersonSum();
//应收
Double ys = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYs();
//个人应收
Double personYs = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getPersonYs();
//单位应收
Double dwYs = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getDwYs();
//单位差异
if ("是".equals(fundInfo.getFd_3add9de0be85e4()) && "实缴".equals(fundInfo.getFd_3add9dd7833db8())) {
//单位差异
//$列表.求总和$($公积金订单明细*总数(单位代缴)$)+$单位代缴$) -($列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $预估单位代缴$)
fundInfo.setFd_3adfeb53c70f72(Double.sum(Double.sum(sjDwSum, fundInfo.getFd_3adfeb52fbe966()), -Double.sum(ygDwSum,fundInfo.getFd_3adfeb52a4d2e2())));
//个人差异
//$列表.求总和$($公积金订单明细*总数(个人代缴)$)+ $个人代缴$ - $列表.求总和$($公积金订单明细*总数(预估个人代缴)$)
fundInfo.setFd_3adfeb5413fb44(Double.sum(Double.sum(sjPersonSum, fundInfo.getFd_3adfeb5366dd82()), -ygPersonSum));
}
//Fd_3adfeb7b624f06应收;Fd_3b35a65138a7fc个人应收;fd_3b35a6518b73b2单位应收
if ("是".equals(deptInfo.getIsBpo())) {
//应收
fundInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
fundInfo.setFd_3b35a65138a7fc(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应收
fundInfo.setFd_3b35a6518b73b2(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
if ("实缴".equals(deptInfo.getSettleType())) {
if ("预估".equals(fundInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $列表.求总和$($公积金订单明细*总数(预估个人代缴)$) + $预估个人代缴$ + $预估单位代缴$ - $列表.求总和$($公积金订单明细*总数(应收)$)
fundInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(ygDwSum, ygPersonSum),Double.sum(fundInfo.getFd_3adfeb52a4d2e2(),fundInfo.getFd_3adfeb4e8064a8()) -ys));
//$列表.求总和$($公积金订单明细*总数(预估个人代缴)$) + $预估个人代缴$ - $列表.求总和$($公积金订单明细*总数(个人应收)$)
fundInfo.setFd_3b35a65138a7fc(Double.sum(Double.sum(ygPersonSum, fundInfo.getFd_3adfeb52a4d2e2()), -personYs));
//$列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $预估单位代缴$ - $列表.求总和$($公积金订单明细*总数(单位应收)$)
fundInfo.setFd_3b35a6518b73b2(Double.sum(Double.sum(ygDwSum, fundInfo.getFd_3adfeb4e8064a8()), -dwYs));
} else {
if (Double.sum(ygDwSum, ygPersonSum) > 0) {
//应收
fundInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
fundInfo.setFd_3b35a65138a7fc(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应收
fundInfo.setFd_3b35a6518b73b2(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
// $列表.求总和$($公积金订单明细*总数(单位代缴)$) +$列表.求总和$($公积金订单明细*总数(个人代缴)$) + $单位代缴$ + $个人代缴$ - $列表.求总和$($公积金订单明细*总数(应收)$)
fundInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(sjDwSum, sjPersonSum),Double.sum(fundInfo.getFd_3adfeb52fbe966(),fundInfo.getFd_3adfeb5366dd82()) -ys));
//$列表.求总和$($公积金订单明细*总数(个人代缴)$) + $个人代缴$ - $列表.求总和$($公积金订单明细*总数(个人应收)$)
fundInfo.setFd_3b35a65138a7fc(Double.sum(Double.sum(sjPersonSum, fundInfo.getFd_3adfeb5366dd82()), -personYs));
//$列表.求总和$($公积金订单明细*总数(单位代缴)$) + $单位代缴$ - $列表.求总和$($公积金订单明细*总数(单位应收)$)
fundInfo.setFd_3b35a6518b73b2(Double.sum(Double.sum(sjDwSum, fundInfo.getFd_3adfeb52fbe966()), -dwYs));
}
}
} else {
if ("预估".equals(fundInfo.getFd_3add9dd7833db8())) {
// $列表.求总和$($公积金订单明细*总数(预估个人代缴)$) + $列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $预估个人代缴$ + $预估单位代缴$ -$列表.求总和$($公积金订单明细*总数(应收)$)
fundInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(ygPersonSum, ygDwSum),Double.sum(fundInfo.getFd_3adfeb52a4d2e2(),fundInfo.getFd_3adfeb4e8064a8()) -ys));
//$列表.求总和$($公积金订单明细*总数(预估个人代缴)$) + $预估个人代缴$ -$列表.求总和$($公积金订单明细*总数(个人应收)$)
fundInfo.setFd_3b35a65138a7fc(Double.sum(Double.sum(ygPersonSum, fundInfo.getFd_3adfeb52a4d2e2()), -personYs));
// $列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $预估单位代缴$ -$列表.求总和$($公积金订单明细*总数(单位应收)$)
fundInfo.setFd_3b35a6518b73b2(Double.sum(Double.sum(ygDwSum, fundInfo.getFd_3adfeb4e8064a8()), -dwYs));
} else {
//$列表.求总和$($公积金订单明细*总数(单位代缴)$) +$列表.求总和$($公积金订单明细*总数(个人代缴)$) + $单位代缴$ + $个人代缴$ - $列表.求总和$($公积金订单明细*总数(应收)$)
fundInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(sjDwSum, sjPersonSum),Double.sum(fundInfo.getFd_3adfeb52fbe966(),fundInfo.getFd_3adfeb5366dd82()) -ys));
//$列表.求总和$($公积金订单明细*总数(个人代缴)$) + $个人代缴$ - $列表.求总和$($公积金订单明细*总数(个人应收)$)
fundInfo.setFd_3b35a65138a7fc(Double.sum(Double.sum(sjPersonSum, fundInfo.getFd_3adfeb5366dd82()), -personYs));
//$列表.求总和$($公积金订单明细*总数(单位代缴)$) + $单位代缴$ - $列表.求总和$($公积金订单明细*总数(单位应收)$)
fundInfo.setFd_3b35a6518b73b2(Double.sum(Double.sum(sjDwSum, fundInfo.getFd_3adfeb52fbe966()), -dwYs));
}
}
}
if ("预估".equals(fundInfo.getFd_3add9dd7833db8())) {
//应支出
fundInfo.setFd_3adfeb7bd97464(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应支
fundInfo.setFd_3b35a6989dfde8(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应支
fundInfo.setFd_3b35a6992a20a4(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
//应支出
fundInfo.setFd_3adfeb7bd97464(Double.sum(fundInfo.getFd_3adfeb52fbe966(),fundInfo.getFd_3adfeb5366dd82()));
//个人应支
fundInfo.setFd_3b35a6989dfde8(fundInfo.getFd_3adfeb5366dd82());
//单位应支
fundInfo.setFd_3b35a6992a20a4(fundInfo.getFd_3adfeb52fbe966());
}
//创建时间
fundInfo.setCreateTime(DateUtil.getCurrentDateTime());
fundInfoList.add(fundInfo);
paymentIds.add(fundParam.getFd_3b0afbaf10df2c());
}
boolean flag = this.saveBatch(fundInfoList);
if (flag) {
//推送成功更新明细状态
EkpSocialPushInfoVo pushInfoVo = new EkpSocialPushInfoVo();
pushInfoVo.setPaymentIds(paymentIds);
return pushInfoVo;
}
} catch (Exception e) {
log.error("公积金明细推送失败");
return null;
}
return null;
}
private void copyFundProperties(EkpPushFundParam socialParam,EkpFundInfo socialInfo) {
//订单类型
socialInfo.setFd_3add9dd7833db8(socialParam.getFd_3add9dd7833db8());
//与工资合并结算
socialInfo.setFd_3add9e1a670144(socialParam.getFd_3add9e1a670144());
//是否有预估
socialInfo.setFd_3add9de0be85e4(socialParam.getFd_3add9de0be85e4());
//是否为BPO业务
socialInfo.setFd_3b178ec510bf48(socialParam.getFd_3b178ea361cabe());
//创建人姓名
socialInfo.setFd_3b439246fcdc7c(socialParam.getFd_3b43922217c6f8());
//项目编码
socialInfo.setFd_3adfe8c70d3fd4(socialParam.getFd_3adfe8c70d3fd4());
//项目名称
socialInfo.setFd_3adfe8c8468e54(socialParam.getFd_3adfe8c8468e54());
//单号
socialInfo.setFd_3adfe95c169c48(socialParam.getFd_3adfe95c169c48());
//客户编码
socialInfo.setFd_3adfe8c73cb5a4(socialParam.getFd_3adfe8c73cb5a4());
//客户名称
socialInfo.setFd_3adfe8c81a0e42(socialParam.getFd_3adfe8c81a0e42());
//公积金户
socialInfo.setFd_3aeafa8cc144bc(socialParam.getFd_3aeafa8cc144bc());
//姓名
socialInfo.setFd_3adfe8c79989d4(socialParam.getFd_3adfe8c79989d4());
//身份证号
socialInfo.setFd_3adfe8c7e4cf7a(socialParam.getFd_3adfe8c7e4cf7a());
//我司到款单位
socialInfo.setFd_3b01956c77864c(socialParam.getFd_3b019a2e9bfdd6());
//生成月份
socialInfo.setFd_3adfe8cb96c41e(socialParam.getFd_3adfe8cb96c41e());
//缴纳月份
socialInfo.setFd_3adfe8cf632700(socialParam.getFd_3adfe8cf632700());
//公积金ID
socialInfo.setFd_3b10b38f90d138(socialParam.getFd_3b0afbaf10df2c());
//薪酬申请编号
socialInfo.setFd_3b3cabbf094f1a(socialParam.getFd_3b3cabde83d1d0());
//缴纳地
socialInfo.setFd_3b5cc4b2aae22a(socialParam.getFd_3b5cc487bb46fa());
//预估单位部分
socialInfo.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3adfeb4e8064a8()) ? null : Double.valueOf(socialParam.getFd_3adfeb4e8064a8()));
//预估个人部分
socialInfo.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3adfeb52a4d2e2()) ? null : Double.valueOf(socialParam.getFd_3adfeb52a4d2e2()));
//实缴单位部分
socialInfo.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3adfeb52fbe966()) ? null : Double.valueOf(socialParam.getFd_3adfeb52fbe966()));
//实缴个人部分
socialInfo.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3adfeb5366dd82()) ? null : Double.valueOf(socialParam.getFd_3adfeb5366dd82()));
//结算状态
socialInfo.setFd_3add9ea428879a(socialParam.getFd_3add9ea428879a());
//收款状态
socialInfo.setFd_3add9eaeed2560("未收");
//付款状态
socialInfo.setFd_3add9eed23894a("未付");
//支出结算状态
socialInfo.setFd_3add9edfbc6f7e("未结算");
}
}
...@@ -66,7 +66,7 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E ...@@ -66,7 +66,7 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
//对象信息赋值 //对象信息赋值
copySocialProperties(socialParam, socialInfo); copySocialProperties(socialParam, socialInfo);
//社保信息 //项目信息
deptInfo = map.get(socialInfo.getFd_3adfe8c70d3fd4()); deptInfo = map.get(socialInfo.getFd_3adfe8c70d3fd4());
socialInfo.setFd_3b16e2f436ff98_text(deptInfo.getDeptName()); socialInfo.setFd_3b16e2f436ff98_text(deptInfo.getDeptName());
socialInfo.setFd_3b16e2f436ff98(deptInfo.getFdId()); socialInfo.setFd_3b16e2f436ff98(deptInfo.getFdId());
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.ekp.mapper.EkpFundInfoMapper">
<resultMap id="ekpSocialInfoMap" type="com.yifu.cloud.plus.v1.ekp.entity.EkpFundInfo">
<id property="fd_id" column="fd_id"/>
<result property="fd_3add9dd7833db8" column="fd_3add9dd7833db8"/>
<result property="fd_3add9de0be85e4" column="fd_3add9de0be85e4"/>
<result property="fd_3add9e1a670144" column="fd_3add9e1a670144"/>
<result property="fd_3adfe8c70d3fd4" column="fd_3adfe8c70d3fd4"/>
<result property="fd_3adfe8c8468e54" column="fd_3adfe8c8468e54"/>
<result property="fd_3adfe95c169c48" column="fd_3adfe95c169c48"/>
<result property="fd_3adfe8c73cb5a4" column="fd_3adfe8c73cb5a4"/>
<result property="fd_3adfe8c81a0e42" column="fd_3adfe8c81a0e42"/>
<result property="fd_3adfe8c79989d4" column="fd_3adfe8c79989d4"/>
<result property="fd_3adfe8c7e4cf7a" column="fd_3adfe8c7e4cf7a"/>
<result property="fd_3adfe8cb96c41e" column="fd_3adfe8cb96c41e"/>
<result property="fd_3adfe8cf632700" column="fd_3adfe8cf632700"/>
<result property="fd_3adfe8cff746bc" column="fd_3adfe8cff746bc"/>
<result property="fd_3adfeb4e8064a8" column="fd_3adfeb4e8064a8"/>
<result property="fd_3adfeb52a4d2e2" column="fd_3adfeb52a4d2e2"/>
<result property="fd_3adfeb52fbe966" column="fd_3adfeb52fbe966"/>
<result property="fd_3adfeb5366dd82" column="fd_3adfeb5366dd82"/>
<result property="fd_3adfeb53c70f72" column="fd_3adfeb53c70f72"/>
<result property="fd_3adfeb5413fb44" column="fd_3adfeb5413fb44"/>
<result property="fd_3adfeb7b624f06" column="fd_3adfeb7b624f06"/>
<result property="fd_3add9ea428879a" column="fd_3add9ea428879a"/>
<result property="fd_3add9eaeed2560" column="fd_3add9eaeed2560"/>
<result property="fd_3adfeb830523b6" column="fd_3adfeb830523b6"/>
<result property="fd_3adfeb8489e6c2" column="fd_3adfeb8489e6c2"/>
<result property="fd_3adfeb7bd97464" column="fd_3adfeb7bd97464"/>
<result property="fd_3add9edfbc6f7e" column="fd_3add9edfbc6f7e"/>
<result property="fd_3add9eed23894a" column="fd_3add9eed23894a"/>
<result property="fd_3adfeb83a704c8" column="fd_3adfeb83a704c8"/>
<result property="fd_3adfeb84175f28" column="fd_3adfeb84175f28"/>
<result property="fd_3aeafa8cc144bc" column="fd_3aeafa8cc144bc"/>
<result property="fd_3b13afd1ef7798" column="fd_3b13afd1ef7798"/>
<result property="fd_3b13d8f8fdfb76" column="fd_3b13d8f8fdfb76"/>
<result property="fd_3b16e37baa5650_text" column="fd_3b16e37baa5650_text"/>
<result property="fd_3b16e37baa5650" column="fd_3b16e37baa5650"/>
<result property="fd_3b178ec510bf48" column="fd_3b178ec510bf48"/>
<result property="fd_3b35a6989dfde8" column="fd_3b35a6989dfde8"/>
<result property="fd_3b35a6518b73b2" column="fd_3b35a6518b73b2"/>
<result property="fd_3b35a6992a20a4" column="fd_3b35a6992a20a4"/>
<result property="fd_3b35a65138a7fc" column="fd_3b35a65138a7fc"/>
<result property="fd_3b3cabbf094f1a" column="fd_3b3cabbf094f1a"/>
<result property="fd_3b3e41ef8db782" column="fd_3b3e41ef8db782"/>
<result property="fd_3b439246fcdc7c" column="fd_3b439246fcdc7c"/>
<result property="fd_3b5cc4b2aae22a" column="fd_3b5cc4b2aae22a"/>
<result property="fd_3b10b38f90d138" column="fd_3b10b38f90d138"/>
<result property="fd_3b01956c77864c" column="fd_3b01956c77864c"/>
<result property="createTime" column="create_time"/>
</resultMap>
<!--tPaymentInfo合并查询-->
<select id="getAllEkpDeptInfo" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo">
SELECT
a.fd_id as fdId,
a.fd_3b1480cd9dcb60 as settleType,
a.fd_3b15f64dd59a28 as isBpo,
a.fd_3b13479cedebd4 as socialType,
a.fd_3a2b38c61ef9aa as deptName,
a.fd_3a37fe508071fe as deptNo
from ekp_24a8e6a7fc143bb8c48a a
group by fd_3a37fe508071fe
</select>
<!--tPaymentInfo合并查询-->
<select id="getCostSumInfo" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo">
SELECT
round(sum(ifnull(fd_3adfeb52a4d2e2,0)),2) as ygPersonSum,
round(sum(ifnull(fd_3adfeb4e8064a8,0)),2) as ygDwSum,
round(sum(ifnull(fd_3adfeb52fbe966,0)),2) as sjDwSum,
round(sum(ifnull(fd_3adfeb5366dd82,0)),2) as sjPersonSum,
round(sum(ifnull(fd_3adfeb7b624f06,0)),2) as ys,
round(sum(ifnull(fd_3b35a65138a7fc,0)),2) as personYs,
round(sum(ifnull(fd_3b35a6518b73b2,0)),2) as dwYs
from ekp_fund_info
where fd_3adfe8c7e4cf7a = #{card} and fd_3adfe8cb96c41e = #{month}
</select>
<select id="getFundCount" resultType="java.lang.Long">
SELECT
count(1)
from ekp_fund_info
where fd_3b10b38f90d138 = #{fundId}
</select>
</mapper>
...@@ -2952,14 +2952,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2952,14 +2952,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.isNotNull(TPaymentInfo::getFundId)); .isNotNull(TPaymentInfo::getFundId));
if (count > 0) { if (count > 0) {
List<TPaymentInfo> unPushInfo; List<TPaymentInfo> unPushInfo;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.ONE_THOUSAND_INT);
Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap(); Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
//获取所有未推送的公积金实缴明细数据 //获取所有未推送的公积金实缴明细数据
unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getFundId).last(" limit 0,10000")); .isNotNull(TPaymentInfo::getFundId).last(" limit 0,1000"));
synchronized (this) { synchronized (this) {
if (Common.isNotNull(unPushInfo)) { if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送 //推送数据封装并推送
...@@ -3152,7 +3152,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3152,7 +3152,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
long count = baseMapper.getTPaymentFundPushCount(searchVo, user.getId()); long count = baseMapper.getTPaymentFundPushCount(searchVo, user.getId());
if (count > 0) { if (count > 0) {
List<TPaymentInfo> unPushInfo; List<TPaymentInfo> unPushInfo;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.ONE_THOUSAND_INT);
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
unPushInfo = baseMapper.getTPaymentFundPushInfo(searchVo, user.getId()); unPushInfo = baseMapper.getTPaymentFundPushInfo(searchVo, user.getId());
synchronized (this) { synchronized (this) {
......
...@@ -743,7 +743,7 @@ public class DoJointSocialTask { ...@@ -743,7 +743,7 @@ public class DoJointSocialTask {
} }
//生成月份 //生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) { if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth())); fundParam.setFd_3adfe8cb96c41e(library.getProvidentCreateMonth());
} else { } else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
} }
...@@ -838,29 +838,25 @@ public class DoJointSocialTask { ...@@ -838,29 +838,25 @@ public class DoJointSocialTask {
fundParam.setFd_3b5cc487bb46fa(CommonConstants.EMPTY_STRING); fundParam.setFd_3b5cc487bb46fa(CommonConstants.EMPTY_STRING);
} }
paramList.add(fundParam); paramList.add(fundParam);
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
paramList.add(fundParam);
} }
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(paramList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
for (String id : idList) {
paymentInfoMapper.updateBySocialPayment(id);
}
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金批量插入失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
} }
// R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(paramList);
// if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
// EkpSocialPushInfoVo vo = info.getData();
// List<String> idList = vo.getPaymentIds();
// for (String id : idList) {
// paymentInfoMapper.updateBySocialPayment(id);
// }
// } else {
// TSendEkpError error = new TSendEkpError();
// error.setCreateTime(new Date());
// error.setCreateDay(DateUtil.getThisDay());
// error.setType(CommonConstants.THREE_STRING);
// error.setCreateUserName("公积金实缴费用推送");
// error.setLinkId(unPushInfo.get(0).getId());
// error.setTitle("公积金批量插入失败");
// error.setNums(CommonConstants.ONE_INT);
// tSendEkpErrorService.saveError(error);
// }
} catch (Exception e) { } catch (Exception e) {
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date()); error.setCreateTime(new Date());
...@@ -1004,7 +1000,7 @@ public class DoJointSocialTask { ...@@ -1004,7 +1000,7 @@ public class DoJointSocialTask {
} }
//社保生成月份 //社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) { if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth())); socialParam.setFd_3adfe8cb96c41e(library.getSocialCreateMonth());
} else { } else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment