Commit 61480f0d authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/fxj-dev' into fxj-dev

parents 77a8c754 4037c0de
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-ekp # 资源的名字,在同一个namespace中必须唯一
namespace: qas-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-ekp
replicas: 2 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
# rollingUpdate: # 滚动更新
# maxSurge: 30% # 最大额外可以存在的副本数,可以为百分比,也可以为整数
# maxUnavailable: 30% # 示在更新过程中能够进入不可用状态的 Pod 的最大值,可以为百分比,也可以为整数
# type: RollingUpdate # 滚动更新策略
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-ekp
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-ekp" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5077" #这个参数告诉Dapr你的应用程序正在监听哪个端口。
#dapr.io/log-level: "debug" #为 Dapr sidecar设置日志级别。 允许的值是debug,info,warn,error。 默认是 info
#dapr.io/log-as-json: "false" #将此参数设置为true以JSON格式输出日志。 默认值为 false.
#dapr.io/config: file #告诉 Dapr 要使用哪个配置 CRD
dapr.io/app-protocol: "http" #告诉 Dapr 你的应用程序正在使用哪种协议。 有效选项是 http and grpc。 Default is http
#dapr.io/app-max-concurrency: "20" #限制应用程序的并发量。 有效的数值是大于 0
#dapr.io/app-ssl: "false" #告诉Dapr通过不安全的SSL连接调用应用程序。 同时适用于HTTP和gRPC。 Traffic between your app and the Dapr sidecar is encrypted with a certificate issued by a non-trusted certificate authority, which is considered insecure. 默认值为 false.
dapr.io/metrics-port: "9090" #设置 sidecar 度量服务器的端口。 默认值为 9090
#dapr.io/sidecar-cpu-limit: 2 #Dapr sidecar可以使用的最大CPU数量。 默认情况下未设置
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
spec: # 资源规范字段
nodeSelector: # node 选择器
node-type: worker # node标签
kubernetes.io/hostname: yfmaster1
containers: # 容器
- name: yifu-ekp # 容器的名字
#image: 192.168.1.110:5500/qas-mvp/yifu-ekp-biz:1.0.0 # 容器镜像地址
image: hub.worfu.com/qas-mvp/yifu-ekp-biz:1.0.0 #临时地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 5002 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: test
- name: TZ
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "4096Mi"
#cpu: 300m # CPU,1核心 = 1000m
requests: # 容器运行时,最低资源需求,也就是说最少需要多少资源容器才能正常运行
#cpu: 100m
memory: "500Mi"
#livenessProbe: # pod 内部健康检查的设置
# httpGet: # 通过httpget检查健康,返回200-399之间,则认为容器正常
# path: /healthCheck # URI地址
# port: 8080 # 端口
# scheme: HTTP # 协议
# # host: 127.0.0.1 # 主机地址
# initialDelaySeconds: 30 # 表明第一次检测在容器启动后多长时间后开始
# timeoutSeconds: 5 # 检测的超时时间
# periodSeconds: 30 # 检查间隔时间
# successThreshold: 1 # 成功门槛
# failureThreshold: 5 # 失败门槛,连接失败5次,pod杀掉,重启一个新的pod
# readinessProbe: # Pod 准备服务健康检查设置
# httpGet:
# path: /healthCheck
# port: 8080
# scheme: HTTP
# initialDelaySeconds: 30
# timeoutSeconds: 5
# periodSeconds: 10
# successThreshold: 1
# failureThreshold: 5
#也可以用这种方法
#exec: 执行命令的方法进行监测,如果其退出码不为0,则认为容器正常
# command:
# - cat
# - /tmp/health
#也可以用这种方法
#tcpSocket: # 通过tcpSocket检查健康
# port: number
#ports:
# - name: http # 名称
# containerPort: 8080 # 容器开发对外的端口
# protocol: TCP # 协议
imagePullSecrets: # 镜像仓库拉取密钥
- name: login
#affinity: # 亲和性调试
# nodeAffinity: # 节点亲和力
# requiredDuringSchedulingIgnoredDuringExecution: # pod 必须部署到满足条件的节点上
# nodeSelectorTerms: # 节点满足任何一个条件就可以
# - matchExpressions: # 有多个选项,则只有同时满足这些逻辑选项的节点才能运行 pod
# - key: beta.kubernetes.io/arch
# operator: In
# values:
# - amd64
\ No newline at end of file
apiVersion: v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Service # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
labels: # 设定资源的标签
app: yifu-ekp # 资源的名字,在同一个namespace中必须唯一
name: yifu-ekp # 资源的名字,在同一个namespace中必须唯一
namespace: qas-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 5077 # service 端口
protocol: TCP # 协议
targetPort: 5077 # 容器暴露的端口
name: http-ekp # 端口名称
- port: 3500 # service 端口
protocol: TCP # 协议
targetPort: 3500 # 容器暴露的端口
name: http-ekp-dapr
selector: # 选择器
app: yifu-ekp # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
......@@ -56,6 +56,12 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-ekp-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON;
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;
......@@ -26,12 +28,23 @@ public class EkpDaprUtils {
/**
* @Author huyc
* @Description 更新结算信息
* @Description 新增社保明细数据
* @Date 16:18 2024/02/28
* @Param
* @return
**/
public R<Boolean> pushSocialInfoToEkp(List<EkpPushSocialParam> unPushList) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/ekpSocialPush/inner/pushSocialInfoToEkp", JSON.toJSONString(unPushList), Boolean.class, SecurityConstants.FROM_IN);
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);
}
}
#\u6D4B\u8BD5\u73AF\u5883
#\u67E5\u8BE2\u5730\u5740\u6559\u7A0B\uFF1A cd home/data/nginx-mvp-image/mvp/
# vim Default.conf
# \u627E\u5230\u5BF9\u5E94\u7684\u670D\u52A1\u5730\u5740
#dapr.upms.appUrl=http://yifu-auth.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
dapr.upms.appUrl=http://localhost:3500/v1.0/invoke/
dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms
dapr.upms.appPort=4000
dapr.upms.httpPort=3500
dapr.upms.grpcPort=52000
dapr.upms.metricsPort=9094
#\u6D4B\u8BD5\u73AF\u5883
#dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
dapr.check.appUrl=http://localhost:3507/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.check.appId=yifu-check
dapr.check.appPort=50022
dapr.check.httpPort=3507
dapr.check.grpcPort=52008
dapr.check.metricsPort=9098
dapr.business.appUrl=http://localhost:5034/v1.0/invoke/
dapr.business.appId=yifu-business
dapr.business.appPort=5034
dapr.business.httpPort=3510
dapr.business.grpcPort=52010
dapr.business.metricsPort=9110
dapr.archives.appUrl=http://localhost:3508/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.archives.appId=yifu-archives
dapr.archives.appPort=5001
dapr.archives.httpPort=3508
dapr.archives.grpcPort=52009
dapr.archives.metricsPort=9099
dapr.social.appUrl=http://localhost:3509/v1.0/invoke/
dapr.social.appId=yifu-social
dapr.social.appPort=5002
dapr.social.httpPort=3509
dapr.social.grpcPort=52003
dapr.social.metricsPort=9093
dapr.salary.appUrl=http://localhost:3513/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
dapr.salary.appUrl=http://yifu-salary.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.salary.appId=yifu-salary
dapr.salary.appPort=5003
dapr.salary.httpPort=3513
dapr.salary.grpcPort=52013
dapr.salary.metricsPort=9102
#\u6D4B\u8BD5\u73AF\u5883
dapr.social.appUrl=http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.social.appId=yifu-social
dapr.job.appUrl=http://localhost:3504/v1.0/invoke/
dapr.job.appId=yifu-job
dapr.job.appPort=5004
dapr.job.httpPort=3506
dapr.job.grpcPort=52007
dapr.job.metricsPort=9097
#\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1
dapr.business.appUrl=http://yifu-business.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.business.appId=yifu-business
dapr.msg.appUrl=http://localhost:3516/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883-\u6D88\u606F\u63D0\u9192\u670D\u52A1
dapr.msg.appUrl=http://yifu-msg.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.msg.appId=yifu-msg
dapr.msg.appPort=5026
dapr.msg.httpPort=3516
dapr.msg.grpcPort=52111
dapr.msg.metricsPort=9111
dapr.insurances.appUrl=http://localhost:3511/v1.0/invoke/
dapr.insurances.appId=yifu-insurances
dapr.insurances.appPort=5005
dapr.insurances.httpPort=3511
dapr.insurances.grpcPort=52012
dapr.insurances.metricsPort=9101
dapr.permission.appUrl=http://localhost:3517/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883-EKP\u6743\u9650
dapr.permission.appUrl=http://yifu-permission.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.permission.appId=yifu-permission
dapr.permission.appPort=5027
dapr.permission.httpPort=3517
dapr.permission.grpcPort=52222
dapr.permission.metricsPort=9222
#\u6D4B\u8BD5\u73AF\u5883-EKP
dapr.ekp.appUrl=http://yifu-ekp.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.ekp.appId=yifu-ekp
#\u6D4B\u8BD5\u73AF\u5883-\u85AA\u8D44\u670D\u52A1
#dapr.salary.appUrl=http://yifu-salary.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#dapr.salary.appId=yifu-salary
......
......@@ -154,7 +154,7 @@ public class EkpPushFundParam implements Serializable {
private String fd_3b43922217c6f8;
/**
* 公积金创建人姓名
* 缴纳地
**/
private String fd_3b5cc487bb46fa;
......
......@@ -258,8 +258,15 @@ public class EkpPushSocialParam implements Serializable {
private String fd_3b438e33f37378;
/**
* 社保创建人姓名
* 缴纳地
**/
private String fd_3b5cc58d1a70fe;
/**
* 社保ids
**/
private String socialIds;
/**
* 是否为预估
**/
private String ygFlag;
}
\ No newline at end of file
ldap.url=192.168.0.240
ldap.url=192.168.1.65
ldap.port=389
ldap.userName=cn=admin,dc=worfu,dc=com
ldap.password=Yifu123ABC!
ldap.password=yifu123456!
ldap.dn=dc=worfu,dc=com
ldap.baseDn=ou=\u7696\u4FE1\u4EBA\u529B\u96C6\u56E2,ou=wanxin,dc=worfu,dc=com
\ No newline at end of file
......@@ -42,5 +42,17 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-ekp</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-social-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
/*
* 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;
@Schema(description ="订单类型")
private String fd_3add9dd7833db8;
@Schema(description ="是否有预估")
private String fd_3add9de0be85e4;
@Schema(description ="与工资合并结算")
private String fd_3add9e1a670144;
@Schema(description ="项目编码")
private String fd_3adfe8c70d3fd4;
@Schema(description ="项目名称")
private String fd_3adfe8c8468e54;
@Schema(description ="单号")
private String fd_3adfe95c169c48;
@Schema(description ="客户编码")
private String fd_3adfe8c73cb5a4;
@Schema(description ="客户名称")
private String fd_3adfe8c81a0e42;
@Schema(description ="姓名")
private String fd_3adfe8c79989d4;
@Schema(description ="身份证号")
private String fd_3adfe8c7e4cf7a;
@Schema(description ="生成月份")
private String fd_3adfe8cb96c41e;
@Schema(description ="缴纳月份")
private String fd_3adfe8cf632700;
@Schema(description ="实际结算月份")
private String fd_3adfe8cff746bc;
@Schema(description ="预估单位部分")
private Double fd_3adfeb4e8064a8;
@Schema(description ="预估个人部分")
private Double fd_3adfeb52a4d2e2;
@Schema(description ="实缴单位部分")
private Double fd_3adfeb52fbe966;
@Schema(description ="实缴个人部分")
private Double fd_3adfeb5366dd82;
@Schema(description ="单位差异")
private Double fd_3adfeb53c70f72;
@Schema(description ="个人差异")
private Double fd_3adfeb5413fb44;
@Schema(description ="应收")
private Double fd_3adfeb7b624f06;
@Schema(description ="结算状态")
private String fd_3add9ea428879a;
@Schema(description ="收款状态")
private String fd_3add9eaeed2560;
@Schema(description ="结算单号")
private String fd_3adfeb830523b6;
@Schema(description ="收款单号")
private String fd_3adfeb8489e6c2;
@Schema(description ="应支出")
private Double fd_3adfeb7bd97464;
@Schema(description ="支出结算状态")
private String fd_3add9edfbc6f7e;
@Schema(description ="付款状态")
private String fd_3add9eed23894a;
@Schema(description ="支出缴纳单号")
private String fd_3adfeb83a704c8;
@Schema(description ="付款单号")
private String fd_3adfeb84175f28;
@Schema(description ="公积金账户")
private String fd_3aeafa8cc144bc;
@Schema(description ="是否全部结算")
private String fd_3b13afd1ef7798;
@Schema(description ="HRO结算月份")
private Date fd_3b13d8f8fdfb76;
@Schema(description ="项目台账ID")
private String fd_3b16e37baa5650_text;
@Schema(description ="项目台账ID(ID)")
private String fd_3b16e37baa5650;
@Schema(description ="是否为BPO业务")
private String fd_3b178ec510bf48;
@Schema(description ="个人应支")
private Double fd_3b35a6989dfde8;
@Schema(description ="单位应收")
private Double fd_3b35a6518b73b2;
@Schema(description ="单位应支")
private Double fd_3b35a6992a20a4;
@Schema(description ="个人应收")
private Double fd_3b35a65138a7fc;
@Schema(description ="薪酬申请编号")
private String fd_3b3cabbf094f1a;
@Schema(description ="变更记录")
private String fd_3b3e41ef8db782;
@Schema(description ="创建人姓名")
private String fd_3b439246fcdc7c;
@Schema(description ="缴纳地")
private String fd_3b5cc4b2aae22a;
@Schema(description ="公积金id")
private String fd_3b10b38f90d138;
@Schema(description ="我司到款单位")
private String fd_3b01956c77864c ;
@Schema(description ="创建时间")
private Date createTime;
}
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;
......@@ -19,157 +21,225 @@ import java.util.Date;
@Schema(description = "社保明细表")
public class EkpSocialInfo {
@Schema(description = "fdId")
private String fdId;
@TableId(type = IdType.ASSIGN_ID)
private String fd_id;
private String fd3add9dd7833db8;
private String fd3add9de0be85e4;
private String fd3add9e1a670144;
private String fd3adfe8c70d3fd4;
private String fd3adfe8c8468e54;
private String fd3adfe95c169c48;
private String fd3adfe8c73cb5a4;
private String fd3adfe8c81a0e42;
private String fd3adfe8c79989d4;
private String fd3adfe8c7e4cf7a;
private Date fd3adfe8cb96c41e;
private Date fd3adfe8cf632700;
private Date fd3adfe8cff746bc;
private Double fd3adfeb4e8064a8;
private Double fd3adfeb52a4d2e2;
private Double fd3adfeb52fbe966;
private Double fd3adfeb5366dd82;
private Double fd3adfeb53c70f72;
private Double fd3adfeb5413fb44;
private Double fd3adfeb7b624f06;
private String fd3add9ea428879a;
private String fd3add9eaeed2560;
private String fd3adfeb830523b6;
private String fd3adfeb8489e6c2;
private Double fd3adfeb7bd97464;
private String fd3add9edfbc6f7e;
private String fd3add9eed23894a;
private String fd3adfeb83a704c8;
private String fd3adfeb84175f28;
private String fd3aeafa25916e82;
private Double fd3af9f2fa79ee72;
private Double fd3af9f2ec516c30;
private Double fd3af9f2fcde9158;
private Double fd3af9f285ee1e38;
private Double fd3af9f2dd5d8fb8;
private Double fd3af9f2e03295dc;
private Double fd3af9f27a3974e6;
private Double fd3af9f25b851e94;
private Double fd3af9f27efdd912;
private Double fd3af9f3059e5b9c;
private Double fd3af9f26a3cae94;
private Double fd3af9f263e094c6;
private Double fd3af9f2617e530a;
private Double fd3af9f281651734;
private Double fd3af9f2e9208e4e;
private Double fd3af9f2e6dfb3f4;
private Double fd3af9f2f8290f24;
private Double fd3af9f2e237f794;
private Double fd3af9f2e45a5d78;
private Double fd3af9f283a6f288;
private Double fd3af9f2db1e5e16;
private Double fd3af9f27ce947ac;
private Double fd3af9f2ff2c9f42;
private Double fd3af9f25f5e9cc4;
private Double fd3af9f2883941b4;
private Double fd3af9f267a03bd6;
private Double fd3af9f303037214;
private Double fd3af9f2d8df88c0;
private Double fd3af9f257b1b586;
private String fd3b0194c7336de0;
private String fd3b0b716e771e06;
private String fd3b1354c3add8c2;
private String fd3b16e2f436ff98Text;
private String fd3b16e2f436ff98;
private String fd3b178e3ba5e258;
private Double fd3b35a57b6e9d0a;
private Double fd3b35a5b0b04d54;
private Double fd3b35a57aee1428;
private Double fd3b35a5b03100c4;
private String fd3b3cab5f343a90;
private String fd3b3e41ac916e66;
private String fd3b438e61af0a56;
private String fd3b5cc5e697079a;
private String fd3b6495a5ad6e10;
@Schema(description ="订单类型")
private String fd_3add9dd7833db8;
@Schema(description ="是否有预估")
private String fd_3add9de0be85e4;
@Schema(description ="与工资合并结算")
private String fd_3add9e1a670144;
@Schema(description ="项目编码")
private String fd_3adfe8c70d3fd4;
@Schema(description ="项目名称")
private String fd_3adfe8c8468e54;
@Schema(description ="单号")
private String fd_3adfe95c169c48;
@Schema(description ="客户编码")
private String fd_3adfe8c73cb5a4;
@Schema(description ="客户名称")
private String fd_3adfe8c81a0e42;
@Schema(description ="姓名")
private String fd_3adfe8c79989d4;
@Schema(description ="身份证号")
private String fd_3adfe8c7e4cf7a;
@Schema(description ="生成月份")
private String fd_3adfe8cb96c41e;
@Schema(description ="缴纳月份")
private String fd_3adfe8cf632700;
@Schema(description ="实际结算月份")
private String fd_3adfe8cff746bc;
@Schema(description ="预估单位部分")
private Double fd_3adfeb4e8064a8;
@Schema(description ="实缴个人部分")
private Double fd_3adfeb5366dd82;
@Schema(description ="单位差异")
private Double fd_3adfeb53c70f72;
@Schema(description ="个人差异")
private Double fd_3adfeb5413fb44;
@Schema(description ="应收")
private Double fd_3adfeb7b624f06;
@Schema(description ="结算状态")
private String fd_3add9ea428879a;
@Schema(description ="收款状态")
private String fd_3add9eaeed2560;
@Schema(description ="结算单号")
private String fd_3adfeb830523b6;
@Schema(description ="收款单号")
private String fd_3adfeb8489e6c2;
@Schema(description ="应支出")
private Double fd_3adfeb7bd97464;
@Schema(description ="支出结算状态")
private String fd_3add9edfbc6f7e;
@Schema(description ="付款状态")
private String fd_3add9eed23894a;
@Schema(description ="支出缴纳单号")
private String fd_3adfeb83a704c8;
@Schema(description ="付款单号")
private String fd_3adfeb84175f28;
@Schema(description ="社保户")
private String fd_3aeafa25916e82;
@Schema(description ="实缴个人失业")
private Double fd_3af9f2fa79ee72;
@Schema(description ="实缴个人养老")
private Double fd_3af9f2ec516c30;
@Schema(description ="实缴个人补缴利息")
private Double fd_3af9f2fcde9158;
@Schema(description ="预估个人合计")
private Double fd_3af9f285ee1e38;
@Schema(description ="实缴单位失业")
private Double fd_3af9f2dd5d8fb8;
@Schema(description ="实缴单位工伤")
private Double fd_3af9f2e03295dc;
@Schema(description ="预估个人养老")
private Double fd_3af9f27a3974e6;
@Schema(description ="预估单位医疗")
private Double fd_3af9f25b851e94;
@Schema(description ="实缴合计")
private Double fd_3af9f3059e5b9c;
@Schema(description ="预估单位大病救助")
private Double fd_3af9f26a3cae94;
@Schema(description ="预估单位生育")
private Double fd_3af9f263e094c6;
@Schema(description ="预估单位工伤")
private Double fd_3af9f2617e530a;
@Schema(description ="预估个人补缴利息")
private Double fd_3af9f281651734;
@Schema(description ="实缴单位合计")
private Double fd_3af9f2e9208e4e;
@Schema(description ="实缴单位大病救助")
private Double fd_3af9f2e6dfb3f4;
@Schema(description ="实缴个人医疗")
private Double fd_3af9f2f8290f24;
@Schema(description ="实缴单位生育")
private Double fd_3af9f2e237f794;
@Schema(description ="实缴单位补缴利息")
private Double fd_3af9f2e45a5d78;
@Schema(description ="预估个人大病救助")
private Double fd_3af9f283a6f288;
@Schema(description ="实缴单位医疗")
private Double fd_3af9f2db1e5e16;
@Schema(description ="预估个人医疗")
private Double fd_3af9f27ce947ac;
@Schema(description ="实缴个人大病救助")
private Double fd_3af9f2ff2c9f42;
@Schema(description ="预估单位失业")
private Double fd_3af9f25f5e9cc4;
@Schema(description ="预估合计")
private Double fd_3af9f2883941b4;
@Schema(description ="预估单位补缴利息")
private Double fd_3af9f267a03bd6;
@Schema(description ="实缴个人合计")
private Double fd_3af9f303037214;
@Schema(description ="实缴单位养老")
private Double fd_3af9f2d8df88c0;
@Schema(description ="预估个人失业")
private Double fd_3af9f27efdd912;
@Schema(description ="预估单位养老")
private Double fd_3af9f257b1b586;
@Schema(description ="我司到款单位")
private String fd_3b0194c7336de0;
@Schema(description ="社保ID")
private String fd_3b0b716e771e06;
@Schema(description ="是否全部结算")
private String fd_3b1354c3add8c2;
@Schema(description ="项目台账ID")
private String fd_3b16e2f436ff98_text;
@Schema(description ="项目台账ID(ID)")
private String fd_3b16e2f436ff98;
@Schema(description ="是否为BPO业务")
private String fd_3b178e3ba5e258;
@Schema(description ="单位应收")
private Double fd_3b35a57b6e9d0a;
@Schema(description ="单位应支")
private Double fd_3b35a5b0b04d54;
@Schema(description ="个人应收")
private Double fd_3b35a57aee1428;
@Schema(description ="个人应支")
private Double fd_3b35a5b03100c4;
@Schema(description ="薪酬申请编号")
private String fd_3b3cab5f343a90;
@Schema(description ="变更记录")
private String fd_3b3e41ac916e66;
@Schema(description ="创建人姓名")
private String fd_3b438e61af0a56;
@Schema(description ="缴纳地")
private String fd_3b5cc5e697079a;
@Schema(description ="社保合集ID")
private String fd_3b6495a5ad6e10;
@Schema(description ="创建时间")
private Date createTime;
}
package com.yifu.cloud.plus.v1.ekp.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author huyc
* @Date 2024/3/1
* @Description 获取项目明细信息
* @Version 1.0
*/
@Data
public class EkpDeptInfoVo implements Serializable {
/**
* fdId
**/
private String fdId;
/**
* 是否为BPO项目
**/
private String isBpo;
/**
* 社保费用
**/
private String socialType;
/**
* 结算方式
**/
private String settleType;
/**
* 项目名称
**/
private String deptName;
/**
* 项目编码
**/
private String deptNo;
}
package com.yifu.cloud.plus.v1.ekp.vo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentSocialPush;
import lombok.Data;
import java.io.Serializable;
......@@ -18,6 +18,10 @@ public class EkpSocialPushInfoVo implements Serializable {
/**
* 社保明细
**/
private List<EkpPushSocialParam> unPushInfo;
private List<TPaymentSocialPush> unPushInfo;
/**
* 社保id集合
**/
private List<String> paymentIds;
}
package com.yifu.cloud.plus.v1.ekp.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author huyc
* @Date 2024/3/1
* @Description 获取社保公积金订单明细信息
* @Version 1.0
*/
@Data
public class EkpSocialSumInfoVo implements Serializable {
/**
* 预估合计
**/
private Double ygSum;
/**
* 预估个人合计
**/
private Double ygPersonSum;
/**
* 实缴合计
**/
private Double sjSum;
/**
* 预估单位合计
**/
private Double ygDwSum;
/**
* 实缴单位合计
**/
private Double sjDwSum;
/**
* 实缴个人合计
**/
private Double sjPersonSum;
/**
* 应收
**/
private Double ys;
/**
* 个人应收
**/
private Double personYs;
/**
* 单位应收
**/
private Double dwYs;
/**
* 应支出
**/
private Double yzc;
/**
* 个人应支
**/
private Double personYzc;
/**
* 单位应支
**/
private Double dwYzc;
}
......@@ -8,7 +8,7 @@ ARG JAR_FILE=target/yifu-ekp-biz.jar
COPY ${JAR_FILE} app.jar
EXPOSE 5027
EXPOSE 5077
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
......
package com.yifu.cloud.plus.v1.ekp.config;
import com.google.common.collect.Range;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@Component
public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<LocalDateTime> {
public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<String> {
private static final DateTimeFormatter yyyy = DateTimeFormatter.ofPattern("yyyy");
......@@ -24,10 +24,10 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
* @return
*/
@Override
public String doSharding(Collection<String> collection, PreciseShardingValue<LocalDateTime> preciseShardingValue) {
public String doSharding(Collection<String> collection, PreciseShardingValue<String> preciseShardingValue) {
LocalDateTime value = preciseShardingValue.getValue();
String tableSuffix = value.format(yyyy);
String value = preciseShardingValue.getValue();
String tableSuffix = value.substring(0,4);
String logicTableName = preciseShardingValue.getLogicTableName();
String table = logicTableName.concat("_").concat(tableSuffix);
return collection.stream().filter(s -> s.equals(table)).findFirst().orElseThrow(() -> new RuntimeException("逻辑分表不存在"));
......@@ -42,12 +42,12 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
* @return
*/
@Override
public Collection<String> doSharding(Collection<String> collection, RangeShardingValue<LocalDateTime> rangeShardingValue) {
public Collection<String> doSharding(Collection<String> collection, RangeShardingValue<String> rangeShardingValue) {
// 逻辑表名
String logicTableName = rangeShardingValue.getLogicTableName();
// 范围参数
Range<LocalDateTime> valueRange = rangeShardingValue.getValueRange();
Range<String> valueRange = rangeShardingValue.getValueRange();
Set<String> queryRangeTables = extracted(logicTableName, valueRange.lowerEndpoint(), valueRange.upperEndpoint());
ArrayList<String> tables = new ArrayList<>(collection);
tables.retainAll(queryRangeTables);
......@@ -63,12 +63,12 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
* @Date 2022-07-21
* @return 物理表名集合
*/
private Set<String> extracted(String logicTableName, LocalDateTime lowerEndpoint, LocalDateTime upperEndpoint) {
private Set<String> extracted(String logicTableName, String lowerEndpoint, String upperEndpoint) {
Set<String> rangeTable = new HashSet<>();
while (lowerEndpoint.isBefore(upperEndpoint)) {
while (DateUtil.stringToDate(lowerEndpoint + "01").before(DateUtil.stringToDate(upperEndpoint + "01"))) {
String str = getTableNameByDate(lowerEndpoint, logicTableName);
rangeTable.add(str);
lowerEndpoint = lowerEndpoint.plusYears(1);
lowerEndpoint = DateUtil.dateToString(DateUtil.dateIncreaseByYear(DateUtil.stringToDate(lowerEndpoint + "01"),1),DateUtil.DATETIME_YYYYMM);
}
// 获取物理表明
String tableName = getTableNameByDate(upperEndpoint, logicTableName);
......@@ -84,8 +84,8 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
* @Date 2022-07-21
* @return 物理表名
*/
private String getTableNameByDate(LocalDateTime dateTime, String logicTableName) {
String tableSuffix = dateTime.format(yyyy);
private String getTableNameByDate(String dateTime, String logicTableName) {
String tableSuffix = dateTime.substring(0,4);
return logicTableName.concat("_").concat(tableSuffix);
}
......
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.controller;
import com.yifu.cloud.plus.v1.ekp.service.EkpSocialInfoService;
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.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -23,8 +25,10 @@ import java.util.List;
@Tag(name = "社保明细推送")
public class TEkpSocialInfoController {
private final EkpSocialInfoService socialInfoService;
/**
* @param viewVo
* @param unPushList
* @Description: 推送社保明细数据
* @Author: huyc
* @Date: 2024/2/29
......@@ -32,8 +36,7 @@ public class TEkpSocialInfoController {
**/
@Inner
@PostMapping("/inner/pushSocialInfoToEkp")
public Boolean pushSocialInfoToEkp(@RequestBody List<EkpSocialViewVo> viewVo) {
// return tPaymentInfoService.updateSocialSettleStatus(viewVo);
return null;
public EkpSocialPushInfoVo pushSocialInfoToEkp(@RequestBody List<EkpPushSocialParam> unPushList) {
return socialInfoService.pushSocialInfoToEkp(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);
}
......@@ -2,7 +2,12 @@ package com.yifu.cloud.plus.v1.ekp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
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;
/**
* 社保明细表
......@@ -13,4 +18,17 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> {
/**
* 获取所有项目信息
* @param
* @return
*/
List<EkpDeptInfoVo> getAllEkpDeptInfo();
/**
* 根据身份证和生成月份获取费用合计
* @param
* @return
*/
EkpSocialSumInfoVo getCostSumInfo(@Param("card") String empIdCard, @Param("month") String createMonth);
}
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);
}
......@@ -2,6 +2,10 @@ package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import java.util.List;
/**
* 社保明细表
......@@ -11,4 +15,5 @@ import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
*/
public interface EkpSocialInfoService extends IService<EkpSocialInfo> {
EkpSocialPushInfoVo pushSocialInfoToEkp(List<EkpPushSocialParam> 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());
}
if (!fundInfoList.isEmpty()) {
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("未结算");
}
}
package com.yifu.cloud.plus.v1.ekp.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
import com.yifu.cloud.plus.v1.ekp.service.EkpSocialInfoService;
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.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentSocialPush;
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
//@author huyc
//@date 2024-02-29 11:21:56
*/
@Log4j2
@Service
public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements EkpSocialInfoService {
/**
//@Description: 社保明细推送至ekp
//@Author: huyc
//@Date: 2024-2-29
//@return: void
**/
public EkpSocialPushInfoVo pushSocialInfoToEkp(List<EkpPushSocialParam> unPushList) {
//插入数据集合
List<EkpSocialInfo> socialInfoList = new ArrayList<>();
//社保推送记录表
List<TPaymentSocialPush> socialPushList = 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));
}
EkpSocialInfo socialCount;
try {
for (EkpPushSocialParam socialParam : unPushList) {
//去重 防止重复推送
socialCount = baseMapper.selectOne(Wrappers.<EkpSocialInfo>query().lambda()
.eq(EkpSocialInfo::getFd_3b0b716e771e06, socialParam.getFd_3b0afbe1f94a08())
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(socialCount).isPresent()) {
continue;
}
EkpSocialInfo socialInfo = new EkpSocialInfo();
//对象信息赋值
copySocialProperties(socialParam, socialInfo);
//项目信息
deptInfo = map.get(socialInfo.getFd_3adfe8c70d3fd4());
socialInfo.setFd_3b16e2f436ff98_text(deptInfo.getDeptName());
socialInfo.setFd_3b16e2f436ff98(deptInfo.getFdId());
//实际结算月份
if ("生成月本月数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3adfe8cff746bc(dateStringInsert(socialInfo.getFd_3adfe8cb96c41e()));
} else if ("生成月上月数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3adfe8cff746bc(DateUtil.dateToString(DateUtil.addMonthByDate(DateUtil.parseDate(socialInfo.getFd_3adfe8cb96c41e(), "yyyyMM"), -1), "yyyy-MM"));
} else if ("生成月次月数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3adfe8cff746bc(DateUtil.dateToString(DateUtil.addMonthByDate(DateUtil.parseDate(socialInfo.getFd_3adfe8cb96c41e(), "yyyyMM"), 1), "yyyy-MM"));
}
//是否全部结算
if ("全量未结算数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3b1354c3add8c2(CommonConstants.IS_TRUE);
} else {
socialInfo.setFd_3b1354c3add8c2(CommonConstants.IS_FALSE);
}
//获取社保订单明细合计
socialSumInfo = baseMapper.getCostSumInfo(socialInfo.getFd_3adfe8c7e4cf7a(), socialInfo.getFd_3adfe8cb96c41e());
//预估合计
Double ygSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYgSum();
//预估个人合计
Double ygPersonSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYgPersonSum();
//实缴合计
Double sjSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getSjSum();
//预估单位合计
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(socialInfo.getFd_3add9de0be85e4()) && "实缴".equals(socialInfo.getFd_3add9dd7833db8())) {
//单位差异
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(预估单位合计)$)
socialInfo.setFd_3adfeb53c70f72(Double.sum(Double.sum(sjDwSum, socialInfo.getFd_3af9f2e9208e4e()), -ygDwSum));
//个人差异
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(预估个人合计)$)
socialInfo.setFd_3adfeb5413fb44(Double.sum(Double.sum(sjPersonSum, socialInfo.getFd_3af9f303037214()), -ygPersonSum));
}
//Fd_3adfeb7b624f06应收;Fd_3b35a57aee1428个人应收;fd_3b35a57b6e9d0a单位应收
if ("是".equals(deptInfo.getIsBpo())) {
//应收
socialInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
socialInfo.setFd_3b35a57aee1428(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应收
socialInfo.setFd_3b35a57b6e9d0a(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
if ("实缴".equals(deptInfo.getSettleType())) {
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(ygSum, socialInfo.getFd_3af9f2883941b4()), -ys));
//$列表.求总和$($社保订单明细*总数(预估个人合计)$) + $预估个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(Double.sum(Double.sum(ygPersonSum, socialInfo.getFd_3af9f285ee1e38()), -personYs));
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(Double.sum(Double.sum(ygDwSum, socialInfo.getFd_3adfeb4e8064a8()), -dwYs));
} else {
if (ygSum > 0) {
//应收
socialInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
socialInfo.setFd_3b35a57aee1428(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应收
socialInfo.setFd_3b35a57b6e9d0a(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(sjSum, socialInfo.getFd_3af9f3059e5b9c()), -ys));
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(Double.sum(Double.sum(sjPersonSum, socialInfo.getFd_3af9f303037214()), -personYs));
//列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(Double.sum(Double.sum(sjDwSum, socialInfo.getFd_3af9f2e9208e4e()), -dwYs));
}
}
} else {
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$-$列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(ygSum, socialInfo.getFd_3af9f2883941b4()), -ys));
//$列表.求总和$( $社保订单明细*总数(预估个人合计)$) + $预估个人合计$-$列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(Double.sum(Double.sum(ygPersonSum, socialInfo.getFd_3af9f285ee1e38()), -personYs));
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$-$列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(Double.sum(Double.sum(ygDwSum, socialInfo.getFd_3adfeb4e8064a8()), -dwYs));
} else {
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(sjSum, socialInfo.getFd_3af9f3059e5b9c()), -ys));
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(Double.sum(Double.sum(sjPersonSum, socialInfo.getFd_3af9f303037214()), -personYs));
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(Double.sum(Double.sum(sjDwSum, socialInfo.getFd_3af9f2e9208e4e()), -dwYs));
}
}
}
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//应支出
socialInfo.setFd_3adfeb7bd97464(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应支
socialInfo.setFd_3b35a5b03100c4(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应支
socialInfo.setFd_3b35a5b0b04d54(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
//应支出
socialInfo.setFd_3adfeb7bd97464(socialInfo.getFd_3af9f3059e5b9c());
//个人应支
socialInfo.setFd_3b35a5b03100c4(socialInfo.getFd_3af9f303037214());
//单位应支
socialInfo.setFd_3b35a5b0b04d54(socialInfo.getFd_3af9f2e9208e4e());
}
//创建时间
socialInfo.setCreateTime(DateUtil.getCurrentDateTime());
socialInfoList.add(socialInfo);
TPaymentSocialPush a = new TPaymentSocialPush();
a.setPaymentIds(socialParam.getSocialIds());
a.setId(socialParam.getFd_3b0afbe1f94a08());
socialPushList.add(a);
if (CommonConstants.ZERO_STRING.equals(socialParam.getYgFlag())) {
paymentIds.add(socialParam.getSocialIds());
} else {
paymentIds.add(socialParam.getFd_3b0afbe1f94a08());
}
}
if (!socialInfoList.isEmpty()) {
boolean flag = this.saveBatch(socialInfoList);
if (flag) {
//推送成功保存社保明细合并的数据对应关系
EkpSocialPushInfoVo pushInfoVo = new EkpSocialPushInfoVo();
pushInfoVo.setUnPushInfo(socialPushList);
pushInfoVo.setPaymentIds(paymentIds);
return pushInfoVo;
}
}
}catch (Exception e) {
log.error("社保明细推送失败");
return null;
}
return null;
}
private void copySocialProperties(EkpPushSocialParam socialParam,EkpSocialInfo socialInfo) {
//订单类型
socialInfo.setFd_3add9dd7833db8(socialParam.getFd_3add9dd7833db8());
//与工资合并结算
socialInfo.setFd_3add9e1a670144(socialParam.getFd_3add9e1a670144());
//是否有预估
socialInfo.setFd_3add9de0be85e4(socialParam.getFd_3add9de0be85e4());
//是否为BPO业务
socialInfo.setFd_3b178e3ba5e258(socialParam.getFd_3b178dfcf9e3e6());
//创建人姓名
socialInfo.setFd_3b438e61af0a56(socialParam.getFd_3b438e33f37378());
//项目编码
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_3aeafa25916e82(socialParam.getFd_3aeafa25916e82());
//姓名
socialInfo.setFd_3adfe8c79989d4(socialParam.getFd_3adfe8c79989d4());
//身份证号
socialInfo.setFd_3adfe8c7e4cf7a(socialParam.getFd_3adfe8c7e4cf7a());
//我司到款单位
socialInfo.setFd_3b0194c7336de0(socialParam.getFd_3b01953871b8be());
//生成月份
socialInfo.setFd_3adfe8cb96c41e(socialParam.getFd_3adfe8cb96c41e());
//缴纳月份
socialInfo.setFd_3adfe8cf632700(socialParam.getFd_3adfe8cf632700());
//社保ID
socialInfo.setFd_3b0b716e771e06(socialParam.getFd_3b0afbe1f94a08());
//薪酬申请编号
socialInfo.setFd_3b3cab5f343a90(socialParam.getFd_3b3cab77923f44());
//缴纳地
socialInfo.setFd_3b5cc5e697079a(socialParam.getFd_3b5cc58d1a70fe());
//社保合集ID
socialInfo.setFd_3b6495a5ad6e10(socialParam.getSocialIds());
//预估单位养老
socialInfo.setFd_3af9f257b1b586(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ec80a9de7a()) ? null : Double.valueOf(socialParam.getFd_3af9ec80a9de7a()));
//预估单位医疗
socialInfo.setFd_3af9f25b851e94(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9eba5899c90()) ? null : Double.valueOf(socialParam.getFd_3af9ec80a9de7a()));
//预估单位失业
socialInfo.setFd_3af9f25f5e9cc4(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9eba5f6e19e()) ? null : Double.valueOf(socialParam.getFd_3af9eba5f6e19e()));
//预估单位工伤
socialInfo.setFd_3af9f2617e530a(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9eba684f592()) ? null : Double.valueOf(socialParam.getFd_3af9eba684f592()));
//预估单位生育
socialInfo.setFd_3af9f263e094c6(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9eba71c0138()) ? null : Double.valueOf(socialParam.getFd_3af9eba71c0138()));
//预估单位补缴利息
socialInfo.setFd_3af9f267a03bd6(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9eba7c3da5e()) ? null : Double.valueOf(socialParam.getFd_3af9eba7c3da5e()));
//预估单位大病救助
socialInfo.setFd_3af9f26a3cae94(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9eba863c0ee()) ? null : Double.valueOf(socialParam.getFd_3af9eba863c0ee()));
//预估单位合计
socialInfo.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3adfeb4e8064a8()) ? null : Double.valueOf(socialParam.getFd_3adfeb4e8064a8()));
//预估个人养老
socialInfo.setFd_3af9f27a3974e6(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ebbd791662()) ? null : Double.valueOf(socialParam.getFd_3af9ebbd791662()));
//预估个人医疗
socialInfo.setFd_3af9f27ce947ac(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ebbdd9797e()) ? null : Double.valueOf(socialParam.getFd_3af9ebbdd9797e()));
//预估个人失业
socialInfo.setFd_3af9f27efdd912(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ebbe29ce1c()) ? null : Double.valueOf(socialParam.getFd_3af9ebbe29ce1c()));
//预估个人补缴利息
socialInfo.setFd_3af9f281651734(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ebbecc4aa8()) ? null : Double.valueOf(socialParam.getFd_3af9ebbecc4aa8()));
//预估个人大病救助
socialInfo.setFd_3af9f283a6f288(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ebbf3e8be2()) ? null : Double.valueOf(socialParam.getFd_3af9ebbf3e8be2()));
//预估个人合计
socialInfo.setFd_3af9f285ee1e38(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3adfeb52a4d2e2()) ? null : Double.valueOf(socialParam.getFd_3adfeb52a4d2e2()));
//预估合计
socialInfo.setFd_3af9f2883941b4(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ed7e813b86()) ? null : Double.valueOf(socialParam.getFd_3af9ed7e813b86()));
//实缴单位养老
socialInfo.setFd_3af9f2d8df88c0(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3938170a()) ? null : Double.valueOf(socialParam.getFd_3af9ee3938170a()));
//实缴单位医疗
socialInfo.setFd_3af9f2db1e5e16(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee39dea6a8()) ? null : Double.valueOf(socialParam.getFd_3af9ee39dea6a8()));
//实缴单位失业
socialInfo.setFd_3af9f2dd5d8fb8(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3a46b7e6()) ? null : Double.valueOf(socialParam.getFd_3af9ee3a46b7e6()));
//实缴单位工伤
socialInfo.setFd_3af9f2e03295dc(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3aa9c84a()) ? null : Double.valueOf(socialParam.getFd_3af9ee3aa9c84a()));
//实缴单位生育
socialInfo.setFd_3af9f2e237f794(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3afb34c2()) ? null : Double.valueOf(socialParam.getFd_3af9ee3afb34c2()));
//实缴单位补缴利息
socialInfo.setFd_3af9f2e45a5d78(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3b5ddae8()) ? null : Double.valueOf(socialParam.getFd_3af9ee3b5ddae8()));
//实缴单位合计
socialInfo.setFd_3af9f2e9208e4e(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3c0bf286()) ? null : Double.valueOf(socialParam.getFd_3af9ee3c0bf286()));
//实缴个人养老
socialInfo.setFd_3af9f2ec516c30(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3e513962()) ? null : Double.valueOf(socialParam.getFd_3af9ee3e513962()));
//实缴个人医疗
socialInfo.setFd_3af9f2f8290f24(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3e066d48()) ? null : Double.valueOf(socialParam.getFd_3af9ee3e066d48()));
//实缴个人失业
socialInfo.setFd_3af9f2fa79ee72(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3db44d96()) ? null : Double.valueOf(socialParam.getFd_3af9ee3db44d96()));
//实缴个人补缴利息
socialInfo.setFd_3af9f2fcde9158(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3d634946()) ? null : Double.valueOf(socialParam.getFd_3af9ee3d634946()));
//实缴个人大病救助
socialInfo.setFd_3af9f2ff2c9f42(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3d0ba3b6()) ? null : Double.valueOf(socialParam.getFd_3af9ee3d0ba3b6()));
//实缴单位大病救助
socialInfo.setFd_3af9f2e6dfb3f4(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3ba76f54()) ? null : Double.valueOf(socialParam.getFd_3af9ee3ba76f54()));
//实缴个人合计
socialInfo.setFd_3af9f303037214(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3cb6d4fa()) ? null : Double.valueOf(socialParam.getFd_3af9ee3cb6d4fa()));
//实缴合计
socialInfo.setFd_3af9f3059e5b9c(CommonConstants.EMPTY_STRING.equals(socialParam.getFd_3af9ee3c6bfc74()) ? null : Double.valueOf(socialParam.getFd_3af9ee3c6bfc74()));
//结算状态
socialInfo.setFd_3add9ea428879a(socialParam.getFd_3add9ea428879a());
//收款状态
socialInfo.setFd_3add9eaeed2560("未收");
//付款状态
socialInfo.setFd_3add9eed23894a("未付");
}
/**
* @Description: 推送ekp时更改日期格式
* @Author: huyc
**/
public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-");
return sb.toString();
}
}
......@@ -32,14 +32,14 @@ spring:
algorithmClassName: com.yifu.cloud.plus.v1.ekp.config.OTAStrategyShardingAlgorithm
type: CLASS_BASED
tables:
t_payment_info:
ekp_social_info:
actual-data-nodes: ds0.ekp_social_info_20$->{23..24}
key-generate-strategy:
column: fd_id
key-generator-name: snowflake
table-strategy:
standard:
sharding-column: create_time
sharding-column: fd_3adfe8cb96c41e
sharding-algorithm-name: t-payment-inline
mvc:
......
......@@ -32,14 +32,14 @@ spring:
algorithmClassName: com.yifu.cloud.plus.v1.ekp.config.OTAStrategyShardingAlgorithm
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.ekp_9264ea0160848a681328_20$->{23..24}
ekp_social_info:
actual-data-nodes: ds0.ekp_social_info_20$->{23..24}
key-generate-strategy:
column: fd_id
key-generator-name: snowflake
table-strategy:
standard:
sharding-column: create_time
sharding-column: fd_3adfe8cb96c41e
sharding-algorithm-name: t-payment-inline
mvc:
......
<?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>
......@@ -6,82 +6,111 @@
<mapper namespace="com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper">
<resultMap id="ekpSocialInfoMap" type="com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo">
<id property="fdId" column="fd_id"/>
<result property="fd3add9dd7833db8" column="fd_3add9dd7833db8"/>
<result property="fd3add9de0be85e4" column="fd_3add9de0be85e4"/>
<result property="fd3add9e1a670144" column="fd_3add9e1a670144"/>
<result property="fd3adfe8c70d3fd4" column="fd_3adfe8c70d3fd4"/>
<result property="fd3adfe8c8468e54" column="fd_3adfe8c8468e54"/>
<result property="fd3adfe95c169c48" column="fd_3adfe95c169c48"/>
<result property="fd3adfe8c73cb5a4" column="fd_3adfe8c73cb5a4"/>
<result property="fd3adfe8c81a0e42" column="fd_3adfe8c81a0e42"/>
<result property="fd3adfe8c79989d4" column="fd_3adfe8c79989d4"/>
<result property="fd3adfe8c7e4cf7a" column="fd_3adfe8c7e4cf7a"/>
<result property="fd3adfe8cb96c41e" column="fd_3adfe8cb96c41e"/>
<result property="fd3adfe8cf632700" column="fd_3adfe8cf632700"/>
<result property="fd3adfe8cff746bc" column="fd_3adfe8cff746bc"/>
<result property="fd3adfeb4e8064a8" column="fd_3adfeb4e8064a8"/>
<result property="fd3adfeb52a4d2e2" column="fd_3adfeb52a4d2e2"/>
<result property="fd3adfeb52fbe966" column="fd_3adfeb52fbe966"/>
<result property="fd3adfeb5366dd82" column="fd_3adfeb5366dd82"/>
<result property="fd3adfeb53c70f72" column="fd_3adfeb53c70f72"/>
<result property="fd3adfeb5413fb44" column="fd_3adfeb5413fb44"/>
<result property="fd3adfeb7b624f06" column="fd_3adfeb7b624f06"/>
<result property="fd3add9ea428879a" column="fd_3add9ea428879a"/>
<result property="fd3add9eaeed2560" column="fd_3add9eaeed2560"/>
<result property="fd3adfeb830523b6" column="fd_3adfeb830523b6"/>
<result property="fd3adfeb8489e6c2" column="fd_3adfeb8489e6c2"/>
<result property="fd3adfeb7bd97464" column="fd_3adfeb7bd97464"/>
<result property="fd3add9edfbc6f7e" column="fd_3add9edfbc6f7e"/>
<result property="fd3add9eed23894a" column="fd_3add9eed23894a"/>
<result property="fd3adfeb83a704c8" column="fd_3adfeb83a704c8"/>
<result property="fd3adfeb84175f28" column="fd_3adfeb84175f28"/>
<result property="fd3aeafa25916e82" column="fd_3aeafa25916e82"/>
<result property="fd3af9f2fa79ee72" column="fd_3af9f2fa79ee72"/>
<result property="fd3af9f2ec516c30" column="fd_3af9f2ec516c30"/>
<result property="fd3af9f2fcde9158" column="fd_3af9f2fcde9158"/>
<result property="fd3af9f285ee1e38" column="fd_3af9f285ee1e38"/>
<result property="fd3af9f2dd5d8fb8" column="fd_3af9f2dd5d8fb8"/>
<result property="fd3af9f2e03295dc" column="fd_3af9f2e03295dc"/>
<result property="fd3af9f27a3974e6" column="fd_3af9f27a3974e6"/>
<result property="fd3af9f25b851e94" column="fd_3af9f25b851e94"/>
<result property="fd3af9f27efdd912" column="fd_3af9f27efdd912"/>
<result property="fd3af9f3059e5b9c" column="fd_3af9f3059e5b9c"/>
<result property="fd3af9f26a3cae94" column="fd_3af9f26a3cae94"/>
<result property="fd3af9f263e094c6" column="fd_3af9f263e094c6"/>
<result property="fd3af9f2617e530a" column="fd_3af9f2617e530a"/>
<result property="fd3af9f281651734" column="fd_3af9f281651734"/>
<result property="fd3af9f2e9208e4e" column="fd_3af9f2e9208e4e"/>
<result property="fd3af9f2e6dfb3f4" column="fd_3af9f2e6dfb3f4"/>
<result property="fd3af9f2f8290f24" column="fd_3af9f2f8290f24"/>
<result property="fd3af9f2e237f794" column="fd_3af9f2e237f794"/>
<result property="fd3af9f2e45a5d78" column="fd_3af9f2e45a5d78"/>
<result property="fd3af9f283a6f288" column="fd_3af9f283a6f288"/>
<result property="fd3af9f2db1e5e16" column="fd_3af9f2db1e5e16"/>
<result property="fd3af9f27ce947ac" column="fd_3af9f27ce947ac"/>
<result property="fd3af9f2ff2c9f42" column="fd_3af9f2ff2c9f42"/>
<result property="fd3af9f25f5e9cc4" column="fd_3af9f25f5e9cc4"/>
<result property="fd3af9f2883941b4" column="fd_3af9f2883941b4"/>
<result property="fd3af9f267a03bd6" column="fd_3af9f267a03bd6"/>
<result property="fd3af9f303037214" column="fd_3af9f303037214"/>
<result property="fd3af9f2d8df88c0" column="fd_3af9f2d8df88c0"/>
<result property="fd3af9f257b1b586" column="fd_3af9f257b1b586"/>
<result property="fd3b0194c7336de0" column="fd_3b0194c7336de0"/>
<result property="fd3b0b716e771e06" column="fd_3b0b716e771e06"/>
<result property="fd3b1354c3add8c2" column="fd_3b1354c3add8c2"/>
<result property="fd3b16e2f436ff98Text" column="fd_3b16e2f436ff98_text"/>
<result property="fd3b16e2f436ff98" column="fd_3b16e2f436ff98"/>
<result property="fd3b178e3ba5e258" column="fd_3b178e3ba5e258"/>
<result property="fd3b35a57b6e9d0a" column="fd_3b35a57b6e9d0a"/>
<result property="fd3b35a5b0b04d54" column="fd_3b35a5b0b04d54"/>
<result property="fd3b35a57aee1428" column="fd_3b35a57aee1428"/>
<result property="fd3b35a5b03100c4" column="fd_3b35a5b03100c4"/>
<result property="fd3b3cab5f343a90" column="fd_3b3cab5f343a90"/>
<result property="fd3b3e41ac916e66" column="fd_3b3e41ac916e66"/>
<result property="fd3b438e61af0a56" column="fd_3b438e61af0a56"/>
<result property="fd3b5cc5e697079a" column="fd_3b5cc5e697079a"/>
<result property="fd3b6495a5ad6e10" column="fd_3b6495a5ad6e10"/>
<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_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_3aeafa25916e82" column="fd_3aeafa25916e82"/>
<result property="fd_3af9f2fa79ee72" column="fd_3af9f2fa79ee72"/>
<result property="fd_3af9f2ec516c30" column="fd_3af9f2ec516c30"/>
<result property="fd_3af9f2fcde9158" column="fd_3af9f2fcde9158"/>
<result property="fd_3af9f285ee1e38" column="fd_3af9f285ee1e38"/>
<result property="fd_3af9f2dd5d8fb8" column="fd_3af9f2dd5d8fb8"/>
<result property="fd_3af9f2e03295dc" column="fd_3af9f2e03295dc"/>
<result property="fd_3af9f27a3974e6" column="fd_3af9f27a3974e6"/>
<result property="fd_3af9f25b851e94" column="fd_3af9f25b851e94"/>
<result property="fd_3af9f3059e5b9c" column="fd_3af9f3059e5b9c"/>
<result property="fd_3af9f26a3cae94" column="fd_3af9f26a3cae94"/>
<result property="fd_3af9f263e094c6" column="fd_3af9f263e094c6"/>
<result property="fd_3af9f2617e530a" column="fd_3af9f2617e530a"/>
<result property="fd_3af9f281651734" column="fd_3af9f281651734"/>
<result property="fd_3af9f2e9208e4e" column="fd_3af9f2e9208e4e"/>
<result property="fd_3af9f2e6dfb3f4" column="fd_3af9f2e6dfb3f4"/>
<result property="fd_3af9f2f8290f24" column="fd_3af9f2f8290f24"/>
<result property="fd_3af9f2e237f794" column="fd_3af9f2e237f794"/>
<result property="fd_3af9f2e45a5d78" column="fd_3af9f2e45a5d78"/>
<result property="fd_3af9f283a6f288" column="fd_3af9f283a6f288"/>
<result property="fd_3af9f2db1e5e16" column="fd_3af9f2db1e5e16"/>
<result property="fd_3af9f27ce947ac" column="fd_3af9f27ce947ac"/>
<result property="fd_3af9f2ff2c9f42" column="fd_3af9f2ff2c9f42"/>
<result property="fd_3af9f25f5e9cc4" column="fd_3af9f25f5e9cc4"/>
<result property="fd_3af9f2883941b4" column="fd_3af9f2883941b4"/>
<result property="fd_3af9f267a03bd6" column="fd_3af9f267a03bd6"/>
<result property="fd_3af9f303037214" column="fd_3af9f303037214"/>
<result property="fd_3af9f2d8df88c0" column="fd_3af9f2d8df88c0"/>
<result property="fd_3af9f257b1b586" column="fd_3af9f257b1b586"/>
<result property="fd_3b0194c7336de0" column="fd_3b0194c7336de0"/>
<result property="fd_3b0b716e771e06" column="fd_3b0b716e771e06"/>
<result property="fd_3b1354c3add8c2" column="fd_3b1354c3add8c2"/>
<result property="fd_3b16e2f436ff98_text" column="fd_3b16e2f436ff98_text"/>
<result property="fd_3b16e2f436ff98" column="fd_3b16e2f436ff98"/>
<result property="fd_3b178e3ba5e258" column="fd_3b178e3ba5e258"/>
<result property="fd_3b35a57b6e9d0a" column="fd_3b35a57b6e9d0a"/>
<result property="fd_3b35a5b0b04d54" column="fd_3b35a5b0b04d54"/>
<result property="fd_3b35a57aee1428" column="fd_3b35a57aee1428"/>
<result property="fd_3b35a5b03100c4" column="fd_3b35a5b03100c4"/>
<result property="fd_3b3cab5f343a90" column="fd_3b3cab5f343a90"/>
<result property="fd_3b3e41ac916e66" column="fd_3b3e41ac916e66"/>
<result property="fd_3b438e61af0a56" column="fd_3b438e61af0a56"/>
<result property="fd_3b5cc5e697079a" column="fd_3b5cc5e697079a"/>
<result property="fd_3b6495a5ad6e10" column="fd_3b6495a5ad6e10"/>
<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_3af9f2883941b4,0)),2) as ygSum,
round(sum(ifnull(fd_3af9f285ee1e38,0)),2) as ygPersonSum,
round(sum(ifnull(fd_3af9f3059e5b9c,0)),2) as sjSum,
round(sum(ifnull(fd_3adfeb4e8064a8,0)),2) as ygDwSum,
round(sum(ifnull(fd_3af9f2e9208e4e,0)),2) as sjDwSum,
round(sum(ifnull(fd_3af9f303037214,0)),2) as sjPersonSum,
round(sum(ifnull(fd_3adfeb7b624f06,0)),2) as ys,
round(sum(ifnull(fd_3b35a57aee1428,0)),2) as personYs,
round(sum(ifnull(fd_3b35a57b6e9d0a,0)),2) as dwYs,
round(sum(ifnull(fd_3adfeb7bd97464,0)),2) as yzc,
round(sum(ifnull(fd_3b35a5b03100c4,0)),2) as personYzc,
round(sum(ifnull(fd_3b35a5b0b04d54,0)),2) as dwYzc
from ekp_social_info
where fd_3adfe8c7e4cf7a = #{card} and fd_3adfe8cb96c41e = #{month}
</select>
</mapper>
......@@ -284,7 +284,8 @@ public class TForecastLibraryController {
**/
@Operation(summary = "定时任务推送社保预估明细的数据", description = "定时任务推送社保预估明细的数据")
@SysLog("定时任务推送社保预估明细的数据")
@PostMapping("/createForecastInfo")
@Inner
@PostMapping("/inner/createForecastInfo")
public void createForecastInfo() {
tForecastLibraryService.createForecastInfo();
}
......
......@@ -50,7 +50,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.EkpDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
......@@ -2931,7 +2930,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
long count = baseMapper.getTPaymentInfoSumPushCount(null);
if (count > 0) {
List<TPaymentInfoPushVo> unPushs;
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++) {
unPushs = baseMapper.getTPaymentInfoSumPushList(null);
......@@ -2953,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)) {
//推送数据封装并推送
......@@ -3134,14 +3133,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
long count = baseMapper.getTPaymentInfoSumPushCount(searchVo);
if (count > 0) {
List<TPaymentInfoPushVo> 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.getTPaymentInfoSumPushList(searchVo);
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
this.asynchronousEkpPaymentSocial(unPushInfo, mapSelectVo);
synchronized (this) {
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
doJointSocialTask.asynchronousEkpPaymentSocial(unPushInfo, mapSelectVo);
}
}
}
}
}
......@@ -3153,7 +3153,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) {
......@@ -4009,331 +4009,4 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
/**
* @Description: 实缴数据推送
* @Author: huyc
* @Date: 2022-11-17
* @return: void
**/
public void asynchronousEkpPaymentSocial(List<TPaymentInfoPushVo> unPushInfo, Map<String, TSettleDomainSelectVo> mapSelectVo) {
log.info("推送社保实缴费用到EKP-线程开始");
TSettleDomain settleDomain;
EkpPushSocialParam socialParam;
TPaymentSocialPush a;
List<EkpPushSocialParam> paramList = new ArrayList<>();
List<EkpPushSocialParam> insertList = new ArrayList<>();
Map<String,String> idMap = new HashMap<>();
for (TPaymentInfoPushVo library : unPushInfo) {
try {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
} else {
settleDomain = null;
}
socialParam = new EkpPushSocialParam();
//员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
//单位医疗金额
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
//单位工伤金额
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
//单位失业金额
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
//单位生育金额
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
//单位大病金额
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
//预估个人养老
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
//预估个人医疗
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
//预估单位合计
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//个人社保合计
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//预估个人大病救助
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
//预估个人失业
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
//结算状态
// hgw2022-9-30 12:03:05根据倩倩的需求,改为默认空,未结算
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
socialParam.setFd_3b178dfcf9e3e6(library.getBpoFlag());
//客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
if (Common.isNotNull(library.getUnitBirthMoney())) {
socialParam.setFd_3af9ee3afb34c2(library.getUnitBirthMoney().toString());
} else {
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
}
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
if (Common.isNotNull(library.getSocialSecurityPersonalSum())) {
socialParam.setFd_3af9ee3cb6d4fa(library.getSocialSecurityPersonalSum().toString());
} else {
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
}
//预估合计
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
//实缴单位合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3af9ee3c0bf286(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
}
//实缴个人补缴利息
if (Common.isNotNull(library.getPersonalAccrual())) {
socialParam.setFd_3af9ee3d634946(library.getPersonalAccrual().toString());
} else {
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
}
//实缴单位医疗
if (Common.isNotNull(library.getUnitMedicalMoney())) {
socialParam.setFd_3af9ee39dea6a8(library.getUnitMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
}
//预估个人补缴利息
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
//预估单位补缴利息
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
//实缴单位养老
if (Common.isNotNull(library.getUnitPensionMoney())) {
socialParam.setFd_3af9ee3938170a(library.getUnitPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
}
//实缴个人失业
if (Common.isNotNull(library.getPersonalUnemploymentMoney())) {
socialParam.setFd_3af9ee3db44d96(library.getPersonalUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
}
//实缴单位补缴利息
if (Common.isNotNull(library.getCompanyAccrual())) {
socialParam.setFd_3af9ee3b5ddae8(library.getCompanyAccrual().toString());
} else {
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
}
//实缴单位大病救助
if (Common.isNotNull(library.getUnitBigmailmentMoney())) {
socialParam.setFd_3af9ee3ba76f54(library.getUnitBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
}
//实缴单位工伤
if (Common.isNotNull(library.getUnitInjuryMoney())) {
socialParam.setFd_3af9ee3aa9c84a(library.getUnitInjuryMoney().toString());
} else {
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
}
//实缴合计
if (Common.isNotNull(library.getSocialSum())) {
socialParam.setFd_3af9ee3c6bfc74(library.getSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
}
//实缴个人医疗
if (Common.isNotNull(library.getPersonalMedicalMoney())) {
socialParam.setFd_3af9ee3e066d48(library.getPersonalMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
}
//实缴单位失业
if (Common.isNotNull(library.getUnitUnemploymentMoney())) {
socialParam.setFd_3af9ee3a46b7e6(library.getUnitUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
}
//实缴个人养老
if (Common.isNotNull(library.getPersonalPensionMoney())) {
socialParam.setFd_3af9ee3e513962(library.getPersonalPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
}
//实缴个人大病救助
if (Common.isNotNull(library.getPersonalBigmailmentMoney())) {
socialParam.setFd_3af9ee3d0ba3b6(library.getPersonalBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
// 缴纳地
if (Common.isNotNull(library.getSocialPayAddr())) {
socialParam.setFd_3b5cc58d1a70fe(library.getSocialPayAddr());
} else {
socialParam.setFd_3b5cc58d1a70fe(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
insertList.add(socialParam);
ekpDaprUtil.pushSocialInfoToEkp(insertList);
String body = "";
if (Common.isEmpty(body) || body.length() != 32) {
paramList.add(socialParam);
idMap.put(library.getId(), library.getIds());
}
if (Common.isNotNull(body) && body.length() == 32) {
baseMapper.updateBySocialPaymentList(library.getIds());
a = new TPaymentSocialPush();
a.setId(library.getId());
a.setPaymentIds(library.getIds());
socialPushMapper.insert(a);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保实缴费用到EKP错误", e);
}
}
//推送失败的数据重新推送
if (!paramList.isEmpty()) {
for (EkpPushSocialParam s:paramList) {
try {
String body = "";
if (Common.isNotNull(body) && body.length() == 32) {
baseMapper.updateBySocialPaymentList(idMap.get(s.getFd_3b0afbe1f94a08()));
a = new TPaymentSocialPush();
a.setId(s.getFd_3b0afbe1f94a08());
a.setPaymentIds(idMap.get(s.getFd_3b0afbe1f94a08()));
socialPushMapper.insert(a);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(s.getFd_3b0afbe1f94a08());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
}catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(s.getFd_3b0afbe1f94a08());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保实缴费用到EKP错误", e);
}
}
}
idMap.clear();
log.info("推送社保实缴费用到EKP结束");
}
/**
* @Description: 推送ekp时更改日期格式
* @Author: huyc
**/
public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-");
return sb.toString();
}
}
/*
* 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.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentSocialPush;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentSocialPushMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentSocialPushService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 收入明细表
*
* @author hgw
* @date 2022-08-30 17:34:58
*/
@Log4j2
@Service
public class TPaymentSocialPushServiceImpl extends ServiceImpl<TPaymentSocialPushMapper, TPaymentSocialPush> implements TPaymentSocialPushService {
}
package com.yifu.cloud.plus.v1.yifu.social.util;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
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.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.EkpDaprUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil;
......@@ -18,7 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TForecastLibraryMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentSocialPushMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentSocialPushService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoPushVo;
import lombok.extern.slf4j.Slf4j;
......@@ -60,11 +64,14 @@ public class DoJointSocialTask {
private TForecastLibraryMapper forecastLibraryMapper;
@Autowired
private TPaymentSocialPushMapper socialPushMapper;
private TPaymentSocialPushService socialPushService;
@Autowired
private RedisUtil redisUtil;
@Autowired
private EkpDaprUtils ekpDaprUtil;
/**
* @Description: 合同-批量更换负责人
* @Author: huyc
......@@ -431,11 +438,10 @@ public class DoJointSocialTask {
log.info("推送社保实缴费用到EKP-线程开始");
TSettleDomain settleDomain;
EkpPushSocialParam socialParam;
TPaymentSocialPush a;
List<EkpPushSocialParam> paramList = new ArrayList<>();
Map<String,String> idMap = new HashMap<>();
for (TPaymentInfoPushVo library : unPushInfo) {
try {
List<EkpPushSocialParam> insertList = new ArrayList<>();
try {
for (TPaymentInfoPushVo library : unPushInfo) {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
......@@ -482,7 +488,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);
}
......@@ -661,79 +667,43 @@ public class DoJointSocialTask {
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
paramList.add(socialParam);
idMap.put(library.getId(), library.getIds());
}
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPaymentList(library.getIds());
a = new TPaymentSocialPush();
a.setId(library.getId());
a.setPaymentIds(library.getIds());
socialPushMapper.insert(a);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
socialParam.setSocialIds(library.getIds());
//实缴
socialParam.setYgFlag(CommonConstants.ZERO_STRING);
insertList.add(socialParam);
}
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushSocialInfoToEkp(insertList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
for (String ids : idList) {
paymentInfoMapper.updateBySocialPaymentList(ids);
}
List<TPaymentSocialPush> list = vo.getUnPushInfo();
socialPushService.saveBatch(list);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("社保明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保实缴费用到EKP错误", e);
}
}
//推送失败的数据重新推送
if (!paramList.isEmpty()) {
for (EkpPushSocialParam s:paramList) {
try {
String body = ekpSocialUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPaymentList(idMap.get(s.getFd_3b0afbe1f94a08()));
a = new TPaymentSocialPush();
a.setId(s.getFd_3b0afbe1f94a08());
a.setPaymentIds(idMap.get(s.getFd_3b0afbe1f94a08()));
socialPushMapper.insert(a);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(s.getFd_3b0afbe1f94a08());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
}catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(s.getFd_3b0afbe1f94a08());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保实缴费用到EKP错误", e);
}
}
} catch (Exception e) {
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(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保实缴费用到EKP错误", e);
}
idMap.clear();
log.info("推送社保实缴费用到EKP结束");
}
......@@ -749,8 +719,8 @@ public class DoJointSocialTask {
TSettleDomain settleDomain;
EkpPushFundParam fundParam;
List<EkpPushFundParam> paramList = new ArrayList<>();
for (TPaymentInfo library : unPushInfo) {
try {
try {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
......@@ -774,7 +744,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);
}
......@@ -868,67 +838,37 @@ public class DoJointSocialTask {
} else {
fundParam.setFd_3b5cc487bb46fa(CommonConstants.EMPTY_STRING);
}
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
paramList.add(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(library.getId());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
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);
}
} catch (Exception e) {
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金批量插入失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("公积金推送实缴费用到EKP错误", e);
}
}
//推送失败的数据重新推送
if (!paramList.isEmpty()) {
for (EkpPushFundParam s:paramList) {
try {
String body = ekpFundUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(s.getFd_3b0afbaf10df2c());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(s.getFd_3b0afbaf10df2c());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
}catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(s.getFd_3b0afbaf10df2c());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("公积金推送实缴费用到EKP错误", e);
}
}
} catch (Exception e) {
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(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("公积金推送实缴费用到EKP错误", e);
}
log.info("公积金推送实缴费用到EKP结束");
}
......@@ -954,9 +894,10 @@ public class DoJointSocialTask {
log.info("推送社保预估费用到EKP-线程开始");
TSettleDomain settleDomain;
EkpPushSocialParam socialParam;
List<EkpPushSocialParam> paramList = new ArrayList<>();
for (TForecastLibrary library : unPushInfo) {
try {
List<EkpPushSocialParam> insertList = new ArrayList<>();
try {
for (TForecastLibrary library : unPushInfo) {
//获取项目信息
settleDomain = selectVoMap.get(library.getDeptNo());
if (Common.isEmpty(settleDomain)) {
......@@ -1060,7 +1001,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);
}
......@@ -1178,72 +1119,46 @@ public class DoJointSocialTask {
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
paramList.add(socialParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
//预估
socialParam.setYgFlag(CommonConstants.ONE_STRING);
//缴纳地拼接
StringBuilder adress = new StringBuilder();
adress.append(null!= library.getSocialProvince() ? RedisUtil.redis.opsForValue().get(CacheConstants.AREA_LABEL + library.getSocialProvince()) : "")
.append(null!= library.getSocialCity() ? "_" + RedisUtil.redis.opsForValue().get(CacheConstants.AREA_LABEL + library.getSocialCity()) : "")
.append(null!= library.getSocialTown() ? "_" + RedisUtil.redis.opsForValue().get(CacheConstants.AREA_LABEL + library.getSocialTown()) : "");
socialParam.setFd_3b5cc58d1a70fe(adress.toString());
insertList.add(socialParam);
}
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushSocialInfoToEkp(insertList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
forecastLibraryMapper.updatePushStatus(idList);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("社保预估明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保预估费用到EKP错误", e);
}
}
//推送失败的数据重新推送
if (!paramList.isEmpty()) {
for (EkpPushSocialParam s:paramList) {
try {
String body = ekpSocialUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
TForecastLibrary library = forecastLibraryMapper.selectById(s.getFd_3b0afbe1f94a08());
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(s.getFd_3b0afbe1f94a08());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
}catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(s.getFd_3b0afbe1f94a08());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保预估费用到EKP错误", e);
}
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保预估费用到EKP错误", e);
}
log.info("推送社保预估费用到EKP结束");
log.info("推送社保预估费预估用到EKP结束");
}
/**
......@@ -1263,9 +1178,9 @@ public class DoJointSocialTask {
log.info("推送公积金预估费用到EKP-线程开始");
TSettleDomain settleDomain;
EkpPushFundParam fundParam;
List<EkpPushFundParam> paramList = new ArrayList<>();
for (TForecastLibrary library : unPushInfo) {
try {
List<EkpPushFundParam> insertList = new ArrayList<>();
try {
for (TForecastLibrary library : unPushInfo) {
//获取项目信息
settleDomain = selectVoMap.get(library.getDeptNo());
if (Common.isEmpty(settleDomain)) {
......@@ -1385,70 +1300,41 @@ public class DoJointSocialTask {
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
paramList.add(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
//缴纳地拼接
StringBuilder adress = new StringBuilder();
adress.append(null != library.getFundProvince() ? RedisUtil.redis.opsForValue().get(CacheConstants.AREA_LABEL + library.getFundProvince()) : "")
.append(null != library.getFundCity() ? "_" + RedisUtil.redis.opsForValue().get(CacheConstants.AREA_LABEL + library.getFundCity()) : "")
.append(null != library.getFundTown() ? "_" + RedisUtil.redis.opsForValue().get(CacheConstants.AREA_LABEL + library.getFundTown()) : "");
fundParam.setFd_3b5cc487bb46fa(adress.toString());
insertList.add(fundParam);
}
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(insertList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
forecastLibraryMapper.updatePushStatus(idList);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金预估明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送公积金预估费用到EKP错误", e);
}
}
//推送失败的数据重新推送
if (!paramList.isEmpty()) {
for (EkpPushFundParam s:paramList) {
try {
String body = ekpFundUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
TForecastLibrary library = forecastLibraryMapper.selectById(s.getFd_3b0afbaf10df2c());
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(s.getFd_3b0afbaf10df2c());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
}catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(s.getFd_3b0afbaf10df2c());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送公积金预估费用到EKP错误", e);
}
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送公积金预估费用到EKP错误", e);
}
log.info("推送公积金预估费用到EKP结束");
}
......
......@@ -2162,7 +2162,7 @@
<include refid="tPaymentInfo_export_push_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SOCIAL_PAY_ADDR
limit 0,10000
limit 0,1000
</select>
<!--tPaymentInfo合并查询-->
......
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