Commit a534c9cb authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop'

# Conflicts:
#	k8s-bash/allBuild.sh
#	yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckMobileServiceImpl.java
parents 187b277e 355fd612
......@@ -29,4 +29,7 @@ sh build-test.sh
#社保服务
cd $thisPath"/yifu-social/yifu-social-biz"
sh build-test.sh
#大批量导入导出服务
cd $thisPath"/yifu-batch/yifu-batch-biz"
sh build-test.sh
......@@ -23,6 +23,9 @@ sh build-test.sh
#社保服务
cd $thisPath"/yifu-social/yifu-social-biz"
sh build-test.sh
#大批量导入导出服务
cd $thisPath"/yifu-batch/yifu-batch-biz"
sh build-test.sh
#B端服务
#cd $thisPath"/yifu-business/yifu-business-biz"
#sh build-test.sh
......
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-batch # 资源的名字,在同一个namespace中必须唯一
namespace: qas-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-batch
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
# rollingUpdate: # 滚动更新
# maxSurge: 30% # 最大额外可以存在的副本数,可以为百分比,也可以为整数
# maxUnavailable: 30% # 示在更新过程中能够进入不可用状态的 Pod 的最大值,可以为百分比,也可以为整数
# type: RollingUpdate # 滚动更新策略
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-batch
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-batch" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5008" #这个参数告诉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/app-max-request-size: "600" # 明确指定应用请求大小
dapr.io/http-max-request-size: "600" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "4096" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
spec: # 资源规范字段
nodeSelector: # node 选择器
node-type: worker # node标签
kubernetes.io/hostname: yfmaster1
containers: # 容器
- name: yifu-batch # 容器的名字
#image: 192.168.1.110:5500/qas-mvp/yifu-batch-biz:1.0.0 # 容器镜像地址
image: hub.worfu.com/qas-mvp/yifu-batch-biz:1.0.0 #临时地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 5008 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: test
- 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-batch # 资源的名字,在同一个namespace中必须唯一
name: yifu-batch # 资源的名字,在同一个namespace中必须唯一
namespace: qas-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 5008 # service 端口
protocol: TCP # 协议
targetPort: 5008 # 容器暴露的端口
name: http-batch # 端口名称
- port: 3500 # service 端口
protocol: TCP # 协议
targetPort: 3500 # 容器暴露的端口
name: http-batch-dapr
selector: # 选择器
app: yifu-batch # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
......@@ -10,11 +10,11 @@ spec: # 资源规范字段
- port: 5088 # service 端口
protocol: TCP # 协议
targetPort: 5088 # 容器暴露的端口
name: http-ekp # 端口名称
name: http-csp # 端口名称
- port: 3500 # service 端口
protocol: TCP # 协议
targetPort: 3500 # 容器暴露的端口
name: http-ekp-dapr
name: http-csp-dapr
selector: # 选择器
app: yifu-ekp # 资源名称
app: yifu-csp # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
......@@ -49,4 +49,7 @@ sh build-prd.sh
cd $thisPath"/yifu-csp/yifu-csp-biz"
sh build-prd.sh
#大批量导入导出服务
cd $thisPath"/yifu-batch/yifu-batch-biz"
sh build-prd.sh
......@@ -23,4 +23,7 @@ sh build-prd.sh
#社保服务
cd $thisPath"/yifu-social/yifu-social-biz"
sh build-prd.sh
#大批量导入导出服务
cd $thisPath"/yifu-batch/yifu-batch-biz"
sh build-prd.sh
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-batch # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-batch
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
# rollingUpdate: # 滚动更新
# maxSurge: 30% # 最大额外可以存在的副本数,可以为百分比,也可以为整数
# maxUnavailable: 30% # 示在更新过程中能够进入不可用状态的 Pod 的最大值,可以为百分比,也可以为整数
# type: RollingUpdate # 滚动更新策略
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-batch
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-batch" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5008" #这个参数告诉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/app-max-request-size: "600" # 明确指定应用请求大小
dapr.io/http-max-request-size: "600" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "4096" #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-batch # 容器的名字
#image: 192.168.1.110:5500/prd-mvp/yifu-batch-biz:1.0.0 # 容器镜像地址
image: hub.worfu.com/prd-mvp/yifu-batch-biz:1.0.0 #临时地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 5008 # 容器端口
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-batch # 资源的名字,在同一个namespace中必须唯一
name: yifu-batch # 资源的名字,在同一个namespace中必须唯一
namespace: prd-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 5008 # service 端口
protocol: TCP # 协议
targetPort: 5008 # 容器暴露的端口
name: http-batch # 端口名称
#- port: 4089 # service 端口
# protocol: TCP # 协议
# targetPort: 4089 # 容器暴露的端口
# name: http-batch-dapr
selector: # 选择器
app: yifu-batch # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
......@@ -116,6 +116,7 @@
<module>yifu-ekp</module>
<module>yifu-process</module>
<module>yifu-csp</module>
<module>yifu-batch</module>
</modules>
<dependencyManagement>
......
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TDispatchInfoPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TFundPreDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSocialPreDetailVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail;
......@@ -109,7 +107,7 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "商险是否已购买 0 是 1 否")
private String insuranceIsBuy;
@Schema(description = "商险是否已购买 0 是 1 否")
@Schema(description = "社保是否已购买 0 是 1 否")
private String socialIsBuy;
@Schema(description = "公积金是否已参保 0 是 1 否")
......@@ -177,4 +175,18 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "公积金是否可修改")
@TableField(exist = false)
private Boolean fundUpdateFlag;
/**
* 社保是否可修改 可修改 true 不可修改 false
*/
@Schema(description = "社保是否可修改")
@TableField(exist = false)
private Boolean socialUpdateFlag;
/**
* 合同是否可修改 可修改 true 不可修改 false
*/
@Schema(description = "合同是否可修改")
@TableField(exist = false)
private Boolean contractUpdateFlag;
}
......@@ -68,7 +68,7 @@ public class TAutoFundRuleInfo extends BaseEntity {
@Schema(description = "是否自动触发派增(字典:0自动触发派增,1:手动派增)")
private String autoFlag;
/**
* 派单发起时间(字典:0:起缴日期当日)
* 派单发起时间(字典:0:起缴日期当日) 新:0:按起缴日期计算得出
*/
@ExcelAttribute(name = "派单发起时间", maxLength = 2)
@Length(max = 2, message = "派单发起时间不能超过2个字符")
......
......@@ -93,12 +93,14 @@ public class TAutoFundRuleRel extends BaseEntity {
@Schema(description = "公积金单位个人比例是否一致(0-是,1-否)")
private String fundPerFlag;
/**
* 起缴日期类型:0 入职日期 1 入职满1年次月 2 人员自定义
* 起缴日期类型:0 入职日期 1 入职满个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月
* * 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月
* 原:0 入职日期 1 入职满1年次月 2 人员自定义
*/
@ExcelAttribute(name = "起缴日期类型", maxLength = 2)
@Length(max = 2, message = "起缴日期类型不能超过2个字符")
@ExcelProperty("起缴日期类型")
@Schema(description = "起缴日期类型:0 入职日期 1 入职满1年次月 2 人员自定义")
@Schema(description = "起缴日期类型:0 入职日期 1 入职满个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月 ")
private String fundDateType;
/**
* 缴纳基数类型:0最低、1自定义、2最高、3固定基数
......
......@@ -67,12 +67,12 @@ public class TAutoSocialRuleInfo extends BaseEntity {
@Schema(description = "是否自动触发派增(字典:0自动触发派增,1:手动派增)")
private String autoFlag;
/**
* 派单发起时间(字典::0:入职满1个月...入职满6个月)
* 派单发起时间(字典::0:入职满1个月...入职满6个月) 新:6:按起缴日期计算得出
*/
@ExcelAttribute(name = "派单发起时间", maxLength = 2,isNotEmpty = false, errorInfo = "派单发起时间不能为空")
@Length(max = 2, message = "派单发起时间不能超过2个字符")
@ExcelProperty("派单发起时间")
@Schema(description = "派单发起时间(字典::0:入职满1个月...入职满6个月)")
@Schema(description = "派单发起时间(字典::0:入职满1个月...入职满6个月 6:按起缴日期计算得出)")
private String startPeriod;
/**
* 派单发起具体时间字典:0:15:20
......
......@@ -94,12 +94,14 @@ public class TAutoSocialRuleRel extends BaseEntity {
@Schema(description = "社保起缴日期是否一致(0-是,1-否)")
private String socialDateFlag;
/**
* 起缴日期:0 入职日期
*/
@ExcelAttribute(name = "起缴日期", maxLength = 2)
@Length(max = 2, message = "起缴日期不能超过2个字符")
@ExcelProperty("起缴日期")
@Schema(description = "起缴日期:0 入职日期")
* 起缴日期类型:0 入职日期 1 入职满个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月
* 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月
* 原:0 入职日期
*/
@ExcelAttribute(name = "起缴日期类型", maxLength = 2)
@Length(max = 2, message = "起缴日期类型不能超过2个字符")
@ExcelProperty("起缴日期类型")
@Schema(description = "起缴日期类型:0 入职日期 1 入职满个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月")
private String socialDateType;
/**
* 缴纳类型:0最低、1自定义、2最高
......
......@@ -334,4 +334,33 @@ public class TEmployeeContractPre extends BaseEntity {
@Schema(description = "任务信息")
private String requestMsg;
// 电子签推送需要的新字段:——START
@TableField(exist = false)
@ExcelAttribute(name = "户籍所在地")
private String huArea;
// contactProvince,contactCity,contactTown,
// contactAddress
@TableField(exist = false)
@ExcelAttribute(name = "通讯地址")
private String contactArea;
@TableField(exist = false)
@ExcelAttribute(name = "邮箱")
private String empEmail;
// 紧急联系人表
@TableField(exist = false)
@ExcelAttribute(name = "紧急联系人")
private String contactEmpName;
@TableField(exist = false)
@ExcelAttribute(name = "紧急联系人电话")
private String contactTel;
// relationProvince,relationCity,relationTown
// address
@TableField(exist = false)
@ExcelAttribute(name = "紧急联系人地址")
private String contactAddress;
// 电子签推送需要的新字段——END
}
......@@ -21,6 +21,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -28,6 +29,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
/**
* 法大大专业版公司信息表
*
......@@ -95,5 +98,27 @@ public class TFascCompany extends BaseEntity {
@ExcelProperty("场景码")
@Schema(description = "场景码")
private String businessId;
/**
* 是否删除:0未删除1已删除
*/
@ExcelAttribute(name = "是否删除", maxLength = 1)
@Length(max = 1, message = "是否删除不能超过1个字符")
@ExcelProperty("是否删除")
@Schema(description = "是否删除")
private String deleteFlag;
/**
* 删除人姓名
*/
@ExcelAttribute(name = "删除人姓名", maxLength = 64)
@Length(max = 64, message = "删除人姓名不能超过64个字符")
@ExcelProperty("删除人姓名")
@Schema(description = "删除人姓名")
private String deleteName;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@ExcelAttribute(name = "删除时间")
@ExcelProperty("删除时间")
@Schema(description = "删除时间")
private LocalDateTime deleteTime;
}
......@@ -270,14 +270,25 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
private String registerId;
/**
* 起缴日期类型:0 入职日期 1 入职满1年次月 2 人员自定义
* 起缴日期类型:0 入职日期 1 入职满1个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月
* 原:0 入职日期 1 入职满1年次月 2 人员自定义
*/
@ExcelAttribute(name = "起缴日期类型", maxLength = 2)
@Length(max = 2, message = "起缴日期类型不能超过2个字符")
@ExcelProperty("起缴日期类型")
@Schema(description = "起缴日期类型:0 入职日期 1 入职满1年次月 2 人员自定义")
@Schema(description = "起缴日期类型:0 入职日期 1 入职满1个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月")
private String fundDateType;
/**
* 起缴日期类型:0 入职日期 1 入职满1个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月
* 原:0 入职日期 1 入职满1年次月 2 人员自定义
*/
@ExcelAttribute(name = "起缴日期类型", maxLength = 2)
@Length(max = 2, message = "起缴日期类型不能超过2个字符")
@ExcelProperty("起缴日期类型")
@Schema(description = "起缴日期类型:0 入职日期 1 入职满1个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月")
private String socialDateType;
/**
* 公积金单位个人比例是否一致(0-是,1-否)
*/
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import lombok.Data;
/**
* 法大大电子签信推送字段
*/
@Data
public class TEmployeeContractPrePushFascVo {
// idProvince,idCity,idTown
@ExcelAttribute(name = "户籍所在地")
private String huArea;
// contactProvince,contactCity,contactTown,
// contactAddress
@ExcelAttribute(name = "通讯地址")
private String contactArea;
@ExcelAttribute(name = "邮箱")
private String empEmail;
// 紧急联系人表
@ExcelAttribute(name = "紧急联系人")
private String contactEmpName;
@ExcelAttribute(name = "紧急联系人电话")
private String contactTel;
// relationProvince,relationCity,relationTown
// address
@ExcelAttribute(name = "紧急联系人地址")
private String contactAddress;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author fxj
......@@ -38,4 +42,19 @@ public class UpdateEmpVo implements Serializable {
**/
private String createName;
private String createBy;
@Schema(description = "是否大专及以上(0否1是)")
private Integer isCollege;
@Schema(description = "最高学历(字典值)")
private String hignEducation;
@Schema(description = "学校")
private String school;
@Schema(description = "专业")
private String major;
@Schema(description = "毕业时间")
private Date gradutionDate;
}
......@@ -11,10 +11,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.FascService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TFascPushLogService;
import com.yifu.cloud.plus.v1.yifu.archives.utils.DoFascTask;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -22,13 +20,12 @@ import lombok.RequiredArgsConstructor;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.HashMap;
import java.util.Map;
/**
* @auther huyc
......@@ -55,6 +52,30 @@ public class FascController {
private static String FASC_BIZ_CONTENT = "bizContent";
private static String FASC_SUCCESS = "success";
/**
* @Description: 获取新建模板的Url
* @Author: hgw
* @Date: 2025/9/26 16:21
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "获取新建模板的Url")
@GetMapping("/getCreateNewTemplate")
public R<String> getCreateNewTemplate(@RequestParam String companyId) {
return fascService.getCreateNewTemplate(companyId);
}
/**
* @Description: 获取编辑模板的url
* @Author: hgw
* @Date: 2025/9/26 16:21
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "获取编辑模板的url")
@GetMapping("/getEditNewTemplate")
public R<String> getEditNewTemplate(@RequestParam String id) {
return fascService.getEditNewTemplate(id);
}
/**
* @Description: 获取模板
* @Author: hgw
......
......@@ -442,4 +442,17 @@ public class TEmployeeContractInfoController {
return tEmployeeContractInfoService.selectExitEmpCopntract(cardVo);
}
/**
* @Author huych
* @Description 查询是否存在正常或者在途的合同
* @Date 14:32 2025/12/22
* @Param
* @return
**/
@Operation(summary = "查询是否存在正常或者在途的合同", description = "查询是否存在正常或者在途的合同")
@PostMapping("/selectExitEmpContractNew")
public R selectExitEmpCopntractNew(@RequestBody TEmployeeAutoRegistCheckVo cardVo) {
return tEmployeeContractInfoService.selectExitEmpCopntractNew(cardVo);
}
}
......@@ -161,6 +161,19 @@ public class TEmployeeInfoController {
return tEmployeeInfoService.getById(empId);
}
/**
* @param vo
* @Description: 内部接口获取档案基本信息
* @Author: huych
* @Date: 2025/12/17 14:47
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo>
**/
@Inner
@PostMapping("/inner/getTEmployeeInfoByIdcardAndName")
public TEmployeeInfo getTEmployeeInfoByIdcardAndName(@RequestBody IdNameNoVo vo) {
return tEmployeeInfoService.getTEmployeeInfoByIdcardAndName(vo);
}
/**
* @param idcard
* @Description: 内部接口获取档案基本信息
......
/*
* 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.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TFascCompany;
import com.yifu.cloud.plus.v1.yifu.archives.service.TFascCompanyService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.List;
/**
* 法大大专业版公司信息表
*
* @author hgw
* @date 2025-10-22 17:43:17
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tfasccompany")
@Tag(name = "法大大专业版公司信息表管理")
public class TFascCompanyController {
private final TFascCompanyService tFascCompanyService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tFascCompany 法大大专业版公司信息表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TFascCompany>> getTFascCompanyPage(Page<TFascCompany> page, TFascCompany tFascCompany) {
return new R<>(tFascCompanyService.getTFascCompanyPage(page, tFascCompany));
}
/**
* 获取全量列表
*/
@Operation(description = "获取全量列表")
@GetMapping("/getTFascCompanyAllList")
public R<List<TFascCompany>> getTFascCompanyAllList(@RequestParam(required = false) String companyName) {
return new R<>(tFascCompanyService.getTFascCompanyAllList(companyName));
}
/**
* 通过id查询法大大专业版公司信息表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<TFascCompany> getById(@PathVariable("id") String id) {
return R.ok(tFascCompanyService.getById(id));
}
/**
* 新增法大大专业版公司信息表
*
* @param tFascCompany 法大大专业版公司信息表
* @return R
*/
@Operation(summary = "新增法大大专业版公司信息表", description = "新增法大大专业版公司信息表:hasPermission('archives_tfasccompany_add')")
@SysLog("新增法大大专业版公司信息表")
@PostMapping
@PreAuthorize("@pms.hasPermission('archives_tfasccompany_add')")
public R<Boolean> save(@RequestBody TFascCompany tFascCompany) {
if (Common.isEmpty(tFascCompany.getCompanyName())) {
return R.failed("请填写公司主体!");
}
int num = tFascCompanyService.getTFascCompanyByNameAndId(tFascCompany.getCompanyName(), null);
if (num > 0) {
return R.failed("该公司主体已存在,请勿重复配置!");
}
R<Boolean> failed = judgeFieldMust(tFascCompany);
if (failed != null) {
return failed;
}
return R.ok(tFascCompanyService.save(tFascCompany));
}
private R<Boolean> judgeFieldMust(TFascCompany tFascCompany) {
if (Common.isEmpty(tFascCompany.getAppId())) {
return R.failed("请填写appId!");
} else if (tFascCompany.getAppId().length() > CommonConstants.INTEGER_HUNDRED) {
return R.failed("appId不能超过100个字符!");
}
if (Common.isEmpty(tFascCompany.getAppSecret())) {
return R.failed("请填写appSecret!");
} else if (tFascCompany.getAppSecret().length() > CommonConstants.INTEGER_HUNDRED) {
return R.failed("appSecret不能超过100个字符!");
}
if (Common.isEmpty(tFascCompany.getAppUrl())) {
return R.failed("请填写appUrl!");
} else if (tFascCompany.getAppUrl().length() > CommonConstants.INTEGER_HUNDRED) {
return R.failed("appUrl不能超过100个字符!");
}
if (Common.isEmpty(tFascCompany.getOpenId())) {
return R.failed("请填写openCorpId!");
} else if (tFascCompany.getOpenId().length() > CommonConstants.INTEGER_HUNDRED) {
return R.failed("openCorpId不能超过100个字符!");
}
if (Common.isEmpty(tFascCompany.getAppUrl())) {
return R.failed("请填写appUrl!");
} else if (tFascCompany.getAppUrl().length() > CommonConstants.INTEGER_HUNDRED) {
return R.failed("appUrl不能超过100个字符!");
}
if (Common.isEmpty(tFascCompany.getBusinessId())) {
return R.failed("请填写businessId!");
} else if (tFascCompany.getBusinessId().length() > CommonConstants.INTEGER_HUNDRED) {
return R.failed("businessId不能超过100个字符!");
}
return null;
}
/**
* 修改法大大专业版公司信息表
*
* @param tFascCompany 法大大专业版公司信息表
* @return R
*/
@Operation(summary = "修改法大大专业版公司信息表", description = "修改法大大专业版公司信息表:hasPermission('archives_tfasccompany_edit')")
@SysLog("修改法大大专业版公司信息表")
@PutMapping
@PreAuthorize("@pms.hasPermission('archives_tfasccompany_edit')")
public R<Boolean> updateById(@RequestBody TFascCompany tFascCompany) {
if (Common.isEmpty(tFascCompany.getId())) {
return R.failed("请传参ID!");
}
if (Common.isEmpty(tFascCompany.getCompanyName())) {
return R.failed("请传参公司主体!");
}
int num = tFascCompanyService.getTFascCompanyByNameAndId(tFascCompany.getCompanyName(), tFascCompany.getId());
if (num > 0) {
return R.failed("该公司主体已存在,请勿重复配置!");
}
R<Boolean> failed = judgeFieldMust(tFascCompany);
if (failed != null) {
return failed;
}
return R.ok(tFascCompanyService.updateById(tFascCompany));
}
/**
* 通过id删除法大大专业版公司信息表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除法大大专业版公司信息表", description = "通过id删除法大大专业版公司信息表:hasPermission('archives_tfasccompany_del')")
@SysLog("通过id删除法大大专业版公司信息表")
@GetMapping("/deleteCompanyById")
@PreAuthorize("@pms.hasPermission('archives_tfasccompany_del')")
public R<String> deleteCompanyById(@RequestParam String id) {
if (CommonConstants.ONE_STRING.equals(id)) {
return R.failed("请勿删除此条数据!");
}
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getNickname())) {
return R.failed("请登录!");
}
TFascCompany tFascCompany = tFascCompanyService.getById(id);
if (tFascCompany == null || Common.isEmpty(tFascCompany.getId())) {
return R.failed("根据ID未找到数据!");
} else {
tFascCompany.setDeleteFlag(CommonConstants.DELETE_FLAG);
tFascCompany.setDeleteName(user.getNickname());
tFascCompany.setDeleteTime(LocalDateTime.now());
tFascCompanyService.updateById(tFascCompany);
return R.ok("已删除!");
}
}
}
......@@ -291,6 +291,7 @@ public class TSettleDomainController {
List<TSettleDomainSelectVo> list = new ArrayList<>();
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tSettleDomainSelectVo.getDepartNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
BeanUtils.copyProperties(tSettleDomain,tSettleDomainSelectVo);
tSettleDomainSelectVo.setCustomerCode(tSettleDomain.getCustomerNo());
......
......@@ -21,6 +21,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.entity.TEmpContactInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPrePushFascVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -50,4 +51,10 @@ public interface TEmpContactInfoMapper extends BaseMapper<TEmpContactInfo> {
List<TEmpContactInfo> getContactByDeptId(@Param("deptId") String deptId);
List<TEmpContactInfo> getContactByIdCardList(@Param("idCardList") List<String> idCardList);
/* 获取紧急联系人信息,电子签推送法大大需要用紧急联系人相关字段 */
TEmployeeContractPrePushFascVo getTEmpContactInfoOneByCard(@Param("empIdCard") String empIdCard);
/* 获取档案信息,电子签推送法大大需要用紧急联系人相关字段 */
TEmployeeContractPrePushFascVo getTEmpInfoOneByCard(@Param("empIdCard") String empIdCard);
}
......@@ -18,8 +18,11 @@
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
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.entity.TFascCompany;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -35,5 +38,11 @@ public interface TFascCompanyMapper extends BaseMapper<TFascCompany> {
* 法大大专业版公司信息表简单分页查询
* @return
*/
List<TFascCompany> getTFascCompanyAllList();
List<TFascCompany> getTFascCompanyAllList(@Param("companyName") String companyName);
IPage<TFascCompany> getTFascCompanyPage(Page<TFascCompany> page, @Param("tFascCompany") TFascCompany tFascCompany);
// 查重
int getTFascCompanyByNameAndId(@Param("companyName") String companyName, @Param("id") String id);
}
......@@ -30,9 +30,15 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
*/
public interface FascService extends IService<FddContractInfo> {
// 获取新建模板的url
R<String> getCreateNewTemplate(String companyId);
// 获取编辑模板的url(id:模板列表的id)
R<String> getEditNewTemplate(String id);
// 获取模板
R<String> getTemplate(String templateName) throws ApiException;
// 获取模板详情预览链接
R<String> getTemplateDetailUrl(String signTemplateId) throws ApiException;
......
......@@ -202,6 +202,8 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
Boolean selectExitEmpCopntract(TEmployeeAutoRegistCheckVo cardVo);
R selectExitEmpCopntractNew(TEmployeeAutoRegistCheckVo cardVo);
// 获取合同ID,在用,已审核
String getContractByEmpIdCardAndDeptNo(String empIdCard, String deptNo);
// 查找最近的终止合同
......
......@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchListVO;
......@@ -213,6 +212,8 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
// 未删除的档案
TEmployeeInfo getInfoByIdcard(String idcard);
TEmployeeInfo getTEmployeeInfoByIdcardAndName(IdNameNoVo vo);
// 已删除的档案
TEmployeeInfo getInfoByDelete(String idcard);
......
......@@ -17,6 +17,8 @@
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TFascCompany;
......@@ -34,5 +36,11 @@ public interface TFascCompanyService extends IService<TFascCompany> {
*
* @return
*/
List<TFascCompany> getTFascCompanyAllList();
List<TFascCompany> getTFascCompanyAllList(String companyName);
IPage<TFascCompany> getTFascCompanyPage(Page<TFascCompany> page, TFascCompany tFascCompany);
// 查重
int getTFascCompanyByNameAndId(String companyName, String id);
}
......@@ -21,12 +21,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasc.open.api.exception.ApiException;
import com.fasc.open.api.v5_1.res.template.SignTemplateListInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.FddContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractPreMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.*;
import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.utils.FascUtil;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPrePushFascVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TFascTemplateSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
......@@ -62,6 +60,8 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
private final TFascTemplateDetailService tFascTemplateDetailService;
private final TEmployeeContractPreMapper tEmployeeContractPreMapper;
private final TEmployeeContractInfoMapper tEmployeeContractInfoMapper;
private final TEmployeeInfoMapper tEmployeeInfoMapper;
private final TEmpContactInfoMapper tEmpContactInfoMapper;
private final TAttaInfoMapper tAttaInfoMapper;
private final TFascCompanyService tFascCompanyService;
......@@ -72,6 +72,39 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
private static final Logger logger = LoggerFactory.getLogger(FascService.class);
// 获取新建模板的url
@Override
public R<String> getCreateNewTemplate(String companyId) {
if (Common.isEmpty(companyId)) {
return R.failed("请传参公司ID!");
}
TFascCompany company = tFascCompanyService.getById(companyId);
if (company == null || Common.isEmpty(company.getId())) {
return R.failed("未找到公司信息,请刷新后重试!");
}
return fascUtil.getCreateNewTemplate(tFascPushLogService, company);
}
// 获取新建模板的url
@Override
public R<String> getEditNewTemplate(String id) {
if (Common.isEmpty(id)) {
return R.failed("请传参列表ID!");
}
TFascTemplate tFascTemplate = tFascTemplateService.getById(id);
if (tFascTemplate == null || Common.isEmpty(tFascTemplate.getId())) {
return R.failed("未找到模板信息,请刷新后重试!");
}
if (Common.isEmpty(tFascTemplate.getSignTemplateId()) || Common.isEmpty(tFascTemplate.getCompanyId())) {
return R.failed("模板信息缺失,请刷新后重试!");
}
TFascCompany company = tFascCompanyService.getById(tFascTemplate.getCompanyId());
if (company == null || Common.isEmpty(company.getId())) {
return R.failed("未找到公司信息,请刷新后重试!");
}
return fascUtil.getEditNewTemplate(tFascPushLogService, tFascTemplate.getSignTemplateId(), company);
}
@Override
public R<String> getTemplate(String templateName) throws ApiException {
......@@ -82,7 +115,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
userId = user.getId();
userName = user.getNickname();
}
List<TFascCompany> companyList = tFascCompanyService.getTFascCompanyAllList();
List<TFascCompany> companyList = tFascCompanyService.getTFascCompanyAllList(null);
if (companyList != null && !companyList.isEmpty()) {
// templateName 签署任务模板名称
List<TFascTemplate> tList ;
......@@ -287,11 +320,28 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
if (Common.isEmpty(contract.getContractId())) {
return R.failed("未生成合同,请联系管理员");
}
String empIdCard = contract.getEmpIdcard();
if (Common.isEmpty(empIdCard)) {
return R.failed("未找到身份证,请联系管理员");
}
TEmployeeContractInfo empContract = tEmployeeContractInfoMapper.selectById(contract.getContractId());
if (empContract == null) {
return R.failed(FASC_NO_EMP_CONTRACT);
}
TEmployeeContractPrePushFascVo empContactInfo = tEmpContactInfoMapper.getTEmpContactInfoOneByCard(empIdCard);
TEmployeeContractPrePushFascVo empInfo = tEmpContactInfoMapper.getTEmpInfoOneByCard(empIdCard);
if (empContactInfo != null) {
contract.setContactEmpName(empContactInfo.getContactEmpName());
contract.setContactTel(empContactInfo.getContactTel());
contract.setContactAddress(empContactInfo.getContactAddress());
}
if (empInfo != null) {
contract.setHuArea(empInfo.getHuArea());
contract.setContactArea(empInfo.getContactArea());
contract.setEmpEmail(empInfo.getEmpEmail());
}
if (Common.isEmpty(contract.getFadadaTemplateId())) {
return R.failed("未找到合同模板ID,请联系管理员");
......
......@@ -2310,6 +2310,24 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
@Override
public R selectExitEmpCopntractNew(TEmployeeAutoRegistCheckVo cardVo) {
if (Common.isNotNull(cardVo) && Common.isNotNull(cardVo.getEmpIdcard()) && Common.isNotNull(cardVo.getDeptNo())) {
return R.ok(baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, cardVo.getEmpIdcard())
.eq(TEmployeeContractInfo::getDeptNo, cardVo.getDeptNo())
.isNull(TEmployeeContractInfo::getSignType)
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.TWO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)));
} else {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
}
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
public void changeStatus(TEmployeeContractInfo contractInfo,YifuUser user) {
//同步任务处理清单执行详情
......
......@@ -2634,6 +2634,22 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employeeInfo.setContactAddress(vo.getContactAddress());
}
employeeInfo.setStatus(CommonConstants.ONE_INT);
// 新增加同步派单的学历等信息到档案里:MVP1.7.18 2025-12-15 09:21:47
if (Common.isNotNull(vo.getHignEducation())) {
employeeInfo.setHignEducation(vo.getHignEducation());
}
if (Common.isNotNull(vo.getIsCollege())) {
employeeInfo.setIsCollege(vo.getIsCollege());
}
if (Common.isNotNull(vo.getSchool())) {
employeeInfo.setSchool(vo.getSchool());
}
if (Common.isNotNull(vo.getMajor())) {
employeeInfo.setMajor(vo.getMajor());
}
if (Common.isNotNull(vo.getGradutionDate())) {
employeeInfo.setGradutionDate(vo.getGradutionDate());
}
}
if (Common.isNotNull(vo.getProjectNo())) {
......@@ -2812,6 +2828,15 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.last(CommonConstants.LAST_ONE_SQL));
}
@Override
public TEmployeeInfo getTEmployeeInfoByIdcardAndName(IdNameNoVo vo) {
return baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, vo.getNo())
.eq(TEmployeeInfo::getEmpName, vo.getName())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
}
@Override
public TEmployeeInfo getInfoByDelete(String idcard) {
return baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
......
......@@ -16,6 +16,8 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TFascCompany;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TFascCompanyMapper;
......@@ -40,7 +42,18 @@ public class TFascCompanyServiceImpl extends ServiceImpl<TFascCompanyMapper, TFa
* @return
*/
@Override
public List<TFascCompany> getTFascCompanyAllList() {
return baseMapper.getTFascCompanyAllList();
public List<TFascCompany> getTFascCompanyAllList(String companyName) {
return baseMapper.getTFascCompanyAllList(companyName);
}
@Override
public IPage<TFascCompany> getTFascCompanyPage(Page<TFascCompany> page, TFascCompany tFascCompany){
return baseMapper.getTFascCompanyPage(page,tFascCompany);
}
// 查重
@Override
public int getTFascCompanyByNameAndId(String companyName, String id) {
return baseMapper.getTFascCompanyByNameAndId(companyName,id);
}
}
......@@ -12,10 +12,7 @@ import com.fasc.open.api.v5_1.client.ServiceClient;
import com.fasc.open.api.v5_1.client.SignTaskClient;
import com.fasc.open.api.v5_1.client.TemplateClient;
import com.fasc.open.api.v5_1.req.signtask.*;
import com.fasc.open.api.v5_1.req.template.GetSignTemplateListReq;
import com.fasc.open.api.v5_1.req.template.GetTemplatePreviewUrlReq;
import com.fasc.open.api.v5_1.req.template.SignTemplateDetailReq;
import com.fasc.open.api.v5_1.req.template.SignTemplateListFilterInfo;
import com.fasc.open.api.v5_1.req.template.*;
import com.fasc.open.api.v5_1.res.service.AccessTokenRes;
import com.fasc.open.api.v5_1.res.signtask.CreateSignTaskRes;
import com.fasc.open.api.v5_1.res.signtask.SignTaskGetFileRes;
......@@ -97,6 +94,92 @@ public class FascUtil {
return token;
}
/**
* @Description: 获取新建模板的url
* @Author: hgw
* @Date: 2025-12-11 15:06:54
**/
public R<String> getCreateNewTemplate(TFascPushLogService tFascPushLogService, TFascCompany company) {
try {
OpenApiClient openApiClient = new OpenApiClient(company.getAppId(), company.getAppSecret(), company.getAppUrl());
String accessToken = this.getFascToken(openApiClient, company);
TemplateClient templateClient = new TemplateClient(openApiClient);
GetTemplateCreateUrlReq getTemplateCreateUrlReq = new GetTemplateCreateUrlReq();
getTemplateCreateUrlReq.setOpenCorpId(company.getOpenId());
getTemplateCreateUrlReq.setType("sign");
getTemplateCreateUrlReq.setAccessToken(accessToken);
// 新增推送日志
TFascPushLog pushLog = new TFascPushLog();
pushLog.setTransReferenceId(company.getOpenId());
pushLog.setPushData(JSON.toJSONString(templateClient, features));
pushLog.setTaskStatus(CommonConstants.ZERO_STRING);
pushLog.setTypeKey("获取新建模板的url,CompanyName:" + company.getCompanyName());
pushLog.setTypeName("获取新建模板的url");
pushLog.setContractId(company.getId());
tFascPushLogService.save(pushLog);
BaseRes<GetTemplateCreateUrlRes> res = templateClient.getTemplateCreateUrl(getTemplateCreateUrlReq);
if (res != null) {
pushLog.setReturnData(JSON.toJSONString(res, features));
pushLog.setTaskStatus(res.isSuccess() ? CommonConstants.ONE_STRING : CommonConstants.TWO_STRING);
tFascPushLogService.updateById(pushLog);
if (res.isSuccess() && Common.isNotNull(res.getData())) {
return R.ok(res.getData().getTemplateCreateUrl());
} else {
return R.failed(res.getMsg());
}
}
return R.failed("res无返回");
} catch (Exception e) {
return R.failed("获取新建模板的url失败:" + e.getMessage());
}
}
/**
* @Description: 获取模板编辑的url
* @Author: hgw
* @Date: 2025-12-11 15:06:54
**/
public R<String> getEditNewTemplate(TFascPushLogService tFascPushLogService, String signTemplateId, TFascCompany company) {
try {
OpenApiClient openApiClient = new OpenApiClient(company.getAppId(), company.getAppSecret(), company.getAppUrl());
String accessToken = this.getFascToken(openApiClient, company);
TemplateClient templateClient = new TemplateClient(openApiClient);
GetTemplateEditUrlReq getTemplateEditUrlReq = new GetTemplateEditUrlReq() ;
getTemplateEditUrlReq.setOpenCorpId(company.getOpenId()) ;
getTemplateEditUrlReq.setTemplateId(signTemplateId) ;
getTemplateEditUrlReq.setAccessToken(accessToken) ;
// 新增推送日志
TFascPushLog pushLog = new TFascPushLog();
pushLog.setTransReferenceId(company.getOpenId());
pushLog.setPushData(JSON.toJSONString(getTemplateEditUrlReq, features));
pushLog.setTaskStatus(CommonConstants.ZERO_STRING);
pushLog.setTypeKey("获取模板编辑的url,signTemplateId:" + signTemplateId);
pushLog.setTypeName("获取模板编辑的url");
pushLog.setContractId(company.getId());
tFascPushLogService.save(pushLog);
BaseRes<GetTemplateEditUrlRes> res = templateClient.getTemplateEditUrl(getTemplateEditUrlReq) ;
if (res != null) {
pushLog.setReturnData(JSON.toJSONString(res, features));
pushLog.setTaskStatus(res.isSuccess() ? CommonConstants.ONE_STRING : CommonConstants.TWO_STRING);
tFascPushLogService.updateById(pushLog);
if (res.isSuccess() && Common.isNotNull(res.getData())) {
return R.ok(res.getData().getTemplateEditUrl());
} else {
return R.failed(res.getMsg());
}
}
return R.failed("res无返回");
} catch (Exception e) {
return R.failed("获取模板编辑的url:" + e.getMessage());
}
}
/**
* @Description: 获取模板
* @Author: hgw
......
......@@ -110,6 +110,43 @@
</where>
</select>
<!-- 获取紧急联系人信息,电子签推送法大大需要用紧急联系人相关字段 -->
<select id="getTEmpContactInfoOneByCard" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPrePushFascVo">
SELECT
a.EMP_NAME contactEmpName,a.tel contactTel,concat(ifnull(sp.AREA_NAME,'')
,ifnull(sc.AREA_NAME,'')
,ifnull(st.AREA_NAME,'')
,ifnull(a.ADDRESS,'')
) contactAddress
from t_emp_contact_info a
left join sys_area sp on sp.id = a.RELATION_PROVINCE
left join sys_area sc on sc.id = a.RELATION_CITY
left join sys_area st on st.id = a.RELATION_TOWN
where a.EMP_IDCARD = #{empIdCard} ORDER BY a.CREATE_TIME desc limit 1
</select>
<!-- 获取档案信息,电子签推送法大大需要用紧急联系人相关字段 -->
<select id="getTEmpInfoOneByCard" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPrePushFascVo">
select
concat(ifnull(sp.AREA_NAME,'')
,ifnull(sc.AREA_NAME,'')
,ifnull(st.AREA_NAME,'')
) huArea,
concat(ifnull(sp2.AREA_NAME,'')
,ifnull(sc2.AREA_NAME,'')
,ifnull(st2.AREA_NAME,'')
,ifnull(a.CONTACT_ADDRESS,'')
) contactArea,a.EMP_EMAIL empEmail
from t_employee_info a
left join sys_area sp on sp.id = a.ID_PROVINCE
left join sys_area sc on sc.id = a.ID_CITY
left join sys_area st on st.id = a.ID_TOWN
left join sys_area sp2 on sp2.id = a.CONTACT_PROVINCE
left join sys_area sc2 on sc2.id = a.CONTACT_CITY
left join sys_area st2 on st2.id = a.CONTACT_TOWN
where a.EMP_IDCARD = #{empIdCard} ORDER BY a.CREATE_TIME desc limit 1
</select>
<select id="getContactByDeptId" resultMap="tEmpContactInfoMap">
SELECT
<include refid="Base_Column_List"/>
......
......@@ -573,7 +573,7 @@
a.EMP_NAME,
a.EMP_IDCARD
from t_employee_info a
where 1=1
where 1=1 and a.delete_flag = '0'
<if test="tEmployeeInfo != null">
<if test="tEmployeeInfo.empName != null and tEmployeeInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{tEmployeeInfo.empName},'%')
......
......@@ -36,6 +36,9 @@
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="businessId" column="business_id"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="deleteName" column="DELETE_NAME"/>
<result property="deleteTime" column="DELETE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
......@@ -49,7 +52,10 @@
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.business_id
a.business_id,
a.DELETE_FLAG,
a.DELETE_NAME,
a.DELETE_TIME
</sql>
<sql id="tFascCompany_where">
<if test="tFascCompany != null">
......@@ -57,7 +63,7 @@
AND a.id = #{tFascCompany.id}
</if>
<if test="tFascCompany.companyName != null and tFascCompany.companyName.trim() != ''">
AND a.company_name = #{tFascCompany.companyName}
AND a.company_name like concat('%', #{tFascCompany.companyName}, '%')
</if>
<if test="tFascCompany.appId != null and tFascCompany.appId.trim() != ''">
AND a.app_id = #{tFascCompany.appId}
......@@ -86,12 +92,37 @@
</if>
</sql>
<select id="getTFascCompanyAllList" resultMap="tFascCompanyMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_fasc_company a
where a.DELETE_FLAG = '0'
<if test="companyName != null and companyName.trim() != ''">
AND a.company_name like concat('%', #{companyName}, '%')
</if>
order by a.CREATE_TIME asc
</select>
<!--tFascCompany简单分页查询,排序顺序,为了总公司在第一位-->
<select id="getTFascCompanyPage" resultMap="tFascCompanyMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_fasc_company a
<where>
1=1
a.DELETE_FLAG = '0'
<include refid="tFascCompany_where"/>
</where>
order by a.CREATE_TIME asc
</select>
<!--查重 -->
<select id="getTFascCompanyByNameAndId" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_fasc_company a
where a.DELETE_FLAG = '0' and a.company_name = #{companyName}
<if test="id != null and id.trim() != ''">
AND a.id != #{id}
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>yifu</artifactId>
<groupId>com.yifu.cloud.plus.v1</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yifu-batch</artifactId>
<description>大批量数据处理</description>
<packaging>pom</packaging>
<!--项目子模块-->
<modules>
<module>yifu-batch-api</module>
<module>yifu-batch-biz</module>
</modules>
</project>
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>yifu-batch-api</artifactId>
<packaging>jar</packaging>
<description>大批量数据处理</description>
<dependencies>
<!-- core 工具类 -->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-core</artifactId>
<exclusions>
<exclusion>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</exclusion>
<exclusion>
<groupId>cn.hutool</groupId>
<artifactId>hutool-crypto</artifactId>
</exclusion>
<!-- 排除所有可能的 hutool 模块 -->
</exclusions>
</dependency>
<!--swagger 注解-->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<!--mybatis 依赖-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-mybatis</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-social-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>icbc-api-sdk-cop</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>icbc-api-sdk-cop-io</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>icbc-ca</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>InfosecCrypto_Java1_02_JDK14</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>proguard</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>hsm-software-share</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>com.icbc</groupId>
<artifactId>commons-logging-icbc</artifactId>
<version>1.2.0</version>
</dependency>
<!-- 交行jar引入 -->
<!--<dependency>
<groupId>com.ipct.safety</groupId>
<artifactId>ipct_safety</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.5.8</version>
</dependency>-->
</dependencies>
</project>
package com.yifu.cloud.plus.v1.batch.constants;
import sun.net.www.content.image.gif;
import sun.net.www.content.image.jpeg;
import sun.net.www.content.image.png;
/**
* 电子档案相关常量
*
* @author huych
* @date 2025-12-17
*/
public interface ArchiveConstants {
/**
* 任务编号前缀
*/
String TASK_CODE_PREFIX = "DZDAPL";
/**
* 任务状态-未上传
*/
String TASK_STATUS_NOT_UPLOADED = "0";
/**
* 任务状态-生成电子档案中
*/
String TASK_STATUS_GENERATING = "1";
/**
* 任务状态-已生成电子档案
*/
String TASK_STATUS_GENERATED = "2";
/**
* 明细状态-不可用
*/
String DETAIL_STATUS_DISABLED = "0";
/**
* 明细状态-可用
*/
String DETAIL_STATUS_ENABLED = "1";
/**
* 附件关系类型-任务表附件
*/
String ATTA_RELATION_TYPE_TASK = "1";
/**
* 附件关系类型-ZIP附件
*/
String ATTA_RELATION_TYPE_ZIP = "2";
/**
* 附件关系类型-反馈表附件
*/
String ATTA_RELATION_TYPE_FEEDBACK = "3";
/**
* 附件关系类型-人员附件
*/
String ATTA_RELATION_TYPE_PER = "4";
/**
* 附件状态-可用
*/
String ATTA_STATUS_ENABLED = "0";
/**
* 附件状态-不可用
*/
String ATTA_STATUS_DISABLED = "1";
/**
* 资料类型-存量
*/
String MATERIAL_TYPE_STOCK = "存量";
/**
* 资料类型-新签
*/
String MATERIAL_TYPE_NEW = "新签";
/**
* 资料类型-续签
*/
String MATERIAL_TYPE_RENEW = "续签";
/**
* 资料类型-减员
*/
String MATERIAL_TYPE_LEAVE = "减员";
/**
* 处理结果-成功
*/
String PROCESS_RESULT_SUCCESS = "成功";
/**
* 处理结果-失败
*/
String PROCESS_RESULT_FAILED = "失败";
/**
* 处理结果-跳过
*/
String PROCESS_RESULT_SKIP = "跳过";
/**
* ZIP文件最大大小(500M)
*/
long ZIP_MAX_SIZE = 500 * 1024 * 1024L;
/**
* 单个附件最大大小(15M)
*/
long SINGLE_FILE_MAX_SIZE = 15 * 1024 * 1024L;
/**
* 同时上传任务数限制
*/
int MAX_CONCURRENT_TASKS = 5;
/**
* 支持的文件格式
*/
String[] SUPPORTED_FILE_FORMATS = {"gif", "jpg", "jpeg", "png", "bmp", "xls", "xlsx", "csv", "pdf", "docx", "doc", "m4a", "mp3", "zip", "rar", "txt"};
}
package com.yifu.cloud.plus.v1.batch.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
/**
* 单个人员电子档案上传DTO
*
* @author huych
* @date 2025-12-17
*/
@Data
@Schema(description = "单个人员电子档案上传DTO")
public class SingleArchiveUploadDTO {
/**
* 身份证号
*/
@NotBlank(message = "身份证号不能为空")
@Pattern(regexp = "^\\d{18}$", message = "身份证号格式不正确")
@Schema(description = "身份证号")
private String empIdcard;
/**
* 姓名
*/
@NotBlank(message = "姓名不能为空")
@Length(min = 2, max = 32, message = "姓名长度必须在2-32之间")
@Schema(description = "姓名")
private String empName;
/**
* 项目编码
*/
@NotBlank(message = "项目编码不能为空")
@Schema(description = "项目编码")
private String deptNo;
/**
* 项目名称
*/
@NotBlank(message = "项目名称不能为空")
@Schema(description = "项目名称")
private String deptName;
/**
* 资料类型(存量、新签、续签、减员)
*/
@NotBlank(message = "资料类型不能为空")
@Schema(description = "资料类型(存量、新签、续签、减员)")
private String materialType;
}
package com.yifu.cloud.plus.v1.batch.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 系统限制配置表
*
* @author hgw
* @date 2024-09-24 17:39:57
*/
@Data
@TableName("sys_config_limit")
@Schema(description = "系统限制配置表")
public class SysConfigLimit {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 限制键
*/
@ExcelAttribute(name = "限制键", isNotEmpty = true, errorInfo = "限制键不能为空", maxLength = 32)
@NotBlank(message = "限制键不能为空")
@Length(max = 32, message = "限制键不能超过32个字符")
@ExcelProperty("限制键")
@Schema(description = "限制键")
private String configKey;
/**
* 限制值
*/
@ExcelAttribute(name = "限制值", isNotEmpty = true, errorInfo = "限制值不能为空")
@NotBlank(message = "限制值不能为空")
@ExcelProperty("限制值")
@Schema(description = "限制值")
private Integer configValue;
/**
* 备注
*/
@ExcelAttribute(name = "备注", maxLength = 255)
@Length(max = 255, message = "备注不能超过255个字符")
@ExcelProperty("备注")
@Schema(description = "备注")
private String remark;
}
package com.yifu.cloud.plus.v1.batch.entity;
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.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* @Author fxj
* @Description 附件信息表
* @Date 11:07 2022/6/22
**/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_atta_info")
@Tag(name = "附件信息表")
public class TAttaInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 资源名称
*/
@NotBlank(message = "资源名称不能为空")
@Length(max = 50, message = "资源名称不能超过50个字符")
@Schema(description = "资源名称")
private String attaName;
/**
* 资源地址
*/
@NotBlank(message = "资源地址不能为空")
@Length(max = 100, message = "资源地址不能超过100个字符")
@Schema(description = "资源地址")
private String attaSrc;
/**
* 资源大小
*/
@Schema(description = "资源大小")
private Long attaSize;
/**
* 资源类型
*/
@Length(max = 10, message = "资源类型不能超过10个字符")
@Schema(description = "资源类型")
private String attaType;
/**
* 关系类型 1 任务表附件 2 zip附件 3反馈表附件 4人员文件
*/
@NotBlank(message = "关系类型不能为空")
@Length(max = 20, message = "关系类型不能超过20个字符")
@Schema(description = "关系类型 1 任务表附件 2 zip附件 3反馈表附件 4人员文件")
private String relationType;
/**
* 实体id和关系类型共同确定附件所属
*/
@NotBlank(message = "实体id和关系类型共同确定附件所属不能为空")
@Length(max = 32, message = "实体id和关系类型共同确定附件所属不能超过32个字符")
@Schema(description = "实体id和关系类型共同确定附件所属")
private String domainId;
/**
* 任务ID,用于区分同一个domainId下不同任务的附件
*/
@Length(max = 32, message = "任务ID不能超过32个字符")
@Schema(description = "任务ID,用于区分同一个domainId下不同任务的附件")
private String taskId;
/**
* 状态 0可用 1不可用
*/
@Schema(description = "状态 0可用 1不可用")
private String status;
/**
* 地址URL
*/
@Length(max = 100, message = "地址URL不能超过100个字符")
@Schema(description = "地址URL")
@TableField(exist = false)
private String attaUrl;
/**
* 附件变更类型:0 新增 1 更新 2 删除 3 不变 档案编辑附件时需要告知后端是增加还是减少
*/
@TableField(exist = false)
private String handleType;
/**
* 其他分租名称
*/
@TableField(exist = false)
private String groupName;
}
package com.yifu.cloud.plus.v1.batch.entity;
import com.alibaba.excel.annotation.ExcelProperty;
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.batch.vo.TaskAttachmentGroupVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.util.List;
/**
* 电子档案明细表
*
* @author huych
* @date 2025-12-17 11:03:37
*/
@Data
@TableName("t_electronic_archive_detail")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "电子档案明细表")
public class TElectronicArchiveDetail extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 姓名
*/
@ExcelAttribute(name = "姓名", maxLength = 32)
@ExcelProperty("姓名")
@Schema(description = "姓名")
private String empName;
/**
* 身份证号码
*/
@ExcelAttribute(name = "身份证号码")
@ExcelProperty("身份证号码")
@Schema(description = "身份证号码")
private String empIdcard;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码")
@ExcelProperty("项目编码")
@Schema(description = "项目编码")
private String deptNo;
/**
* 项目ID
*/
@ExcelAttribute(name = "项目ID")
@ExcelProperty("项目ID")
@Schema(description = "项目ID")
private String deptId;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
private String deptName;
/**
* 客户名称
*/
@ExcelAttribute(name = "客户名称")
@ExcelProperty("客户名称")
@Schema(description = "客户名称")
private String customerName;
/**
* 客户编码
*/
@ExcelAttribute(name = "客户编码")
@ExcelProperty("客户编码")
@Schema(description = "客户编码")
private String customerCode;
/**
* 资料类型(存量、新签、续签、减员,多个用逗号分隔)
*/
@ExcelAttribute(name = "资料类型")
@ExcelProperty("资料类型")
@Schema(description = "资料类型 存量、新签、续签、减员,多个用逗号分隔)")
private String materialType;
/**
* 档案所在地-省
*/
@ExcelAttribute(name = "档案所在地-省")
@ExcelProperty("档案所在地-省")
@Schema(description = "档案所在地-省")
private Integer fileProvince;
/**
* 档案所在地
*/
@ExcelAttribute(name = "档案所在地")
@ExcelProperty("档案所在地")
@Schema(description = "档案所在地")
private String fileAddress;
/**
* 档案所在地-市
*/
@ExcelAttribute(name = "档案所在地-市")
@ExcelProperty("档案所在地-市")
@Schema(description = "档案所在地-市")
private Integer fileCity;
/**
* 档案所在地-县
*/
@ExcelAttribute(name = "档案所在地-县")
@ExcelProperty("档案所在地-县")
@Schema(description = "档案所在地-县")
private Integer fileTown;
/**
* 状态(0不可用,1可用)
*/
@ExcelAttribute(name = "状态")
@ExcelProperty("状态")
@Schema(description = "状态(0不可用,1可用)")
private String status;
/**
* 是否删除 0否/1是
*/
@ExcelAttribute(name = "是否删除 0否/1是", maxLength = 1)
@Length(max = 1, message = "是否删除 0否/1是不能超过1个字符")
@ExcelProperty("是否删除 0否/1是")
@Schema(description = "是否删除 0否/1是")
private String deleteFlag;
/**
* 附件Id
*/
@TableField(exist = false)
private List<String> attaIdList;
/**
* 印章附件
*/
@TableField(exist = false)
private List<TAttaInfo> attaInfoList;
/**
* 按任务分组的附件列表
*/
@TableField(exist = false)
private List<TaskAttachmentGroupVO> taskAttachmentGroups;
}
package com.yifu.cloud.plus.v1.batch.entity;
import com.alibaba.excel.annotation.ExcelProperty;
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;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
/**
* 电子档案任务表
*
* @author huych
* @date 2025-12-17 11:03:07
*/
@Data
@TableName("t_electronic_archive_task")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "电子档案任务表")
public class TElectronicArchiveTask extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 任务编号
*/
@ExcelAttribute(name = "任务编号")
@NotBlank(message = "任务编号不能为空")
@ExcelProperty("任务编号")
@Schema(description = "任务编号")
private String taskCode;
/**
* 上传表格名称
*/
@ExcelAttribute(name = "上传表格名称")
@ExcelProperty("上传表格名称")
@Schema(description = "上传表格名称")
private String uploadFileName;
/**
* 上传压缩包名称
*/
@ExcelAttribute(name = "上传压缩包名称")
@ExcelProperty("上传压缩包名称")
@Schema(description = "上传压缩包名称")
private String uploadZipName;
@Schema(description = "状态(未上传,生成电子档案中,已生成电子档案)")
private String status;
@Schema(description = "是否删除 0否/1是")
private String deleteFlag;
@Schema(description = "反馈表附件名称")
@TableField(exist = false)
private String backAttaName;
}
package com.yifu.cloud.plus.v1.batch.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 电子档案上传任务和档案明细关系表
*
* @author huych
* @date 2025-12-17 11:02:01
*/
@Data
@TableName("t_task_archive_relation")
@EqualsAndHashCode()
@Schema(description = "电子档案上传任务和档案明细关系表")
public class TTaskArchiveRelation {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 任务表ID
*/
@ExcelAttribute(name = "任务表ID")
@ExcelProperty("任务表ID")
@Schema(description = "任务表ID")
private String taskId;
/**
* 电子档案明细表ID
*/
@ExcelAttribute(name = "电子档案明细表ID")
@ExcelProperty("电子档案明细表ID")
@Schema(description = "电子档案明细表ID")
private String archiveDetailId;
}
package com.yifu.cloud.plus.v1.batch.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* 电子档案附件删除请求VO
*
* @author huych
* @date 2025-12-17
*/
@Data
@Schema(description = "电子档案附件删除请求VO")
public class ArchiveAttachmentDeleteRequestVO {
/**
* 电子档案明细ID
*/
@NotBlank(message = "电子档案明细ID不能为空")
@Schema(description = "电子档案明细ID")
private String detailId;
/**
* 任务ID
*/
@NotBlank(message = "任务ID不能为空")
@Schema(description = "任务ID")
private String taskId;
/**
* 资料类型(存量、新签、续签、减员)
*/
@NotBlank(message = "资料类型不能为空")
@Schema(description = "资料类型(存量、新签、续签、减员)")
private String materialType;
/**
* 要删除的附件ID列表
*/
@NotEmpty(message = "附件ID列表不能为空")
@Schema(description = "要删除的附件ID列表")
private List<String> attachmentIds;
}
package com.yifu.cloud.plus.v1.batch.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 电子档案批量下载请求VO
*
* @author huych
* @date 2025-12-17
*/
@Data
@Schema(description = "电子档案批量下载请求")
public class ArchiveBatchDownloadRequestVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
@NotBlank(message = "姓名不能为空")
@Schema(description = "姓名")
private String empName;
/**
* 身份证号码
*/
@NotBlank(message = "身份证号码不能为空")
@Schema(description = "身份证号码")
private String empIdcard;
/**
* 项目编码
*/
@NotBlank(message = "项目编码不能为空")
@Schema(description = "项目编码")
private String deptNo;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String deptName;
/**
* 资料类型(为空则下载该人员该项目下所有资料类型)
*/
@Schema(description = "资料类型(为空则下载该人员该项目下所有资料类型)")
private String materialType;
/**
* Excel行号(用于反馈)
*/
@Schema(description = "Excel行号")
private Integer rowIndex;
}
package com.yifu.cloud.plus.v1.batch.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 电子档案下载结果反馈VO
*
* @author huych
* @date 2025-12-17
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "电子档案下载结果反馈")
public class ArchiveDownloadFeedbackVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
@ExcelProperty(value = "姓名", index = 0)
@Schema(description = "姓名")
private String empName;
/**
* 身份证号码
*/
@ExcelProperty(value = "身份证号", index = 1)
@Schema(description = "身份证号")
private String empIdcard;
/**
* 项目名称
*/
@ExcelProperty(value = "项目名称", index = 2)
@Schema(description = "项目名称")
private String deptName;
/**
* 客户名称
*/
@ExcelProperty(value = "客户名称", index = 3)
@Schema(description = "客户名称")
private String customerName;
/**
* 资料类型
*/
@ExcelProperty(value = "资料类型", index = 4)
@Schema(description = "资料类型")
private String materialType;
/**
* 资料类型
*/
@ExcelProperty(value = "档案所在地", index = 5)
@Schema(description = "档案所在地")
private String fileAddress;
/**
* 项目编码
*/
@ExcelProperty(value = "项目编码", index = 6)
@Schema(description = "项目编码")
private String deptNo;
/**
* 客户编码
*/
@ExcelProperty(value = "客户编码", index = 7)
@Schema(description = "客户编码")
private String customerCode;
/**
* 下载状态(成功/失败)
*/
@ExcelProperty(value = "下载状态", index = 8)
@Schema(description = "下载状态")
private String downloadStatus;
/**
* 失败原因
*/
@ExcelProperty(value = "失败原因", index = 9)
@Schema(description = "失败原因")
private String failReason;
}
package com.yifu.cloud.plus.v1.batch.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 电子档案导入反馈表VO
*
* @author huych
* @date 2025-12-17
*/
@Data
@Schema(description = "电子档案导入反馈表VO")
public class ArchiveFeedbackVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
@ExcelAttribute(name = "姓名")
@ExcelProperty(value = "姓名", index = 0)
@Schema(description = "姓名")
private String empName;
/**
* 身份证号码
*/
@ExcelAttribute(name = "身份证号码")
@ExcelProperty(value = "身份证号码", index = 1)
@Schema(description = "身份证号码")
private String empIdcard;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称")
@ExcelProperty(value = "项目名称", index = 2)
@Schema(description = "项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码")
@ExcelProperty(value = "项目编码", index = 3)
@Schema(description = "项目编码")
private String deptNo;
/**
* 资料类型
*/
@ExcelAttribute(name = "资料类型")
@ExcelProperty(value = "资料类型", index = 4)
@Schema(description = "资料类型(存量、新签、续签、减员)")
private String materialType;
/**
* 处理结果
*/
@ExcelAttribute(name = "处理结果")
@ExcelProperty(value = "处理结果", index = 5)
@Schema(description = "处理结果(成功、失败、跳过)")
private String processResult;
/**
* 失败原因
*/
@ExcelAttribute(name = "失败原因")
@ExcelProperty(value = "失败原因", index = 6)
@Schema(description = "失败原因")
private String failReason;
}
package com.yifu.cloud.plus.v1.batch.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 电子档案导入Excel模板VO
*
* @author huych
* @date 2025-12-17
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "电子档案导入Excel模板VO")
public class ArchiveImportVO extends RowIndex implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
@ExcelAttribute(name = "姓名", isNotEmpty = true, errorInfo = "姓名不能为空", maxLength = 32)
@ExcelProperty(value = "姓名")
@NotBlank(message = "姓名不能为空")
@Schema(description = "姓名")
private String empName;
/**
* 身份证号码
*/
@ExcelAttribute(name = "身份证号码", isNotEmpty = true, errorInfo = "身份证号码不能为空", maxLength = 18)
@ExcelProperty(value = "身份证号码")
@NotBlank(message = "身份证号码不能为空")
@Schema(description = "身份证号码")
private String empIdcard;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", isNotEmpty = true, errorInfo = "项目名称不能为空", maxLength = 50)
@ExcelProperty(value = "项目名称")
@NotBlank(message = "项目名称不能为空")
@Schema(description = "项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码不能为空", maxLength = 50)
@ExcelProperty(value = "项目编码")
@NotBlank(message = "项目编码不能为空")
@Schema(description = "项目编码")
private String deptNo;
}
package com.yifu.cloud.plus.v1.batch.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
/**
* 电子档案勾选导出请求VO
* 用于勾选指定任务的指定资料类型进行批量导出
*
* @author huych
* @date 2025-12-17
*/
@Data
@Schema(description = "电子档案勾选导出请求")
public class ArchiveSelectedExportRequestVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 明细ID
*/
@NotBlank(message = "明细ID不能为空")
@Schema(description = "明细ID")
private String detailId;
/**
* 任务ID
*/
@NotBlank(message = "任务ID不能为空")
@Schema(description = "任务ID")
private String taskId;
/**
* 资料类型列表(要导出的资料类型)
*/
@NotEmpty(message = "资料类型列表不能为空")
@Schema(description = "资料类型列表(存量、新签、续签、减员)")
private List<String> materialTypes;
}
package com.yifu.cloud.plus.v1.batch.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
/**
* 单个新增人员档案附件请求VO
*
* @author huych
* @date 2025-12-31
*/
@Data
@Schema(description = "单个新增人员档案附件请求VO")
public class SingleArchiveUploadVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 身份证号
*/
@NotBlank(message = "身份证号不能为空")
@Schema(description = "身份证号")
private String empIdcard;
/**
* 姓名
*/
@NotBlank(message = "姓名不能为空")
@Schema(description = "姓名")
private String empName;
/**
* 项目编码
*/
@NotBlank(message = "项目编码不能为空")
@Schema(description = "项目编码")
private String deptNo;
/**
* 项目名称
*/
@NotBlank(message = "项目名称不能为空")
@Schema(description = "项目名称")
private String deptName;
/**
* 资料类型(存量、新签、续签、减员)
*/
@NotBlank(message = "资料类型不能为空")
@Schema(description = "资料类型(存量、新签、续签、减员)")
private String materialType;
/**
* 附件ID列表
*/
@NotEmpty(message = "附件ID列表不能为空")
@Schema(description = "附件ID列表")
private List<String> attaIdList;
}
package com.yifu.cloud.plus.v1.batch.vo;
import com.yifu.cloud.plus.v1.batch.entity.TElectronicArchiveDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* 电子档案明细表
*
* @author huych
* @date 2025-12-17 11:03:37
*/
@Data
public class TElectronicArchiveDetailSearchVo extends TElectronicArchiveDetail {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
@Schema(description = "资料类型数组")
private List<String> typeList;
}
package com.yifu.cloud.plus.v1.batch.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
/**
* 电子档案明细表
*
* @author huych
* @date 2025-12-17 11:03:37
*/
@Data
public class TElectronicArchiveDetailVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "主键")
@Schema(description = "主键")
@ExcelProperty("主键")
private String id;
@ExcelAttribute(name = "姓名")
@Schema(description = "姓名")
@ExcelProperty("姓名")
private String empName;
@ExcelAttribute(name = "身份证号码")
@Schema(description = "身份证号码")
@ExcelProperty("身份证号码")
private String empIdcard;
@ExcelAttribute(name = "项目编码")
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
/**
* 客户名称
*/
@ExcelAttribute(name = "客户名称")
@Schema(description = "客户名称")
@ExcelProperty("客户名称")
private String customerName;
/**
* 客户编码
*/
@ExcelAttribute(name = "客户编码")
@Schema(description = "客户编码")
@ExcelProperty("客户编码")
private String customerCode;
/**
* 资料类型(存量、新签、续签、减员,多个用逗号分隔)
*/
@ExcelAttribute(name = "资料类型")
@Schema(description = "资料类型(存量、新签、续签、减员,多个用逗号分隔)")
@ExcelProperty("资料类型")
private String materialType;
/**
* 档案所在地-省
*/
@ExcelAttribute(name = "档案所在地-省")
@Schema(description = "档案所在地-省")
@ExcelProperty("档案所在地-省")
private Integer fileProvince;
/**
* 档案所在地-市
*/
@ExcelAttribute(name = "档案所在地-市")
@Schema(description = "档案所在地-市")
@ExcelProperty("档案所在地-市")
private Integer fileCity;
/**
* 档案所在地-县
*/
@ExcelAttribute(name = "档案所在地-县")
@Schema(description = "档案所在地-县")
@ExcelProperty("档案所在地-县")
private Integer fileTown;
/**
* 状态(0不可用,1可用)
*/
@Length(max = 10, message = "状态(0不可用,1可用) 不能超过10 个字符")
@ExcelAttribute(name = "状态(0不可用,1可用)", maxLength = 10)
@Schema(description = "状态(0不可用,1可用)")
@ExcelProperty("状态(0不可用,1可用)")
private String status;
}
package com.yifu.cloud.plus.v1.batch.vo;
import com.yifu.cloud.plus.v1.batch.entity.TElectronicArchiveTask;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* 电子档案任务表
*
* @author huych
* @date 2025-12-17 11:03:07
*/
@Data
public class TElectronicArchiveTaskSearchVo extends TElectronicArchiveTask {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间起")
private LocalDateTime createTimeStart;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间止")
private LocalDateTime createTimeEnd;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
@Schema(description = "资料类型数组")
private List<String> typeList;
}
package com.yifu.cloud.plus.v1.batch.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 电子档案任务表
*
* @author huych
* @date 2025-12-17 11:03:07
*/
@Data
public class TElectronicArchiveTaskVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "主键")
@Schema(description = "主键")
@ExcelProperty("主键")
private String id;
@ExcelAttribute(name = "任务编号")
@Schema(description = "任务编号")
@ExcelProperty("任务编号")
private String taskCode;
@ExcelAttribute(name = "上传表格名称")
@Schema(description = "上传表格名称")
@ExcelProperty("上传表格名称")
private String uploadFileName;
@ExcelAttribute(name = "上传压缩包名称")
@Schema(description = "上传压缩包名称")
@ExcelProperty("上传压缩包名称")
private String uploadZipName;
@ExcelAttribute(name = "状态")
@Schema(description = "状态(未上传,生成电子档案中,已生成电子档案)")
@ExcelProperty("状态")
private String status;
}
package com.yifu.cloud.plus.v1.batch.vo;
import com.yifu.cloud.plus.v1.batch.entity.TAttaInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
* 任务附件分组VO
* 用于按任务分组展示电子档案的附件信息
*
* @author huych
* @date 2025-12-17
*/
@Data
@Schema(description = "任务附件分组VO")
public class TaskAttachmentGroupVO {
/**
* 任务ID
*/
@Schema(description = "任务ID")
private String taskId;
/**
* 任务编号
*/
@Schema(description = "任务编号")
private String taskCode;
/**
* 上传人
*/
@Schema(description = "上传人")
private String createUser;
/**
* 上传时间
*/
@Schema(description = "上传时间")
private LocalDateTime createTime;
/**
* 资料类型及对应的附件列表
* key: 资料类型(存量、新签、续签、减员)
* value: 该资料类型下的附件列表
*/
@Schema(description = "资料类型及对应的附件列表")
private Map<String, List<TAttaInfo>> materialTypeAttachments;
}
FROM moxm/java:1.8-full
RUN mkdir -p /yifu-batch-biz
WORKDIR yifu-batch-biz
ARG JAR_FILE=target/yifu-batch-biz.jar
COPY ${JAR_FILE} app.jar
EXPOSE 5008
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
CMD sleep 60; java -jar app.jar $JAVA_OPTS
#!/usr/bin/env bash
mvn clean package -Pprd -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
#!/usr/bin/env bash
mvn clean package -Ptest -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
#!/usr/bin/env bash
mvn clean package -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>yifu-batch-biz</artifactId>
<packaging>jar</packaging>
<description>大批量数据处理</description>
<dependencies>
<!--选配: orm 模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-batch-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!--必备:安全模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-security</artifactId>
</dependency>
<!--必备:日志处理-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-log</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-insurances-api</artifactId>
<version>1.0.0</version>
</dependency>
<!--必备:swagger-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-swagger</artifactId>
</dependency>
<!--必备:undertow容器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-core</artifactId>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-cp</artifactId>
<version>4.7.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<serverId>docker-hub</serverId>
<!--指定生成的镜像名-->
<imageName>${my.hub.host}/${map.group.name}/${project.artifactId}:${project.version}</imageName>
<dockerDirectory>${project.basedir}/</dockerDirectory>
<!--指定远程 docker api地址-->
<!--<dockerHost>http://172.16.66.232:2375</dockerHost>-->
<!-- 这里是复制 jar 包到 docker 容器指定目录配置-->
<resources>
<resource>
<targetPath>/</targetPath>
<!--jar 包所在的路径 此处配置的 即对应 target 目录-->
<directory>${project.build.directory}</directory>
<!-- 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 -->
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<forceTags>true</forceTags>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.yifu.cloud.plus.v1.batch;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.EnableYifuResourceServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author pig archetype
* <p>
* 项目启动类
*/
@EnableYifuResourceServer
@SpringBootApplication
public class BatchApplication {
public static void main(String[] args) {
SpringApplication.run(BatchApplication.class, args);
}
}
package com.yifu.cloud.plus.v1.batch.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.batch.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.batch.service.FileUploadService;
import com.yifu.cloud.plus.v1.batch.service.TAttaInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author fang
* 文件上传接口
*/
@RestController
@RequestMapping("/fileUpload")
@Tag(name = "文件上传接口")
@Slf4j
public class FileUploadController {
@Autowired
private OSSUtil ossUtil;
@Autowired
private TAttaInfoService tAttaInfoService;
@Autowired
private FileUploadService fileUploadService;
/**
* @Author fxj
* @Description
* @Date 13:49 2022/6/17
* @Param
* @return
**/
@Operation(description = "OSS文件上传接口" +
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型 1 任务表附件 2 zip附件 3反馈表附件\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/ossUploadFile")
public R<T> uploadImg(@RequestBody MultipartFile file, String filePath, String type, String domain) throws IOException {
return fileUploadService.uploadAsso(file,filePath,type,domain, CommonConstants.ZERO_STRING);
}
/**
* @Author hgw
* @Description 改编自ossUploadFile接口,改变了回传信息——专为预入职微信端使用——忽略了token,其余人慎用
* @Date 13:49 2022/6/17
* @Param relationTypeSub 预入职其他附件的子类型
* @return
**/
@Operation(description = "OSS文件上传接口" +
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型 1 任务表附件 2 zip附件 3反馈表附件\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/uploadFileReturnAtta")
public R<T> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, String type, String domainId) throws IOException {
return fileUploadService.uploadAsso(file,filePath,type,domainId,CommonConstants.ONE_STRING);
}
/**
* @Author fxj
* @Description
* @Date 13:51 2022/6/17
* @Param
* @return
**/
@Operation(description = "附件删除")
@PostMapping("/ossFileDelete/deleteByIds")
public R<Boolean> ossFileDelete(@RequestBody List<String> Ids) {
if (Common.isNotNull(Ids)) {
try {
for (String id : Ids) {
TAttaInfo attaInfo = tAttaInfoService.getById(id);
if (null == attaInfo) {
return R.failed("无对应附件信息");
}
if (tAttaInfoService.removeById(id)) {
ossUtil.deleteObject("yf-hr-efile-source", attaInfo.getAttaSrc());
return R.ok(null, "删除成功!");
}
}
} catch (Exception e) {
log.error("附件删除异常:" + e.getMessage());
return R.failed("附件删除异常!");
}
}
return R.ok(null,"删除失败!");
}
/**
* 获取附件下载地址
*
* @param id
* @return
* @Author fxj
* @Date 2019-08-16
* @param id domainId
**/
@Operation(description = "附件预览下载地址 资源类型 0 存量 1 新签 2续签 3减员")
@GetMapping("/ossFileUrl/{id}")
public R<List<TAttaInfo>> ossFileUrl(@PathVariable String id) {
List<TAttaInfo> attas = tAttaInfoService.list(Wrappers.<TAttaInfo>query().lambda().eq(TAttaInfo::getDomainId,id));
if (Common.isEmpty(attas)) {
return new R<>(attas);
}
for (TAttaInfo atta:attas){
URL url = ossUtil.getObjectUrl("yf-hr-efile-source", atta.getAttaSrc());
atta.setAttaUrl(url.toString().replace("http","https"));
}
return new R<>(attas);
}
/**
* 获取附件下载地址
*
* @param id
* @return
* @Author fxj
* @Date 2019-08-16
* @param id domainId
**/
@Operation(description = "附件预览下载地址 根据ID和附件类型")
@PostMapping("/overrideOssFileUrl")
public R<List<TAttaInfo>> ossFileUrl(@RequestParam String id,@RequestParam String type) {
List<TAttaInfo> attas = tAttaInfoService.list(Wrappers.<TAttaInfo>query().lambda()
.eq(TAttaInfo::getDomainId,id)
.eq(TAttaInfo::getRelationType,type));
if (Common.isEmpty(attas)) {
return new R<>(attas);
}
for (TAttaInfo atta:attas){
URL url = ossUtil.getObjectUrl("yf-hr-efile-source", atta.getAttaSrc());
atta.setAttaUrl(url.toString().replace("http","https"));
}
return new R<>(attas);
}
/**
* 电子档案单个新增-附件上传接口
* 前端先调用此接口上传文件到阿里云OSS,如果文件名重复则自动添加后缀
*
* @param file 文件
* @param filePath 文件路径
* @param type 关系类型 4 人员文件
* @return R<TAttaInfo> 返回附件信息,包含附件ID
* @Author huych
* @Date 2025-12-31
*/
@Operation(description = "电子档案单个新增-附件上传接口,上传文件到OSS并返回附件ID")
@PostMapping(value = "/uploadArchiveFile")
public R<TAttaInfo> uploadArchiveFile(@RequestBody MultipartFile file, String filePath, String type) throws IOException {
if (file == null || file.isEmpty()) {
return R.failed("文件不能为空");
}
String fileName = file.getOriginalFilename();
if (fileName == null || Common.isEmpty(fileName)) {
return R.failed("文件名不能为空");
}
if (fileName.length() > 100) {
return R.failed("文件名不能超过100个字符");
}
// 默认关系类型为4(人员文件)
if (Common.isEmpty(type)) {
type = CommonConstants.FOUR_STRING;
}
// 构建OSS文件路径,如果文件名重复则添加后缀
Map<String, String> keyMap = buildUniqueFilePath(filePath, fileName);
String key = keyMap.get("key");
fileName = keyMap.get("name");
// 校验文件类型
if (!Common.checkFile(key)) {
return R.failed("非法上传类型:" + fileName);
}
try {
// 上传文件到OSS
boolean uploadSuccess = ossUtil.uploadFileByStream(file.getInputStream(), key, "yf-hr-efile-source");
if (!uploadSuccess) {
return R.failed("文件上传失败");
}
// 创建附件信息记录,domainId暂时为空,后续调用uploadSingleArchive接口时更新
TAttaInfo attaInfo = new TAttaInfo();
attaInfo.setAttaName(fileName);
attaInfo.setAttaSrc(key);
attaInfo.setAttaSize(file.getSize());
// 提取文件扩展名
int lastDotIndex = key.lastIndexOf('.');
if (lastDotIndex >= 0) {
attaInfo.setAttaType(key.substring(lastDotIndex));
}
attaInfo.setRelationType(type);
attaInfo.setDomainId(CommonConstants.ZERO_STRING); // 临时设置为"0",后续更新
attaInfo.setTaskId(CommonConstants.ZERO_STRING);// 临时设置为"0",后续更新
attaInfo.setStatus(CommonConstants.ZERO_STRING); // 0可用
// 保存附件信息到数据库
tAttaInfoService.save(attaInfo);
// 获取附件URL
URL url = ossUtil.getObjectUrl("yf-hr-efile-source", attaInfo.getAttaSrc());
attaInfo.setAttaUrl(url.toString().replace("http", "https"));
return R.ok(attaInfo, "文件上传成功");
} catch (Exception e) {
log.error("附件上传异常:", e);
// 上传失败,删除OSS文件
try {
ossUtil.deleteObject("yf-hr-efile-source", key);
} catch (Exception ex) {
log.error("删除OSS文件失败:", ex);
}
return R.failed("上传异常:" + e.getMessage());
}
}
/**
* 构建唯一的文件路径,如果文件名重复则添加后缀
*
* @param filePath 文件路径
* @param fileName 文件名
* @return 唯一的文件路径
*/
private Map<String, String> buildUniqueFilePath(String filePath, String fileName) {
Map<String, String> fileMap = new HashMap<>();
// 检查文件是否存在
if (!fileUploadService.checkFileExists(filePath+ "/" + fileName)) {
fileMap.put("key",filePath+ "/" + fileName);
fileMap.put("name",fileName);
return fileMap;
}
// 文件存在,添加后缀
int lastDotIndex = fileName.lastIndexOf('.');
String nameWithoutExt;
String extension;
if (lastDotIndex > 0) {
nameWithoutExt = fileName.substring(0, lastDotIndex);
extension = fileName.substring(lastDotIndex);
} else {
nameWithoutExt = fileName;
extension = "";
}
fileMap.put("key",filePath + "/" + nameWithoutExt + "_" + System.currentTimeMillis() + extension);
fileMap.put("name",nameWithoutExt + "_" + System.currentTimeMillis() + extension);
return fileMap;
}
}
package com.yifu.cloud.plus.v1.batch.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.batch.entity.TElectronicArchiveDetail;
import com.yifu.cloud.plus.v1.batch.service.TElectronicArchiveDetailService;
import com.yifu.cloud.plus.v1.batch.vo.ArchiveAttachmentDeleteRequestVO;
import com.yifu.cloud.plus.v1.batch.vo.ArchiveBatchDownloadRequestVO;
import com.yifu.cloud.plus.v1.batch.vo.ArchiveSelectedExportRequestVO;
import com.yifu.cloud.plus.v1.batch.vo.TElectronicArchiveDetailSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
/**
* 电子档案明细表
*
* @author huych
* @date 2025-12-17 11:03:37
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/telectronicarchivedetail")
@Tag(name = "电子档案明细表管理")
public class TElectronicArchiveDetailController {
private final TElectronicArchiveDetailService tElectronicArchiveDetailService;
private final MenuUtil menuUtil;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tElectronicArchiveDetail 电子档案明细表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TElectronicArchiveDetail>> getTElectronicArchiveDetailPage(Page<TElectronicArchiveDetail> page
, TElectronicArchiveDetailSearchVo tElectronicArchiveDetail) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tElectronicArchiveDetail);
return new R<>(tElectronicArchiveDetailService.getTElectronicArchiveDetailPage(page, tElectronicArchiveDetail));
}
/**
* 通过id查询电子档案明细表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<TElectronicArchiveDetail> getById(@PathVariable("id") String id) {
return tElectronicArchiveDetailService.getDetailInfoById(id);
}
/**
* 批量下载电子档案
* <p>
* 功能说明:
* 1. 根据表格中的姓名、身份证、项目编码、项目名称、资料类型查验电子档案详情表中是否存在该数据
* 2. 不存在的反馈原因:没找到这个人和项目对应的信息
* 3. 如果资料类型为空,则下载该人员该项目下所有资料类型的附件信息
* 4. 下载为一个压缩包,命名规则为:电子档案批量下载_时间戳.zip
* 5. 一级文件夹:项目编码-姓名-身份证
* 6. 二级文件夹:资料类型,该文件夹下为具体附件
* 7. 压缩包中包含:所有人员的项目编码-姓名-身份证号的文件夹 和 一个结果反馈表(同级)
* 8. 下载的附件必须是TAttaInfo表中status为可用(0)的
* </p>
*
* @param requestList 下载请求列表
* @param response HTTP响应
* @author huych
* @date 2025-12-17
*/
@Operation(summary = "批量下载电子档案", description = "根据姓名、身份证、项目编码、项目名称、资料类型批量下载电子档案,资料类型为空则下载所有资料类型")
@PostMapping("/batchDownload")
public void batchDownloadArchives(
@Valid @RequestBody List<ArchiveBatchDownloadRequestVO> requestList,
HttpServletResponse response) {
tElectronicArchiveDetailService.batchDownloadArchives(requestList, response);
}
/**
* 删除电子档案附件
* <p>
* 功能说明:
* 1. 按照勾选的单个资料类型的单个或多个附件进行删除
* 2. 校验附件是否属于指定的档案明细、任务和资料类型
* 3. 将附件状态更新为不可用(逻辑删除)
* 4. 同时删除OSS上的文件
* 5. 如果该资料类型下的所有附件都被删除,则从明细的资料类型字段中移除该类型
* </p>
*
* @param request 删除请求
* @return 删除结果
* @author huych
* @date 2025-12-17
*/
@Operation(summary = "删除电子档案附件", description = "按资料类型删除单个或多个附件")
@PostMapping("/deleteAttachments")
public R<String> deleteArchiveAttachments(@Valid @RequestBody ArchiveAttachmentDeleteRequestVO request) {
return tElectronicArchiveDetailService.deleteArchiveAttachments(request);
}
/**
* 勾选导出电子档案
* <p>
* 功能说明:
* 1. 根据明细ID、任务ID、资料类型列表导出指定的附件
* 2. 支持勾选某个任务的某个或多个资料类型进行导出
* 3. 导出格式与批量下载功能保持一致
* 4. 一级文件夹:项目编码-姓名-身份证
* 5. 二级文件夹:资料类型,该文件夹下为具体附件
* 6. 压缩包命名规则为:电子档案勾选导出_时间戳.zip
* 7. 压缩包中包含:所有导出的文件夹 和 一个结果反馈表(同级)
* 8. 只导出TAttaInfo表中status为可用(0)的附件
* </p>
*
* @param requestList 导出请求列表
* @param response HTTP响应
* @author huych
* @date 2025-12-17
*/
@Operation(summary = "勾选导出电子档案", description = "根据明细ID、任务ID、资料类型列表勾选导出电子档案")
@PostMapping("/selectedExport")
public void selectedExportArchives(
@Valid @RequestBody List<ArchiveSelectedExportRequestVO> requestList,
HttpServletResponse response) {
tElectronicArchiveDetailService.selectedExportArchives(requestList, response);
}
/**
* 根据查询条件导出电子档案
* <p>
* 功能说明:
* 1. 根据查询条件(姓名、身份证、项目编码、项目名称、客户名称、客户编码、资料类型、档案所在地等)查询电子档案明细
* 2. 导出查询结果中所有人员的电子档案附件
* 3. 导出格式与批量下载功能保持一致
* 4. 一级文件夹:项目编码-姓名-身份证
* 5. 二级文件夹:资料类型,该文件夹下为具体附件
* 6. 压缩包命名规则为:电子档案条件导出_时间戳.zip
* 7. 压缩包中包含:所有人员的项目编码-姓名-身份证号的文件夹 和 一个结果反馈表(同级)
* 8. 只导出TAttaInfo表中status为可用(0)的附件
* </p>
*
* @param searchVo 查询条件
* @param response HTTP响应
* @author huych
* @date 2025-12-30
*/
@Operation(summary = "根据查询条件导出电子档案", description = "根据查询条件导出电子档案,支持姓名、身份证、项目、客户、资料类型等条件")
@PostMapping("/exportByCondition")
public void exportArchivesByCondition(
@RequestBody TElectronicArchiveDetailSearchVo searchVo,
HttpServletResponse response) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
tElectronicArchiveDetailService.exportArchivesByCondition(searchVo, response);
}
/**
* 删除电子档案明细表
* <p>
* 功能说明:
* 1. 单条删除电子档案明细表记录
* 2. 同步删除该明细下所有关联的附件信息
* 3. 将明细状态更新为不可用(逻辑删除)
* 4. 将附件删除
* 5. 同时删除OSS上的附件文件
* </p>
*
* @param id 明细ID
* @return 删除结果
* @author huych
* @date 2025-12-30
*/
@Operation(summary = "删除电子档案明细表", description = "删除电子档案明细表,同步删除所有关联的附件信息")
@DeleteMapping("/{id}")
public R<String> deleteDetail(@PathVariable("id") String id) {
return tElectronicArchiveDetailService.deleteArchiveDetail(id);
}
}
package com.yifu.cloud.plus.v1.batch.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.batch.entity.TElectronicArchiveTask;
import com.yifu.cloud.plus.v1.batch.service.ElectronicArchiveImportService;
import com.yifu.cloud.plus.v1.batch.service.TElectronicArchiveTaskService;
import com.yifu.cloud.plus.v1.batch.vo.SingleArchiveUploadVO;
import com.yifu.cloud.plus.v1.batch.vo.TElectronicArchiveTaskSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
/**
* 电子档案任务表
*
* @author huych
* @date 2025-12-17 11:03:07
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/telectronicarchivetask")
@Tag(name = "电子档案任务表管理")
public class TElectronicArchiveTaskController {
private final TElectronicArchiveTaskService tElectronicArchiveTaskService;
private final ElectronicArchiveImportService importService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tElectronicArchiveTask 电子档案任务表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TElectronicArchiveTask>> getTElectronicArchiveTaskPage(Page<TElectronicArchiveTask> page, TElectronicArchiveTaskSearchVo tElectronicArchiveTask) {
return new R<>(tElectronicArchiveTaskService.getTElectronicArchiveTaskPage(page, tElectronicArchiveTask));
}
/**
* 通过id查询电子档案任务表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<TElectronicArchiveTask> getById(@PathVariable("id") String id) {
return R.ok(tElectronicArchiveTaskService.getById(id));
}
/**
* 通过id删除电子档案任务表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除", description = "通过id删除")
@PostMapping("/deleteById")
public R<?> deleteById(@RequestParam String id) {
return tElectronicArchiveTaskService.deleteTaskById(id);
}
/**
* 第一步:导入Excel模板文件
*
* @param file Excel文件
* @return R
*/
@Operation(summary = "导入Excel模板文件", description = "第一步:导入Excel模板文件,包含身份证、姓名、项目编码、项目名称")
@PostMapping("/importExcel")
public R<?> importExcel(@RequestBody MultipartFile file) {
if (file == null || file.isEmpty()) {
return R.failed("文件不能为空");
}
String fileName = file.getOriginalFilename();
if (fileName == null || !fileName.toLowerCase().endsWith(".xlsx") && !fileName.toLowerCase().endsWith(".xls")) {
return R.failed("文件格式不正确,请上传Excel文件");
}
try {
return importService.importExcelTemplate(file.getInputStream(), fileName);
} catch (IOException e) {
return R.failed("文件读取失败:" + e.getMessage());
}
}
/**
* 第二步:导入ZIP文件
*
* @param file ZIP文件
* @param taskId 任务ID
* @return R
*/
@Operation(summary = "导入ZIP文件", description = "第二步:导入ZIP文件,包含员工档案资料")
@PostMapping("/importZip")
public R<?> importZip(
@Parameter(description = "ZIP文件") @RequestBody MultipartFile file,
@Parameter(description = "任务ID") @RequestParam("taskId") String taskId) {
if (file == null || file.isEmpty()) {
return R.failed("文件不能为空");
}
String fileName = file.getOriginalFilename();
if (fileName == null || !fileName.toLowerCase().endsWith(".zip")) {
return R.failed("文件格式不正确,请上传ZIP文件");
}
return importService.importZipFile(file, taskId);
}
/**
* 查询任务状态
*
* @param taskId 任务ID
* @return R
*/
@Operation(summary = "查询任务状态", description = "查询电子档案导入任务的处理状态")
@GetMapping("/status/{taskId}")
public R<TElectronicArchiveTask> getTaskStatus(@PathVariable("taskId") String taskId) {
TElectronicArchiveTask task = tElectronicArchiveTaskService.getById(taskId);
if (task == null) {
return R.failed("任务不存在");
}
return R.ok(task);
}
/**
* 单个新增人员附件
* 前端先调用 /fileUpload/uploadArchiveFile 接口上传文件获取附件ID列表
* 然后调用此接口传入人员信息和附件ID列表,更新附件的domainId
*
* @param vo 人员信息,包含身份证号、姓名、项目编码、项目名称、资料类型、附件ID列表
* @return R
*/
@Operation(summary = "单个新增人员附件", description = "单个新增人员档案附件,前端先上传文件获取附件ID,再调用此接口更新domainId")
@PostMapping("/uploadSingleArchive")
public R<?> uploadSingleArchive(@Validated @RequestBody SingleArchiveUploadVO vo) {
return importService.uploadSinglePersonArchiveByAttaIds(
vo.getEmpIdcard(),
vo.getEmpName(),
vo.getDeptNo(),
vo.getDeptName(),
vo.getMaterialType(),
vo.getAttaIdList()
);
}
}
package com.yifu.cloud.plus.v1.batch.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.batch.entity.TTaskArchiveRelation;
import com.yifu.cloud.plus.v1.batch.service.TTaskArchiveRelationService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 电子档案上传任务和档案明细关系表
*
* @author huych
* @date 2025-12-17 11:02:01
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/ttaskarchiverelation" )
@Tag(name = "电子档案上传任务和档案明细关系表管理")
public class TTaskArchiveRelationController {
private final TTaskArchiveRelationService tTaskArchiveRelationService;
/**
* 简单分页查询
* @param page 分页对象
* @param tTaskArchiveRelation 电子档案上传任务和档案明细关系表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TTaskArchiveRelation>> getTTaskArchiveRelationPage(Page<TTaskArchiveRelation> page, TTaskArchiveRelation tTaskArchiveRelation) {
return new R<>(tTaskArchiveRelationService.getTTaskArchiveRelationPage(page,tTaskArchiveRelation));
}
/**
* 通过id查询电子档案上传任务和档案明细关系表
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
public R<TTaskArchiveRelation> getById(@PathVariable("id" ) String id) {
return R.ok(tTaskArchiveRelationService.getById(id));
}
}
package com.yifu.cloud.plus.v1.batch.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.batch.entity.SysConfigLimit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 系统限制配置表
*
* @author hgw
* @date 2024-09-24 17:39:57
*/
@Mapper
public interface SysConfigLimitMapper extends BaseMapper<SysConfigLimit> {
/**
* 系统限制配置表简单分页查询
*
* @param configKey 键
* @return
*/
Integer getSysConfigLimitByKey(@Param("configKey") String configKey);
}
package com.yifu.cloud.plus.v1.batch.mapper;
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.batch.entity.TAttaInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Mapper
public interface TAttaInfoMapper extends BaseMapper<TAttaInfo> {
/**
* 附件信息表简单分页查询
*
* @param tAttaInfo 附件信息表
* @return
*/
IPage<TAttaInfo> getTAttaInfoPage(Page<TAttaInfo> page, @Param("tAttaInfo") TAttaInfo tAttaInfo);
/**
* @param tAttaInfo
* @Description: 获取list
* @Author: hgw
* @Date: 2021/5/28 16:02
* @return: java.util.List<com.yifu.cloud.v1.crm.api.entity.TAttaInfo>
**/
List<TAttaInfo> getTAttaInfoList(@Param("tAttaInfo") TAttaInfo tAttaInfo);
List<TAttaInfo> getTAttaInfoListByDoMainId(@Param("domainId") String domainId);
int updateDomainId(@Param("domainId")String domainId, @Param("ids")List<String> ids);
List<TAttaInfo> getAttaByApplyId(@Param("applyId")String applyId);
void deleteByDomainId(@Param("domainId") String domainId);
void deleteByDomainIdAndType(@Param("domainId") String domainId, @Param("relationType") String relationType);
}
package com.yifu.cloud.plus.v1.batch.mapper;
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.batch.entity.TElectronicArchiveDetail;
import com.yifu.cloud.plus.v1.batch.vo.TElectronicArchiveDetailSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 电子档案明细表
*
* @author huych
* @date 2025-12-17 11:03:37
*/
@Mapper
public interface TElectronicArchiveDetailMapper extends BaseMapper<TElectronicArchiveDetail> {
/**
* 电子档案明细表简单分页查询
* @param tElectronicArchiveDetail 电子档案明细表
* @return
*/
IPage<TElectronicArchiveDetail> getTElectronicArchiveDetailPage(Page<TElectronicArchiveDetail> page, @Param("tElectronicArchiveDetail") TElectronicArchiveDetailSearchVo tElectronicArchiveDetail);
List<TElectronicArchiveDetail> getTElectronicArchiveDetailList(@Param("tElectronicArchiveDetail") TElectronicArchiveDetailSearchVo tElectronicArchiveDetail);
}
package com.yifu.cloud.plus.v1.batch.mapper;
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.batch.entity.TElectronicArchiveTask;
import com.yifu.cloud.plus.v1.batch.vo.TElectronicArchiveTaskSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 电子档案任务表
*
* @author huych
* @date 2025-12-17 11:03:07
*/
@Mapper
public interface TElectronicArchiveTaskMapper extends BaseMapper<TElectronicArchiveTask> {
/**
* 电子档案任务表简单分页查询
* @param tElectronicArchiveTask 电子档案任务表
* @return
*/
IPage<TElectronicArchiveTask> getTElectronicArchiveTaskPage(Page<TElectronicArchiveTask> page
, @Param("tElectronicArchiveTask") TElectronicArchiveTaskSearchVo tElectronicArchiveTask);
}
package com.yifu.cloud.plus.v1.batch.mapper;
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.batch.entity.TTaskArchiveRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 电子档案上传任务和档案明细关系表
*
* @author huych
* @date 2025-12-17 11:02:01
*/
@Mapper
public interface TTaskArchiveRelationMapper extends BaseMapper<TTaskArchiveRelation> {
/**
* 电子档案上传任务和档案明细关系表简单分页查询
* @param tTaskArchiveRelation 电子档案上传任务和档案明细关系表
* @return
*/
IPage<TTaskArchiveRelation> getTTaskArchiveRelationPage(Page<TTaskArchiveRelation> page, @Param("tTaskArchiveRelation") TTaskArchiveRelation tTaskArchiveRelation);
}
package com.yifu.cloud.plus.v1.batch.service;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.web.multipart.MultipartFile;
import java.io.InputStream;
/**
* 电子档案导入服务接口
*
* @author huych
* @date 2025-12-17
*/
public interface ElectronicArchiveImportService {
/**
* 第一步:导入Excel模板文件
*
* @param inputStream Excel文件流
* @param fileName 文件名
* @return 导入结果
*/
R<?> importExcelTemplate(InputStream inputStream, String fileName);
/**
* 第二步:导入ZIP文件
*
* @param file ZIP文件
* @param taskId 任务ID
* @return 导入结果
*/
R<?> importZipFile(MultipartFile file, String taskId);
/**
* 第三步:异步处理上传
*
* @param taskId 任务ID
* @param userId 用户ID
* @param userName 用户名
*/
void asyncProcessUpload(String taskId, String userId, String userName);
/**
* 生成任务编号
*
* @return 任务编号
*/
String generateTaskCode();
/**
* 单个新增人员附件(旧方法,保留用于兼容)
*
* @param empIdcard 身份证号
* @param empName 姓名
* @param deptNo 项目编码
* @param deptName 项目名称
* @param materialType 资料类型
* @param files 附件文件列表
* @return 上传结果
*/
R<?> uploadSinglePersonArchive(String empIdcard, String empName, String deptNo,
String deptName, String materialType, MultipartFile[] files);
/**
* 单个新增人员附件(通过附件ID列表)
* 前端先调用文件上传接口获取附件ID列表,再调用此方法更新附件的domainId
*
* @param empIdcard 身份证号
* @param empName 姓名
* @param deptNo 项目编码
* @param deptName 项目名称
* @param materialType 资料类型
* @param attaIdList 附件ID列表
* @return 上传结果
*/
R<?> uploadSinglePersonArchiveByAttaIds(String empIdcard, String empName, String deptNo,
String deptName, String materialType, java.util.List<String> attaIdList);
}
package com.yifu.cloud.plus.v1.batch.service;
import com.yifu.cloud.plus.v1.batch.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
/**
* 文件上传
*
* @author pwang
* @date 2022-07-27 16:16:07
*/
public interface FileUploadService {
R<FileVo> uploadImg(MultipartFile file, String filePath, String type, String domain) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, String type, String domainId) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, String type, String domainId, String taskId) throws IOException;
/**
* 上传文件并返回附件信息(支持传递用户ID,用于异步场景)
*
* @param file 文件
* @param filePath 文件路径
* @param type 类型
* @param domainId 域ID
* @param taskId 任务ID
* @param userId 用户ID
* @param userName 用户名
* @return 附件信息
* @throws IOException IO异常
*/
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, String type, String domainId, String taskId, String userId, String userName) throws IOException;
R<T> uploadAsso(MultipartFile file, String filePath, String type, String domain, String uploadType);
R<T> uploadAsso(MultipartFile file, String filePath, String type, String domain, String uploadType, String taskId);
/**
* 检查文件是否存在
*
* @param filePath 文件路径
* @return 是否存在
*/
boolean checkFileExists(String filePath);
}
package com.yifu.cloud.plus.v1.batch.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.batch.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
public interface TAttaInfoService extends IService<TAttaInfo> {
/**
* @param domainId 关联id
* @Description: 根据domainId获取附件
* @Author: huych
* @Date: 2025/12/17 18:23
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>
**/
List<TAttaInfo> getTAttaInfoListByDoMainId(String domainId);
Boolean updateDomainId(String domainId, List<String> ids);
/**
* @param applyId
* @Description: 收入证明使用
* @Author: hgw
* @Date: 2023/2/22 10:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>>
**/
R<List<TAttaInfo>> getAttaByApplyId(String applyId);
/**
* @param domainId 关联id
* @Description: 删除附件
* @Author: hgw
* @Date: 2024/6/20 14:50
* @return: void
**/
void deleteByDomainId(String domainId);
TAttaInfo add(TAttaInfo attaInfo);
}
package com.yifu.cloud.plus.v1.batch.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.batch.entity.TElectronicArchiveDetail;
import com.yifu.cloud.plus.v1.batch.vo.ArchiveAttachmentDeleteRequestVO;
import com.yifu.cloud.plus.v1.batch.vo.ArchiveBatchDownloadRequestVO;
import com.yifu.cloud.plus.v1.batch.vo.ArchiveSelectedExportRequestVO;
import com.yifu.cloud.plus.v1.batch.vo.TElectronicArchiveDetailSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 电子档案明细表
*
* @author huych
* @date 2025-12-17 11:03:37
*/
public interface TElectronicArchiveDetailService extends IService<TElectronicArchiveDetail> {
/**
* 电子档案明细表简单分页查询
* @param tElectronicArchiveDetail 电子档案明细表
* @return
*/
IPage<TElectronicArchiveDetail> getTElectronicArchiveDetailPage(Page<TElectronicArchiveDetail> page, TElectronicArchiveDetailSearchVo tElectronicArchiveDetail);
/**
* 通过id查询电子档案明细表
* @param id id
* @return
*/
R<TElectronicArchiveDetail> getDetailInfoById(String id);
/**
* 批量下载电子档案
* @param requestList 下载请求列表
* @param response HTTP响应
*/
void batchDownloadArchives(List<ArchiveBatchDownloadRequestVO> requestList, HttpServletResponse response);
/**
* 删除电子档案附件
* @param request 删除请求
* @return 删除结果
*/
R<String> deleteArchiveAttachments(ArchiveAttachmentDeleteRequestVO request);
/**
* 勾选导出电子档案
* @param requestList 导出请求列表
* @param response HTTP响应
*/
void selectedExportArchives(List<ArchiveSelectedExportRequestVO> requestList, HttpServletResponse response);
/**
* 根据查询条件导出电子档案
* @param searchVo 查询条件
* @param response HTTP响应
*/
void exportArchivesByCondition(TElectronicArchiveDetailSearchVo searchVo, HttpServletResponse response);
/**
* 删除电子档案明细表
* @param id 明细ID
* @return 删除结果
*/
R<String> deleteArchiveDetail(String id);
}
package com.yifu.cloud.plus.v1.batch.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.batch.entity.TElectronicArchiveTask;
import com.yifu.cloud.plus.v1.batch.vo.TElectronicArchiveTaskSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
/**
* 电子档案任务表
*
* @author huych
* @date 2025-12-17 11:03:07
*/
public interface TElectronicArchiveTaskService extends IService<TElectronicArchiveTask> {
/**
* 电子档案任务表简单分页查询
* @param tElectronicArchiveTask 电子档案任务表
* @return
*/
IPage<TElectronicArchiveTask> getTElectronicArchiveTaskPage(Page<TElectronicArchiveTask> page, TElectronicArchiveTaskSearchVo tElectronicArchiveTask);
R deleteTaskById(String id);
}
package com.yifu.cloud.plus.v1.batch.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.batch.entity.TTaskArchiveRelation;
/**
* 电子档案上传任务和档案明细关系表
*
* @author huych
* @date 2025-12-17 11:02:01
*/
public interface TTaskArchiveRelationService extends IService<TTaskArchiveRelation> {
/**
* 电子档案上传任务和档案明细关系表简单分页查询
* @param tTaskArchiveRelation 电子档案上传任务和档案明细关系表
* @return
*/
IPage<TTaskArchiveRelation> getTTaskArchiveRelationPage(Page<TTaskArchiveRelation> page, TTaskArchiveRelation tTaskArchiveRelation);
}
package com.yifu.cloud.plus.v1.batch.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.batch.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.batch.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.batch.service.TAttaInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.net.URL;
import java.util.List;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Service
public class TAttaInfoServiceImpl extends ServiceImpl<TAttaInfoMapper, TAttaInfo> implements TAttaInfoService {
@Autowired
private OSSUtil ossUtil;
@Override
public List<TAttaInfo> getTAttaInfoListByDoMainId(String domainId) {
return baseMapper.getTAttaInfoListByDoMainId(domainId);
}
@Override
public TAttaInfo add(TAttaInfo attaInfo) {
this.save(attaInfo);
return attaInfo;
}
@Override
public Boolean updateDomainId(String domainId, List<String> ids){
if (Common.isEmpty(domainId) || !Common.isNotEmpty(ids)){
return false;
}
return baseMapper.updateDomainId(domainId,ids) > 0;
}
@Override
public R<List<TAttaInfo>> getAttaByApplyId(String applyId) {
List<TAttaInfo> list = baseMapper.getAttaByApplyId(applyId);
if (Common.isNotNull(list)) {
URL url;
for (TAttaInfo atta:list) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(url.toString());
}
return R.ok(list);
}else{
return R.failed("没有附件");
}
}
@Override
public void deleteByDomainId(String domainId) {
baseMapper.deleteByDomainId(domainId);
}
}
package com.yifu.cloud.plus.v1.batch.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.batch.entity.TElectronicArchiveDetail;
import com.yifu.cloud.plus.v1.batch.entity.TElectronicArchiveTask;
import com.yifu.cloud.plus.v1.batch.entity.TTaskArchiveRelation;
import com.yifu.cloud.plus.v1.batch.mapper.TElectronicArchiveDetailMapper;
import com.yifu.cloud.plus.v1.batch.mapper.TElectronicArchiveTaskMapper;
import com.yifu.cloud.plus.v1.batch.service.TElectronicArchiveTaskService;
import com.yifu.cloud.plus.v1.batch.service.TTaskArchiveRelationService;
import com.yifu.cloud.plus.v1.batch.vo.TElectronicArchiveTaskSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 电子档案任务表
*
* @author huych
* @date 2025-12-17 11:03:07
*/
@Log4j2
@Service
@RequiredArgsConstructor
public class TElectronicArchiveTaskServiceImpl extends ServiceImpl<TElectronicArchiveTaskMapper, TElectronicArchiveTask> implements TElectronicArchiveTaskService {
private final TTaskArchiveRelationService relationService;
private final TElectronicArchiveDetailMapper detailMapper;
/**
* 电子档案任务表简单分页查询
* @param tElectronicArchiveTask 电子档案任务表
* @return
*/
@Override
public IPage<TElectronicArchiveTask> getTElectronicArchiveTaskPage(Page<TElectronicArchiveTask> page, TElectronicArchiveTaskSearchVo tElectronicArchiveTask){
//权限赋值
initSearchVo(tElectronicArchiveTask);
return baseMapper.getTElectronicArchiveTaskPage(page,tElectronicArchiveTask);
}
@Override
public R deleteTaskById(String id) {
TElectronicArchiveTask task = this.getById(id);
if (task == null) {
return R.failed("任务不存在");
}
if (!CommonConstants.ZERO_STRING.equals(task.getStatus())) {
return R.failed("只有待上传状态的任务才可删除!");
}
baseMapper.deleteById(id);
List<TTaskArchiveRelation> relationList = relationService.list(Wrappers.<TTaskArchiveRelation>query().lambda()
.eq(TTaskArchiveRelation::getTaskId, id));
if (Common.isNotNull(relationList)) {
for (TTaskArchiveRelation relation : relationList) {
//删除关联关系表
relationService.removeById(relation.getId());
//删除电子档案明细表
detailMapper.delete(Wrappers.<TElectronicArchiveDetail>query().lambda()
.eq(TElectronicArchiveDetail::getStatus,CommonConstants.ZERO_STRING)
.eq(TElectronicArchiveDetail::getId,relation.getArchiveDetailId()));
}
}
return R.ok();
}
public void initSearchVo(TElectronicArchiveTaskSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
long roleId = 1569585030423158786L;
boolean isSsc = this.haveRole(user, roleId);
if (isSsc || CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
searchVo.setCreateBy(null);
}
}
public boolean haveRole(YifuUser user, long roleId) {
List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP);
for (Long role : roleList) {
if (role == roleId) {
return true;
}
}
return false;
}
}
package com.yifu.cloud.plus.v1.batch.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.batch.entity.TTaskArchiveRelation;
import com.yifu.cloud.plus.v1.batch.mapper.TTaskArchiveRelationMapper;
import com.yifu.cloud.plus.v1.batch.service.TTaskArchiveRelationService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 电子档案上传任务和档案明细关系表
*
* @author huych
* @date 2025-12-17 11:02:01
*/
@Log4j2
@Service
public class TTaskArchiveRelationServiceImpl extends ServiceImpl<TTaskArchiveRelationMapper, TTaskArchiveRelation> implements TTaskArchiveRelationService {
/**
* 电子档案上传任务和档案明细关系表简单分页查询
* @param tTaskArchiveRelation 电子档案上传任务和档案明细关系表
* @return
*/
@Override
public IPage<TTaskArchiveRelation> getTTaskArchiveRelationPage(Page<TTaskArchiveRelation> page, TTaskArchiveRelation tTaskArchiveRelation){
return baseMapper.getTTaskArchiveRelationPage(page,tTaskArchiveRelation);
}
}
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.batch.mapper.SysConfigLimitMapper">
<resultMap id="sysConfigLimitMap" type="com.yifu.cloud.plus.v1.batch.entity.SysConfigLimit">
<id property="id" column="ID"/>
<result property="configKey" column="CONFIG_KEY"/>
<result property="configValue" column="CONFIG_VALUE"/>
<result property="remark" column="REMARK"/>
</resultMap>
<!-- 根据key获取value -->
<select id="getSysConfigLimitByKey" resultType="java.lang.Integer">
SELECT a.CONFIG_VALUE
FROM sys_config_limit a
where a.CONFIG_KEY = #{configKey} limit 1
</select>
</mapper>
lient {
application.id = seata-server ## 应用唯一id
transaction.service.group = yifu_tx_group ## 所属事务组
}
\ No newline at end of file
This diff is collapsed.
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