Commit 5cd2db19 authored by huyuchen's avatar huyuchen

明细接口改造

parent 320faa67
......@@ -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.util.R;
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 lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -27,7 +28,7 @@ public class EkpDaprUtils {
/**
* @Author huyc
* @Description 更新结算信息
* @Description 新增社保明细数据
* @Date 16:18 2024/02/28
* @Param
* @return
......@@ -35,4 +36,15 @@ public class EkpDaprUtils {
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);
}
/**
* @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 {
private String fd_3b43922217c6f8;
/**
* 公积金创建人姓名
* 缴纳地
**/
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;
/**
* @Author huyc
* @Date 2024/3/1
* @Description 获取项目明细信息
* @Description 获取社保公积金订单明细信息
* @Version 1.0
*/
@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);
}
......@@ -66,7 +66,7 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
//对象信息赋值
copySocialProperties(socialParam, socialInfo);
//社保信息
//项目信息
deptInfo = map.get(socialInfo.getFd_3adfe8c70d3fd4());
socialInfo.setFd_3b16e2f436ff98_text(deptInfo.getDeptName());
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
.isNotNull(TPaymentInfo::getFundId));
if (count > 0) {
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();
for (int j = 0; j < i; j++) {
//获取所有未推送的公积金实缴明细数据
unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, 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) {
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
......@@ -3152,7 +3152,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
long count = baseMapper.getTPaymentFundPushCount(searchVo, user.getId());
if (count > 0) {
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++) {
unPushInfo = baseMapper.getTPaymentFundPushInfo(searchVo, user.getId());
synchronized (this) {
......
......@@ -743,7 +743,7 @@ public class DoJointSocialTask {
}
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
fundParam.setFd_3adfe8cb96c41e(library.getProvidentCreateMonth());
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
......@@ -838,29 +838,25 @@ public class DoJointSocialTask {
fundParam.setFd_3b5cc487bb46fa(CommonConstants.EMPTY_STRING);
}
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) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
......@@ -1004,7 +1000,7 @@ public class DoJointSocialTask {
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
socialParam.setFd_3adfe8cb96c41e(library.getSocialCreateMonth());
} else {
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