Commit 90b8e4c5 authored by huyuchen's avatar huyuchen

Merge branch 'MVP1.5.3' into develop

# Conflicts:
#	yifu-auth/src/main/java/com/yifu/cloud/plus/v1/yifu/auth/config/CASproperties.java
#	yifu-auth/src/main/java/com/yifu/cloud/plus/v1/yifu/auth/filter/PasswordDecoderFilter.java
parents cb21c294 8f84461c
#!/bin/bash
#k8s升级所有版本,滚动更新
cd ../
thisPath=`pwd`
#鉴权
cd $thisPath"/yifu-auth"
sh build-prd.sh
#登录基础服务
cd $thisPath"/yifu-upms/yifu-upms-biz"
sh build-prd.sh
#档案服务
cd $thisPath"/yifu-archives/yifu-archives-biz"
sh build-prd.sh
#校验身份证、银行卡、手机号服务
cd $thisPath"/yifu-check/yifu-check-biz"
sh build-prd.sh
#商险服务
cd $thisPath"/yifu-insurances/yifu-insurances-biz"
sh build-prd.sh
#定时任务服务
cd $thisPath"/yifu-job/yifu-job-biz"
sh build-prd.sh
#订单服务
cd $thisPath"/yifu-order/yifu-order-biz"
sh build-prd.sh
#薪资服务
cd $thisPath"/yifu-salary/yifu-salary-biz"
sh build-prd.sh
#社保服务
cd $thisPath"/yifu-social/yifu-social-biz"
sh build-prd.sh
#!/bin/bash
#k8s升级所有版本,滚动更新
cd ../
thisPath=`pwd`
#档案服务
cd $thisPath"/yifu-archives/yifu-archives-biz"
sh build-prd.sh
#校验身份证、银行卡、手机号服务
cd $thisPath"/yifu-check/yifu-check-biz"
sh build-prd.sh
#商险服务
cd $thisPath"/yifu-insurances/yifu-insurances-biz"
sh build-prd.sh
#定时任务服务
cd $thisPath"/yifu-job/yifu-job-biz"
sh build-prd.sh
#订单服务
cd $thisPath"/yifu-order/yifu-order-biz"
sh build-prd.sh
#薪资服务
cd $thisPath"/yifu-salary/yifu-salary-biz"
sh build-prd.sh
#社保服务
cd $thisPath"/yifu-social/yifu-social-biz"
sh build-prd.sh
apiVersion: apps/v1
kind: Deployment
metadata:
name: yifu-prd-webmvp-b
namespace: prd-mvp
spec:
selector:
matchLabels:
app: yifu-prd-webmvp-b
replicas: 1
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-prd-webmvp-b
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-prd-webmvp-b" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "8124" #这个参数告诉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: "100" #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-type: worker
containers:
- name: yifu-prd-webmvp-b
image: hub.worfu.com/prd-mvp/yifu-prd-webmvp-b:1.0.0
imagePullPolicy: Always
ports:
- containerPort: 8124
env:
- name: TZ
value: Asia/Shanghai
resources:
requests:
memory: "100Mi"
limits:
memory: "200Mi"
imagePullSecrets:
- name: login
apiVersion: v1
kind: Service
metadata:
name: yifu-prd-webmvp-b
namespace: prd-mvp
labels:
k8s-app: yifu-prd-webmvp-b
spec:
ports:
- name: yifu-prd-webmvp-b
port: 80
protocol: TCP
targetPort: 8124
selector:
app: yifu-prd-webmvp-b
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: yifu-prd-webmvp-b
namespace: prd-mvp
spec:
gateways:
- istio-system/prd-worfu
hosts:
- hrb.worfu.com
http:
- match:
- uri:
prefix: /
rewrite:
uri: /
route:
- destination:
host: yifu-prd-webmvp-b.prd-mvp.svc.cluster.local
port:
number: 80
apiVersion: apps/v1
kind: Deployment
metadata:
name: yifu-prd-webmvp
namespace: prd-mvp
spec:
selector:
matchLabels:
app: yifu-prd-webmvp
replicas: 1
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-prd-webmvp
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-prd-webmvp" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "8888" #这个参数告诉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-type: worker
containers:
- name: yifu-prd-webmvp
image: hub.worfu.com/prd-mvp/yifu-prd-webmvp:1.0.0
imagePullPolicy: Always
ports:
- containerPort: 8888
env:
- name: TZ
value: Asia/Shanghai
resources:
requests:
memory: "100Mi"
limits:
memory: "200Mi"
imagePullSecrets:
- name: login
apiVersion: v1
kind: Service
metadata:
name: yifu-prd-webmvp
namespace: prd-mvp
labels:
k8s-app: yifu-prd-webmvp
spec:
ports:
- name: yifu-prd-webmvp
port: 80
protocol: TCP
targetPort: 8888
selector:
app: yifu-prd-webmvp
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: yifu-prd-webmvp
namespace: prd-mvp
spec:
gateways:
- istio-system/prd-worfu
hosts:
- mvp.worfu.com
http:
- match:
- uri:
prefix: /
rewrite:
uri: /
route:
- destination:
host: yifu-prd-webmvp.prd-mvp.svc.cluster.local
port:
number: 80
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-archives # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-archives
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
# rollingUpdate: # 滚动更新
# maxSurge: 30% # 最大额外可以存在的副本数,可以为百分比,也可以为整数
# maxUnavailable: 30% # 示在更新过程中能够进入不可用状态的 Pod 的最大值,可以为百分比,也可以为整数
# type: RollingUpdate # 滚动更新策略
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-archives
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-archives" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5001" #这个参数告诉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标签
containers: # 容器
- name: yifu-archives # 容器的名字
#image: 192.168.1.110:5500/prd-mvp/yifu-archives-biz:1.0.0 # 容器镜像地址
image: hub.worfu.com/prd-mvp/yifu-archives-biz:1.0.0 #临时地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 5001 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: prd
- name: TZ
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "4048Mi"
#cpu: 300m # CPU,1核心 = 1000m
requests: # 容器运行时,最低资源需求,也就是说最少需要多少资源容器才能正常运行
#cpu: 100m
memory: "1024Mi"
#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
......@@ -2,15 +2,19 @@ apiVersion: v1 # 指定api版本,此值必须在kubectl api-ve
kind: Service # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
labels: # 设定资源的标签
app: yifu-register # 资源的名字,在同一个namespace中必须唯一
name: yifu-register # 资源的名字,在同一个namespace中必须唯一
app: yifu-archives # 资源的名字,在同一个namespace中必须唯一
name: yifu-archives # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 8848 # service 端口
- port: 5001 # service 端口
protocol: TCP # 协议
targetPort: 8848 # 容器暴露的端口
#name: http # 端口名称
targetPort: 5001 # 容器暴露的端口
name: http-archives # 端口名称
#- port: 3500 # service 端口
# protocol: TCP # 协议
# targetPort: 3500 # 容器暴露的端口
# name: http-archives-dapr
selector: # 选择器
app: yifu-register # 资源名称
app: yifu-archives # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
......@@ -22,12 +22,12 @@ spec: # 资源规范字段
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-auth" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "3000" #这个参数告诉Dapr你的应用程序正在监听哪个端口。
dapr.io/log-level: "debug" #为 Dapr sidecar设置日志级别。 允许的值是debug,info,warn,error。 默认是 info
dapr.io/log-as-json: "false" #将此参数设置为true以JSON格式输出日志。 默认值为 false.
#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/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/ 的有效值。
......@@ -42,8 +42,9 @@ spec: # 资源规范字段
node-type: worker # node标签
containers: # 容器
- name: yifu-auth # 容器的名字
image: hub.worfu.com/prd-mvp/yifu-auth:1.0.0 # 容器镜像地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
#image: 192.168.1.110:5500/prd-mvp/yifu-auth:1.0.0 # 容器镜像地址
image: hub.worfu.com/prd-mvp/yifu-auth:1.0.0 #临时地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
......@@ -56,7 +57,7 @@ spec: # 资源规范字段
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "2048Mi"
memory: "4048Mi"
#cpu: 300m # CPU,1核心 = 1000m
requests: # 容器运行时,最低资源需求,也就是说最少需要多少资源容器才能正常运行
#cpu: 100m
......
......@@ -10,7 +10,11 @@ spec: # 资源规范字段
- port: 3000 # service 端口
protocol: TCP # 协议
targetPort: 3000 # 容器暴露的端口
#name: http # 端口名称
name: http-auth # 端口名称
#- port: 3500 # service 端口
# protocol: TCP # 协议
# targetPort: 3500 # 容器暴露的端口
# name: http-auth-dapr
selector: # 选择器
app: yifu-auth # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-check # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-check
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
# rollingUpdate: # 滚动更新
# maxSurge: 30% # 最大额外可以存在的副本数,可以为百分比,也可以为整数
# maxUnavailable: 30% # 示在更新过程中能够进入不可用状态的 Pod 的最大值,可以为百分比,也可以为整数
# type: RollingUpdate # 滚动更新策略
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-check
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-check" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5022" #这个参数告诉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: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
#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标签
containers: # 容器
- name: yifu-check # 容器的名字
#image: 192.168.1.110:5500/prd-mvp/yifu-check-biz:1.0.0 # 容器镜像地址
image: hub.worfu.com/prd-mvp/yifu-check-biz:1.0.0 #临时地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 5022 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: prd
- name: TZ
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "2048Mi"
#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-check # 资源的名字,在同一个namespace中必须唯一
name: yifu-check # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 5022 # service 端口
protocol: TCP # 协议
targetPort: 5022 # 容器暴露的端口
name: http-check # 端口名称
#- port: 3500 # service 端口
# protocol: TCP # 协议
# targetPort: 3500 # 容器暴露的端口
# name: http-check-dapr
selector: # 选择器
app: yifu-check # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-insurances # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-insurances
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
# rollingUpdate: # 滚动更新
# maxSurge: 30% # 最大额外可以存在的副本数,可以为百分比,也可以为整数
# maxUnavailable: 30% # 示在更新过程中能够进入不可用状态的 Pod 的最大值,可以为百分比,也可以为整数
# type: RollingUpdate # 滚动更新策略
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-insurances
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-insurances" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5005" #这个参数告诉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标签
containers: # 容器
- name: yifu-insurances # 容器的名字
image: hub.worfu.com/prd-mvp/yifu-insurances-biz:1.0.0 #临时地址
# image: 192.168.1.110:5500/prd-mvp/yifu-insurances-biz:1.0.0 # 容器镜像地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 5005 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: prd
- name: TZ
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "2048Mi"
#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-insurances # 资源的名字,在同一个namespace中必须唯一
name: yifu-insurances # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 5005 # service 端口
protocol: TCP # 协议
targetPort: 5005 # 容器暴露的端口
name: http-insurances # 端口名称
#- port: 3500 # service 端口
# protocol: TCP # 协议
# targetPort: 3500 # 容器暴露的端口
# name: http-insurances-dapr
selector: # 选择器
app: yifu-insurances # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-register # 资源的名字,在同一个namespace中必须唯一
name: yifu-job # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-register
app: yifu-job
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
......@@ -17,37 +17,39 @@ spec: # 资源规范字段
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-register
app: yifu-job
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-auth" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "3000" #这个参数告诉Dapr你的应用程序正在监听哪个端口。
dapr.io/log-level: "debug" #为 Dapr sidecar设置日志级别。 允许的值是debug,info,warn,error。 默认是 info
dapr.io/log-as-json: "false" #将此参数设置为true以JSON格式输出日志。 默认值为 false.
dapr.io/app-id: "yifu-job" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5004" #这个参数告诉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: "9091" #设置 sidecar 度量服务器的端口。 默认值为 9090
#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: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
#dapr.io/http-max-request-size: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
#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标签
containers: # 容器
- name: yifu-register # 容器的名字
image: hub.worfu.com/prd-mvp/yifu-register:1.0.0 # 容器镜像地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
- name: yifu-job # 容器的名字
#image: hub.worfu.com/prd-mvp/yifu-job-biz:1.0.0 # 容器镜像地址
image: hub.worfu.com/prd-mvp/yifu-job-biz:1.0.0 #临时地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 8848 # 容器端口
- containerPort: 5004 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: prd
......
......@@ -2,15 +2,19 @@ apiVersion: v1 # 指定api版本,此值必须在kubectl api-ve
kind: Service # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
labels: # 设定资源的标签
app: yifu-consumer # 资源的名字,在同一个namespace中必须唯一
name: yifu-consumer # 资源的名字,在同一个namespace中必须唯一
app: yifu-job # 资源的名字,在同一个namespace中必须唯一
name: yifu-job # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 7002 # service 端口
- port: 5004 # service 端口
protocol: TCP # 协议
targetPort: 7002 # 容器暴露的端口
#name: http # 端口名称
targetPort: 5004 # 容器暴露的端口
name: http-job # 端口名称
#- port: 3500 # service 端口
# protocol: TCP # 协议
# targetPort: 3500 # 容器暴露的端口
# name: http-job-dapr
selector: # 选择器
app: yifu-consumer # 资源名称
app: yifu-job # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-provider # 资源的名字,在同一个namespace中必须唯一
name: yifu-order # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-provider
app: yifu-order
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
......@@ -17,37 +17,40 @@ spec: # 资源规范字段
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-provider
app: yifu-order
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-auth" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "3000" #这个参数告诉Dapr你的应用程序正在监听哪个端口。
dapr.io/log-level: "debug" #为 Dapr sidecar设置日志级别。 允许的值是debug,info,warn,error。 默认是 info
dapr.io/log-as-json: "false" #将此参数设置为true以JSON格式输出日志。 默认值为 false.
dapr.io/app-id: "yifu-order" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5006" #这个参数告诉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: "9093" #设置 sidecar 度量服务器的端口。 默认值为 9090
#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: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
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标签
containers: # 容器
- name: yifu-provider # 容器的名字
image: hub.worfu.com/prd-mvp/yifu-provider:1.0.0 # 容器镜像地址
- name: yifu-order # 容器的名字
image: hub.worfu.com/prd-mvp/yifu-order-biz:1.0.0 #临时地址
# image: 192.168.1.110:5500/prd-mvp/yifu-order-biz:1.0.0 # 容器镜像地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 7001 # 容器端口
- containerPort: 5006 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: prd
......
apiVersion: v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Service # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
labels: # 设定资源的标签
app: yifu-order # 资源的名字,在同一个namespace中必须唯一
name: yifu-order # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 5006 # service 端口
protocol: TCP # 协议
targetPort: 5006 # 容器暴露的端口
name: http-order # 端口名称
#- port: 3500 # service 端口
# protocol: TCP # 协议
# targetPort: 3500 # 容器暴露的端口
# name: http-order-dapr
selector: # 选择器
app: yifu-order # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-salary # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-salary
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
# rollingUpdate: # 滚动更新
# maxSurge: 30% # 最大额外可以存在的副本数,可以为百分比,也可以为整数
# maxUnavailable: 30% # 示在更新过程中能够进入不可用状态的 Pod 的最大值,可以为百分比,也可以为整数
# type: RollingUpdate # 滚动更新策略
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-salary
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-salary" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5003" #这个参数告诉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标签
containers: # 容器
- name: yifu-salary # 容器的名字
#image: 192.168.1.110:5500/prd-mvp/yifu-salary-biz:1.0.0 # 容器镜像地址
image: hub.worfu.com/prd-mvp/yifu-salary-biz:1.0.0 #临时地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 5003 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: prd
- name: TZ
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "2048Mi"
#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-salary # 资源的名字,在同一个namespace中必须唯一
name: yifu-salary # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 5003 # service 端口
protocol: TCP # 协议
targetPort: 5003 # 容器暴露的端口
name: http-salary # 端口名称
#- port: 3500 # service 端口
# protocol: TCP # 协议
# targetPort: 3500 # 容器暴露的端口
# name: http-salary-dapr
selector: # 选择器
app: yifu-salary # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-social # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-social
replicas: 2 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
# rollingUpdate: # 滚动更新
# maxSurge: 30% # 最大额外可以存在的副本数,可以为百分比,也可以为整数
# maxUnavailable: 30% # 示在更新过程中能够进入不可用状态的 Pod 的最大值,可以为百分比,也可以为整数
# type: RollingUpdate # 滚动更新策略
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-social
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-social" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5002" #这个参数告诉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: "150" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "20" #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标签
containers: # 容器
- name: yifu-social # 容器的名字
#image: 192.168.1.110:5500/prd-mvp/yifu-social-biz:1.0.0 # 容器镜像地址
image: hub.worfu.com/prd-mvp/yifu-social-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: prd
- name: TZ
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "4048Mi"
#cpu: 300m # CPU,1核心 = 1000m
requests: # 容器运行时,最低资源需求,也就是说最少需要多少资源容器才能正常运行
#cpu: 100m
memory: "1024Mi"
#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-social # 资源的名字,在同一个namespace中必须唯一
name: yifu-social # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 5002 # service 端口
protocol: TCP # 协议
targetPort: 5002 # 容器暴露的端口
name: http-social # 端口名称
#- port: 3500 # service 端口
# protocol: TCP # 协议
# targetPort: 3500 # 容器暴露的端口
# name: http-social-dapr
selector: # 选择器
app: yifu-social # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-consumer # 资源的名字,在同一个namespace中必须唯一
name: yifu-upms # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-consumer
app: yifu-upms
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
......@@ -17,37 +17,39 @@ spec: # 资源规范字段
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-consumer
app: yifu-upms
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-auth" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "3000" #这个参数告诉Dapr你的应用程序正在监听哪个端口。
dapr.io/log-level: "debug" #为 Dapr sidecar设置日志级别。 允许的值是debug,info,warn,error。 默认是 info
dapr.io/log-as-json: "false" #将此参数设置为true以JSON格式输出日志。 默认值为 false.
dapr.io/app-id: "yifu-upms" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "4000" #这个参数告诉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: "9092" #设置 sidecar 度量服务器的端口。 默认值为 9090
#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: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
#dapr.io/http-max-request-size: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
#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标签
containers: # 容器
- name: yifu-consumer # 容器的名字
image: hub.worfu.com/prd-mvp/yifu-consumer:1.0.0 # 容器镜像地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
- name: yifu-upms # 容器的名字
#image: 192.168.1.110:5500/prd-mvp/yifu-upms-biz:1.0.0 # 容器镜像地址
image: hub.worfu.com/prd-mvp/yifu-upms-biz:1.0.0 #临时地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 7002 # 容器端口
- containerPort: 4000 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: prd
......
......@@ -2,15 +2,19 @@ apiVersion: v1 # 指定api版本,此值必须在kubectl api-ve
kind: Service # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
labels: # 设定资源的标签
app: yifu-provider # 资源的名字,在同一个namespace中必须唯一
name: yifu-provider # 资源的名字,在同一个namespace中必须唯一
app: yifu-upms # 资源的名字,在同一个namespace中必须唯一
name: yifu-upms # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 7001 # service 端口
- port: 4000 # service 端口
protocol: TCP # 协议
targetPort: 7001 # 容器暴露的端口
#name: http # 端口名称
targetPort: 4000 # 容器暴露的端口
name: http-upms # 端口名称
#- port: 3500 # service 端口
# protocol: TCP # 协议
# targetPort: 3500 # 容器暴露的端口
# name: http-upms-dapr
selector: # 选择器
app: yifu-provider # 资源名称
app: yifu-upms # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
......@@ -247,6 +247,28 @@ public class TEmpContractAlert extends BaseEntity {
@ExcelIgnore
private String contractId;
/**
* 客户id
*/
@Schema(description = "客户id")
private String unitId;
/**
* 客户名称
*/
@Schema(description = "客户名称")
private String unitName;
/**
* 客户编码
*/
@Schema(description = "客户编码")
private String unitNo;
/**
* 手机号码
*/
@Schema(description = "手机号码")
private String empPhone;
/**
* 合同截止日期
*/
......
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
......@@ -151,7 +152,15 @@ public class EmployeeContractExportAuditVO implements Serializable {
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
@ExcelProperty("工时制")
private String workingHours;
/**
* 合同编码
*/
@NotBlank(message = "合同编码不能为空")
@Length(max = 50, message = "合同编码不能超过50个字符")
@ExcelAttribute(name = "合同编码", maxLength = 50)
@ExcelProperty("合同编码")
@Schema(description = "合同编码", name = "contractNo")
private String contractNo;
/**
* 离职日期
*/
......
......@@ -209,6 +209,32 @@ public class EmployeeContractExportVO implements Serializable {
@Schema(description = "归档状态", name = "isFile")
private String isFile;
/**
* 合同岗位
*/
@Length(max = 32, message = "合同岗位不能超过32个字符")
@ExcelAttribute(name = "合同岗位", maxLength = 32, needExport = true)
@ExcelProperty("合同岗位")
@Schema(description = "合同岗位", name = "post")
private String post;
/**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@ExcelAttribute(name = "工时制")
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
@ExcelProperty("工时制")
private String workingHours;
/**
* 合同编码
*/
@NotBlank(message = "合同编码不能为空")
@Length(max = 50, message = "合同编码不能超过50个字符")
@ExcelAttribute(name = "合同编码", maxLength = 50)
@ExcelProperty("合同编码")
@Schema(description = "合同编码", name = "contractNo")
private String contractNo;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建人")
private String createName;
......
......@@ -442,14 +442,6 @@ public class EmployeeProjectExportParamVO extends BaseEntity {
@ExcelAttribute(name = "项目档案来源", isDataId = true,dataType = ExcelAttributeConstants.PROJECT_EMP_SOURCE)
private String projectSource;
/**
* 项目档案状态(0草稿、1已审核)
*/
@ExcelAttribute(name ="项目档案状态", readConverterExp = "0=草稿,1=已审核")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="项目档案状态")
private String status;
/**
* 项目档案状态
*/
......
......@@ -380,6 +380,7 @@ public class TEmployeeContractInfoController {
}
contractInfo.setMId(mId);
contractInfo.setAuditStatus(CommonConstants.ONE_INT);
contractInfo.setMId(mId);
this.setAuth(contractInfo);
tEmployeeContractInfoService.exportAuditContractInfo(contractInfo, response);
}
......
......@@ -108,6 +108,9 @@ public class TEmployeeInfoController {
menuUtil.setAuthSql(user, tEmployeeInfo);
if (Common.isNotNull(tEmployeeInfo.getAuthSql()) && tEmployeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tEmployeeInfo.setAuthSql(tEmployeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
if (tEmployeeInfo.getAuthSql().contains("1=2 or ")) {
tEmployeeInfo.setAuthSql(tEmployeeInfo.getAuthSql().replace("1=2 or ", ""));
}
}
return R.ok(tEmployeeInfoService.getLeavePage(page, tEmployeeInfo));
}
......
......@@ -108,5 +108,5 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo);
int getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
String getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
}
......@@ -120,5 +120,4 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
* @return: int
**/
int everyDayUpdateEmployeeInfoContractStatus();
}
......@@ -237,6 +237,15 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
if (Common.isNotNull(entity.getDaysDue())){
wrapper.eq(TEmpContractAlert::getDaysDue,entity.getDaysDue());
}
if (Common.isNotNull(entity.getUnitId())) {
wrapper.eq(TEmpContractAlert::getUnitId, entity.getUnitId());
}
if (Common.isNotNull(entity.getEmpPhone())) {
wrapper.eq(TEmpContractAlert::getEmpPhone, entity.getEmpPhone());
}
if (Common.isNotNull(entity.getUnitNo())) {
wrapper.eq(TEmpContractAlert::getUnitNo, entity.getUnitNo());
}
return wrapper;
}
/**
......@@ -348,6 +357,12 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
}else {
alert.setFirstAlertTime(new Date());
}
// 2023-4-3 09:38:21 hgw 添加
alert.setUnitId(contract.getCustomerId());
alert.setUnitName(contract.getSubjectUnit());
alert.setUnitNo(contract.getUnitNo());
alert.setEmpPhone(employeeInfo.getEmpPhone());
alert.setCreateBy(contract.getCreateBy());
alert.setCreateName(contract.getCreateName());
alert.setContractId(contract.getId());
......
......@@ -676,6 +676,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
tEmployeeContractInfo.setAuditUserName(user.getNickname());
tEmployeeContractInfo.setContractNo(contractInfo.getContractNo());
// 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo);
this.updateById(tEmployeeContractInfo);
......@@ -1352,6 +1353,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo = new TEmployeeContractInfo();
tEmployeeContractInfo.setAuditRemark(contractAuditVo.getAuditRemark());
tEmployeeContractInfo.setAuditStatus(contractAuditVo.getAuditStatus());
tEmployeeContractInfo.setContractNo(contract.getContractNo());
tEmployeeContractInfo.setAuditUserName(user.getNickname());
tEmployeeContractInfo.setId(contract.getId());
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) {
......@@ -1522,9 +1524,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
@Override
public R<String> getContractByEmpIdCardAndDeptId(String mpIdCard, String deptId) {
int count = baseMapper.getContractByEmpIdCardAndDeptId(mpIdCard, deptId);
if (count >0) {
return R.ok();
String contractStart = baseMapper.getContractByEmpIdCardAndDeptId(mpIdCard, deptId);
if (Common.isNotNull(contractStart)) {
return R.ok(contractStart);
} else {
return R.failed("未找到合同");
}
......
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: prd
redis:
host: 192.168.0.153
port: 22379
password: '@yf_2022'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.0.222:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 20 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 100 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
......@@ -50,7 +50,7 @@
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="INFO">
<root level="error">
<appender-ref ref="console"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
......
......@@ -100,7 +100,7 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="reason" column="REASON"/>
<result property="contractNo" column="CONTRACT_NO"/>
<result property="type" column="TYPE"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
......@@ -136,7 +136,9 @@
<result property="endDate" column="END_DATE"/>
<result property="history" column="HISTORY"/>
<result property="type" column="TYPE"/>
<result property="contractNo" column="CONTRACT_NO"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -489,6 +491,12 @@
if(a.IS_FILE = 0,'有附件','无附件') FILES,
if(a.IS_FILE = 0,'已归档','未归档') IS_FILE,
a.CREATE_NAME,
a.CONTRACT_NO,
a.POST,
CASE WHEN a.WORKING_HOURS=1 THEN "标准工时"
WHEN a.WORKING_HOURS =2 THEN "综合工时"
WHEN a.WORKING_HOURS =3 THEN "不定时工时制"
ELSE a.WORKING_HOURS END as "WORKING_HOURS",
CASE WHEN a.type=0 THEN "派增-社保派单"
WHEN a.type =1 THEN "派增-无社保新签"
WHEN a.type =2 THEN "派增-续签"
......@@ -555,6 +563,12 @@
if(a.IN_USE = 0,'可用','不可用') IN_USE,
if(a.IS_FILE = 0,'有附件','无附件') FILES,
if(a.IS_FILE = 0,'已归档','未归档') IS_FILE,
max(a.CONTRACT_NO) CONTRACT_NO,
max(a.POST) POST,
CASE WHEN max(a.WORKING_HOURS)=1 THEN "标准工时"
WHEN max(a.WORKING_HOURS) =2 THEN "综合工时"
WHEN max(a.WORKING_HOURS) =3 THEN "不定时工时制"
ELSE max(a.WORKING_HOURS) END as "WORKING_HOURS",
a.CREATE_NAME,
CASE WHEN a.type=0 THEN "派增-社保派单"
WHEN a.type =1 THEN "派增-无社保新签"
......@@ -629,6 +643,7 @@
a.REASON,
a.TYPE,
a.LEAVE_DATE,
a.CONTRACT_NO,
a.REDUCE_REASON
FROM t_employee_contract_info a
<where>
......@@ -791,9 +806,9 @@
where a.EMP_IDCARD = #{idCard} and a.DEPT_NO = #{oldDeptNo} and b.DEPART_NO= #{deptNo} and b.DELETE_FLAG='0';
</update>
<select id="getContractByEmpIdCardAndDeptId" resultType="java.lang.Integer">
<select id="getContractByEmpIdCardAndDeptId" resultType="java.lang.String">
select
count(1)
e.CONTRACT_START
from t_employee_contract_info e
where e.EMP_IDCARD = #{empIdCard} and e.SETTLE_DOMAIN = #{deptId}
and e.DELETE_FLAG = '0'
......@@ -802,5 +817,6 @@
OR
( e.AUDIT_STATUS = '1' AND e.IN_USE = '1' )
)
limit 1
</select>
</mapper>
......@@ -230,7 +230,7 @@
WHERE 1=1
<if test="idNameNoVo != null">
<if test="idNameNoVo.name != null and idNameNoVo.name.trim() != ''">
and a.CUSTOMER_NAME like concat('%', #{idNameNoVo.name} ,'%')
and (a.CUSTOMER_NAME like concat('%', #{idNameNoVo.name} ,'%') or a.CUSTOMER_NO like concat('%', #{idNameNoVo.name} ,'%'))
</if>
<if test="idNameNoVo.no != null and idNameNoVo.no.trim() != ''">
and a.CUSTOMER_NO = #{idNameNoVo.no}
......
spring:
config:
#import:
# - classpath: application-test.yml
activate:
on-profile: prd
mvc:
pathmatch:
matching-strategy: ant_path_matcher
redis:
host: 192.168.0.153
password: '@yf_2022'
port: 22379
cloud:
sentinel:
eager: true
transport:
dashboard: yifu-sentinel:5003
# 数据源
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.0.222:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
freemarker:
allow-request-override: false
allow-session-override: false
cache: true
charset: UTF-8
check-template-location: true
content-type: text/html
enabled: true
expose-request-attributes: false
expose-session-attributes: false
expose-spring-macro-helpers: true
prefer-file-system-access: true
suffix: .ftl
template-loader-path: classpath:/templates/
# 数据源配置
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
redis:
host: 192.168.0.153
port: 22379
password: '@yf_2022'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.0.222:22306/hr_business?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 20 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 100 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
config:
activate:
on-profile: prd
......@@ -51,7 +51,7 @@ public class ChecksUtil {
* @Author fxj
* @Description 手机号码状态检测
* @Date 17:50 2022/6/20
* @param mobiles 检测手机号,多个手机号码用英文半角逗号隔开,仅支持国内号码
* @param mobiles 检测手机号,多个手机号码用英文半角逗号隔开,仅支持国内号码 一次请求最多五十个号码
**/
public static R<Map<String,TCheckMobile>> checkMobile(String mobiles, boolean canCheck) {
Map<String,TCheckMobile> checkMobiles = new HashMap<>();
......
# 数据源配置
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: prd
redis:
host: 192.168.0.153
password: '@yf_2022'
port: 22379
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.0.222:22306/yifu_checks?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
## spring security 配置
security:
oauth2:
resource:
loadBalanced: true
token-info-uri: http://127.0.0.1:3000/oauth/check_token
# 直接放行URL
ignore:
urls:
- /v3/api-docs
- /actuator/**
- /swagger-ui/**
- /checkBankNo/**
# 创蓝云智校验配置
canCheck: true
\ No newline at end of file
......@@ -35,22 +35,22 @@ public class AsyncConfig implements AsyncConfigurer {
* 1)<!-- 线程池维护线程的最少数量,即使没有任务需要执行,也会一直存活 -->
* 2)<!-- 设置allowCoreThreadTimeout=true(默认false)时,核心线程会超时关闭 -->
*/
taskExecutor.setCorePoolSize(10);
taskExecutor.setCorePoolSize(2);
/**
* <!-- 允许的空闲时间,当线程空闲时间达到keepAliveTime时,线程会退出,直到线程数量=corePoolSize -->
* <!-- 如果allowCoreThreadTimeout=true,则会直到线程数量=0 -->
*/
taskExecutor.setKeepAliveSeconds(60);
taskExecutor.setKeepAliveSeconds(200);
/**
* <!-- 线程池维护线程的最大数量 -->
* <!-- 当线程数>=corePoolSize,且任务队列已满时。线程池会创建新线程来处理任务 -->
* <!-- 当线程数=maxPoolSize,且任务队列已满时,线程池会拒绝处理任务而抛出异常,异常见下
*/
taskExecutor.setMaxPoolSize(100);
taskExecutor.setMaxPoolSize(5);
/**
* <!-- 缓存队列(阻塞队列)当核心线程数达到最大时,新任务会放在队列中排队等待执行 -->
*/
taskExecutor.setQueueCapacity(600);
taskExecutor.setQueueCapacity(100);
/**
* 建议配置threadNamePrefix属性,出问题时可以更方便的进行排查。
**/
......
......@@ -151,4 +151,7 @@ public interface CacheConstants {
String PAYMENT_DISPATCH_BATCH_REDUCE_IMPORT = "payment_dispatch_batch_reduce_import";
String PAYMENT_PRE_DISPATCH_BATCH_ADD_IMPORT = "payment_pre_dispatch_batch_add_import";
//社保公积金派单
String PAYMENT_DISPATCH_BATCH_IMPORT = "payment_dispatch_batch_import";
}
......@@ -351,6 +351,8 @@ public interface CommonConstants {
// 给量大的表导出使用
int EXCEL_EXPORT_LIMIT_3 = 30000;
int EXCEL_EXPORT_LIMIT_1 = 10000;
String USER = "用户";
/**
......
......@@ -428,6 +428,10 @@ public interface ErrorCodes {
* 派减异常: 本次派增已存在对应身份证号的派减记录
*/
String EMP_DISPATCH_REDUCE_EXISTS = "emp.dispatch.reduce.exists";
/**
* 无可派单项,请确认后再次操作
*/
String EMP_DISPATCH_ITEM_EMPTY_EXISTS = "emp.dispatch.item.empty.exists";
/**
* 当前社保导入队列不足或者数据量过大,请稍后重试!
*/
......
......@@ -723,15 +723,7 @@ public class ExcelUtil <T> implements Serializable {
} else {
return errorInfo(attr, "_必须为数字且最多两位小数", i);
}
} /*else if (attr.min() == 0) {
if (Common.isNumber(c)) {
if (attr.isFloat()){
if (Float.valueOf(c).compareTo(attr.min()) < CommonConstants.ZERO_INT) {
return errorInfo(attr, "_小于最小值", i);
}
}
}
}*/
}
}
return null;
}
......
......@@ -156,6 +156,8 @@ emp.dispatch.reduce.exists=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672C\u6B21\u6D3E\u58
socialinfo.list.num.large=\u5F53\u524D\u793E\u4FDD\u5BFC\u5165\u961F\u5217\u4E0D\u8DB3\u6216\u8005\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01
emp.dispatch.item.empty.exists=\u65E0\u53EF\u6D3E\u5355\u9879\uFF0C\u8BF7\u786E\u8BA4\u540E\u518D\u6B21\u64CD\u4F5C
emp.dispatch.social.diy.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u201C\u7F34\u7EB3\u7C7B\u578B\u201D\u4E3A\u201C\u81EA\u5B9A\u4E49\u201D\uFF0C\u5404\u9669\u79CD\u57FA\u6570\u76F8\u540C\uFF0C\u8BF7\u586B\u5199\u201C\u517B\u8001\u57FA\u6570\u201D\uFF0C\u5982\u57FA\u6570\u4E0D\u540C\uFF0C\u5219\u6240\u6709\u9669\u79CD\u57FA\u6570\u90FD\u9700\u586B\u5199
emp.dispatch.social.diy.medical_not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u81EA\u5B9A\u4E49\u7F34\u7EB3\u517B\u8001\u57FA\u6570\u548C\u517B\u8001\u8D77\u7F34\u65E5\u671F\u4E0D\u53EF\u4E3A\u7A7A
......
/*
* Copyright (c) 2020 yifu4cloud Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yifu.cloud.plus.v1.yifu.common.dapr.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/*
*
*
* @author fxj
* @date 2022-05-23 14:28
**/
@Data
@Component
@PropertySource("classpath:daprConfig.properties")
@ConfigurationProperties(value = "dapr.provider", ignoreInvalidFields = false)
public class DaprProviderProperties {
/*
* @author fxj
* @date 14:34
* @Description dapr sidercar url 如:http://localhost:3005/v1.0/invoke/
**/
String appUrl;
/*
* @author fxj
* @date 14:35
* @decription app_id 如:"yifu_upms_sider"
**/
String appId;
String appPort;
String httpPort;
String grpcPort;
String metricsPort;
}
......@@ -108,10 +108,11 @@ public class HttpDaprUtil {
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("Authorization", null);
HttpEntity<String> entity = new HttpEntity(param, headers);
String urlBuffer = stringBuffer.toString();
try {
res = restTemplate.postForEntity(URI.create(stringBuffer.toString()),entity, cs);
res = restTemplate.postForEntity(URI.create(urlBuffer),entity, cs);
} catch (Exception e) {
log.error("日志保存异常:",e);
log.error("日志保存异常:" + URI.create(urlBuffer),e);
return R.failed("获取信息失败:" + e.getMessage());
}
if (null != res && CommonConstants.SUCCESS == res.getStatusCodeValue()) {
......
......@@ -38,7 +38,6 @@ public class MenuUtil {
public void setAuthSql(YifuUser user, BaseEntity entity) {
// 普通用户:
if (user != null && Common.isNotNull(user.getId()) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) {
// 菜单id
String menuId = entity.getMId();
if (Common.isEmpty(menuId)) {
......
#\u6D4B\u8BD5\u73AF\u5883-\u7BA1\u7406\u540E\u53F0
dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms
#\u6D4B\u8BD5\u73AF\u5883-\u6821\u9A8C\u670D\u52A1
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
#dapr.check.appUrl=http://localhost:3502/v1.0/invoke/
dapr.check.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.check.appId=yifu-check
#\u6D4B\u8BD5\u73AF\u5883-\u6863\u6848\u670D\u52A1
dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u751F\u4EA7
dapr.archives.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.archives.appId=yifu-archives
dapr.insurances.appUrl=http://yifu-auth.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.insurances.appId=yifu-insurances
#\u751F\u4EA7
dapr.social.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.social.appId=yifu-social
#\u6D4B\u8BD5\u73AF\u5883-\u85AA\u8D44\u670D\u52A1
dapr.salary.appUrl=http://yifu-salary.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u751F\u4EA7
dapr.salary.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.salary.appId=yifu-salary
#\u6D4B\u8BD5\u73AF\u5883-\u793E\u4FDD\u670D\u52A1
dapr.social.appUrl=http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.social.appId=yifu-social
#\u751F\u4EA7
dapr.insurances.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.insurances.appId=yifu-insurances
#\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
\ No newline at end of file
dapr.business.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.business.appId=yifu-business
#ekpfund.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekpfund.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
ekpfund.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekpfund.fdModelId=181d741547a691aa68b16149a40de901
ekpfund.fdFlowId=18290af372be55308327273487abf72a
ekpfund.docStatus=20
......
#income.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
income.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
income.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#income.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
income.fdModelIdManage=181d76db26e419a88dba97b0c406689e
income.fdFlowIdManage=182d3b6e522b2690119e70d4ff082136
income.fdModelIdRisk=181d76db26e4112e14b9bb4274d06ba1
......
......@@ -4,10 +4,10 @@ insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e
insurance.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a
insurance.insuranceDocStatus=20
insurance.insuranceLoginName=admin
insurance.insuranceDocSubject=\u5546\u9669\u63a8\u9001\u0065\u006b\u0070\u63a5\u53e3
insurance.insuranceUpdateDocSubject=\u5546\u9669\u63a8\u9001\u0065\u006b\u0070\u4fee\u6539\u63a5\u53e3
insurance.insuranceUpdateFdModelId=1850416f69cc813f128474e478b83794
insurance.insuranceUpdateFdFlowId=185041a4d264c3892a0543e43be925eb
insurance.insuranceDocSubject=\u5546\u9669\u63A8\u9001ekp\u63A5\u53E3
insurance.insuranceUpdateDocSubject=\u5546\u9669\u63A8\u9001ekp\u4FEE\u6539\u63A5\u53E3
insurance.insuranceUpdateFdModelId=1850410ac0201ed20e5f09b46b0b109c
insurance.insuranceUpdateFdFlowId=185189155a87e1d4739d82b4d3c80358
#ekporder.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekporder.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
ekporder.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#ekporder.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
ekporder.orderFdModelId=182f1b7ffe2e96f975564e44e559847d
ekporder.orderFdFlowId=182f1c098ce991ca96bc927408792beb
ekporder.replyFdModelId=182f1bb35bb2156fb9a02904bc88dd8a
......
#ekpsocial.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekpsocial.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
ekpsocial.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekpsocial.fdModelId=181d741547a69ba9dbc12377948e98fd
ekpsocial.fdFlowId=18233028fe91511376b00f74b3a8f3a7
ekpsocial.docStatus=20
......
......@@ -83,7 +83,7 @@ public class BaseEntity implements Serializable {
*/
@TableField(exist = false)
@ExcelIgnore
@JsonIgnore
//@JsonIgnore
private String menuInfo;
/**
......
......@@ -28,7 +28,7 @@ seata:
enable-degrade: false # 降级开关
disable-global-transaction: false # 禁用全局事务(默认false)
grouplist:
default: 192.168.1.65:33091
default: 192.168.0.153:33091
transport:
shutdown:
wait: 3
......
......@@ -59,7 +59,7 @@ public class GlobalExceptionHandler {
public R exception(Exception e) {
errorLog( e );
if( null != e.getMessage()){
return R.failed(e.getMessage());
return R.failed(e,e.getMessage());
}else{
return R.failed(e,"系统异常!");
}
......
......@@ -317,9 +317,9 @@ public class InsurancesConstants {
*/
public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间";
/**
* 保单起止时间不能超过365天
* 保单起止时间不能超过一年
*/
public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过365天";
public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过一年";
/**
* 保单结束时间不能为空
*/
......@@ -413,9 +413,9 @@ public class InsurancesConstants {
*/
public static final String POLICY_NO_MORE_THAN_50 = "保单号长度超过50字符限制";
/**
* 发票号不能为空
* 保单号和发票号不可都为空
*/
public static final String INVOICE_NO_EMPTY = "发票号不能为空";
public static final String INVOICE_NO_EMPTY = "保单号和发票号不可都为空";
/**
* 变更原因不能为空
*/
......
......@@ -33,6 +33,11 @@ public class EkpUpdateParam implements Serializable {
*/
private String fd_3b5bf030ab1a56;
/**
* 保单号
*/
private String fd_3bb431933ee968;
/**
* 购买标准
*/
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author huyc
* @description 导出办理VO
* @date 2023-04-06 14:21:39
*/
@Data
@Schema(description = "导出办理VO")
public class InsuranceExportListOneVO implements Serializable {
private static final long serialVersionUID = -8159190612104775933L;
/**
* 主键
*/
private String id;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@JsonIgnore
private Integer buyHandleStatus;
/**
* 购买月数
*/
@Schema(description = "购买月数")
private Long buyMonth;
/**
* 购买天数
*/
@Schema(description = "购买天数")
private Long buyDay;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保单生效时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonIgnore
private LocalDate policyEffect;
/**
* 保险公司名称(冗余字段)
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 结算类型 (0、预估 1、实缴)
*/
@Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
}
......@@ -76,6 +76,12 @@ public class InsuranceRegisterInvoiceNoParam implements Serializable {
@Schema(description = "错误信息")
private String errorMessage;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
/**
* 数据传递对象
*/
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
......@@ -12,6 +13,12 @@ import java.util.List;
*/
@Data
public class InsuranceSearchVo extends TBusinessInsuranceVo{
/**
* 商险购买地
*/
@Schema(name = "商险购买地市")
private String insuranceHandleCityName;
private List<String> idList;
/**
......
......@@ -206,6 +206,13 @@ public class InsuranceWarnExportVo implements Serializable {
@ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市")
private String insuranceCityName;
/**
* 商险购买地
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险办理地市")
@Schema(name = "商险办理地市")
private String insuranceHandleCityName;
/**
* 是否有效 0有效 1无效
*/
......
......@@ -218,6 +218,13 @@ public class TBusinessInsuranceVo implements Serializable {
@ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市")
private String insuranceCityName;
/**
* 商险购买地
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险办理地市")
@Schema(name = "商险办理地市")
private String insuranceHandleCityName;
/**
* 是否有效 0有效 1无效
*/
......
......@@ -227,6 +227,21 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.getInsuranceExportList(param,mId);
}
/**
* 导出办理(新)
*
* @author huyc
* @param param
* @return {@link R<List<InsuranceExportListOneVO>>}
*/
@Operation(summary = "导出办理(新)", description = "导出办理(新)")
@PostMapping("/getInsuranceExportOneList")
@PreAuthorize("@pms.hasPermission('handle_insure_export')")
public R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(@RequestBody InsuranceExportListParam param,
@RequestParam(required = false) String mId) {
return tInsuranceDetailService.getInsuranceExportOneList(param,mId);
}
/**
* 投保退回
*
......@@ -747,5 +762,4 @@ public class TInsuranceDetailController {
public void updateSettleStatus() {
tInsuranceDetailService.updateSettleStatus();
}
}
......@@ -4,9 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -78,6 +76,24 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
List<InsuranceExportListVO> getInsuranceExportList(@Param("param") InsuranceExportListParam param);
/**
* 导出办理勾选查询结果
*
* @author licancan
* @param idList
* @return {@link List<InsuranceExportListVO>}
*/
List<InsuranceExportListOneVO> getInsuranceExportOneListBySelect(@Param("idList") List<String> idList);
/**
* 导出办理非勾选查询结果
*
* @author licancan
* @param param
* @return {@link List< InsuranceExportListVO>}
*/
List<InsuranceExportListOneVO> getInsuranceExportOnetList(@Param("param") InsuranceExportListParam param);
/**
* 批量更新保单号
*
......@@ -277,6 +293,8 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/
List<InsuranceUpdateVO> selectByIds(@Param("ids") List<String> ids);
List<TInsuranceDetail> selectPushList();
/**
* @Author fxj
* @Description 商险提醒分页查询
......@@ -284,11 +302,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page,
@Param("param")InsuranceSearchVo param,
@Param("domains")List<TSettleDomainSelectVo> domains);
@Param("domains")List<String> domains);
List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<String> idList);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<String> idList);
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO);
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<String> idList);
void batchexpireIgnore(@Param("idList")List<String> idList);
}
......@@ -143,6 +143,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param, String mId);
/**
* 导出办理(新)
*
* @author huyc
* @param param
* @return {@link R<List<InsuranceExportListVO>>}
*/
R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(InsuranceExportListParam param, String mId);
/**
* 投保退回
*
......
......@@ -959,6 +959,169 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return list;
}
/**
* 导出办理(新)
*
* @param param
* @return {@link List<InsuranceExportListOneVO>}
* @author huyc
*/
@Override
public R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(InsuranceExportListParam param, String mId) {
YifuUser user = SecurityUtils.getUser();
if (Common.isNotNull(mId)) {
param.setMId(mId);
}
param.setCreateBy(user.getId());
//设置updateBy字段是给导出使用的
param.setUpdateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<InsuranceExportListOneVO> insuranceExportList;
//如果是待投保状态,sql中HANDLED_BY过滤条件不需要,这里强制变为null
if(param.getBuyHandleStatus() == CommonConstants.ONE_INT){
param.setUpdateBy(null);
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){
insuranceExportList = baseMapper.getInsuranceExportOneListBySelect(param.getIdList());
}else {
insuranceExportList = baseMapper.getInsuranceExportOnetList(param);
}
if (CollectionUtils.isNotEmpty(insuranceExportList)){
List<TInsuranceDetail> detailList = new ArrayList<>();
//根据项目编码获取项目名称
List<String> collect = insuranceExportList.stream().map(InsuranceExportListOneVO::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
ProjectSetInfoVo jsonObject;
for (InsuranceExportListOneVO record : insuranceExportList) {
jsonObject = null;
if (data != null) {
jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//购买天数
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if (CommonConstants.THREE_INT == record.getBuyType()){
if (Objects.isNull(record.getPolicyEffect())){
record.setBuyMonth(null);
record.setBuyDay(null);
}else {
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyEffect().toString(),record.getPolicyEnd().toString()));
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyEffect().toString(),record.getPolicyEnd().toString()));
}
}
//如果是待投保,需要处理相关逻辑,投保中、投保成功只是单纯的导出
if(param.getBuyHandleStatus() == CommonConstants.ONE_INT){
TInsuranceDetail detail = new TInsuranceDetail();
detail.setId(record.getId());
//update状态由「待投保」置为「投保中」
detail.setBuyHandleStatus(CommonConstants.TWO_INT);
if (record.getBuyType() == CommonConstants.ONE_INT){
// if 投保类型 == 新增,then 更新保单生效日期为:T+1,无需考虑节假日
detail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
}
detail.setHandledBy(user.getId());
detail.setHandledTime(LocalDateTime.now());
detail.setUpdateBy(user.getId());
detail.setUpdateTime(LocalDateTime.now());
if (Common.isNotNull(jsonObject)){
detail.setDeptId(jsonObject.getId());
detail.setDeptName(jsonObject.getDepartName());
detail.setUnitId(jsonObject.getCustomerId());
detail.setUnitName(jsonObject.getCustomerName());
detail.setUnitNo(jsonObject.getCustomerCode());
}
detailList.add(detail);
}
}
}
//批量更新
if (CollectionUtils.isNotEmpty(detailList)){
this.saveOrUpdateBatch(detailList);
}
//操作记录
addOperate(detailList,user,InsurancesConstants.EXPORT,null,CommonConstants.ONE_INT);
//针对是替换类型的做处理,每一条替换数据对应一条被替换数据
List<InsuranceExportListOneVO> listVOS = insuranceExportList.stream().filter(e -> e.getBuyType() == CommonConstants.FOUR_INT).collect(Collectors.toList());
List<InsuranceExportListOneVO> list = new ArrayList<>();
if(CollectionUtils.isNotEmpty(listVOS)){
for (InsuranceExportListOneVO listVO : listVOS) {
listVO.setRemark(InsurancesConstants.INSERT);
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, listVO.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()){
TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId());
if (Optional.ofNullable(byId).isPresent()){
InsuranceExportListOneVO vo = new InsuranceExportListOneVO();
BeanCopyUtils.copyProperties(byId,vo);
if (StringUtils.isNotBlank(byId.getPolicyNo())){
listVO.setPolicyNo(byId.getPolicyNo());
}
//购买月数
vo.setBuyMonth(LocalDateUtil.betweenMonth(vo.getPolicyStart().toString(),vo.getPolicyEnd().toString()));
//购买天数
vo.setBuyDay(LocalDateUtil.betweenDay(vo.getPolicyStart().toString(),vo.getPolicyEnd().toString()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if (CommonConstants.THREE_INT == vo.getBuyType()){
if (Objects.isNull(vo.getPolicyEffect())){
vo.setBuyMonth(null);
vo.setBuyDay(null);
}else {
vo.setBuyMonth(LocalDateUtil.betweenMonth(vo.getPolicyEffect().toString(),vo.getPolicyEnd().toString()));
vo.setBuyDay(LocalDateUtil.betweenDay(vo.getPolicyEffect().toString(),vo.getPolicyEnd().toString()));
}
}
vo.setRemark(InsurancesConstants.QUIT);
vo.setBuyType(CommonConstants.FOUR_INT);
vo.setProjectName(byId.getDeptName());
list.add(vo);
}
}
}
if (CollectionUtils.isNotEmpty(list)){
//根据项目编码获取项目名称
List<String> collectList = list.stream().map(InsuranceExportListOneVO::getDeptNo).distinct().collect(Collectors.toList());
try{
R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList);
if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodesList.getData().getProjectSetInfoVoMap();
if (data != null) {
for (InsuranceExportListOneVO record : list) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
}
}
}catch (Exception e){
for (InsuranceExportListOneVO record : list) {
record.setProjectName(CommonConstants.EMPTY_STRING);
record.setInvoiceTitle(CommonConstants.EMPTY_STRING);
}
log.error(InsurancesConstants.GET_DEPT_DETAIL_ERROR+e);
}
insuranceExportList.removeAll(listVOS);
insuranceExportList.addAll(crossMergerOne(list,listVOS));
}
}
}
return R.ok(insuranceExportList);
}
/**
* 导出办理
*
......@@ -991,12 +1154,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceExportList = baseMapper.getInsuranceExportList(param);
}
if (CollectionUtils.isNotEmpty(insuranceExportList)){
/*if(insuranceExportList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}*/
List<TInsuranceDetail> detailList = new ArrayList<>();
//根据项目编码获取项目名称
List<String> collect = insuranceExportList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
List<String> collect = insuranceExportList.stream().map(InsuranceExportListVO::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
......@@ -1095,7 +1255,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
if (CollectionUtils.isNotEmpty(list)){
//根据项目编码获取项目名称
List<String> collectList = list.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
List<String> collectList = list.stream().map(InsuranceExportListVO::getDeptNo).distinct().collect(Collectors.toList());
try{
R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList);
if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) {
......@@ -2096,32 +2256,52 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceRegisterInvoiceNoParam> listSuccess = operateList.stream().filter(e-> e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS)).collect(Collectors.toList());
List<TInsuranceDetail> detailList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(listSuccess)){
boolean invoiceNoFlag = false;
boolean policeNoFlag = false;
String invoiceNoInfo = "";
String policeNoInfo = "";
for (InsuranceRegisterInvoiceNoParam success : listSuccess) {
TInsuranceDetail detail = success.getDetail();
if (Optional.ofNullable(detail).isPresent()){
//当两次发票号不一致时才更新
if (!success.getInvoiceNo().equals(detail.getInvoiceNo())){
//只有当结算id存在的时候修改数据才会推给ekp
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
try {
//推送修改信息
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStart());
ekpUpdateParam.setFd_3b5bf02e1d47cc(success.getPolicyEnd());
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(detail.getBuyType()));
//判断本地更新了保单号还是发票号还是两个都更新了
//当两次发票号不一致时
if (Common.isNotNull(success.getInvoiceNo()) && !success.getInvoiceNo().equals(detail.getInvoiceNo())){
invoiceNoFlag = true;
invoiceNoInfo = ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo();
detail.setInvoiceNo(success.getInvoiceNo());
}
//当两次保单号不一致时
if (Common.isNotNull(success.getPolicyNo()) && !success.getPolicyNo().equals(detail.getPolicyNo())){
policeNoFlag = true;
policeNoInfo = ";变更前保单号:" + detail.getPolicyNo() + ";变更后保单号:" + success.getPolicyNo();
detail.setPolicyNo(success.getPolicyNo());
}
detailList.add(detail);
//当两次发票号或发票号不一致时才更新
if ((policeNoFlag || invoiceNoFlag) && StringUtils.isNotBlank(detail.getDefaultSettleId())){
try {
//推送修改信息
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStart());
ekpUpdateParam.setFd_3b5bf02e1d47cc(success.getPolicyEnd());
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(detail.getBuyType()));
if (invoiceNoFlag) {
ekpUpdateParam.setFd_3b5bf030ab1a56(success.getInvoiceNo());
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId());
ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:"+user.getNickname() + ";操作时间:"+LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error registeredInvoiceNo:",e.getMessage());
} else {
ekpUpdateParam.setFd_3b5bf030ab1a56(detail.getInvoiceNo());
}
if (policeNoFlag) {
ekpUpdateParam.setFd_3bb431933ee968(success.getPolicyNo());
} else {
ekpUpdateParam.setFd_3bb431933ee968(detail.getPolicyNo());
}
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId());
ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:" + user.getNickname() + ";操作时间:" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + invoiceNoInfo + policeNoInfo);
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
} catch (Exception e) {
log.error("pushEkp error registeredInvoiceNo:", e.getMessage());
}
//设置发票号
detail.setInvoiceNo(success.getInvoiceNo());
detailList.add(detail);
}
}
}
......@@ -2520,7 +2700,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
if (LocalDateUtil.betweenDay(param.getPolicyStart(),param.getPolicyEnd()) > CommonConstants.ONE_YEAR){
if (DateUtil.getDateStr(DateUtil.stringToDate(param.getPolicyStart()),1).compareTo(param.getPolicyEnd().replaceAll("-","")) < CommonConstants.ZERO_INT) {
param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365);
listResult.add(param);
continue;
......@@ -3245,7 +3425,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
if (LocalDateUtil.betweenDay(param.getPolicyStart(),param.getPolicyEnd()) > CommonConstants.ONE_YEAR){
//日期比较
if (DateUtil.getDateStr(DateUtil.stringToDate(param.getPolicyStart()),1).compareTo(param.getPolicyEnd().replaceAll("-","")) < CommonConstants.ZERO_INT){
param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365);
listResult.add(param);
continue;
......@@ -3760,7 +3941,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EMPTY);
continue;
}
if (StringUtils.isBlank(param.getInvoiceNo())){
if (StringUtils.isBlank(param.getInvoiceNo()) || StringUtils.isBlank(param.getPolicyNo())){
param.setErrorMessage(InsurancesConstants.INVOICE_NO_EMPTY);
continue;
}
......@@ -4092,6 +4273,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return list;
}
/**
* 将集合交叉合并,list1 是第一个顺序 list2 是第二个顺序
*
* @author huyc
* @param list1
* @param list2
* @return {@link List<InsuranceExportListOneVO>}
*/
private List<InsuranceExportListOneVO> crossMergerOne (List<InsuranceExportListOneVO> list1, List<InsuranceExportListOneVO> list2){
//将list放入到链表队列
LinkedList<InsuranceExportListOneVO> st1 = new LinkedList<>(list1);
LinkedList<InsuranceExportListOneVO> st2 = new LinkedList<>(list2);
//计算较大的数组长度
int max = list1.size() > list2.size() ? list1.size() : list2.size();
//新建一个最终结果的list
List<InsuranceExportListOneVO> list = new ArrayList<>(list1.size() + list2.size());
for ( int i = 0; i < max;i++){
//如果队列没取完,继续取
if (!st1.isEmpty()){
list.add(st1.poll());
}
//如果队列没取完,继续取
if (!st2.isEmpty()){
list.add(st2.poll());
}
}
return list;
}
/***********************减员办理********************************/
/**
......@@ -7431,11 +7641,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
condition.setInsuranceProvinces(provinces);
condition.setInsuranceCitys(citys);
}
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())) {
return baseMapper.getInsuranceExpireWarnVoPage(page, condition, sdRes.getData().getListSelectVO());
IPage<TBusinessInsuranceVo> recordsPage = new Page<>();
int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize();
int limitEnd = (int)page.getSize();
condition.setLimitStart(limitStart);
condition.setLimitEnd(limitEnd);
recordsPage.setPages(page.getPages());
recordsPage.setSize(page.getSize());
recordsPage.setCurrent(page.getCurrent());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData()) && Common.isNotNull(sdRes.getData().getDeptIds())) {
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,sdRes.getData().getDeptIds()));
recordsPage.setRecords(baseMapper.pageDiy(condition, sdRes.getData().getDeptIds()));
}else {
return baseMapper.getInsuranceExpireWarnVoPage(page, condition, null);
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,null));
recordsPage.setRecords(baseMapper.pageDiy(condition, null));
}
return recordsPage;
}
@Override
......@@ -7661,10 +7883,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_1) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_1);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet(InsurancesConstants.INSURANCE_ALERT_EXPORT+index).build();
......@@ -7711,18 +7933,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) {
List<TSettleDomainSelectVo> listSelectVO =null;
listSelectVO = getExportCondition(searchVo, listSelectVO);
return baseMapper.noPageDiy(searchVo,listSelectVO);
List<String> domainIds = getExportCondition(searchVo);
return baseMapper.noPageDiy(searchVo,domainIds);
}
private int noPageCountDiy(InsuranceSearchVo searchVo) {
List<TSettleDomainSelectVo> listSelectVO =null;
listSelectVO = getExportCondition(searchVo, listSelectVO);
return baseMapper.noPageCountDiy(searchVo,listSelectVO);
List<String> domainIds = getExportCondition(searchVo);
return baseMapper.noPageCountDiy(searchVo,domainIds);
}
private List<TSettleDomainSelectVo> getExportCondition(InsuranceSearchVo searchVo, List<TSettleDomainSelectVo> listSelectVO) {
private List<String> getExportCondition(InsuranceSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
R<TSettleDomainListVo > sdRes = archivesDaprUtil.getPermissionByUserId(user.getId());
List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda()
......@@ -7742,15 +7962,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
searchVo.setCreateBy(SecurityUtils.getUser().getId());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())){
listSelectVO = sdRes.getData().getListSelectVO();
return sdRes.getData().getDeptIds();
}
return listSelectVO;
return null;
}
@Override
public R<Integer> getExpireInsuranceWarn() {
InsuranceSearchVo searchVo = new InsuranceSearchVo();
List<TSettleDomainSelectVo> listSelectVO =null;
listSelectVO = getExportCondition(searchVo, listSelectVO);
return R.ok(baseMapper.noPageCountDiy(searchVo,listSelectVO));
List<String> domainIds = getExportCondition(searchVo);
return R.ok(baseMapper.noPageCountDiy(searchVo,domainIds));
}
}
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: prd
redis:
host: 192.168.0.153
port: 22379
password: '@yf_2022'
datasource:
insurances:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
jdbc-url: jdbc:mysql://192.168.0.222:22306/mvp_insurances?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
ekp:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: hroread
password: 123456
jdbc-url: jdbc:mysql://192.168.0.103:3306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
ekp:
url: http://192.168.0.251:8080/api/sys-modeling/appModelRestService/addModel
fdModelId: '181d73279372e5a55438a47d7436ab7e'
fdFlowId: '18267f206233f29cbd3c5ee425c9408a'
docStatus: '20'
LoginName: 'admin'
docSubject : '接口发起流程'
\ No newline at end of file
......@@ -461,6 +461,101 @@
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<!--导出办理勾选查询结果-->
<select id="getInsuranceExportOneListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListOneVO">
select a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.BUY_HANDLE_STATUS as buyHandleStatus,
a.POST as post,
a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a.INSURANCE_CITY_NAME as insuranceCityName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.ACTUAL_PREMIUM as actualPremium,
a.SETTLE_MONTH as settleMonth,
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
ORDER BY a.CREATE_TIME DESC
</select>
<!--出办理非勾选查询结果-->
<select id="getInsuranceExportOnetList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListOneVO">
select a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.POST as post,
a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a.INSURANCE_CITY_NAME as insuranceCityName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.ACTUAL_PREMIUM as actualPremium,
a.SETTLE_MONTH as settleMonth,
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and a.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyType != null">
and a.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.updateBy != null and param.updateBy.trim() != ''">
and a.HANDLED_BY = #{param.updateBy}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
<if test="param.buyStandardMin != null">
AND a.BUY_STANDARD <![CDATA[ >= ]]> #{param.buyStandardMin}
</if>
<if test="param.buyStandardMax != null">
AND a.BUY_STANDARD <![CDATA[ <= ]]> #{param.buyStandardMax}
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<!--批量更新保单号-->
<update id="updatePolicyNoBatch">
<foreach collection="details" index="index" item="item" separator=";">
......@@ -1626,14 +1721,7 @@
</sql>
<sql id="expire_sql_where">
<where>
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.empName != null and param.empName.trim() != ''">
AND a.EMP_NAME like CONCAT('%' , #{param.empName},'%')
......@@ -1641,92 +1729,258 @@
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
AND a.EMP_IDCARD_NO like CONCAT('%' ,#{param.empIdcardNo},'%')
</if>
<if test="param.insuranceCityName != null and param.insuranceCityName.trim() != ''">
AND a.INSURANCE_CITY_NAME like CONCAT(#{param.insuranceCityName},'%')
</if>
<if test="param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''">
AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%')
</if>
<if test="param.idList != null and param.idList.size() > 0">
and a.id in
<foreach collection="param.idList" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
<if test="param.insuranceProvinces != null and param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
and a.INSURANCE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</where>
</sql>
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from
(select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
</if>
<if test="param.insuranceCitys != null and param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
and a.INSURANCE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
</if>
<if test="param.insuranceCitys != null and param.insuranceProvinces != null">
<if test="param.insuranceCitys.size() > 0 and param.insuranceProvinces.size() > 0">
and (
a.INSURANCE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
or a.INSURANCE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
)
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<include refid="expire_sql_where"/>
) a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
</select>
<select id="pageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
AND (a.CREATE_BY = #{param.createBy}
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.SETTLEMENT_ORGAN in
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</where>
</sql>
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>
from t_insurance_detail a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
</if>
) a
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
</select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>
from t_insurance_detail a
<if test="param != null and param.limitStart != null">
limit #{param.limitStart},#{param.limitEnd}
</if>
) a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
</select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null">
limit #{param.limitStart},#{param.limitEnd}
</if>
)a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
group by a.id
</select>
<select id="noPageCountDiy" resultType="java.lang.Integer">
select
count(1)
from t_insurance_detail a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<!--LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id-->
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
</select>
<update id="batchexpireIgnore">
<if test="idList != null and idList.size() > 0">
......@@ -1739,4 +1993,12 @@
</foreach>
</if>
</update>
<select id="selectPushList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT
*
FROM
t_insurance_detail
WHERE ERROR_STATUS = '1'
</select>
</mapper>
......@@ -46,4 +46,17 @@ public class UpdateOverdueTask {
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/updateSettleStatus","", Void.class, SecurityConstants.FROM_IN);
log.info("------------重新更新结算状态同步失败的数据-定时任务结束------------");
}
/**
* 更新商险到期定时任务
*
* @author licancan
* @param
* @return void
*/
public void pushInsEkp() throws Exception {
log.info("-------------推送商险待结算数据-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/pushActualPremium","", Void.class, SecurityConstants.FROM_IN);
log.info("------------推送商险待结算数据-定时任务结束------------");
}
}
# 数据源配置
spring:
redis:
host: 192.168.0.153
port: 22379
password: '@yf_2022'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.0.222:22306/yifu_job?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
config:
activate:
on-profile: prd
......@@ -6,9 +6,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-mail</artifactId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<relativePath/>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>yifu-mail-api</artifactId>
......
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: prd
redis:
host: 192.168.0.153
port: 22379
password: '@yf_2022'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.0.222:22306/mvp_order?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
......@@ -8,6 +8,7 @@
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<relativePath/>
</parent>
<artifactId>yifu-salary-api</artifactId>
......
......@@ -130,4 +130,13 @@ public class TConfigSalary extends BaseEntity implements Serializable {
@ExcelProperty(value="发放方式(0:现金;1:转账)")
private Integer grantType;
/**
* 收入月份
*/
@NotNull(message = "收入月份不能为空")
@ExcelAttribute(name = "收入月份", isNotEmpty = true,errorInfo = "收入月份不能为空" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value="收入月份")
private Integer incomeMonth;
}
......@@ -445,6 +445,13 @@ public class TSalaryStandard extends BaseEntity {
@Schema(description = "是否差额单")
private String isDiff;
/**
* 收入月份
* 2023-4-7 09:31:39 hgw新增
*/
@Schema(description = "收入月份")
private String incomeMonth;
/**
* 工资月份-起
*/
......
......@@ -67,10 +67,9 @@ public class TSalaryStandardIssueRes implements Serializable {
@Schema(description = "薪资主表id")
private String salaryId;
/**
* money
* money 2023-4-4 11:11:56 hgw 去掉了金额限制,mvp1.5.3版本
*/
@ExcelAttribute(name = "money", isNotEmpty = true, errorInfo = "money不能为空")
@NotBlank(message = "money不能为空")
@ExcelAttribute(name = "money")
@ExcelProperty("money")
@Schema(description = "money")
private BigDecimal money;
......
......@@ -106,4 +106,15 @@ public class TSalaryAccountExportVo {
private BigDecimal costReduction;
@ExcelProperty("表单上传人")
private String createName;
@ExcelProperty("个人代扣明细")
private String pdeductionDetail;
@ExcelProperty("个人代扣金额")
private String pdeductionMoney;
/**
* 支出信息结算状态 0 已结算 1 结算中 2 未结算
*/
@ExcelProperty("支出结算状态")
private String paySettleFlag;
}
......@@ -396,5 +396,20 @@ public class TSalaryAccountController {
wp.setSalary(salary.divide(new BigDecimal(realMonthCount), SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP));
return wp;
}
/**
* 报账跨年查询导出
* @author hgw
* @date 2023-3-30 15:36:00
**/
@Operation(description = "报账跨年查询导出 hasPermission('account_all_year_export')")
@PostMapping("/allYearExport")
@PreAuthorize("@pms.hasPermission('account_all_year_export')")
public R<List<TSalaryAccount>> allYearExport(@RequestBody TSalaryAccountSearchVo tSalaryAccount) {
if (Common.isEmpty(tSalaryAccount.getEmpIdcard())) {
return R.failed("身份证不可为空!");
}
return R.ok(tSalaryAccountService.allYearExport(tSalaryAccount));
}
}
......@@ -184,4 +184,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
, @Param("emIdCard") String emIdCard, @Param("settleDepartId") String settleDepartId);
TSalaryAccountSumVo getAccountSumBySalaryId(@Param("salaryId") String salaryId);
/**
* @param tSalaryAccount
* @Description: 报账按身份证导出,可以导出2个报账年份表
* @Author: hgw
* @Date: 2023/3/31 15:14
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List<TSalaryAccount> allYearExport(@Param("tSalaryAccount") TSalaryAccountSearchVo tSalaryAccount);
}
......@@ -205,4 +205,6 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSumVo
**/
TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId);
List<TSalaryAccount> allYearExport(TSalaryAccountSearchVo tSalaryAccount);
}
......@@ -199,9 +199,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (Common.isEmpty(res.getIssueId())) {
return R.failed("代发户配置id不可为空");
}
if (Common.isEmpty(res.getMoney())) {
return R.failed("代发户金额不可为空");
}
if (Common.isEmpty(res.getBankName())) {
return R.failed("代发户开户行不可为空");
}
......@@ -228,11 +225,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// return R.ok(saList)
//薪资导入
if (CommonConstants.ZERO_STRING.equals(salaryType)) {
return this.saveAndSubmit(saList, vo, dept);
return this.saveAndSubmit(configSalary, saList, vo, dept);
}
//劳务费和稿酬导入
if (CommonConstants.THREE_STRING.equals(salaryType) || CommonConstants.FOUR_STRING.equals(salaryType)) {
return this.saveLaborSubmit(saList, dept, salaryType, orderId);
return this.saveLaborSubmit(configSalary, saList, dept, salaryType, orderId);
}
} else {
return R.failed("导入数据不可为空");
......@@ -256,8 +253,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/26 9:44
* @return: com.yifu.cloud.v1.hrms.api.entity.TSalaryStandard
**/
public R<TSalaryStandard> saveNewTSalary(TSalaryAccountVo sav, TSettleDomainSelectVo dept, YifuUser user
, LocalDateTime nowTime, String invoiceTitle) {
public R<TSalaryStandard> saveNewTSalary(TConfigSalary configSalary, TSalaryAccountVo sav, TSettleDomainSelectVo dept
, YifuUser user, LocalDateTime nowTime, String invoiceTitle) {
TSalaryStandard s = null;
if (sav != null) {
if (null == user || null == user.getId()) {
......@@ -296,6 +293,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//s.setSettlementAmount()
s.setStatus(SalaryConstants.AUDIT_STATUS[0]);
s.setBpoFlag(dept.getBpoFlag());
if (configSalary != null && Common.isNotNull(configSalary.getIncomeMonth())) {
s.setIncomeMonth(DateUtil.addMonth(configSalary.getIncomeMonth()));
} else {
s.setIncomeMonth(sav.getSalaryMonth());
}
}
return new R<>(s);
}
......@@ -307,7 +309,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/20 17:05
* @return: com.yifu.cloud.v1.common.core.util.R
**/
private R saveAndSubmit(List<TSalaryAccountVo> savList, SalaryUploadParamVo vo, TSettleDomainSelectVo dept) {
private R saveAndSubmit(TConfigSalary configSalary, List<TSalaryAccountVo> savList, SalaryUploadParamVo vo, TSettleDomainSelectVo dept) {
if (Common.isNotNull(savList) && !savList.isEmpty()) {
String orderId = vo.getOrderId();
// 代发户
......@@ -327,7 +329,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now();
TSalaryStandard salary;
//工资主表
R<TSalaryStandard> sr = this.saveNewTSalary(salaryAccountVo, dept, user, nowTime, invoiceTitle); //工资主表
R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle); //工资主表
if (sr == null || sr.getCode() == CommonConstants.FAIL) {
return sr;
} else {
......@@ -1431,7 +1433,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2022/8/16
* @return: com.yifu.cloud.v1.common.core.util.R
**/
public R saveLaborSubmit(List<TSalaryAccountVo> savList, TSettleDomainSelectVo dept, String salaryType, String orderId) {
public R saveLaborSubmit(TConfigSalary configSalary, List<TSalaryAccountVo> savList, TSettleDomainSelectVo dept, String salaryType, String orderId) {
if (Common.isNotNull(savList) && !savList.isEmpty()) {
TSalaryAccountVo salaryAccountVo = savList.get(0);
List<TSalaryAccountItem> saiList = null; //报账明细List
......@@ -1440,7 +1442,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now();
//工资主表
String invoiceTitle = dept.getBusinessSubjectName();
R<TSalaryStandard> sr = this.saveNewTSalary(salaryAccountVo, dept, user, nowTime, invoiceTitle);
R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle);
if (sr == null || sr.getCode() == CommonConstants.FAIL) {
return sr;
......
......@@ -379,4 +379,9 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
public TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId) {
return baseMapper.getAccountSumBySalaryId(salaryId);
}
@Override
public List<TSalaryAccount> allYearExport(TSalaryAccountSearchVo tSalaryAccount) {
return baseMapper.allYearExport(tSalaryAccount);
}
}
......@@ -541,7 +541,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
fd3b71f20933e0d2.add("");
}
fd3b745c35ff27a8.add(res.getBankName());
fd3b73a736cc9cc8.add(String.valueOf(res.getMoney()));
if (Common.isNotNull(res.getMoney())) {
fd3b73a736cc9cc8.add(String.valueOf(res.getMoney()));
} else {
fd3b73a736cc9cc8.add("");
}
}
sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f207c0cfd0", fd3b71f207c0cfd0);
sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f20883301a", fd3b71f20883301a);
......
......@@ -118,7 +118,7 @@ public class DoJointSalaryAsyncTask {
private R<String> getIncomeDetailMap(TSalaryStandard tSalaryStandard, TSettleDomainSelectVo dept, List<String> idCardList, Map<String, Integer> detailMap) {
TIncomeDetail detail = new TIncomeDetail();
detail.setApplyNo(tSalaryStandard.getApplyNo());
detail.setPayMonth(tSalaryStandard.getSalaryMonth());
detail.setPayMonth(tSalaryStandard.getIncomeMonth());
detail.setIdCardList(idCardList);
detail.setDeptId(dept.getId());
R<TIncomeDetailReturnVo> detailR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
......@@ -175,14 +175,14 @@ public class DoJointSalaryAsyncTask {
if (Common.isEmpty(value) || value == 0) {
detail = new TIncomeDetail();
detail.setRedisKey(redisKey);
detail.setPayMonth(account.getSalaryMonth());
detail.setPayMonth(tSalaryStandard.getIncomeMonth());
detail.setDeptId(account.getDeptId());
detail.setDeptName(account.getDeptName());
detail.setDeptNo(account.getDeptNo());
detail.setUnitId(tSalaryStandard.getUnitId());
detail.setUnitName(tSalaryStandard.getUnitName());
detail.setUnitNo(tSalaryStandard.getUnitNo());
detail.setCreateMonth(account.getSalaryMonth());
detail.setCreateMonth(tSalaryStandard.getSettlementMonth());
detail.setEmpIdcard(account.getEmpIdcard());
detail.setEmpName(account.getEmpName());
detail.setFeeMode(dept.getManagementType());
......
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: prd
redis:
host: 192.168.0.153
port: 22379
password: '@yf_2022'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.0.222:22306/mvp_salary?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 20 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 100 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
......@@ -97,8 +97,8 @@
<result property="sumPrivatePension" column="SUM_PRIVATE_PENSION"/>
<result property="incomeSettleFlag" column="INCOME_SETTLE_FLAG"/>
<result property="incomeCollectFlag" column="INCOME_COLLECT_FLAG"/>
<result property="paySettleFlag" column="PAY_COLLECT_FLAG"/>
<result property="payCollectFlag" column="PAY_SETTLE_FLAG"/>
<result property="paySettleFlag" column="PAY_SETTLE_FLAG"/>
<result property="payCollectFlag" column="PAY_COLLECT_FLAG"/>
<result property="isDiff" column="IS_DIFF"/>
</resultMap>
......@@ -280,7 +280,8 @@
a.SUM_CONTINUING_EDUCATION_MONEY,
a.SUM_BABY_MONEY,
a.SUM_PRIVATE_PENSION,
a.IS_DIFF
a.IS_DIFF,
a.PAY_SETTLE_FLAG
</sql>
<sql id="tSalaryAccount_where">
......@@ -802,16 +803,20 @@
a.SUM_PRIVATE_PENSION as sumPrivatePension,
a.SUM_SUPPORT_ELDERLY_MONEY as sumSupportElderlyMoney,
a.COST_REDUCTION as costReduction,
a.CREATE_NAME as createName
a.CREATE_NAME as createName,
GROUP_CONCAT(pdeduction.CN_NAME,':',pdeduction.SALARY_MONEY,';') pdeductionDetail,
sum(ifnull(pdeduction.SALARY_MONEY,0)) pdeductionMoney,
if(a.PAY_SETTLE_FLAG = '0','已结算',if(a.PAY_SETTLE_FLAG = '1','结算中',if(a.PAY_SETTLE_FLAG = '2','未结算','-'))) paySettleFlag
from
t_salary_account a
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
left join t_salary_account_item pdeduction on pdeduction.SALARY_ACCOUNT_ID = a.id and pdeduction.JAVA_FIED_NAME='pdeduction'
<where>
a.DELETE_FLAG = 0
<include refid="where_export"/>
ORDER BY a.CREATE_TIME desc
GROUP BY a.id ORDER BY a.CREATE_TIME desc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
......@@ -1180,4 +1185,36 @@
left join t_salary_account_item enterpriseAnnuityUnit on enterpriseAnnuityUnit.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuityUnit.JAVA_FIED_NAME='enterpriseAnnuityUnit'
where a.DELETE_FLAG='0' and a.SALARY_FORM_ID = #{salaryId}
</select>
<!-- 根据idList获取报账信息 -->
<select id="allYearExport" resultMap="tSalaryAccountMap">
select * from (
select
a.id,a.DEPT_NAME,a.DEPT_NO,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.BANK_NO
,a.BANK_NAME,a.BANK_PROVINCE,a.BANK_CITY,a.BANK_SUB_NAME,a.FORM_TYPE
,a.SALARY_MONTH,a.SETTLEMENT_MONTH,if(a.FORM_TYPE='3',a.RELAY_SALARY_UNIT,a.RELAY_SALARY) RELAY_SALARY
,a.ACTUAL_SALARY,ifnull(SALARY_TAX_UNIT,0) + ifnull(a.SALARY_TAX,0) SALARY_TAX
FROM
t_salary_account a
where a.DELETE_FLAG = 0 AND a.EMP_IDCARD = #{tSalaryAccount.empIdcard}
union all
select
a.id,a.DEPT_NAME,a.DEPT_NO,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.BANK_NO
,a.BANK_NAME,a.BANK_PROVINCE,a.BANK_CITY,a.BANK_SUB_NAME,a.FORM_TYPE
,a.SALARY_MONTH,a.SETTLEMENT_MONTH,relaySalary.SALARY_MONEY RELAY_SALARY
,actualSalarySum.SALARY_MONEY ACTUAL_SALARY,salaryTax.SALARY_MONEY SALARY_TAX
FROM
t_salary_account_hro_2021 a
left join t_salary_account_item_hro_2021 relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
left join t_salary_account_item_hro_2021 actualSalarySum on actualSalarySum.SALARY_ACCOUNT_ID = a.id and actualSalarySum.JAVA_FIED_NAME='actualSalarySum'
left join t_salary_account_item_hro_2021 salaryTax on salaryTax.SALARY_ACCOUNT_ID = a.id and salaryTax.JAVA_FIED_NAME='salaryTax'
where a.DELETE_FLAG = 0 AND a.EMP_IDCARD = #{tSalaryAccount.empIdcard}
) a
where 1=1
<include refid="tSalaryAccount_where"/>
order by a.SALARY_MONTH desc
</select>
</mapper>
......@@ -80,6 +80,7 @@
<result property="incomeEndTime" column="INCOME_END_TIME"/>
<result property="issueStatus" column="ISSUE_STATUS"/>
<result property="isDiff" column="IS_DIFF"/>
<result property="incomeMonth" column="INCOME_MONTH"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -137,7 +138,8 @@
a.INCOME_START_TIME,
a.INCOME_END_TIME,
a.ISSUE_STATUS,
a.IS_DIFF
a.IS_DIFF,
a.INCOME_MONTH
</sql>
<sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null">
......
......@@ -20,6 +20,7 @@ import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -63,6 +64,15 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("派单申请编码" )
private String dispatchCode;
/**
* 重新派单号
*/
@ExcelAttribute(name = "重新派单号", maxLength = 30)
@Schema(description = "重新派单号" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("重新派单号" )
private String againDispatchCode;
/**
* 员工ID
*/
......@@ -697,4 +707,12 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("订单ID" )
private String orderId;
/**
* 原派单ID
* 2023-4-11 14:37:17
* hgw增加
*/
@TableField(exist = false)
private String pid;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author huyc
* @Date 2023/4/10
* @Description
* @Version 1.0
*/
@Data
public class DispatchOneDetailVo implements Serializable {
/**
* 派单
**/
private TDispatchInfo dispatch;
/**
* 社保公积金查询
**/
private TSocialFundInfo social;
}
......@@ -4,12 +4,15 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* @Author fxj
......@@ -171,6 +174,27 @@ public class FundHandleExportVo implements Serializable {
@ExcelProperty("委托备注" )
private String fundTrustRemark;
/**
* 离职日期
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "离职日期", isDate = true)
@Schema(description = "离职日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职日期" )
private Date leaveDate;
/**
* 离职原因
*/
@Length(max = 32, message = "离职原因 不能超过32个字符" )
@ExcelAttribute(name = "离职原因", maxLength = 32,isNotEmpty = true, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "离职原因" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职原因" )
private String reduceReason;
/*******************************导出字段结束*************************************************/
}
......@@ -194,7 +194,7 @@ public class SocialHandleExportVo implements Serializable {
@Schema(description = "合同年限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同年限" )
private Double contractTerm;
private String contractTerm;
/**
* 合同起始时间
*/
......
......@@ -110,4 +110,21 @@ public class TDispatchReduceVo extends RowIndex implements Serializable {
@ExcelProperty("委托备注" )
private String trustRemark;
/**
* 是否是失败项重新派单 0 是
*/
@ExcelAttribute(name = "是否是失败项重新派单")
@Schema(description = "是否是失败项重新派单" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否是失败项重新派单" )
private String isAgainFlag;
/**
* 重新派单的ID
*/
@ExcelAttribute(name = "重新派单的ID")
@Schema(description = "重新派单的ID" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("重新派单的ID" )
private String isAgainId;
}
/*
* 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.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2023-04-10 11:38:05
*/
@Data
public class TSocialFundInfoOneVo {
/**
* id
*/
@Schema(description = "id" )
private String id;
/**
* 员工身份证
*/
@Schema(description = "身份证号" )
private String empIdcard;
}
......@@ -31,7 +31,9 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFundInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchOneDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoOneVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -86,6 +88,17 @@ public class TSocialFundInfoController {
return R.ok(tSocialFundInfoService.noPageDiy(tSocialFundInfo));
}
/**
* 重新派单明细查询
* @param tSocialFundInfo 社保公积金查询表
* @return
*/
@Operation(summary = "重新派单明细查询", description = "重新派单明细查询")
@PostMapping("/dispatchAgainInfo" )
public R<DispatchOneDetailVo> getTSocialFundInfoOne(@RequestBody TSocialFundInfoOneVo tSocialFundInfo) {
return R.ok(tSocialFundInfoService.getTSocialFundInfoOne(tSocialFundInfo));
}
/**
* 通过id查询社保公积金查询表
* @param id id
......
......@@ -24,7 +24,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchOneDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoOneVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import javax.servlet.http.HttpServletResponse;
......@@ -64,6 +66,8 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
List<TSocialFundInfo> noPageDiy(TSocialFundInfoSearchVo searchVo);
DispatchOneDetailVo getTSocialFundInfoOne(TSocialFundInfoOneVo searchVo);
/**
* @param id
* @Description: 社保公积金查询的详情
......
......@@ -40,7 +40,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
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.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
......@@ -573,7 +575,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 新增派单信息
excel.setOrderId(orderId);
initDispatchAddInfo(user, dispatchMap, empVo, socialSet, fundSet, excel,socialFund,injury);
if (initDispatchAddInfo(user, dispatchMap, empVo, socialSet, fundSet, excel,socialFund,injury)){
excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard());
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ITEM_EMPTY_EXISTS)));
continue;
}
if (Common.isNotNull(dispatchMap.get(excel.getEmpIdcard())) && "公积金".equals(dispatchMap.get(excel.getEmpIdcard()).getDispatchItem())){
socialsMap.remove(excel.getEmpIdcard());
excel.setSocialHousehold(null);
}
// 变更社保公积金查询
initSocialFundAddInfo(socialFundAddMap, empVo, socialSet, fundSet, setInfoVo, socialFund, excel);
}
......@@ -686,6 +696,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(social)){
dispatch.setSocialId(social.getId());
dispatch.setSocialHouseholdName(social.getSocialHouseholdName());
dispatch.setFirstBuyMonthSocial(getFirstBuyMonthSocial(social));
}
if (Common.isNotNull(fund)){
dispatch.setFundId(fund.getId());
......@@ -697,12 +708,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(project)){
dispatch.setEmpNo(project.getEmpNo());
}
insertDispatch(emp, dispatch);
// 新增派单申请提交记录
auditInfo = new TAuditInfo();
addAuditInfo(dispatch, auditInfo);
}
dispatch.setFirstBuyMonthSocial(getFirstBuyMonthSocial(social));
insertDispatch(emp, dispatch);
// 新增派单申请提交记录
auditInfo = new TAuditInfo();
addAuditInfo(dispatch, auditInfo);
}
// 插入或更新社保公积金查询信息 大病在封装社保的时候已经算了 大病技术和金额了
if (Common.isNotNull(socialFundAddMap)){
......@@ -819,6 +829,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
dispatch.setCreateTime(LocalDateTime.now());
baseMapper.insert(dispatch);
if (Common.isNotNull(dispatch.getPid())) {
TDispatchInfo old = new TDispatchInfo();
old.setId(dispatch.getPid());
old.setAgainDispatchCode(dispatch.getApplyNo());
baseMapper.updateById(old);
}
}
}
......@@ -1177,7 +1193,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
int num = 3 - nowNums.length();
return zeroArr[num] + nowNums;
}
private void initDispatchAddInfo(YifuUser user,
private boolean initDispatchAddInfo(YifuUser user,
Map<String, TDispatchInfo> dispatchMap,
DispatchEmpVo empVo,
SysBaseSetInfo socialSet,
......@@ -1189,6 +1205,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 初始化派单项
dispatch.setOrderId(excel.getOrderId());
initAddHandleItem(excel, socialFund,dispatch,socialSet,injury);
if (Common.isEmpty(dispatch.getDispatchItem())){
return true;
}
dispatch.setOrganName(user.getDeptName());
dispatch.setCreateBy(user.getId());
dispatch.setCreateTime(LocalDateTime.now());
......@@ -1208,7 +1227,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setSettleDomainName(excel.getDepartName());
dispatch.setSettleDomainCode(excel.getSettleDomainCode());
dispatch.setSettleDomain(excel.getSettleDomainId());
if (Common.isNotNull(excel.getSocialHousehold())){
if (Common.isNotNull(excel.getSocialHousehold()) && !"公积金".equals(dispatch.getDispatchItem())){
dispatch.setSocialHandleStatus(CommonConstants.ZERO_STRING);
}
if (Common.isNotNull(excel.getProvidentHousehold())){
......@@ -1278,7 +1297,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 生成申请编码
dispatch.setApplyNo(getApplyCode());
dispatch.setPid(excel.getDispatchId());
dispatchMap.put(excel.getEmpIdcard(),dispatch);
return false;
}
private void initAddHandleItem(TDispatchImportVo excel, TSocialFundInfo socialFund, TDispatchInfo dispatch, SysBaseSetInfo socialSet, boolean injury) {
......@@ -1955,6 +1976,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
contract.setSettleDomain(setInfoVo.getId());
contract.setDeptNo(setInfoVo.getDepartNo());
contract.setCustomerId(setInfoVo.getCustomerId());
contract.setUnitNo(setInfoVo.getCustomerCode());
contract.setSubjectUnit(setInfoVo.getCustomerName());
contract.setSubjectDepart(setInfoVo.getDepartName());
contract.setEmpNatrue(excel.getEmpType());
......@@ -2719,9 +2741,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard());
// 初始化派单 和 社保公积金查询信息
dispatch = getDispatchInfo(empVo, excel, socialFund,setInfoVo,user);
if (Common.isEmpty(dispatch.getDispatchItem())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ITEM_EMPTY_EXISTS)));
continue;
}
try {
dispatch.setOrderId(orderId);
dispatch.setApplyNo(getApplyCode());
if (CommonConstants.ZERO_STRING.equals(excel.getIsAgainFlag())) {
TDispatchInfo dispatchInfo = baseMapper.selectById(excel.getIsAgainId());
dispatchInfo.setAgainDispatchCode(dispatch.getApplyNo());
baseMapper.updateById(dispatchInfo);
}
dispatch.setStatus(CommonConstants.ONE_STRING);
baseMapper.insert(dispatch);
socialFundMapper.updateById(socialFund);
......@@ -3364,34 +3395,49 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override
public R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus,
String handleRemark, String socialType, String remark) {
YifuUser user = SecurityUtils.getUser();
if (null == user) {
return R.failed(CommonConstants.USER_FAIL);
}
if (Common.isEmpty(ids)) {
return R.failed(DispatchConstants.DISPATCH_ID_NOT_EMPTY);
}
int flag;
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
//办理成功
flag = CommonConstants.ZERO_INT;
} else if (CommonConstants.TWO_STRING.equals(handleStatus)) {
//办理失败
flag = CommonConstants.ONE_INT;
} else {
return R.failed("派单办理状态参数异常:0待办理 1办理通过 2办理不通过");
}
String key = CacheConstants.PAYMENT_DISPATCH_BATCH_IMPORT + CommonConstants.DOWN_LINE_STRING +user.getId() ;
// 获取redis分布式事务锁
String requestId;
try {
YifuUser user = SecurityUtils.getUser();
if (null == user) {
return R.failed(CommonConstants.USER_FAIL);
}
if (Common.isEmpty(ids)) {
return R.failed(DispatchConstants.DISPATCH_ID_NOT_EMPTY);
}
int flag;
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
//办理成功
flag = CommonConstants.ZERO_INT;
} else if (CommonConstants.TWO_STRING.equals(handleStatus)) {
//办理失败
flag = CommonConstants.ONE_INT;
} else {
return R.failed("派单办理状态参数异常:0待办理 1办理通过 2办理不通过");
}
List<ErrorMessage> errorInfo = addBatchApplyHandle(ids, typeSub, user, flag, handleStatus,
Common.isNullToString(handleRemark), socialType,remark);
if (errorInfo == null || errorInfo.isEmpty()) {
return R.ok(null,"办理成功!");
} else {
return R.ok(errorInfo,"派单办理结果:");
}
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
log.error(DispatchConstants.DISPATCH_EXCEPTION + e.getMessage());
return R.failed("数据异常,办理失败!");
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
if (Common.isNotNull(requestId)) {
try {
List<ErrorMessage> errorInfo = addBatchApplyHandle(ids, typeSub, user, flag, handleStatus,
Common.isNullToString(handleRemark), socialType, remark);
if (errorInfo == null || errorInfo.isEmpty()) {
return R.ok(null, "办理成功!");
} else {
return R.ok(errorInfo, "派单办理结果:");
}
} catch (Exception e) {
log.error(DispatchConstants.DISPATCH_EXCEPTION + e.getMessage());
return R.failed("数据异常,办理失败!");
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}
......@@ -4046,6 +4092,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialStatus(CommonConstants.ELEVEN_STRING);
sf.setSocialReduceStatus(CommonConstants.FIVE_STRING);
}
// 有部分办理失败的多次派单 优化,存在办理失败的 更新为 部分办理失败
if (CommonConstants.EIGHT_STRING.equals(sf.getSocialStatus()) &&
(CommonConstants.FOUR_STRING.equals(sf.getPensionHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getBirthHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle()))){
sf.setSocialStatus(CommonConstants.TWELVE_STRING);
sf.setSocialReduceStatus(CommonConstants.SIX_STRING);
sf.setSocialReduceDate(null);
}
if (CommonConstants.NINE_STRING.equals(sf.getSocialStatus()) &&
(CommonConstants.THREE_STRING.equals(sf.getPensionHandle())
|| CommonConstants.THREE_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.THREE_STRING.equals(sf.getUnemployHandle())
|| CommonConstants.THREE_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.THREE_STRING.equals(sf.getBirthHandle())
|| CommonConstants.THREE_STRING.equals(sf.getBigailmentHandle()))){
sf.setSocialStatus(CommonConstants.TWELVE_STRING);
sf.setSocialReduceStatus(CommonConstants.SIX_STRING);
}
}
// 2.派增处理 socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病)
if (CommonConstants.ZERO_STRING.equals(dis.getType()) && Common.isNotNull(dis.getSocialId())){
......@@ -4151,6 +4219,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
)
|| Common.isEmpty(socialInfo.getBigailmentHandle()))
){
if (partHandleStatus(socialInfo, sf, dis)) return;
if (CommonConstants.TWO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getBirthHandle())
......@@ -4194,6 +4263,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness()))
|| Common.isEmpty(socialInfo.getBigailmentHandle()))
){
// 针对增增减的情况 直接派减完成第二次派增后 无法继续办理第一次派单项的情况优化 2023-04-07 fxj
if (partHandleStatus(socialInfo, sf, dis)) return;
socialInfo.setHandleStatus(CommonConstants.THREE_STRING);
sf.setSocialStatus(CommonConstants.EIGHT_STRING);
sf.setSocialReduceStatus(CommonConstants.TWO_STRING);
......@@ -4238,6 +4309,26 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dis.setSocialHandleStatus(CommonConstants.THREE_STRING);
}
private boolean partHandleStatus(TSocialInfo socialInfo, TSocialFundInfo sf, TDispatchInfo dis) {
// 针对增增减的情况 直接派减完成第二次派增后 无法继续办理第一次派单项的情况优化 2023-04-07 fxj
if (CommonConstants.FIVE_STRING.equals(sf.getPensionHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getUnemployHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getBirthHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getBigailmentHandle())
) {
//办理中
socialInfo.setHandleStatus(CommonConstants.SIX_STRING);
sf.setSocialStatus(CommonConstants.ELEVEN_STRING);
sf.setSocialReduceStatus(CommonConstants.FIVE_STRING);
socialInfo.setReduceCan(CommonConstants.ONE_STRING);
dis.setSocialHandleStatus(CommonConstants.FOUR_STRING);
return true;
}
return false;
}
private void updateSocialByHandle(int flag, TSocialInfo socialInfo, TDispatchInfo dis, TSocialFundInfo sf) {
if (CommonConstants.ZERO_INT== flag
&& Common.isNotNull(dis.getSocialId())
......
......@@ -371,7 +371,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
error.setNums(entry.getValue());
tSendEkpErrorService.save(error);
}
baseMapper.updateIncomeById(updateList);
if (Common.isNotNull(updateList)){
baseMapper.updateIncomeById(updateList);
}
}
/**
......
......@@ -42,10 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundHistoryVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -165,6 +162,22 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
return baseMapper.selectList(wrapper);
}
@Override
public DispatchOneDetailVo getTSocialFundInfoOne(TSocialFundInfoOneVo searchVo) {
if (Common.isNotNull(searchVo.getEmpIdcard()) && Common.isNotNull(searchVo.getId())) {
LambdaQueryWrapper<TSocialFundInfo> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TSocialFundInfo::getEmpIdcard, searchVo.getEmpIdcard());
wrapper.last(CommonConstants.LAST_ONE_SQL);
TSocialFundInfo socialFundInfo = baseMapper.selectOne(wrapper);
TDispatchInfo dispatchInfo = tDispatchInfoService.getById(searchVo.getId());
DispatchOneDetailVo detailVo = new DispatchOneDetailVo();
detailVo.setSocial(socialFundInfo);
detailVo.setDispatch(dispatchInfo);
return detailVo;
}
return null;
}
private List<TSocialFundInfoExportVo> export(TSocialFundInfoSearchVo searchVo) {
if (Common.isNotNull(searchVo.getIdList())) {
searchVo.setIdList(searchVo.getIdList());
......
spring:
shardingsphere:
datasource:
ds0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.0.222:22306/mvp_social?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: yf_zsk
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 20 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 100 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
names: ds0
rules:
sharding:
key-generators:
snowflake:
type: SNOWFLAKE
sharding-algorithms:
t-payment-inline:
props:
strategy: standard
algorithmClassName: com.yifu.cloud.plus.v1.yifu.social.config.OTAStrategyShardingAlgorithm
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.t_payment_info_20$->{17..23}
key-generate-strategy:
column: ID
key-generator-name: snowflake
table-strategy:
standard:
sharding-column: CREATE_TIME
sharding-algorithm-name: t-payment-inline
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: prd
redis:
host: 192.168.0.153
port: 22379
password: '@yf_2022'
\ No newline at end of file
......@@ -26,7 +26,7 @@ mybatis-plus:
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# spring security 配置
security:
......
......@@ -50,7 +50,7 @@
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="debug">
<root level="error">
<appender-ref ref="console"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
......
......@@ -85,6 +85,7 @@
<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
<result property="belongUnitName" column="BELONG_UNIT_NAME"/>
<result property="dispatchCode" column="DISPATCH_CODE"/>
<result property="againDispatchCode" column="AGAIN_DISPATCH_CODE"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="educationName" column="EDUCATION_NAME"/>
......@@ -280,6 +281,7 @@
a.SETTLE_DOMAIN_NAME,
a.BELONG_UNIT_NAME,
a.DISPATCH_CODE,
a.AGAIN_DISPATCH_CODE,
a.SETTLE_DOMAIN_CODE,
a.CONTRACT_SUB_NAME,
a.CONTRACT_ID,
......@@ -527,6 +529,9 @@
#{idStr}
</foreach>
</if>
<if test="tDispatchInfo.type != null and tDispatchInfo.type.trim() != ''">
AND a.TYPE = #{tDispatchInfo.type}
</if>
<if test="tDispatchInfo.empName != null and tDispatchInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{tDispatchInfo.empName},'%')
</if>
......@@ -946,6 +951,8 @@
<result property="fundTown" column="FUND_TOWN"/>
<result property="belongUnit" column="BELONG_UNIT_NAME"/>
<result property="fundTrustRemark" column="TRUST_REMARK"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
</resultMap>
<!--tDispatchInfo 社保花名册数据查询-->
......@@ -1062,7 +1069,9 @@
f.FUND_PROVINCE,
f.FUND_CITY,
f.FUND_TOWN,
a.TRUST_REMARK
a.TRUST_REMARK,
a.LEAVE_DATE,
a.REDUCE_REASON
<include refid="where_getFundRecord"/>
</select>
......
......@@ -326,6 +326,7 @@
a.UPDATE_TIME,
a.UPDATE_BY,
a.CREATE_NAME,
a.BPO_FLAG,
a.CREATE_TIME
</sql>
<sql id="tPaymentInfo_where">
......
......@@ -113,6 +113,9 @@ public class UserController {
if (Common.isNotNull(user)) {
userService.ldapLogin(username, password, user);
}
if (null == user){
throw new RuntimeException("未获取到用户:"+ username);
}
return userService.getUserInfo(user);
}
......@@ -193,7 +196,7 @@ public class UserController {
@PutMapping
@PreAuthorize("@pms.hasPermission('sys_user_edit')")
public R<Boolean> updateUser(@Valid @RequestBody UserDTO userDto) {
userDto.setType(CommonConstants.ZERO_STRING);
///userDto.setType(CommonConstants.ZERO_STRING); 2023-04-07 fxj 解决变更LDAP 用户的问题
return R.ok(userService.updateUser(userDto));
}
......
......@@ -187,7 +187,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
user.setPassword(ENCODER.encode(password));
}else {
// 登录失败,随机密码,保证用户密码不一致
user.setPassword(password+RandomUtil.getSix());
user = null;
//user.setPassword(password+RandomUtil.getSix());
throw new RuntimeException("LDAP登录失败:"+ username);
}
} catch (Exception e) {
log.error("LDAP登录异常",e);
......
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: prd
redis:
host: 192.168.0.153
port: 22379
password: '@yf_2022'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.0.222:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 20 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 100 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
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