Commit 3f0e299e authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
#	yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
parents 1e2fff65 f4ff31f2
apiVersion: apps/v1 # 指定api版本,此值必须在kubectl api-versions中
kind: Deployment # 指定创建资源的角色/类型
metadata: # 资源的元数据/属性
name: yifu-insurances # 资源的名字,在同一个namespace中必须唯一
namespace: qas-mvp # 部署在哪个namespace中
spec: # 资源规范字段
selector: # 选择器
matchLabels: # 匹配标签
app: yifu-insurances
replicas: 1 # 声明副本数目
#revisionHistoryLimit: 3 # 保留历史版本
#strategy: # 策略
# rollingUpdate: # 滚动更新
# maxSurge: 30% # 最大额外可以存在的副本数,可以为百分比,也可以为整数
# maxUnavailable: 30% # 示在更新过程中能够进入不可用状态的 Pod 的最大值,可以为百分比,也可以为整数
# type: RollingUpdate # 滚动更新策略
template: # 模版
metadata: # 模版
labels: # 设定资源的标签
app: yifu-insurances
annotations:
dapr.io/enabled: "true" #设定此参数为 true 注入Dapr sidecar到pod
dapr.io/app-id: "yifu-insurances" #应用程序唯一 ID。 用于服务发现、状态封装 和 发布/订阅 消费者ID
dapr.io/app-port: "5005" #这个参数告诉Dapr你的应用程序正在监听哪个端口。
#dapr.io/log-level: "debug" #为 Dapr sidecar设置日志级别。 允许的值是debug,info,warn,error。 默认是 info
#dapr.io/log-as-json: "false" #将此参数设置为true以JSON格式输出日志。 默认值为 false.
#dapr.io/config: file #告诉 Dapr 要使用哪个配置 CRD
dapr.io/app-protocol: "http" #告诉 Dapr 你的应用程序正在使用哪种协议。 有效选项是 http and grpc。 Default is http
#dapr.io/app-max-concurrency: "20" #限制应用程序的并发量。 有效的数值是大于 0
#dapr.io/app-ssl: "false" #告诉Dapr通过不安全的SSL连接调用应用程序。 同时适用于HTTP和gRPC。 Traffic between your app and the Dapr sidecar is encrypted with a certificate issued by a non-trusted certificate authority, which is considered insecure. 默认值为 false.
dapr.io/metrics-port: "9090" #设置 sidecar 度量服务器的端口。 默认值为 9090
#dapr.io/sidecar-cpu-limit: 2 #Dapr sidecar可以使用的最大CPU数量。 默认情况下未设置
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
spec: # 资源规范字段
nodeSelector: # node 选择器
node-type: worker # node标签
containers: # 容器
- name: yifu-insurances # 容器的名字
image: hub.yifucenter.com:5500/qas-mvp/yifu-insurances-biz:1.0.0 # 容器镜像地址
imagePullPolicy: Always # 每次Pod启动拉取镜像策略,三个选择 Always、Never、IfNotPresent
# Always,每次都检查;Never,每次都不检查(不管本地是否有);IfNotPresent,如果本地有就不检查,如果没有就拉取(手动测试时,
# 已经打好镜像存在docker容器中时,使用存在不检查级别,
# 默认为每次都检查,然后会进行拉取新镜像,因镜像仓库不存在,导致部署失败)
ports:
- containerPort: 5005 # 容器端口
env: # 启动环境配置信息 active and timeZone set
- name: SPRING_PROFILES_ACTIVE
value: 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-insurances # 资源的名字,在同一个namespace中必须唯一
name: yifu-insurances # 资源的名字,在同一个namespace中必须唯一
namespace: qas-mvp # 部署在哪个namespace中
spec: # 资源规范字段
ports:
- port: 5005 # service 端口
protocol: TCP # 协议
targetPort: 5005 # 容器暴露的端口
name: http-insurances # 端口名称
- port: 3500 # service 端口
protocol: TCP # 协议
targetPort: 3500 # 容器暴露的端口
name: http-insurances-dapr
selector: # 选择器
app: yifu-insurances # 资源名称
type: ClusterIP # ClusterIP 类型
\ No newline at end of file
......@@ -28,7 +28,6 @@ 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.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
import com.yifu.cloud.plus.v1.check.entity.TCheckIdCard;
import com.yifu.cloud.plus.v1.check.entity.TCheckMobile;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants;
......@@ -49,7 +48,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.bouncycastle.jcajce.provider.asymmetric.ec.KeyFactorySpi;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
......@@ -64,7 +62,6 @@ import java.io.InputStream;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/**
* 人员档案表
......@@ -2079,17 +2076,21 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
// 新增项目档案不需要返回ID
saveProject(empAddsMap, projectsMap);
// 新增合同
saveContract(projectsMap, contractsMap);
saveContract(projectsMap, contractsMap,empAddsMap);
addVo.setProjectsMap(projectsMap);
addVo.setEmpAddsMap(empAddsMap);
addVo.setContractsMap(contractsMap);
return addVo;
}
private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap, Map<String, EmpContractDispatchVo> contractsMap) {
private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap,
Map<String, EmpContractDispatchVo> contractsMap,
Map<String, EmpAddDispatchVo> empAddsMap) {
if (Common.isNotNull(contractsMap)) {
EmpContractDispatchVo contractAdd;
TEmployeeContractInfo contract;
EmpAddDispatchVo emp;
EmpProjectDispatchVo project;
for (Map.Entry<String, EmpContractDispatchVo> entry : contractsMap.entrySet()) {
contractAdd = entry.getValue();
try {
......@@ -2097,11 +2098,15 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
contract = new TEmployeeContractInfo();
BeanUtil.copyProperties(contractAdd, contract);
if (Common.isEmpty(contract.getEmpId()) && Common.isNotNull(projectsMap)) {
EmpProjectDispatchVo project = projectsMap.get(contract.getEmpIdcard());
project = projectsMap.get(contract.getEmpIdcard());
if (Common.isNotNull(project)) {
contract.setEmpId(project.getId());
contract.setEmpNo(project.getEmpNo());
}
emp = empAddsMap.get(contract.getEmpIdcard());
if (Common.isNotNull(emp)){
contract.setEmpId(emp.getId());
}
}
contractMapper.insert(contract);
contractAdd.setId(contract.getId());
......
package com.yifu.cloud.plus.v1.yifu.common.core.constant;
import java.util.regex.Pattern;
/**
* @author fang
* 常用的一些验证,如手机、移动号码、联通号码、电信号码、密码、座机、 邮政编码、邮箱、年龄、身份证、URL、QQ、汉字、字母、数字等校验表达式
......@@ -63,4 +66,7 @@ public class ValidityConstants {
public static final String PATTERN_50 = "^.{1,50}$";
/** 最多60位 规则 */
public static final String PATTERN_60 = "^.{1,60}$";
/** 不超过两位小数的正数 */
public static final String POSITIVE_INTEGER_PATTERN_TWO_FLOAT = "^[+]?([0-9]+(.[0-9]{1,2})?)$";
}
......@@ -284,10 +284,34 @@ public class InsurancesConstants {
* 保单号不能为空
*/
public static final String POLICY_NO_EMPTY = "保单号不能为空";
/**
* 保单号长度超过50字符限制
*/
public static final String POLICY_NO_MORE_THAN_50 = "保单号长度超过50字符限制";
/**
* 发票号长度超过50字符限制
*/
public static final String INVOICE_NO_MORE_THAN_50 = "发票号长度超过50字符限制";
/**
* 保费不能为空
*/
public static final String ACTUAL_PREMIUM_NO_EMPTY = "保费不能为空";
public static final String ACTUAL_PREMIUM_EMPTY = "保费不能为空";
/**
* 保费金额格式错误
*/
public static final String ACTUAL_PREMIUM_PARSE_ERROR= "保费金额格式错误";
/**
* 替换类型无法登记保单保费
*/
public static final String BUY_TYPE_FOUR_NOT_REGISTERED= "替换类型无法登记保单保费";
/**
* 商险待投保,无法登记保单保费
*/
public static final String BUY_HANDLE_ONE_NOT_REGISTERED = "商险待投保,无法登记保单保费";
/**
* 商险投保中,无法登记保单保费
*/
public static final String BUY_HANDLE_TWO_NOT_REGISTERED = "商险投保中,无法登记保单保费";
/**
* 保单号不存在或已过期
*/
......@@ -304,24 +328,49 @@ public class InsurancesConstants {
/***********************减员办理错误码********************************/
/**
* 已被替换,不允许减员
* 商险已出险,无法减员
*/
public static final String IS_EFFECT_ERROR = "已被替换,不允许减员";
public static final String INSURANCE_IS_USE_ERROR = "商险已出险,无法减员";
/**
* 已超出保单截止日期,不允许减员
* 非已投保状态,无法减员
*/
public static final String IS_OVERDUE_ERROR = "已超出保单截止日期,不允许减员";
public static final String REFUND_ERROR = "非已投保状态,无法减员";
/**
* 已出险的,不允许减员
* 商险待投保,无法减员
*/
public static final String IS_USE_ERROR = "已出险的,不允许减员";
public static final String INSURANCE_BUY_STATUS_ONE_ERROR = "商险待投保,无法减员";
/**
* 非已投保状态,无法减员
* 商险投保中,无法减员
*/
public static final String REFUND_ERROR = "非已投保状态,无法减员";
public static final String INSURANCE_BUY_STATUS_TWO_ERROR = "商险投保中,无法减员";
/**
* 商险无效,无法减员
*/
public static final String INSURANCE_IS_EFFECT_ERROR = "商险无效,无法减员";
/**
* 商险已过期,无法减员
*/
public static final String INSURANCE_IS_OVERDUE_ERROR = "商险已过期,无法减员";
/**
* 商险待减员,无法减员
*/
public static final String INSURANCE_REFUND_STATUS_ONE_ERROR = "商险待减员,无法减员";
/**
* 商险减员中,无法减员
*/
public static final String INSURANCE_REFUND_STATUS_TWO_ERROR = "商险减员中,无法减员";
/**
* 商险已减员,无法减员
*/
public static final String INSURANCE_REFUND_STATUS_FOUR_ERROR = "商险已减员,无法减员";
/**
* 替换结算月份和原有结算月份相同
......@@ -329,14 +378,41 @@ public class InsurancesConstants {
public static final String SETTLE_MONTH_IDENTICAL = "替换结算月份和原有结算月份相同";
/**
* 当前保单已处于减员流程,无法变更结算月
* 商险待投保,无法减员
*/
public static final String SETTLE_MONTH_CHANGE_REDUCE_HANDLE_STATUS_ERROR = "商险待投保,无法减员";
/**
* 商险待投保,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_BUY_STATUS_ONE_ERROR = "商险待投保,无法变更结算月";
/**
* 商险投保中,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_BUY_STATUS_TWO_ERROR = "商险投保中,无法变更结算月";
/**
* 商险已减员,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR = "商险已减员,无法变更结算月";
/**
* 商险结算中,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_REDUCE_HANDLE_STATUS_ERROR = "当前保单已处于减员流程,无法变更结算月";
public static final String SETTLE_MONTH_CHANGE_SETTLE_STATUS_TWO_ERROR = "商险结算中,无法变更结算月";
/**
* 当前保单已结算,无法变更结算月
* 商险已结算,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_SETTLE_HANDLE_STATUS_ERROR = "当前保单已结算,无法变更结算月";
public static final String SETTLE_MONTH_CHANGE_SETTLE_STATUS_THREE_ERROR = "商险已结算,无法变更结算月";
/**
* 替换类型无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR ="替换类型无法变更结算月";
/**
* 替换项目ID和原有项目ID相同
......@@ -354,44 +430,55 @@ public class InsurancesConstants {
public static final String SETTLE_MONTH_CHANGE_LIST_IS_EMPTY ="当前变更结算月列表为空";
/**
* 替换人员不允许变更结算月
* 替换类型无法变更项目
*/
public static final String SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR ="替换人员不允许变更结算月";
public static final String DEPT_NO_CHANGE_IS_EFFECT_ERROR ="替换类型无法变更项目";
/**
* 替换人员不允许变更所属项目
* 商险待投保,无法变更项目
*/
public static final String DEPT_NO_CHANGE_IS_EFFECT_ERROR ="替换人员不允许变更所属项目";
public static final String DEPT_NO_CHANGE_BUY_STATUS_ONE_ERROR = "商险待投保,无法变更项目";
/**
* 当前保单已结算,无法变更所属项目
* 商险投保中,无法变更项目
*/
public static final String DEPT_NO_CHANGE_SETTLE_HANDLE_STATUS_ERROR = "当前保单已结算,无法变更所属项目";
public static final String DEPT_NO_CHANGE_BUY_STATUS_TWO_ERROR = "商险投保中,无法变更项目";
/**
* 退费金额不能为空
* 商险已减员,无法变更项目
*/
public static final String REFUND_MONEY_NOT_EMPTY = "退费金额不能为空";
public static final String DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR = "商险已减员,无法变更项目";
/**
* 退费金额格式不正确
* 商险结算中,无法变更项目
*/
public static final String REFUND_MONEY_PARSE_ERROR = "退费金额格式不正确";
public static final String DEPT_NO_CHANGE_SETTLE_STATUS_TWO_ERROR = "商险结算中,无法变更项目";
/**
* 退费金额不能小于零
* 商险已结算,无法变更项目
*/
public static final String REFUND_MONEY_MIN_ERROR= "退费金额不能小于零";
public static final String DEPT_NO_CHANGE_SETTLE_STATUS_THREE_ERROR = "商险已结算,无法变更项目";
/**
* 退费金额不能大于999999.99
* 替换项目编码不能为空
*/
public static final String REFUND_MONEY_MAX_ERROR = "退费金额不能大于999999.99";
public static final String DEPT_NO_CHANGE_NOT_EMPTY = "替换项目编码不能为空";
/**
* 姓名不能超过20个字符
* 替换项目不存在
*/
public static final String DEPT_NO_CHANGE_IS_NOT_EXIST = "替换项目不存在";
/**
* 退费金额不能为空
*/
public static final String EMP_NAME_MAX_LENGTH_ERROR = "姓名不能超过20个字符";
public static final String REFUND_MONEY_NOT_EMPTY = "保费不能为空";
/**
* 保费金额格式不正确
*/
public static final String REFUND_MONEY_PARSE_ERROR = "保费金额格式不正确";
/**
* 员工减员记录不存在
......@@ -408,5 +495,56 @@ public class InsurancesConstants {
*/
public static final String REFUND_EXPORT = "减员导出办理";
/**
* 减员办理成功
*/
public static final String REFUND_EXPORT_SUCCESS = "减员办理成功";
/**
* 减员办理成功
*/
public static final String REFUND_EXPORT_FAILED = "减员办理失败";
/**
* 员工投保信息不存在
*/
public static final String USER_DATA_IS_NOT_EXIST = "员工投保信息不存在";
/***********************商险产品错误码********************************/
/**
* 新增保险公司
*/
public static final String NEW_INSURANCE_COMPANY = "新增保险公司";
/**
* 修改保险公司
*/
public static final String UPDATE_INSURANCE_COMPANY = "修改保险公司";
/**
* 新增险种
*/
public static final String NEW_INSURANCE_TYPE = "新增险种";
/**
* 修改险种
*/
public static final String UPDATE_INSURANCE_TYPE = "修改险种";
/**
* 新增费率
*/
public static final String NEW_INSURANCE_TYPE_RATE = "新增费率";
/**
* 删除费率
*/
public static final String DELETE_INSURANCE_TYPE_RATE = "删除费率";
/**
* 新增购买标准
*/
public static final String NEW_INSURANCE_TYPE_STANDARD = "新增购买标准";
/**
* 删除购买标准
*/
public static final String DELETE_INSURANCE_TYPE_STANDARD = "删除购买标准";
}
......@@ -27,7 +27,7 @@ public class TInsuranceType extends BaseEntity {
*/
@Schema(description = "险种id")
@TableId(type = IdType.ASSIGN_ID)
private Long id;
private String id;
/**
* 险种名称
......
......@@ -25,7 +25,7 @@ public class TInsuranceTypeStandard extends BaseEntity {
/**
* 购买标准id
*/
@Schema(description = "保险公司id")
@Schema(description = "购买标准id")
@TableId(type = IdType.ASSIGN_ID)
private String id;
......
......@@ -152,6 +152,29 @@ public class ValidityUtil {
return idCard.matches(ValidityConstants.IDCARD_PATTERN) ;
}
/**
* 判断是否是整数或者是携带一位或者两位的小数
* @param refundMoney 金额
* @return boolean
*/
public static boolean validateMoney(final String refundMoney) {
if(Common.isEmpty(refundMoney)){
return Boolean.FALSE ;
}
if(!BigDecimalUtils.isBigDecimal(refundMoney)){
return Boolean.FALSE ;
}
if(!refundMoney.matches(ValidityConstants.POSITIVE_INTEGER_PATTERN_TWO_FLOAT)){
return Boolean.FALSE ;
}
boolean max = refundMoney.compareTo(CommonConstants.MONEY_MAX) < 0;
boolean min = refundMoney.compareTo(CommonConstants.MONEY_MIN) > 0;
if (!max || !min){
return Boolean.FALSE ;
}
return Boolean.TRUE;
}
/**
* 姓名验证
*
......@@ -259,7 +282,7 @@ public class ValidityUtil {
}
/**
* 验证字符串 最多50位
* 验证字符串 最多60位
*
* @author licancan
* @param str
......
......@@ -15,7 +15,11 @@ import java.io.Serializable;
@Tag(name = "变更所属项目")
public class DeptChangeCheckParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
//姓名+身份证号+原项目编码+保险公司+险种+保单开始时间+保单结束时间+保单结束时间+标准+有效+未减员 是否存在校验
/**
* 商险id
*/
@Schema(description = "商险id")
private String id;
/**
* 员工姓名
*/
......
......@@ -226,6 +226,14 @@ public class InsuredListVo implements Serializable {
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 购买月数
*/
@Schema(description = "购买月数")
private Long buyMonth;
//订单编号、姓名、身份证号、投保类型、项目、岗位、保单开始日期、保单结束日期、保险公司、险种、购买标准、医保、身故或残疾、预估保费、实际保费、保单号、发票号、保单生效日期、商险购买地、商险办理地、是否出险、是否过期、是否失效、派单日期、派单人
}
......@@ -183,5 +183,15 @@ public class RefundExportListVo implements Serializable {
@Schema(description = "备注")
private String remark;
/**
* 购买月数
*/
@Schema(description = "购买月数")
private Long buyMonth;
/**
* 购买天数
*/
@Schema(description = "购买天数")
private long buyDay;
}
......@@ -15,7 +15,12 @@ import java.io.Serializable;
@Tag(name = "结算月变更")
public class SettleMonthChangeCheckParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
//姓名+身份证号+原项目编码+保险公司+险种+保单开始时间+保单结束时间+保单结束时间+标准+有效+未减员 是否存在校验
/**
* 商险id
*/
@Schema(description = "商险id")
private String id;
/**
* 员工姓名
*/
......
......@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
......@@ -12,7 +11,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
......@@ -88,7 +86,7 @@ public class TInsuranceCompanyController {
* @return
*/
@Operation(summary = "查询保险公司列表(不分页)", description = "查询保险公司列表(不分页)")
@GetMapping("/list" )
@GetMapping("/list")
public R<List<TInsuranceCompany>> getInsuranceCompanyList() {
return R.ok(insuranceCompanyService.getInsuranceCompanyList());
}
......
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import io.swagger.v3.oas.annotations.Operation;
......
......@@ -23,4 +23,6 @@ public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> {
TInsuranceRefund getByInsDetailId(String id);
void updateByInsDetailId(TInsuranceRefund insuranceRefund);
int updateRefundMoney(TInsuranceRefund insuranceRefund);
}
......@@ -15,4 +15,6 @@ public interface TInsuranceRefundService extends IService<TInsuranceRefund> {
void updateByInsDetailId(TInsuranceRefund insuranceRefund);
int updateRefundMoney(TInsuranceRefund insuranceRefund);
}
......@@ -24,4 +24,11 @@ implements TInsuranceRefundService {
public void updateByInsDetailId(TInsuranceRefund insuranceRefund) {
this.baseMapper.updateByInsDetailId(insuranceRefund);
}
@Override
public int updateRefundMoney(TInsuranceRefund insuranceRefund) {
return this.baseMapper.updateRefundMoney(insuranceRefund);
}
}
......@@ -101,22 +101,23 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
return R.failed("当前险种信息不存在或已被删除");
}
String month = insuranceTypeRate.getMonth();
if (!ValidityUtil.isMonth(month)){
if (!ValidityUtil.validatePositiveInt(month)){
return R.failed("当前月份格式不正确");
}
String rate = insuranceTypeRate.getRate();
if (!Common.isNumber(rate)){
if (!ValidityUtil.validateMoney(rate)){
return R.failed("当前费率格式不正确");
}
LambdaQueryWrapper<TInsuranceTypeRate> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT).eq(TInsuranceTypeRate::getInsuranceTypeId,insuranceTypeId)
.eq(TInsuranceTypeRate :: getRate,insuranceTypeRate.getRate()).eq(TInsuranceTypeRate:: getMonth ,insuranceTypeRate.getMonth());
.eq(TInsuranceTypeRate:: getMonth ,insuranceTypeRate.getMonth());
List<TInsuranceTypeRate> list = this.list(queryWrapper);
if (list.isEmpty()){
insuranceTypeRate.setDeleteFlag(CommonConstants.ZERO_INT);
insuranceTypeRate.setCreateBy(user.getId());
insuranceTypeRate.setCreateName(user.getNickname());
insuranceTypeRate.setCreateTime(LocalDateTime.now());
return R.ok(this.baseMapper.insert(insuranceTypeRate));
}else{
return R.failed("当前险种已存在相同的费率");
......
......@@ -9,13 +9,15 @@ 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 com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeStandardMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeStandardService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -31,10 +33,14 @@ import java.util.List;
@Service
public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTypeStandardMapper, TInsuranceTypeStandard> implements TInsuranceTypeStandardService {
@Resource
private TInsuranceTypeService insuranceTypeService;
private TInsuranceTypeService tInsuranceTypeService;
@Resource
private TInsuranceDetailService insuranceDetailService;
private TInsuranceDetailService tInsuranceDetailService;
@Resource
private TInsuranceOperateService tInsuranceOperateService;
/**
* 查询购买标准列表
......@@ -48,7 +54,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
if (Common.isEmpty(id)){
return R.failed("险种id为空");
}
TInsuranceType byId = insuranceTypeService.getById(id);
TInsuranceType byId = tInsuranceTypeService.getById(id);
if ( Common.isEmpty(byId) || CommonConstants.ONE_INT == byId.getDeleteFlag()){
return R.failed("当前险种信息不存在或已被删除");
}
......@@ -79,7 +85,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
queryWrapper.eq(TInsuranceDetail::getInsuranceTypeId,byId.getInsuranceTypeId())
.eq(TInsuranceDetail::getBuyStandard,byId.getBuyStandard())
.eq(TInsuranceDetail::getDeleteFlag,CommonConstants.ZERO_INT);
List<TInsuranceDetail> list = insuranceDetailService.list(queryWrapper);
List<TInsuranceDetail> list = tInsuranceDetailService.list(queryWrapper);
if (Common.isNotEmpty(list)){
return R.failed("当前险种的购买标准已存在对应的商险信息,不能删除");
}
......@@ -105,20 +111,20 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
return R.failed("新增的购买标准信息为空");
}
Long insuranceTypeId = insuranceTypeStandard.getInsuranceTypeId();
TInsuranceType byId = insuranceTypeService.getById(insuranceTypeId);
TInsuranceType byId = tInsuranceTypeService.getById(insuranceTypeId);
if ( Common.isEmpty(byId) || CommonConstants.ONE_INT == byId.getDeleteFlag()){
return R.failed("当前险种信息不存在或已被删除");
}
String buyStandard = insuranceTypeStandard.getBuyStandard();
String medicalQuota = insuranceTypeStandard.getMedicalQuota();
String dieDisableQuota = insuranceTypeStandard.getDieDisableQuota();
if (!Common.isNumber(buyStandard)){
if (!ValidityUtil.validateMoney(buyStandard)){
return R.failed("当前购买标准格式不正确");
}
if (!Common.isNumber(medicalQuota)){
if (!ValidityUtil.validateMoney(medicalQuota)){
return R.failed("当前医疗额度格式不正确");
}
if (!Common.isNumber(dieDisableQuota)){
if (!ValidityUtil.validateMoney(dieDisableQuota)){
return R.failed("当前身故或残疾额度格式不正确");
}
LambdaQueryWrapper<TInsuranceTypeStandard> queryWrapper = new LambdaQueryWrapper<>();
......@@ -131,10 +137,13 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
insuranceTypeStandard.setCreateBy(user.getId());
insuranceTypeStandard.setCreateName(user.getNickname());
insuranceTypeStandard.setCreateTime(LocalDateTime.now());
return R.ok(this.baseMapper.insert(insuranceTypeStandard),"新增购买标准成功");
}else{
return R.failed("当前险种下的购买标准已存在");
}
}
}
......@@ -5,7 +5,7 @@
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceCompanyMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany">
<id property="id" column="ID" jdbcType="BIGINT"/>
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="companyName" column="COMPANY_NAME" jdbcType="VARCHAR"/>
<result property="companyAddress" column="COMPANY_ADDRESS" jdbcType="VARCHAR"/>
<result property="companyDocking" column="COMPANY_DOCKING" jdbcType="VARCHAR"/>
......
......@@ -541,8 +541,6 @@
t_insurance_refund refund
where
detail.ID = refund.INS_DETAIL_ID
and
(detail.REDUCE_HANDLE_STATUS is not null and detail.REDUCE_HANDLE_STATUS != 3)
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
......@@ -607,9 +605,6 @@
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.reduceHandleStatus != null ">
and detail.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if test="param.isOverdue != null ">
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
</if>
......
......@@ -25,11 +25,22 @@
t_insurance_refund
set
REDUCE_HANDLE_STATUS = #{reduceHandleStatus},
REMARK = #{remark},
UPDATE_BY = #{createBy},
UPDATE_TIME = #{createTime}
where
INS_DETAIL_ID = #{insDetailId}
</update>
<update id="updateRefundMoney">
update
t_insurance_refund
set
REFUND_MONEY = #{refundMoney},
UPDATE_BY = #{updateBy},
UPDATE_TIME = #{updateTime}
where
INS_DETAIL_ID = #{insDetailId}
</update>
<select id="getByInsDetailId" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund">
</select>
......
......@@ -5,9 +5,9 @@
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType">
<id property="id" column="ID" jdbcType="BIGINT"/>
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="name" column="NAME" jdbcType="VARCHAR"/>
<result property="insuranceCompanyId" column="INSURANCE_COMPANY_ID" jdbcType="BIGINT"/>
<result property="insuranceCompanyId" column="INSURANCE_COMPANY_ID" jdbcType="VARCHAR"/>
<result property="receiptUnitName" column="RECEIPT_UNIT_NAME" jdbcType="VARCHAR"/>
<result property="bankName" column="BANK_NAME" jdbcType="VARCHAR"/>
<result property="bankNo" column="BANK_NO" jdbcType="VARCHAR"/>
......
......@@ -6,7 +6,7 @@
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="insuranceTypeId" column="INSURANCE_TYPE_ID" jdbcType="BIGINT"/>
<result property="insuranceTypeId" column="INSURANCE_TYPE_ID" jdbcType="VARCHAR"/>
<result property="buyStandard" column="BUY_STANDARD" jdbcType="VARCHAR"/>
<result property="medicalQuota" column="MEDICAL_QUOTA" jdbcType="VARCHAR"/>
<result property="dieDisableQuota" column="DIE_DISABLE_QUOTA" jdbcType="VARCHAR"/>
......
......@@ -32,6 +32,8 @@ public class DispatchConstants {
public static final String DISPATCH_FUND_ADD_FAIL = "公积金派增办理失败:";
public static final String DISPATCH_FUND_REDUCE = "公积金派减";
public static final String DISPATCH_SOCIAL_REDUCE = "社保派减";
public static final String SOCIAL_RECORD_ROSTER_EXPORT = "社保花名册导出";
public static final String SOCIAL_RECORD_EXPORT = "公积金变更清册导出";
/**
......@@ -82,7 +84,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String PARAM_EMPLOYEE_ID_EMPTY = "传参有误:员工ID不可为空";
......@@ -92,7 +93,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String NO_EMPLOYEE_OF_ID = "无对应员工ID的员工信息";
......@@ -102,7 +102,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String EMPLOYEE_SOCIAL_FUND_INFO ="员工、社保、公积金信息";
......@@ -112,7 +111,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String DISPATCH_ID_NOT_EMPTY ="派单ID不可为空,多个ID请用逗号分割!";
......@@ -122,7 +120,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String OFFICE = "offical";
......@@ -132,7 +129,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String ADD = "add";
......@@ -142,7 +138,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String MINUS = "minus";
......@@ -152,7 +147,6 @@ public class DispatchConstants {
* @Date 2022-01-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String UPDATE_RELATION_FROM_SALARY_FAILED = "更新缴费库薪资结算状态失败,请重新尝试或联系管理人员!";
......
......@@ -58,6 +58,14 @@ public class TProvidentFund extends BaseEntity {
@Schema(description = "公积金户" )
@ExcelProperty("公积金户" )
private String providentHousehold;
/**
* 公积金户名称
*/
@ExcelAttribute(name = "公积金户名称", maxLength = 32)
@Schema(description = "公积金户名称" )
@ExcelProperty("公积金户名称" )
private String providentHouseholdName;
/**
* 公积金起缴日期
*/
......
......@@ -58,6 +58,13 @@ public class TSocialInfo extends BaseEntity {
@Schema(description = "社保户" )
@ExcelProperty("社保户" )
private String socialHousehold;
/**
* 社保户名称
*/
@ExcelAttribute(name = "社保户名称", maxLength = 32)
@Schema(description = "社保户名称" )
@ExcelProperty("社保户名称" )
private String socialHouseholdName;
/**
* 社保起缴日期
*/
......
package com.yifu.cloud.plus.v1.yifu.social.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;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Description 社保办理导出花名册
* @Date 19:25 2022/7/27
* @Param
* @return
**/
@Data
public class FundHandleExportVo implements Serializable {
/**
* 派单类型:0派增1派减
*/
@ExcelAttribute(name = "派单类型", errorInfo = "派单类型不能为空", maxLength = 1,isDataId = true,readConverterExp = "0=派增,1=派减",needExport = true)
@ExcelProperty("派单类型" )
private String type;
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", errorInfo = "员工姓名不能为空", maxLength = 50,needExport = true)
@ExcelProperty("员工姓名" )
private String empName;
/**
* 员工身份证
*/
@ExcelAttribute(name = "员工身份证", errorInfo = "员工身份证不能为空", maxLength = 20,needExport = true)
@ExcelProperty("员工身份证" )
private String empIdcard;
/**
* 所属单位
*/
@ExcelAttribute(name = "客户名称", isNotEmpty = true,needExport = true)
@Schema(description = "客户名称(所属单位)")
@ExcelProperty("客户名称" )
private String belongUnit;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", isNotEmpty = true,needExport = true)
@Schema(description = "项目名称(结算主体)")
@ExcelProperty("项目名称" )
private String settleDomain;
/**
* 手机号码
*/
@ExcelAttribute(name = "手机号码", maxLength = 20,needExport = true)
@ExcelProperty("手机号码" )
private String empMobile;
/**
* 创建人姓名
*/
@ExcelAttribute(name = "申请人",needExport = true)
@Schema(description = "申请人")
@ExcelProperty("申请人" )
private String creasteUserName;
/**
* 公积金缴纳地-省
*/
@ExcelAttribute(name = "公积金缴纳地-省", maxLength = 32, isDataId = true, isArea = true, parentField = "",needExport = true)
@ExcelProperty("公积金缴纳地-省" )
private String fundProvince;
/**
* 公积金缴纳地-市
*/
@ExcelAttribute(name = "公积金缴纳地-市", maxLength = 32, isDataId = true, isArea = true, parentField = "fundProvince",needExport = true)
@ExcelProperty("公积金缴纳地-市" )
private String fundCity;
/**
* 公积金缴纳地-县
*/
@ExcelAttribute(name = "公积金缴纳地-县", maxLength = 32, isDataId = true, isArea = true, parentField = "fundCity",needExport = true)
@ExcelProperty("公积金缴纳地-县" )
private String fundTown;
/**
* 公积金起缴日期
*/
@ExcelAttribute(name = "公积金起缴日期", errorInfo = "公积金起缴日期不能为空",needExport = true)
@ExcelProperty("公积金起缴日期" )
private LocalDateTime providentStart;
/**
* 单位公积金缴纳基数
*/
@ExcelAttribute(name = "单位公积金缴纳基数", errorInfo = "单位公积金缴纳基数不能为空",needExport = true)
@ExcelProperty("单位公积金缴纳基数" )
private BigDecimal unitProvidengCardinal;
/**
* 单位公积金缴纳比例
*/
@ExcelAttribute(name = "单位公积金缴纳比例", errorInfo = "单位公积金缴纳比例不能为空",needExport = true)
@ExcelProperty("单位公积金缴纳比例" )
private BigDecimal unitProvidentPer;
/**
* 单位公积金缴纳费用
*/
@ExcelAttribute(name = "单位公积金缴纳费用", isNotEmpty = true, errorInfo = "单位公积金缴纳费用不能为空",needExport = true)
@ExcelProperty("单位公积金缴纳费用" )
private BigDecimal unitProvidentFee;
/**
* 个人公积金缴纳基数
*/
@ExcelAttribute(name = "个人公积金缴纳基数", errorInfo = "个人公积金缴纳基数不能为空",needExport = true)
@ExcelProperty("个人公积金缴纳基数" )
private BigDecimal personalProvidentCardinal;
/**
* 个人公积金缴纳比例
*/
@ExcelAttribute(name = "个人公积金缴纳比例", errorInfo = "个人公积金缴纳比例不能为空",needExport = true)
@ExcelProperty("个人公积金缴纳比例" )
private BigDecimal personalProvidentPer;
/**
* 个人公积金缴纳费用
*/
@ExcelAttribute(name = "个人公积金缴纳费用", isNotEmpty = true, errorInfo = "个人公积金缴纳费用不能为空",needExport = true)
@ExcelProperty("个人公积金缴纳费用" )
private BigDecimal personalProvidentFee;
/**
* 公积金户
*/
@ExcelAttribute(name = "公积金户", errorInfo = "公积金户不能为空", maxLength = 32,needExport = true)
@ExcelProperty("公积金户" )
private String providentHouseholdName;
/**
*
*委托备注
**/
@ExcelAttribute(name = "委托备注",needExport = true)
@ExcelProperty("委托备注" )
private String fundTrustRemark;
/*******************************导出字段结束*************************************************/
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Description 公积金补缴清册
* @Date 19:04 2022/7/27
* @Param
* @return
**/
@Data
public class FundSupplementaryExportVo implements Serializable {
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", errorInfo = "员工姓名不能为空", maxLength = 50,needExport = true)
private String empName;
/**
* 公积金起缴日期
*/
@NotBlank(message = "公积金起缴日期不能为空")
@ExcelAttribute(name = "公积金起缴日期", errorInfo = "公积金起缴日期不能为空",needExport = true)
@Schema(description = "公积金起缴日期")
private LocalDateTime providentStart;
/**
* 单位公积金缴纳基数
*/
@NotBlank(message = "单位公积金缴纳基数不能为空")
@ExcelAttribute(name = "单位公积金缴纳基数", errorInfo = "单位公积金缴纳基数不能为空",needExport = true)
@Schema(description = "单位公积金缴纳基数")
private BigDecimal unitProvidengCardinal;
/**
* 单位公积金缴纳比例
*/
@NotBlank(message = "单位公积金缴纳比例不能为空")
@ExcelAttribute(name = "单位公积金缴纳比例", errorInfo = "单位公积金缴纳比例不能为空",needExport = true)
@Schema(description = "单位公积金缴纳比例")
private BigDecimal unitProvidentPer;
/**
* 单位公积金缴纳费用
*/
@NotBlank(message = "单位公积金缴纳费用不能为空")
@ExcelAttribute(name = "单位公积金缴纳费用", isNotEmpty = true, errorInfo = "单位公积金缴纳费用不能为空",needExport = true)
@Schema(description = "单位公积金缴纳费用")
private BigDecimal unitProvidentFee;
/**
* 个人公积金缴纳基数
*/
@NotBlank(message = "个人公积金缴纳基数不能为空")
@ExcelAttribute(name = "个人公积金缴纳基数", errorInfo = "个人公积金缴纳基数不能为空",needExport = true)
@Schema(description = "个人公积金缴纳基数")
private BigDecimal personalProvidentCardinal;
/**
* 个人公积金缴纳比例
*/
@NotBlank(message = "个人公积金缴纳比例不能为空")
@ExcelAttribute(name = "个人公积金缴纳比例", errorInfo = "个人公积金缴纳比例不能为空",needExport = true)
@Schema(description = "个人公积金缴纳比例")
private BigDecimal personalProvidentPer;
/**
* 个人公积金缴纳费用
*/
@NotBlank(message = "个人公积金缴纳费用不能为空")
@ExcelAttribute(name = "个人公积金缴纳费用", isNotEmpty = true, errorInfo = "个人公积金缴纳费用不能为空",needExport = true)
@Schema(description = "个人公积金缴纳费用")
private BigDecimal personalProvidentFee;
/*******************************导出字段结束*************************************************/
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Date 2022/7/27
* @Description
* @Version 1.0
*/
@Data
public class SocialHandleSearchVo extends TDispatchInfo {
//派单开始时间(查询专用)
@ExcelAttribute(name = "创建开始时间")
@TableField(exist = false)
private LocalDateTime createTimeStart;
//派单截止时间(查询专用)
@ExcelAttribute(name = "创建截止时间")
@TableField(exist = false)
private LocalDateTime createTimeEnd;
/**
* 社保户
*/
@Schema(description = "社保户" )
@TableField(exist = false)
private String socialHouseholdName;
/**
* 公积金户
*/
@Schema(description = "公积金户" )
@TableField(exist = false)
private String providentHouseholdName;
/**
* @Author fxj
* 查询数据起
**/
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
private int limitEnd;
}
......@@ -37,6 +37,7 @@ import java.util.Date;
* @author fxj
* @date 2022-07-15 11:38:05
*/
@Schema(description = "社保公积金查询-导出使用" )
@Data
public class TSocialFundInfoExportVo extends RowIndex implements Serializable {
......
......@@ -28,18 +28,24 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.log4j.Log4j2;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
/**
......@@ -112,20 +118,39 @@ public class TDispatchInfoController {
}
/**
* 简单分页查询--审核
* 简单分页查询--社保办理列表
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--审核
* @param tDispatchInfo 派单信息记录表--社保办理列表
* @return
*/
@Operation(description = "简单分页查询--审核")
@GetMapping("/pageHandle")
public R<IPage<TDispatchInfo>> getTDispatchHandlePage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setStatus(CommonConstants.ONE_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
@Operation(description = "简单分页查询--社保办理列表")
@GetMapping("/pageSocialHandle")
public R<IPage<TDispatchInfo>> getTDispatchSocialHandlePage(Page<TDispatchInfo> page, SocialHandleSearchVo tDispatchInfo) {
// 获取结算主体权限 TODO
List<String> settleDomains = null;
// 获取自定义sql TODO
String sql = CommonConstants.EMPTY_STRING;
return new R<>(tDispatchInfoService.getTDispatchSocialHandlePage(page,tDispatchInfo,settleDomains,sql));
}
/**
* 简单分页查询--公积金办理列表
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--公积金办理列表
* @return
*/
@Operation(description = "简单分页查询--公积金办理列表")
@GetMapping("/pageFundHandle")
public R<IPage<TDispatchInfo>> getTDispatchFundHandlePage(Page<TDispatchInfo> page, SocialHandleSearchVo tDispatchInfo) {
// 获取结算主体权限 TODO
List<String> settleDomains = null;
// 获取自定义sql TODO
String sql = CommonConstants.EMPTY_STRING;
return new R<>(tDispatchInfoService.getTDispatchFundHandlePage(page,tDispatchInfo,settleDomains,sql));
}
/**
* 通过id查询派单信息记录表
* @param id id
* @param id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_tdispatchinfo_get')")
......@@ -268,4 +293,62 @@ public class TDispatchInfoController {
@RequestParam(name = "socialType", required = false) String socialType) {
return tDispatchInfoService.addApplyHandle(ids,typeSub,handleStatus,handleRemark,socialType);
}
/**
* @Author fxj
* @Description 导出 社保花名册
* @Date 17:40 2022/7/27
* @Param
* @return
**/
@PostMapping("/doexportSocialRecordRoster")
@Operation(description = "导出社保花名册 hasPermission('wxhr:tdispatchinfo_doexportSocialRecordRoster')")
@SysLog("导出社保花名册信息")
@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_doexportSocialRecordRoster')")
public void doexportSocialRecordRoster(HttpServletResponse response, HttpServletRequest request,
@RequestParam(name = "idStr", required = false) String idStr,
@RequestBody String[] exportFields, SocialHandleSearchVo searchVo) {
tDispatchInfoService.doexportSocialRecordRoster(response,searchVo,idStr,exportFields);
}
/**
* @Author fxj
* @Description 导出 公积金变更清册
* @Date 20:05 2022/7/27
* @Param
* @return
**/
@PostMapping("/doexportFundRecordChange")
@Operation(description = "导出公积金变更清册 hasPermission('wxhr:tdispatchinfo_doexportFundRecordChange')")
@SysLog("导出公积金变更清册")
@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_doexportFundRecordChange')")
public void doexportFundRecordChange(HttpServletResponse response, HttpServletRequest request,
@RequestParam(name = "idStr", required = false) String idStr,
@RequestBody String[] exportFields, SocialHandleSearchVo searchVo) {
// 获取结算主体权限 TODO
List<String> settleDomains = null;
// 获取自定义sql TODO
String sql = CommonConstants.EMPTY_STRING;
tDispatchInfoService.doexportFundRecordChange(response, idStr,searchVo,settleDomains,sql);
}
/**
* @Author fxj
* @Description 导出公积金补缴清册
* @Date 20:05 2022/7/27
* @Param
* @return
**/
@GetMapping("/doExportFundSupplementaryRecord")
@Operation(description = "导出公积金补缴清册 hasPermission('wxhr:tdispatchinfo_doExportFundSupplementaryRecord')")
@SysLog("导出公积金补缴清册")
@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_doExportFundSupplementaryRecord')")
public R<List<FundSupplementaryExportVo>> doExportFundSupplementaryRecord(HttpServletResponse response, HttpServletRequest request,
@RequestParam(name = "idStr", required = false) String idStr,
@RequestBody SocialHandleSearchVo searchVo) {
// 获取结算主体权限 TODO
List<String> settleDomains = null;
// 获取自定义sql TODO
String sql = CommonConstants.EMPTY_STRING;
return tDispatchInfoService.getFundSupplementaryRecords(idStr,searchVo,settleDomains,sql);
}
}
......@@ -146,12 +146,11 @@ public class TPreDispatchInfoController {
* @param status 0 是 1 否
* @return R
*/
@Operation(summary = "修改资料是否提交", description = "修改资料是否提交:status 0 是 1 否(social_tpredispatchinfo_edit)")
@Operation(summary = "修改资料是否提交", description = "修改资料是否提交:status 0 是 1 否")
@SysLog("修改资料是否提交")
@PostMapping("/modifyDataSubmitStatus")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_edit')")
public R<Boolean> modifyDataSubmitStatus(@RequestParam(value = "ids",required = true)String ids,
@RequestParam(value = "status",required = true)String status) {
public R<Boolean> modifyDataSubmitStatus(@RequestParam(value = "ids")String ids,
@RequestParam(value = "status")String status) {
return tPreDispatchInfoService.modifyDataSubmitStatus(ids,status);
}
/**
......@@ -165,7 +164,7 @@ public class TPreDispatchInfoController {
@SysLog("清空预派单默认的派单合同信息")
@PostMapping("/clearContractInfo")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_edit')")
public R<Boolean> clearContractInfo(@RequestParam(value = "ids",required = true)String ids) {
public R<Boolean> clearContractInfo(@RequestParam(value = "ids")String ids) {
return tPreDispatchInfoService.clearContractInfo(ids);
}
......@@ -178,12 +177,11 @@ public class TPreDispatchInfoController {
* @param cancelRemark 不派单 时填写
* @return R
**/
@Operation(summary = "更新预派单是否派单状态", description = "更新预派单是否派单状态(social_tpredispatchinfo_edit)")
@Operation(summary = "更新预派单是否派单状态", description = "更新预派单是否派单状态")
@SysLog("更新预派单是否派单状态")
@PostMapping("/updateDispatchFlag")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_edit')")
public R<Boolean> updateDispatchFlag(@RequestParam(value = "id",required = true)String id,
@RequestParam(value = "dispatchFlag",required = true)String dispatchFlag,
public R<Boolean> updateDispatchFlag(@RequestParam(value = "id")String id,
@RequestParam(value = "dispatchFlag")String dispatchFlag,
@RequestParam(value = "cancelRemark",required = false)String cancelRemark) {
return tPreDispatchInfoService.updateDispatchFlag(id,dispatchFlag,cancelRemark);
}
......@@ -197,7 +195,8 @@ public class TPreDispatchInfoController {
*/
@Operation(summary = "单个派单:按创建人和ID", description = "单个派单:按创建人和ID")
@PostMapping("/dispatchById")
public R<Boolean> dispatchById(@RequestParam(value = "id",required = true)String id) {
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_dispatch')")
public R<Boolean> dispatchById(@RequestParam(value = "id")String id) {
return tPreDispatchInfoService.dispatchById(id);
}
......@@ -209,6 +208,7 @@ public class TPreDispatchInfoController {
*/
@Operation(summary = "一键派单:按创建人查找正常未派单的数据", description = "一键派单:按创建人查找正常未派单的数据")
@PostMapping("/oneKeyToDispatch")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_dispatch')")
public R oneKeyToDispatch(@RequestParam String idStr) {
return tPreDispatchInfoService.oneKeyToDispatch(idStr);
}
......
......@@ -20,7 +20,12 @@ package com.yifu.cloud.plus.v1.yifu.social.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.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.FundHandleExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.FundSupplementaryExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import org.apache.ibatis.annotations.Mapper;
......@@ -51,4 +56,85 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
**/
List<TDispatchInfoExportVo> exportDispatch(@Param("tDispatchInfo") TDispatchInfoSearchVo tDispatchInfo);
/**
* 导出社保花名册数据查询
* @Author fxj
* @Date 2019-10-12
* @param dispatchInfo
* @param settleDomainIds
* @param idsStr
* @return
**/
List<SocialHandleExportVo> getSocialRecordRosterList(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,
@Param("settleDomainIds")List<String> settleDomainIds,
@Param("idsStr") List<String> idsStr,
@Param("sql") String sql);
/**
* 导出社保花名册数据查询count
* @Author fxj
* @Date 2019-10-12
* @param dispatchInfo
* @param settleDomainIds
* @param idsStr
* @return
**/
int getSocialRecordRosterListCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,
@Param("settleDomainIds")List<String> settleDomainIds,
@Param("idsStr") List<String> idsStr,
@Param("sql") String sql);
/**
* 社保页面查询
* @Author fxj
* @Date 2019-10-12
* @param tDispatchInfo
* @param settleDomains
* @param sql
* @return
**/
IPage<TDispatchInfo> getTDispatchSocialHandlePage(Page<TDispatchInfo> page,
@Param("tDispatchInfo") SocialHandleSearchVo tDispatchInfo,
@Param("settleDomainIds")List<String> settleDomains,
@Param("sql")String sql);
/**
* 公积金办理页面查询
* @Author fxj
* @Date 2019-10-12
* @param tDispatchInfo
* @param settleDomains
* @param sql
* @return
**/
IPage<TDispatchInfo> getTDispatchFundHandlePage(Page<TDispatchInfo> page,
@Param("tDispatchInfo")SocialHandleSearchVo tDispatchInfo,
@Param("settleDomainIds")List<String> settleDomains,
@Param("sql")String sql);
/**
* @Author fxj
* @Description 公积金补交清册
* @Date 19:47 2022/7/27
* @Param
* @return
**/
List<FundSupplementaryExportVo> getFundSupplementaryRecords(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,
@Param("settleDomainIds")List<String> settleDomainIds,
@Param("idsStr") List<String> idsStr,
@Param("sql") String sql);
/**
* @Author fxj
* @Description 公积金变更清册cout
* @Date 19:47 2022/7/27
* @Param
* @return
**/
int getFundRecordCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,
@Param("settleDomainIds")List<String> settleDomainIds,
@Param("idsStr") List<String> idsStr,
@Param("sql") String sql);
List<FundHandleExportVo> getFundRecordList(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,
@Param("settleDomainIds")List<String> settleDomainIds,
@Param("idsStr") List<String> idsStr,
@Param("sql") String sql);
}
......@@ -23,9 +23,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
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.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.web.bind.annotation.RequestBody;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
......@@ -49,6 +51,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo);
@GlobalTransactional
void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList,
YifuUser user);
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream);
R<Boolean> removeByIdDiy(String id);
......@@ -60,4 +67,14 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R<List<ErrorMessage>> addApplyAudit(String ids,String auditStatus,String auditRemark);
R<List<ErrorMessage>> addApplyHandle(String ids,String typeSub,String handleStatus,String handleRemark,String socialType);
void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields);
IPage<TDispatchInfo> getTDispatchSocialHandlePage(Page<TDispatchInfo> page, SocialHandleSearchVo tDispatchInfo, List<String> settleDomains, String sql);
IPage<TDispatchInfo> getTDispatchFundHandlePage(Page<TDispatchInfo> page, SocialHandleSearchVo tDispatchInfo, List<String> settleDomains, String sql);
R<List<FundSupplementaryExportVo>> getFundSupplementaryRecords(String idStr,SocialHandleSearchVo dispatchInfo, List<String> settleDomains, String sql);
void doexportFundRecordChange(HttpServletResponse response,String idStr, SocialHandleSearchVo searchVo, List<String> settleDomains, String sql);
}
......@@ -26,6 +26,7 @@
<resultMap id="tProvidentFundMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund">
<id property="id" column="ID"/>
<result property="providentHousehold" column="PROVIDENT_HOUSEHOLD"/>
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="providentStart" column="PROVIDENT_START"/>
<result property="unitProvidengCardinal" column="UNIT_PROVIDENG_CARDINAL"/>
<result property="personalProvidentCardinal" column="PERSONAL_PROVIDENT_CARDINAL"/>
......@@ -76,6 +77,7 @@
<sql id="Base_Column_List">
a.ID,
a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD_NAME,
a.PROVIDENT_START,
a.UNIT_PROVIDENG_CARDINAL,
a.PERSONAL_PROVIDENT_CARDINAL,
......
......@@ -26,6 +26,7 @@
<resultMap id="tSocialInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo">
<id property="id" column="ID"/>
<result property="socialHousehold" column="SOCIAL_HOUSEHOLD"/>
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
<result property="socialStartDate" column="SOCIAL_START_DATE"/>
<result property="unitPensionCardinal" column="UNIT_PENSION_CARDINAL"/>
<result property="unitMedicalCardinal" column="UNIT_MEDICAL_CARDINAL"/>
......@@ -37,7 +38,6 @@
<result property="personalMedicalCardinal" column="PERSONAL_MEDICAL_CARDINAL"/>
<result property="personalBigailmentCardinal" column="PERSONAL_BIGAILMENT_CARDINAL"/>
<result property="personalUnemploymentCardinal" column="PERSONAL_UNEMPLOYMENT_CARDINAL"/>
<result property="personalWorkInjuryCardinal" column="PERSONAL_WORK_INJURY_CARDINAL"/>
<result property="empId" column="EMP_ID"/>
<result property="empNo" column="EMP_NO"/>
<result property="empName" column="EMP_NAME"/>
......@@ -124,6 +124,7 @@
<sql id="Base_Column_List">
a.ID,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_HOUSEHOLD_NAME,
a.SOCIAL_START_DATE,
a.UNIT_PENSION_CARDINAL,
a.UNIT_MEDICAL_CARDINAL,
......
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