Commit 4eafd399 authored by fangxinjiang's avatar fangxinjiang

公积金自动化-fxj

parent 2279880f
...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity; ...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat; 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.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.archives.vo.TSocialPreDetailVo;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; 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.TEmployeeInsurancePre;
...@@ -109,6 +110,9 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -109,6 +110,9 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "商险是否已购买 0 是 1 否") @Schema(description = "商险是否已购买 0 是 1 否")
private String socialIsBuy; private String socialIsBuy;
@Schema(description = "公积金是否已参保 0 是 1 否")
private String fundIsBuy;
@Schema(description = "档案所在地-县编号") @Schema(description = "档案所在地-县编号")
@TableField(updateStrategy = FieldStrategy.IGNORED) @TableField(updateStrategy = FieldStrategy.IGNORED)
private String townCode; private String townCode;
...@@ -143,10 +147,18 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -143,10 +147,18 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private TDispatchInfoPreVo dispatchInfoPreVo; private TDispatchInfoPreVo dispatchInfoPreVo;
@Schema(description = "公积金待购买信息")
@TableField(exist = false)
private TDispatchInfoPreVo dispatchInfoFundPreVo;
@Schema(description = "社保流程中信息集合") @Schema(description = "社保流程中信息集合")
@TableField(exist = false) @TableField(exist = false)
private List<TSocialPreDetailVo> exitSocialInfoList; private List<TSocialPreDetailVo> exitSocialInfoList;
@Schema(description = "公积金流程中信息集合")
@TableField(exist = false)
private List<TFundPreDetailVo> exitFundInfoList;
@Schema(description = "附件集合") @Schema(description = "附件集合")
@TableField(exist = false) @TableField(exist = false)
private List<TAttaInfo> attaList; private List<TAttaInfo> attaList;
......
...@@ -20,7 +20,13 @@ public class EmployeePreSocialListVo implements Serializable { ...@@ -20,7 +20,13 @@ public class EmployeePreSocialListVo implements Serializable {
@Schema(description = "社保待购买信息") @Schema(description = "社保待购买信息")
private TDispatchInfoPreVo dispatchInfoPreVo; private TDispatchInfoPreVo dispatchInfoPreVo;
@Schema(description = "公积金待购买信息")
private TDispatchInfoPreVo dispatchInfoPreFundVo;
@Schema(description = "社保流程中信息集合") @Schema(description = "社保流程中信息集合")
private List<TSocialPreDetailVo> exitSocialInfoList; private List<TSocialPreDetailVo> exitSocialInfoList;
@Schema(description = "公积金流程中信息集合")
private List<TFundPreDetailVo> exitFundInfoList;
} }
...@@ -123,6 +123,9 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -123,6 +123,9 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "社保是否已参保 0 是 1 否") @Schema(description = "社保是否已参保 0 是 1 否")
private String socialIsBuy; private String socialIsBuy;
@Schema(description = "公积金是否已参保 0 是 1 否")
private String fundIsBuy;
@Schema(description = "身份证合集") @Schema(description = "身份证合集")
private List<String> idcardList; private List<String> idcardList;
...@@ -138,9 +141,15 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -138,9 +141,15 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "社保待购买信息") @Schema(description = "社保待购买信息")
private TDispatchInfoPreVo dispatchInfoPreVo; private TDispatchInfoPreVo dispatchInfoPreVo;
@Schema(description = "公积金待购买信息")
private TDispatchInfoPreVo dispatchInfoFundPreVo;
@Schema(description = "社保流程中信息集合") @Schema(description = "社保流程中信息集合")
private List<TSocialPreDetailVo> exitSocialInfoList; private List<TSocialPreDetailVo> exitSocialInfoList;
@Schema(description = "公积金流程中信息集合")
private List<TFundPreDetailVo> exitFundInfoList;
@Schema(description = "附件集合") @Schema(description = "附件集合")
private List<TAttaInfoSaveVo> attaList; private List<TAttaInfoSaveVo> attaList;
......
...@@ -220,7 +220,7 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -220,7 +220,7 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00") @JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
private Date expectedCollectionTime; private Date expectedCollectionTime;
/** /**
* 预计派单时间 * 预计派单时间:社保(入职日期当天 0 入职一个月 1 ...)公积金(起缴日期当日)
*/ */
@Schema(description = "预计派单类型 入职日期当天 0 入职一个月 1 ...") @Schema(description = "预计派单类型 入职日期当天 0 入职一个月 1 ...")
private String expectedCollectionType; private String expectedCollectionType;
...@@ -267,14 +267,46 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -267,14 +267,46 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "入职确认信息主表id") @Schema(description = "入职确认信息主表id")
@ExcelProperty("入职确认信息主表id") @ExcelProperty("入职确认信息主表id")
private String registerId; private String registerId;
/**
* 起缴日期类型:0 入职日期 1 入职满1年次月 2 人员自定义
*/
@ExcelAttribute(name = "起缴日期类型", maxLength = 2)
@Length(max = 2, message = "起缴日期类型不能超过2个字符")
@ExcelProperty("起缴日期类型")
@Schema(description = "起缴日期类型:0 入职日期 1 入职满1年次月 2 人员自定义")
private String fundDateType;
/**
* 公积金单位个人比例是否一致(0-是,1-否)
*/
@ExcelAttribute(name = "公积金单位个人比例是否一致)", maxLength = 1)
@Length(max = 1, message = "公积金单位个人比例是否一致不能超过1个字符")
@ExcelProperty("公积金单位个人比例是否一致")
@Schema(description = "公积金单位个人比例是否一致(0-是,1-否)")
private String fundPerFlag;
/** /**
* 起缴日期 * 起缴日期 (社保起缴日期)
*
*/ */
@ExcelAttribute(name = "起缴日期", isDate = true) @ExcelAttribute(name = "起缴日期", isDate = true)
@Schema(description = "起缴日期") @Schema(description = "起缴日期(社保起缴日期)")
@ExcelProperty("起缴日期") @ExcelProperty("起缴日期")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00") @JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
private Date socialStartDate; private Date socialStartDate;
/**
* 起缴日期 (公积金起缴日期)
*/
@ExcelAttribute(name = "起缴日期", isDate = true)
@Schema(description = "起缴日期(公积金起缴日期)")
@ExcelProperty("起缴日期")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
private Date fundStartDate;
/** /**
* 养老起缴日期 * 养老起缴日期
*/ */
...@@ -482,7 +514,7 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -482,7 +514,7 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@ExcelProperty("生育基数") @ExcelProperty("生育基数")
private BigDecimal birthCardinal; private BigDecimal birthCardinal;
/** /**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) * 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳 (3固定基数--公积金特有)
*/ */
@ExcelAttribute(name = "缴纳类型") @ExcelAttribute(name = "缴纳类型")
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)") @Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)")
...@@ -537,4 +569,53 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -537,4 +569,53 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@ExcelProperty("基数下限(社保或公积金)" ) @ExcelProperty("基数下限(社保或公积金)" )
private BigDecimal lowerLimit; private BigDecimal lowerLimit;
/**
* 公积金基数
*/
@ExcelAttribute(name = "公积金基数")
@ExcelProperty("公积金基数")
@Schema(description = "公积金基数")
private BigDecimal providentCardinal;
/**
* 单位公积金比例
*/
@ExcelAttribute(name = "单位公积金比例")
@Schema(description = "单位公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金比例")
private BigDecimal unitProvidentPer;
/**
* 个人公积金比例
*/
@ExcelAttribute(name = "个人公积金比例")
@Schema(description = "个人公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金比例")
private BigDecimal personalProvidentPer;
/**
* 公积金缴纳地-省Id
*/
@ExcelAttribute(name = "公积金缴纳地-省Id", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-省Id不能超过32个字符")
@ExcelProperty("公积金缴纳地-省Id")
@Schema(description = "公积金缴纳地-省Id")
private String fundProvinceId;
/**
* 公积金缴纳地-市Id
*/
@ExcelAttribute(name = "公积金缴纳地-市Id", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-市不能超过32个字符")
@ExcelProperty("公积金缴纳地-市Id")
@Schema(description = "公积金缴纳地-市Id")
private String fundCityId;
/**
* 公积金缴纳地-县Id
*/
@ExcelAttribute(name = "公积金缴纳地-县Id", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-县Id不能超过32个字符")
@ExcelProperty("公积金缴纳地-县Id")
@Schema(description = "公积金缴纳地-县Id")
private String fundTownId;
} }
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
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 java.io.Serializable;
/**
* 入职确认信息公积金已购买记录
*
* @author huych
* @date 2025-09-30 16:41:57
*/
@Data
public class TFundPreDetailVo implements Serializable {
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("ID")
@Schema(description = "ID")
private String id;
/**
* 公积金缴纳地-省
*/
@ExcelAttribute(name = "公积金缴纳地-省", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-省不能超过32个字符")
@ExcelProperty("公积金缴纳地-省")
@Schema(description = "公积金缴纳地-省")
private String socialProvince;
/**
* 公积金缴纳地-市
*/
@ExcelAttribute(name = "公积金缴纳地-市", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-市不能超过32个字符")
@ExcelProperty("公积金缴纳地-市")
@Schema(description = "公积金缴纳地-市")
private String socialCity;
/**
* 公积金缴纳地-县
*/
@ExcelAttribute(name = "公积金缴纳地-县", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-县不能超过32个字符")
@ExcelProperty("公积金缴纳地-县")
@Schema(description = "公积金缴纳地-县")
private String socialTown;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", maxLength = 50)
@Length(max = 50, message = "项目编码不能超过50个字符")
@ExcelProperty("项目编码")
@Schema(description = "项目编码")
private String deptNo;
/**
* 公积金户名称
*/
@ExcelAttribute(name = "公积金户名称", maxLength = 50)
@Length(max = 50, message = "公积金户名称不能超过50个字符")
@ExcelProperty("公积金户名称")
@Schema(description = "公积金户名称")
private String socialHouseholdName;
/**
* 入职确认信息主表id
*/
@ExcelAttribute(name = "入职确认信息主表id", maxLength = 36)
@Length(max = 36, message = "入职确认信息主表id不能超过36个字符")
@ExcelProperty("入职确认信息主表id")
@Schema(description = "入职确认信息主表id")
private String registerId;
/**
* 缴费政策类型 0-最低 1-自定义 2-最高 3-固定基数
*/
private String paymentType;
/**
* 公积金状态
*/
private String fundStatus;
/**
* 派单人
*/
@ExcelAttribute(name = "派单人", maxLength = 64)
@Length(max = 64, message = "派单人不能超过64个字符")
@ExcelProperty("派单人")
@Schema(description = "派单人")
private String dispatchName;
/**
* 派单时间
*/
@ExcelAttribute(name = "派单时间")
@ExcelProperty("派单时间")
@Schema(description = "派单时间")
private String dispatchTime;
}
...@@ -806,6 +806,44 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -806,6 +806,44 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
} }
//1.9.17公积金自动化校验逻辑
if (employeeRegistrationPre.getServerItem().contains("公积金")) {
//根据身份证号码和项目编号查询公积金
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(employeeRegistrationPre.getEmpIdcard());
R<Boolean> fundFlag = socialDaprUtils.selectExitEmpFund(cardVo);
//是否已签署为是需要判断公积金是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeRegistrationPre.getFundIsBuy()) &&
(Common.isEmpty(fundFlag) || Boolean.TRUE.equals(!fundFlag.getData()))) {
return R.other(CommonConstants.TWO_INT, null, "未找到流程中或者在用的公积金信息!");
}
//是否已签署为否需要判断是否在用或者流程中的公积金
if (CommonConstants.ONE_STRING.equals(employeeRegistrationPre.getFundIsBuy()) &&
Common.isNotNull(fundFlag) && Boolean.TRUE.equals(fundFlag.getData()) &&
null != employeeRegistrationPre.getDispatchInfoPreVo() &&
Common.isEmpty(employeeRegistrationPre.getDispatchInfoPreVo().getId())) {
return R.other(CommonConstants.TWO_INT, null, "该人员存在在途/有效的公积金数据,请将“是否已参保”调整为“是”");
}
//流程中的公积金数据不能修改
//查已购买公积金明细
if (null != employeeRegistrationPre.getDispatchInfoPreVo() &&
Common.isEmpty(employeeRegistrationPre.getDispatchInfoPreVo().getId())) {
R<EmployeePreSocialListVo> fundSdr = socialDaprUtils.getFundPreInfoStatus(id);
//公积金购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,7办理成功,8办理失败
if (fundSdr != null && fundSdr.getData() != null
&& null != fundSdr.getData().getDispatchInfoPreFundVo()
&& (fundSdr.getData().getDispatchInfoPreFundVo().getProcessStatus().equals(CommonConstants.THREE_STRING) ||
fundSdr.getData().getDispatchInfoPreFundVo().getProcessStatus().equals(CommonConstants.FOUR_STRING) ||
fundSdr.getData().getDispatchInfoPreFundVo().getProcessStatus().equals(CommonConstants.FIVE_STRING))) {
return R.failed("流程中的公积金待购买数据不可修改!");
}
}
//更新合同签署状态
if (null != employeeRegistrationPre.getDispatchInfoPreVo()) {
employeeRegistrationPre.getDispatchInfoPreVo().setContractStatus(flag ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING);
}
}
//操作记录中字典值的转化 //操作记录中字典值的转化
String natureItemBefore = null; String natureItemBefore = null;
String natureItemAfter = null; String natureItemAfter = null;
...@@ -1602,6 +1640,15 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -1602,6 +1640,15 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
pre.setDispatchInfoPreVo(socialSdr.getData().getDispatchInfoPreVo()); pre.setDispatchInfoPreVo(socialSdr.getData().getDispatchInfoPreVo());
} }
} }
// 查已购买公积金明细
R<EmployeePreSocialListVo> fundsdr = socialDaprUtils.getFundPreInfoList(id);
if (fundsdr != null && fundsdr.getData() != null) {
if (null != fundsdr.getData().getExitFundInfoList()) {
pre.setExitFundInfoList(fundsdr.getData().getExitFundInfoList());
} else if (null != fundsdr.getData().getDispatchInfoPreFundVo()) {
pre.setDispatchInfoFundPreVo(fundsdr.getData().getDispatchInfoPreFundVo());
}
}
} }
return pre; return pre;
} }
......
...@@ -1639,6 +1639,12 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri ...@@ -1639,6 +1639,12 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
rel.setProvince(setInfo.getProvince()); rel.setProvince(setInfo.getProvince());
rel.setCity(setInfo.getCity()); rel.setCity(setInfo.getCity());
rel.setTown(setInfo.getTown()); rel.setTown(setInfo.getTown());
if (CommonConstants.THREE_STRING.equals(rel.getPaymentType())){
if (rel.getFundBase().compareTo(setInfo.getLowerLimit()) < 0) {
return R.failed("公积金基数需≥当前户("+rel.getConfigName()+")的最低基数:"+setInfo.getLowerLimit()+"!");
}
}
}else { }else {
return R.failed("获取公积金配置信息失败!"); return R.failed("获取公积金配置信息失败!");
} }
......
...@@ -262,6 +262,14 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -262,6 +262,14 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
String isBuyOld = oldInfo.getInsuranceIsBuy(); String isBuyOld = oldInfo.getInsuranceIsBuy();
String isBuyNew = newInfo.getInsuranceIsBuy(); String isBuyNew = newInfo.getInsuranceIsBuy();
oldInfo.setInsuranceIsBuy(newInfo.getInsuranceIsBuy()); oldInfo.setInsuranceIsBuy(newInfo.getInsuranceIsBuy());
//记录公积金是否已购买日志
String isFundBuyOld = oldInfo.getFundIsBuy();
String isFundBuyNew = newInfo.getFundIsBuy();
//公积金是否已购买list不做比较
oldInfo.setExitFundInfoList(newInfo.getExitFundInfoList());
oldInfo.setFundIsBuy(newInfo.getFundIsBuy());
//比较差异 //比较差异
String differenceKey = HrEquator.comparisonValue(oldInfo, newInfo); String differenceKey = HrEquator.comparisonValue(oldInfo, newInfo);
//如果有差异保存差异 //如果有差异保存差异
...@@ -274,10 +282,11 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -274,10 +282,11 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
TEmployeePreLogDetail detailEmpLog = null; TEmployeePreLogDetail detailEmpLog = null;
if (Common.isNotNull(differenceKey) && !"insurancePreList".equals(differenceKey) if (Common.isNotNull(differenceKey) && !"insurancePreList".equals(differenceKey)
&& !"attaIdList".equals(differenceKey) && !"employeeContractPre".equals(differenceKey) && !"attaIdList".equals(differenceKey) && !"employeeContractPre".equals(differenceKey)
&& !"dispatchInfoPreVo".equals(differenceKey)) { && !"dispatchInfoPreVo".equals(differenceKey) && !"dispatchInfoFundPreVo".equals(differenceKey)) {
differenceKey = differenceKey.replace("insurancePreList",""); differenceKey = differenceKey.replace("insurancePreList","");
differenceKey = differenceKey.replace("employeeContractPre",""); differenceKey = differenceKey.replace("employeeContractPre","");
differenceKey = differenceKey.replace("dispatchInfoPreVo",""); differenceKey = differenceKey.replace("dispatchInfoPreVo","");
differenceKey = differenceKey.replace("dispatchInfoFundPreVo","");
diffTitle = "档案信息"; diffTitle = "档案信息";
detailEmpLog = new TEmployeePreLogDetail(); detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.TWO_STRING); detailEmpLog.setModelType(CommonConstants.TWO_STRING);
...@@ -506,6 +515,73 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -506,6 +515,73 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
detailList.add(detailEmpLog); detailList.add(detailEmpLog);
} }
} }
// 公积金处理逻辑
String differenceFundKey;
if (newInfo.getServerItem().contains("公积金") && (Common.isEmpty(isFundBuyOld) ||
(Common.isNotNull(isFundBuyOld) && !isFundBuyOld.equals(isFundBuyNew)))) {
//单独记录是否已购买公积金的变更记录
differenceFundKey = "fundIsBuy";
TEmployeePreLogDetail detailFundLog = new TEmployeePreLogDetail();
detailFundLog.setModelType(CommonConstants.TWO_STRING);
detailFundLog.setType(CommonConstants.FIVE_STRING);
Map<String,Object> old = new HashMap<>();
old.put("fundIsBuy", isFundBuyOld);
Map<String,Object> simNew = new HashMap<>();
simNew.put("fundIsBuy", isFundBuyNew);
this.setLogBaseInfo(empPreId, old, simNew, user, differenceFundKey, logId, detailFundLog);
detailList.add(detailFundLog);
if (Common.isNotNull(diffTitle)) {
diffTitle += "、公积金信息";
} else {
diffTitle = "公积金信息";
}
}
//查询老的公积金明细
R<EmployeePreSocialListVo> fundSdr = socialDaprUtils.getFundPreInfoList(empPreId);
TDispatchInfoPreVo dispatchInfoFundPreOldVo = null;
if (fundSdr != null && fundSdr.getData() != null && null != fundSdr.getData().getDispatchInfoPreVo()) {
dispatchInfoFundPreOldVo = fundSdr.getData().getDispatchInfoPreVo();
}
TDispatchInfoPreVo dispatchInfoFundPreVo = newInfo.getDispatchInfoFundPreVo();
if (!newInfo.getServerItem().contains("公积金") && oldInfo.getServerItem().contains("公积金")) {
//删除公积金待购买相关数据
socialDaprUtils.deleteUnProcessFundPreInfo(empPreId);
//如果之前包含流程中的公积金待购买数据,记录删除日志
if (Common.isNotNull(dispatchInfoFundPreOldVo)) {
//记录操作记录
detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.THREE_STRING);
detailEmpLog.setType(CommonConstants.FIVE_STRING);
this.setLogBaseInfo(empPreId, dispatchInfoFundPreOldVo, null, user, null
, logId, detailEmpLog);
detailList.add(detailEmpLog);
if (Common.isNotNull(diffTitle)) {
diffTitle += "、公积金信息";
} else {
diffTitle = "公积金信息";
}
}
}
if (newInfo.getServerItem().contains("公积金") && dispatchInfoFundPreOldVo != null && dispatchInfoFundPreVo != null) {
differenceFundKey = HrEquator.comparisonValueIgnoreField(dispatchInfoFundPreOldVo
, dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD);
if (differenceFundKey.length() > 0) {
if (Common.isNotNull(diffTitle)) {
diffTitle += "、公积金信息";
} else {
diffTitle = "公积金信息";
}
detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.TWO_STRING);
detailEmpLog.setType(CommonConstants.FIVE_STRING);
this.setLogBaseInfo(empPreId, dispatchInfoFundPreOldVo, dispatchInfoFundPreVo, user,
differenceFundKey, logId, detailEmpLog);
detailList.add(detailEmpLog);
}
}
// 有修改,则加日志 // 有修改,则加日志
if (Common.isNotNull(diffTitle)) { if (Common.isNotNull(diffTitle)) {
...@@ -546,6 +622,17 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -546,6 +622,17 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
} }
socialDaprUtils.saveSocialPreInfo(preVo); socialDaprUtils.saveSocialPreInfo(preVo);
} }
//公积金待购买数据处理
if (newInfo.getServerItem().contains("公积金")) {
EmployeeRegistrationPreVo preVo = new EmployeeRegistrationPreVo();
BeanUtils.copyProperties(newInfo,preVo);
if (null != preVo.getExitFundInfoList() && !preVo.getExitFundInfoList().isEmpty()) {
preVo.getExitFundInfoList().forEach(fundPreDetailVo -> fundPreDetailVo.setRegisterId(empPreId));
} else {
initFundPreInfo(preVo, preVo.getDispatchInfoFundPreVo(), user, empPreId);
}
socialDaprUtils.saveFundPreInfo(preVo);
}
if (!saveOrUpdateList.isEmpty()) { if (!saveOrUpdateList.isEmpty()) {
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId() HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId()
, "/temployeeinsurancepre/inner/saveOrUpdateInsuranceList" , "/temployeeinsurancepre/inner/saveOrUpdateInsuranceList"
...@@ -858,5 +945,29 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -858,5 +945,29 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
preVo.setSocialStartDate(pre.getJoinLeaveDate()); preVo.setSocialStartDate(pre.getJoinLeaveDate());
} }
} }
//公积金待购买数据初始化
private void initFundPreInfo(EmployeeRegistrationPreVo pre, TDispatchInfoPreVo preVo,
YifuUser user, String id) throws ParseException {
preVo.setRegisterId(id);
preVo.setCustomerUsername(pre.getCustomerUsernameNew());
preVo.setCustomerUserLoginName(pre.getCustomerUserLoginname());
preVo.setDeptName(pre.getDeptName());
preVo.setDeptId(pre.getDeptId());
preVo.setJoinLeaveDate(pre.getJoinLeaveDate());
preVo.setDeptNo(pre.getDeptNo());
preVo.setEmpName(pre.getEmployeeName());
preVo.setPhone(pre.getEmpPhone());
preVo.setPosition(pre.getPosition());
preVo.setEmpIdcard(pre.getEmpIdcard());
preVo.setCreateBy(user.getId());
preVo.setCreateName(user.getNickname());
preVo.setUpdateBy(user.getId());
preVo.setTypeSub(CommonConstants.ONE_STRING);
preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("公积金");
if (CommonConstants.ZERO_STRING.equals(preVo.getIsCreateDate()) && Common.isEmpty(preVo.getSocialStartDate())) {
preVo.setSocialStartDate(pre.getJoinLeaveDate());
}
}
} }
...@@ -238,7 +238,27 @@ public class SocialDaprUtils { ...@@ -238,7 +238,27 @@ public class SocialDaprUtils {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(), return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),
"/tdispatchinfopre/saveSocialPreInfo", JSON.toJSONString(preVo), Boolean.class, SecurityConstants.FROM_IN); "/tdispatchinfopre/saveSocialPreInfo", JSON.toJSONString(preVo), Boolean.class, SecurityConstants.FROM_IN);
} }
/**
* @Author fxj
* @Description 判断是否存在正常或者在途的公积金
* @Date 10:08 2025/11/7
* @Param
* @return
**/
public R<Boolean> selectExitEmpFund(TEmployeeAutoRegistCheckVo cardVo) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tsocialfundinfo/selectExitEmpSocial", JSON.toJSONString(cardVo), Boolean.class, SecurityConstants.FROM_IN);
}
/**
* @Author fxj
* @Description 新增公积金待购买信息
* @Date 10:07 2025/11/7
* @Param
* @return
**/
public R<Boolean> saveFundPreInfo(EmployeeRegistrationPreVo preVo) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),
"/tdispatchinfopre/saveFundPreInfo", JSON.toJSONString(preVo), Boolean.class, SecurityConstants.FROM_IN);
}
/** /**
* @Author fxj * @Author fxj
* @Description 获取社保配置信息 * @Description 获取社保配置信息
...@@ -293,6 +313,20 @@ public class SocialDaprUtils { ...@@ -293,6 +313,20 @@ public class SocialDaprUtils {
, EmployeePreSocialListVo.class, SecurityConstants.FROM_IN); , EmployeePreSocialListVo.class, SecurityConstants.FROM_IN);
} }
/**
* @Author huych
* @Description 获取公积金已购买信息
* @Date 2025-10-10 15:48:08
* @Param
* @return
**/
public R<EmployeePreSocialListVo> getFundPreInfoStatus(String id){
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl()
, daprProperties.getAppId(),"/tdispatchinfopre/getFundPreInfoStatus" , id
, EmployeePreSocialListVo.class, SecurityConstants.FROM_IN);
}
/** /**
* @Author huych * @Author huych
* @Description 删除社保已购买非流程中的数据 * @Description 删除社保已购买非流程中的数据
...@@ -305,4 +339,28 @@ public class SocialDaprUtils { ...@@ -305,4 +339,28 @@ public class SocialDaprUtils {
, daprProperties.getAppId(),"/tdispatchinfopre/deleteUnProcessSocialPreInfo" , id , daprProperties.getAppId(),"/tdispatchinfopre/deleteUnProcessSocialPreInfo" , id
, Object.class, SecurityConstants.FROM_IN); , Object.class, SecurityConstants.FROM_IN);
} }
/**
* @Author fxj
* @Description 删除未处理的公积金待购买信息
* @Date 9:23 2025/10/11
* @Param
* @return
**/
public R<Boolean> deleteUnProcessFundPreInfo(String id) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),
"/tdispatchinfopre/inner/deleteUnProcessFundPreInfo", id, Boolean.class, SecurityConstants.FROM_IN);
}
/**
* @Author fxj
* @Description 获取公积金待购买信息
* @Date 10:07 2025/11/7
* @Param
* @return
**/
public R<EmployeePreSocialListVo> getFundPreInfoList(String id) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),
"/tdispatchinfopre/getFundPreInfoList", id, EmployeePreSocialListVo.class, SecurityConstants.FROM_IN);
}
} }
...@@ -657,6 +657,22 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -657,6 +657,22 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return R.other(CommonConstants.TWO_INT,null,"该人员存在在途/有效的社保数据,请将“是否已参保”调整为“是”"); return R.other(CommonConstants.TWO_INT,null,"该人员存在在途/有效的社保数据,请将“是否已参保”调整为“是”");
} }
} }
// 公积金自动化校验逻辑 1.9.17 FXJ
if (preVo.getServerItem().contains("公积金") && null != preVo.getDispatchInfoPreVo()) {
//根据身份证号码和项目编号查询公积金
flag = socialDaprUtils.selectExitEmpFund(cardVo);
//是否已签署为是需要判断是否在用或者流程中的公积金
if (CommonConstants.ZERO_STRING.equals(preVo.getFundIsBuy()) &&
(Common.isEmpty(flag) || Boolean.TRUE.equals(!flag.getData()))) {
return R.other(CommonConstants.TWO_INT,null,"未找到流程中或者在用的公积金信息!");
}
// 是否已签署为否需要判断是否在用或者流程中的公积金
if (CommonConstants.ONE_STRING.equals(preVo.getFundIsBuy()) &&
Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
return R.other(CommonConstants.TWO_INT,null,"该人员存在在途/有效的公积金数据,请将'是否已参保'调整为'是'");
}
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项, //点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项 //状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
EmpProjectStatusVo vo = new EmpProjectStatusVo(); EmpProjectStatusVo vo = new EmpProjectStatusVo();
...@@ -717,6 +733,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -717,6 +733,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
socialDaprUtils.saveSocialPreInfo(preVo); socialDaprUtils.saveSocialPreInfo(preVo);
} }
//服务类型包含公积金购买时
if (preVo.getServerItem().contains("公积金") && (null != preVo.getExitFundInfoList()
|| null != preVo.getDispatchInfoFundPreVo())) {
if (null != preVo.getExitFundInfoList() && !preVo.getExitFundInfoList().isEmpty()) {
preVo.getExitFundInfoList().forEach(fundPreDetailVo -> fundPreDetailVo.setRegisterId(domainR.getData()));
}
if (null != preVo.getDispatchInfoFundPreVo()) {
initFundPreInfo(registration, preVo.getDispatchInfoFundPreVo(), user, domainR.getData());
}
socialDaprUtils.saveFundPreInfo(preVo);
}
} }
} catch (Exception e) { } catch (Exception e) {
log.error("自动化办理执行异常", e); log.error("自动化办理执行异常", e);
...@@ -724,6 +751,81 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -724,6 +751,81 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return R.ok(); return R.ok();
} }
private void initFundPreInfo(EmployeeRegistration registration, TDispatchInfoPreVo preVo, YifuUser user, String id) {
preVo.setRegisterId(id);
preVo.setCustomerUsername(registration.getCustomerUsernameNew());
preVo.setCustomerUserLoginName(null != registration.getCustomerUserLoginNameNew()
? registration.getCustomerUserLoginNameNew() : registration.getCustomerUserLoginname());
preVo.setDeptName(registration.getDeptName());
preVo.setDeptId(registration.getDeptId());
preVo.setJoinLeaveDate(registration.getJoinLeaveDate());
preVo.setDeptNo(registration.getDeptNo());
preVo.setEmpName(registration.getEmployeeName());
preVo.setPhone(registration.getEmpPhone());
preVo.setPosition(registration.getPosition());
preVo.setEmpIdcard(registration.getEmpIdcard());
preVo.setCreateBy(user.getId());
preVo.setCreateName(user.getNickname());
preVo.setUpdateBy(user.getId());
preVo.setTypeSub(CommonConstants.ONE_STRING);
preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("公积金");
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis())
&& Common.isNotNull(preVo.getExpectedCollectionType())) {
TEmployeeContractDateVo vo = new TEmployeeContractDateVo();
//接收方式 0项目配置 1自定义
if (CommonConstants.ONE_STRING.equals(preVo.getReceiveType())){
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getSocialStartDate());
}else {
//先计算起缴日期
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(registration.getJoinLeaveDate());
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setYearAfter(CommonConstants.ONE_INT);
vo.setRegistDate(registration.getJoinLeaveDate());
}else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){
//用户自定义取值用户填写的起缴日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getSocialStartDate());
}
}
Date date = this.addYearsMonths(vo);
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date);
dayVo.setRegistType(0);
R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getContractAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate())) {
preVo.setExpectedCollectionTime(dataR.getData().getRegistDate());
preVo.setExpectedConfirmTime(dataR.getData().getRegistDate());
} else {
preVo.setExpectedCollectionTime(date);
preVo.setExpectedConfirmTime(date);
}
try {
preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE));
preVo.setExpectedConfirmTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 09:00", DateUtil.DATETIME_PATTERN_MINUTE));
} catch (ParseException e) {
log.error("初始化预计派单日期异常!", e);
throw new RuntimeException("初始化预计派单日期异常!"+e.getMessage());
}
}
}
/** /**
* 初始化合同预信息 * 初始化合同预信息
* 该方法用于将员工注册信息转换并填充到合同预信息对象中,以便后续的合同签订流程使用 * 该方法用于将员工注册信息转换并填充到合同预信息对象中,以便后续的合同签订流程使用
...@@ -1006,6 +1108,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1006,6 +1108,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
} }
// 公积金自动化校验逻辑
if (preVo.getServerItem().contains("公积金") && null != preVo.getDispatchInfoFundPreVo()) {
//根据身份证号码和项目编号查询公积金
flag = socialDaprUtils.selectExitEmpFund(cardVo);
//是否已签署为否需要判断是否在用或者流程中的公积金
if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
exitCheckVo.setType("公积金");
exitCheckVo.setErrorMsg("该人员存在在途/有效的公积金数据");
errorList.add(exitCheckVo);
continue;
}
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项, //点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项 //状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
EmpProjectStatusVo vo = new EmpProjectStatusVo(); EmpProjectStatusVo vo = new EmpProjectStatusVo();
...@@ -1056,6 +1170,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1056,6 +1170,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
socialDaprUtils.saveSocialPreInfo(preVo); socialDaprUtils.saveSocialPreInfo(preVo);
} }
//服务类型包含公积金购买时
if (preVo.getServerItem().contains("公积金") && (null != preVo.getExitFundInfoList()
|| null != preVo.getDispatchInfoPreVo())) {
if (null != preVo.getExitFundInfoList() && !preVo.getExitFundInfoList().isEmpty()) {
preVo.getExitFundInfoList().forEach(fundPreDetailVo -> fundPreDetailVo.setRegisterId(domainR.getData()));
}
if (null != preVo.getDispatchInfoFundPreVo()) {
initFundPreInfo(registration, preVo.getDispatchInfoFundPreVo(), user, domainR.getData());
}
socialDaprUtils.saveFundPreInfo(preVo);
}
} }
}catch (Exception e) { }catch (Exception e) {
log.error("执行异常", e); log.error("执行异常", e);
......
...@@ -245,21 +245,23 @@ public class WeComSmartSheetManager { ...@@ -245,21 +245,23 @@ public class WeComSmartSheetManager {
log.warn("未找到任何工作表"); log.warn("未找到任何工作表");
} }
} else { } else {
log.error("查询工作表失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
// 特别处理一些常见的错误代码 // 特别处理一些常见的错误代码
switch (errCode) { switch (errCode) {
case 404: case 404:
log.error("请求的文档未找到,请检查docId是否正确,并确保是通过API创建的智能表格"); log.error("请求的文档未找到,请检查docId是否正确,并确保是通过API创建的智能表格;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break; break;
case 400: case 400:
log.error("请求参数错误,请检查docId格式是否正确"); log.error("请求参数错误,请检查docId格式是否正确;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break; break;
case 48002: case 48002:
log.error("应用没有权限访问该文档,请检查应用权限配置"); log.error("应用没有权限访问该文档,请检查应用权限配置;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break; break;
default: default:
log.error("未知错误,请参考企业微信API文档"); log.error("查询工作表失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
} }
} }
} else { } else {
...@@ -563,21 +565,23 @@ public class WeComSmartSheetManager { ...@@ -563,21 +565,23 @@ public class WeComSmartSheetManager {
} }
} }
} else { } else {
log.error("查询记录失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
// 特别处理一些常见的错误代码 // 特别处理一些常见的错误代码
switch (errCode) { switch (errCode) {
case 404: case 404:
log.error("请求的文档或表格未找到,请检查docId和sheetId是否正确,并确保是通过API创建的智能表格"); log.error("请求的文档或表格未找到,请检查docId和sheetId是否正确,并确保是通过API创建的智能表格;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break; break;
case 400: case 400:
log.error("请求参数错误,请检查docId和sheetId格式是否正确"); log.error("请求参数错误,请检查docId和sheetId格式是否正确;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break; break;
case 48002: case 48002:
log.error("应用没有权限访问该文档,请检查应用权限配置"); log.error("应用没有权限访问该文档,请检查应用权限配置;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break; break;
default: default:
log.error("未知错误,请参考企业微信API文档"); log.error("查询记录失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
} }
} }
} else { } else {
...@@ -633,21 +637,23 @@ public class WeComSmartSheetManager { ...@@ -633,21 +637,23 @@ public class WeComSmartSheetManager {
if (errCode == null || errCode == 0) { if (errCode == null || errCode == 0) {
return true; return true;
} else { } else {
log.error("删除记录失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
// 特别处理一些常见的错误代码 // 特别处理一些常见的错误代码
switch (errCode) { switch (errCode) {
case 404: case 404:
log.error("请求的文档或表格未找到,请检查docId和sheetId是否正确"); log.error("请求的文档或表格未找到,请检查docId和sheetId是否正确;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break; break;
case 400: case 400:
log.error("请求参数错误,请检查参数格式是否正确"); log.error("请求参数错误,请检查参数格式是否正确;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break; break;
case 48002: case 48002:
log.error("应用没有权限访问该文档,请检查应用权限配置"); log.error("应用没有权限访问该文档,请检查应用权限配置;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break; break;
default: default:
log.error("未知错误,请参考企业微信API文档"); log.error("删除记录失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
} }
return false; return false;
} }
...@@ -978,7 +984,6 @@ public class WeComSmartSheetManager { ...@@ -978,7 +984,6 @@ public class WeComSmartSheetManager {
totalDeleted += records.size(); totalDeleted += records.size();
log.info("成功删除 {} 条记录,当前总计已删除 {} 条记录", records.size(), totalDeleted); log.info("成功删除 {} 条记录,当前总计已删除 {} 条记录", records.size(), totalDeleted);
} else { } else {
log.error("删除记录失败");
return false; return false;
} }
} }
......
...@@ -60,6 +60,7 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -60,6 +60,7 @@ public class TDispatchInfoPre extends BaseEntity {
private String phone; private String phone;
/** /**
* 社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败 * 社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败
* 公积金购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,7办理成功,8办理失败
*/ */
@ExcelAttribute(name = "社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败", maxLength = 2) @ExcelAttribute(name = "社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败", maxLength = 2)
@Length(max = 2, message = "社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败不能超过2个字符") @Length(max = 2, message = "社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败不能超过2个字符")
...@@ -135,6 +136,7 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -135,6 +136,7 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("公积金缴纳地-市") @ExcelProperty("公积金缴纳地-市")
@Schema(description = "公积金缴纳地-市") @Schema(description = "公积金缴纳地-市")
private String fundCity; private String fundCity;
/** /**
* 公积金缴纳地-县 * 公积金缴纳地-县
*/ */
...@@ -143,6 +145,32 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -143,6 +145,32 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("公积金缴纳地-县") @ExcelProperty("公积金缴纳地-县")
@Schema(description = "公积金缴纳地-县") @Schema(description = "公积金缴纳地-县")
private String fundTown; private String fundTown;
/**
* 公积金缴纳地-省Id
*/
@ExcelAttribute(name = "公积金缴纳地-省Id", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-省Id不能超过32个字符")
@ExcelProperty("公积金缴纳地-省Id")
@Schema(description = "公积金缴纳地-省Id")
private String fundProvinceId;
/**
* 公积金缴纳地-市Id
*/
@ExcelAttribute(name = "公积金缴纳地-市Id", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-市不能超过32个字符")
@ExcelProperty("公积金缴纳地-市Id")
@Schema(description = "公积金缴纳地-市Id")
private String fundCityId;
/**
* 公积金缴纳地-县Id
*/
@ExcelAttribute(name = "公积金缴纳地-县Id", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-县Id不能超过32个字符")
@ExcelProperty("公积金缴纳地-县Id")
@Schema(description = "公积金缴纳地-县Id")
private String fundTownId;
/** /**
* 派单项:如 养老、公积金 * 派单项:如 养老、公积金
*/ */
...@@ -263,6 +291,15 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -263,6 +291,15 @@ public class TDispatchInfoPre extends BaseEntity {
@Schema(description = "起缴日期") @Schema(description = "起缴日期")
@ExcelProperty("起缴日期") @ExcelProperty("起缴日期")
private Date socialStartDate; private Date socialStartDate;
/**
* 起缴日期 (公积金起缴日期)
*/
@ExcelAttribute(name = "起缴日期", isDate = true)
@Schema(description = "起缴日期(公积金起缴日期)")
@ExcelProperty("起缴日期")
private Date fundStartDate;
/** /**
* 配置名称 * 配置名称
*/ */
...@@ -341,6 +378,29 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -341,6 +378,29 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("委托备注") @ExcelProperty("委托备注")
@Schema(description = "委托备注") @Schema(description = "委托备注")
private String trustRemark; private String trustRemark;
/**
* 公积金基数
*/
@ExcelAttribute(name = "公积金基数")
@ExcelProperty("公积金基数")
@Schema(description = "公积金基数")
private BigDecimal providentCardinal;
/**
* 单位公积金比例
*/
@ExcelAttribute(name = "单位公积金比例")
@Schema(description = "单位公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金比例")
private BigDecimal unitProvidentPer;
/**
* 个人公积金比例
*/
@ExcelAttribute(name = "个人公积金比例")
@Schema(description = "个人公积金比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金比例")
private BigDecimal personalProvidentPer;
/** /**
* 养老基数 * 养老基数
*/ */
...@@ -493,7 +553,7 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -493,7 +553,7 @@ public class TDispatchInfoPre extends BaseEntity {
private BigDecimal lowerBig; private BigDecimal lowerBig;
/** /**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) * 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳 (3固定基数--公积金特有))
*/ */
@ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)", maxLength = 1) @ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)", maxLength = 1)
@Length(max = 1, message = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)不能超过1个字符") @Length(max = 1, message = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)不能超过1个字符")
...@@ -579,4 +639,22 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -579,4 +639,22 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("基数下限(社保或公积金)" ) @ExcelProperty("基数下限(社保或公积金)" )
private BigDecimal lowerLimit; private BigDecimal lowerLimit;
/**
* 公积金单位个人比例是否一致(0-是,1-否)
*/
@ExcelAttribute(name = "公积金单位个人比例是否一致)", maxLength = 1)
@Length(max = 1, message = "公积金单位个人比例是否一致不能超过1个字符")
@ExcelProperty("公积金单位个人比例是否一致")
@Schema(description = "公积金单位个人比例是否一致(0-是,1-否)")
private String fundPerFlag;
/**
* 起缴日期:0 入职日期
*/
@Length(max = 2, message = "起缴日期:0 入职日期 不能超过2 个字符")
@ExcelAttribute(name = "起缴日期:0 入职日期", maxLength = 2)
@Schema(description = "起缴日期:0 入职日期")
@ExcelProperty("起缴日期:0 入职日期")
private String fundDateType;
} }
package com.yifu.cloud.plus.v1.yifu.social.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 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;
/**
* @Author fxj
* @Description 入职确认信息公积金已购买记录
* @Date 10:30 2025/11/7
* @Param
* @return
**/
@Data
@TableName("t_fund_pre_detail")
@EqualsAndHashCode(callSuper = true)
@Schema(description = " 入职确认信息公积金已购买记录")
public class TFundPreDetail extends BaseEntity {
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("ID")
@Schema(description = "ID")
private String id;
/**
* 公积金缴纳地-省
*/
@ExcelAttribute(name = "公积金缴纳地-省", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-省不能超过32个字符")
@ExcelProperty("公积金缴纳地-省")
@Schema(description = "公积金缴纳地-省")
private String fundProvince;
/**
* 公积金缴纳地-市
*/
@ExcelAttribute(name = "公积金缴纳地-市", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-市不能超过32个字符")
@ExcelProperty("公积金缴纳地-市")
@Schema(description = "公积金缴纳地-市")
private String fundCity;
/**
* 公积金缴纳地-县
*/
@ExcelAttribute(name = "公积金缴纳地-县", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-县不能超过32个字符")
@ExcelProperty("公积金缴纳地-县")
@Schema(description = "公积金缴纳地-县")
private String fundTown;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", maxLength = 50)
@Length(max = 50, message = "项目编码不能超过50个字符")
@ExcelProperty("项目编码")
@Schema(description = "项目编码")
private String deptNo;
/**
* 公积金户名称
*/
@ExcelAttribute(name = "公积金户名称", maxLength = 50)
@Length(max = 50, message = "公积金户名称不能超过50个字符")
@ExcelProperty("公积金户名称")
@Schema(description = "公积金户名称")
private String fundHouseholdName;
/**
* 入职确认信息主表id
*/
@ExcelAttribute(name = "入职确认信息主表id", maxLength = 36)
@Length(max = 36, message = "入职确认信息主表id不能超过36个字符")
@ExcelProperty("入职确认信息主表id")
@Schema(description = "入职确认信息主表id")
private String registerId;
/**
* 缴费政策类型 0-最低 1-自定义 2-最高
*/
private String paymentType;
/**
* 公积金状态
*/
private String fundStatus;
/**
* 派单人
*/
@ExcelAttribute(name = "派单人", maxLength = 64)
@Length(max = 64, message = "派单人不能超过64个字符")
@ExcelProperty("派单人")
@Schema(description = "派单人")
private String dispatchName;
/**
* 派单时间
*/
@ExcelAttribute(name = "派单时间")
@ExcelProperty("派单时间")
@Schema(description = "派单时间")
private String dispatchTime;
}
...@@ -75,7 +75,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable { ...@@ -75,7 +75,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable {
/** /**
* 基数上限 * 基数上限
*/ */
@ExcelAttribute(name = "基数上限",isNotEmpty = true) @ExcelAttribute(name = "基数上限",isNotEmpty = true,isFloat = true,max = "999999999.99",min = 0 )
@Schema(description = "基数上限") @Schema(description = "基数上限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数上限") @ExcelProperty("基数上限")
...@@ -84,7 +84,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable { ...@@ -84,7 +84,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable {
/** /**
* 基数下限 * 基数下限
*/ */
@ExcelAttribute(name = "基数下限",isNotEmpty = true) @ExcelAttribute(name = "基数下限",isNotEmpty = true,isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "基数下限") @Schema(description = "基数下限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数下限") @ExcelProperty("基数下限")
...@@ -147,7 +147,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable { ...@@ -147,7 +147,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable {
/** /**
* 补缴政策 * 补缴政策
*/ */
@ExcelAttribute(name = "补缴政策") @ExcelAttribute(name = "补缴政策",maxLength = 200)
@Schema(description = "补缴政策") @Schema(description = "补缴政策")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("补缴政策") @ExcelProperty("补缴政策")
......
...@@ -68,7 +68,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -68,7 +68,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 养老基数上限 * 养老基数上限
*/ */
@ExcelAttribute(name = "养老基数上限", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "养老基数上限", isNotEmpty = true,isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "养老基数上限") @Schema(description = "养老基数上限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数上限") @ExcelProperty("养老基数上限")
...@@ -77,7 +77,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -77,7 +77,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 养老基数下限 * 养老基数下限
*/ */
@ExcelAttribute(name = "养老基数下限", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "养老基数下限", isNotEmpty = true,isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "养老基数下限") @Schema(description = "养老基数下限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数下限") @ExcelProperty("养老基数下限")
...@@ -86,7 +86,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -86,7 +86,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 工伤基数上限 * 工伤基数上限
*/ */
@ExcelAttribute(name = "工伤基数上限",isDouble = true) @ExcelAttribute(name = "工伤基数上限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "工伤基数上限") @Schema(description = "工伤基数上限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数上限") @ExcelProperty("工伤基数上限")
...@@ -95,7 +95,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -95,7 +95,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 工伤基数下限 * 工伤基数下限
*/ */
@ExcelAttribute(name = "工伤基数下限",isDouble = true) @ExcelAttribute(name = "工伤基数下限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "工伤基数下限") @Schema(description = "工伤基数下限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数下限") @ExcelProperty("工伤基数下限")
...@@ -104,7 +104,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -104,7 +104,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 医疗基数上限 * 医疗基数上限
*/ */
@ExcelAttribute(name = "医疗基数上限",isDouble = true) @ExcelAttribute(name = "医疗基数上限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "医疗基数上限") @Schema(description = "医疗基数上限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数上限") @ExcelProperty("医疗基数上限")
...@@ -113,7 +113,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -113,7 +113,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 医疗基数下限 * 医疗基数下限
*/ */
@ExcelAttribute(name = "医疗基数下限",isDouble = true) @ExcelAttribute(name = "医疗基数下限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "医疗基数下限") @Schema(description = "医疗基数下限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数下限") @ExcelProperty("医疗基数下限")
...@@ -122,7 +122,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -122,7 +122,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 生育基数上限 * 生育基数上限
*/ */
@ExcelAttribute(name = "生育基数上限",isDouble = true) @ExcelAttribute(name = "生育基数上限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "生育基数上限") @Schema(description = "生育基数上限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数上限") @ExcelProperty("生育基数上限")
...@@ -131,7 +131,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -131,7 +131,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 生育基数下限 * 生育基数下限
*/ */
@ExcelAttribute(name = "生育基数下限",isDouble = true) @ExcelAttribute(name = "生育基数下限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "生育基数下限") @Schema(description = "生育基数下限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数下限") @ExcelProperty("生育基数下限")
...@@ -140,7 +140,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -140,7 +140,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 失业基数上限 * 失业基数上限
*/ */
@ExcelAttribute(name = "失业基数上限",isDouble = true) @ExcelAttribute(name = "失业基数上限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "失业基数上限") @Schema(description = "失业基数上限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数上限") @ExcelProperty("失业基数上限")
...@@ -149,7 +149,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -149,7 +149,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 失业基数下限 * 失业基数下限
*/ */
@ExcelAttribute(name = "失业基数下限",isDouble = true) @ExcelAttribute(name = "失业基数下限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "失业基数下限") @Schema(description = "失业基数下限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数下限") @ExcelProperty("失业基数下限")
...@@ -158,7 +158,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -158,7 +158,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 大病基数上限 * 大病基数上限
*/ */
@ExcelAttribute(name = "大病基数上限",isDouble = true) @ExcelAttribute(name = "大病基数上限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "大病基数上限") @Schema(description = "大病基数上限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病基数上限") @ExcelProperty("大病基数上限")
...@@ -167,7 +167,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -167,7 +167,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 大病基数下限 * 大病基数下限
*/ */
@ExcelAttribute(name = "大病基数下限",isDouble = true) @ExcelAttribute(name = "大病基数下限",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "大病基数下限") @Schema(description = "大病基数下限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病基数下限") @ExcelProperty("大病基数下限")
...@@ -221,7 +221,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -221,7 +221,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位大病金额 * 单位大病金额
*/ */
@ExcelAttribute(name = "单位大病金额",isDouble = true) @ExcelAttribute(name = "单位大病金额",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "单位大病金额") @Schema(description = "单位大病金额")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位大病金额") @ExcelProperty("单位大病金额")
...@@ -230,7 +230,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -230,7 +230,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 个人大病金额 * 个人大病金额
*/ */
@ExcelAttribute(name = "个人大病金额",isDouble = true) @ExcelAttribute(name = "个人大病金额",isFloat = true,max = "999999999.99",min = 0)
@Schema(description = "个人大病金额") @Schema(description = "个人大病金额")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病金额") @ExcelProperty("个人大病金额")
...@@ -239,7 +239,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -239,7 +239,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位医疗缴纳比例 * 单位医疗缴纳比例
*/ */
@ExcelAttribute(name = "单位医疗比例", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "单位医疗比例", isNotEmpty = true,isFloat = true,max = "100",min = 0)
@Schema(description = "单位医疗比例") @Schema(description = "单位医疗比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位医疗比例") @ExcelProperty("单位医疗比例")
...@@ -248,7 +248,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -248,7 +248,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 个人医疗比例 * 个人医疗比例
*/ */
@ExcelAttribute(name = "个人医疗比例", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "个人医疗比例", isNotEmpty = true,isFloat = true,max = "100",min = 0)
@Schema(description = "个人医疗比例") @Schema(description = "个人医疗比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人医疗比例") @ExcelProperty("个人医疗比例")
...@@ -257,7 +257,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -257,7 +257,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位生育缴纳比例 * 单位生育缴纳比例
*/ */
@ExcelAttribute(name = "单位生育比例", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "单位生育比例", isNotEmpty = true,isFloat = true,max = "100",min = 0)
@Schema(description = "单位生育比例") @Schema(description = "单位生育比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位生育比例") @ExcelProperty("单位生育比例")
...@@ -266,7 +266,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -266,7 +266,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位养老缴纳比例 * 单位养老缴纳比例
*/ */
@ExcelAttribute(name = "单位养老比例", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "单位养老比例", isNotEmpty = true,isFloat = true,max = "100",min = 0)
@Schema(description = "单位养老比例") @Schema(description = "单位养老比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位养老比例") @ExcelProperty("单位养老比例")
...@@ -275,7 +275,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -275,7 +275,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 个人养老比例 * 个人养老比例
*/ */
@ExcelAttribute(name = "个人养老比例", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "个人养老比例", isNotEmpty = true,isFloat = true,max = "100",min = 0)
@Schema(description = "个人养老比例") @Schema(description = "个人养老比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人养老比例") @ExcelProperty("个人养老比例")
...@@ -285,7 +285,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -285,7 +285,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位工伤缴纳比例 * 单位工伤缴纳比例
*/ */
@ExcelAttribute(name = "单位工伤比例", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "单位工伤比例", isNotEmpty = true,isFloat = true,max = "100",min = 0)
@Schema(description = "单位工伤比例") @Schema(description = "单位工伤比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位工伤比例") @ExcelProperty("单位工伤比例")
...@@ -294,7 +294,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -294,7 +294,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位失业缴纳比例 * 单位失业缴纳比例
*/ */
@ExcelAttribute(name = "单位失业比例", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "单位失业比例", isNotEmpty = true,isFloat = true,max = "100",min = 0)
@Schema(description = "单位失业比例") @Schema(description = "单位失业比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位失业比例") @ExcelProperty("单位失业比例")
...@@ -303,7 +303,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -303,7 +303,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 个人失业比例 * 个人失业比例
*/ */
@ExcelAttribute(name = "个人失业比例", isNotEmpty = true,isDouble = true) @ExcelAttribute(name = "个人失业比例", isNotEmpty = true,isFloat = true,max = "100",min = 0)
@Schema(description = "个人失业比例") @Schema(description = "个人失业比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人失业比例") @ExcelProperty("个人失业比例")
...@@ -312,7 +312,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -312,7 +312,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位大病比例 * 单位大病比例
*/ */
@ExcelAttribute(name = "单位大病比例",isDouble = true) @ExcelAttribute(name = "单位大病比例",isFloat = true,max = "100",min = 0)
@Schema(description = "单位大病比例") @Schema(description = "单位大病比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位大病比例") @ExcelProperty("单位大病比例")
...@@ -321,7 +321,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -321,7 +321,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 个人大病比例 * 个人大病比例
*/ */
@ExcelAttribute(name = "个人大病比例",isDouble = true) @ExcelAttribute(name = "个人大病比例",isFloat = true,max = "100",min = 0)
@Schema(description = "个人大病比例") @Schema(description = "个人大病比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病比例") @ExcelProperty("个人大病比例")
...@@ -375,7 +375,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -375,7 +375,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 补缴政策 * 补缴政策
*/ */
@ExcelAttribute(name = "补缴政策") @ExcelAttribute(name = "补缴政策",maxLength = 200)
@Schema(description = "补缴政策") @Schema(description = "补缴政策")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("补缴政策") @ExcelProperty("补缴政策")
......
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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 huych
* @date 2025-09-30 16:40:07
*/
@Data
public class TDispatchInfoPreFundExportVo implements Serializable {
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码")
@Schema(description = "项目编码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码")
private String deptNo;
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名")
@Schema(description = "员工姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名")
private String empName;
/**
* 员工身份证
*/
@ExcelAttribute(name = "身份证号")
@Schema(description = "身份证号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 公积金户
*/
@ExcelAttribute(name = "公积金户")
@Schema(description = "公积金户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金户")
private String fundHouseholdName;
/**
* 公积金基数
*/
@ExcelAttribute(name = "公积金基数")
@Schema(description = "公积金基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金基数")
private String providentCardinal;
/**
* 单位公积金缴纳比例
*/
@ExcelAttribute(name = "单位公积金缴纳比例")
@Schema(description = "单位公积金缴纳比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金缴纳比例")
private BigDecimal unitProvidentPer;
/**
* 个人公积金比例
*/
@ExcelAttribute(name = "个人公积金缴纳比例")
@Schema(description = "个人公积金缴纳比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金缴纳比例")
private BigDecimal personalProvidentPer;
/**
* 入职日期
*/
@ExcelAttribute(name = "入职日期")
@Schema(description = "入职日期")
@ExcelProperty("入职日期")
private String joinLeaveDate;
/**
* 合同签署状态 0已签署 1未签署
*/
@ExcelAttribute(name = "合同签署状态")
@Schema(description = "合同签署状态 0已签署 1未签署")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同签署状态")
private String contractStatus;
/**
* 公积金购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败
*/
@ExcelAttribute(name = "公积金购买状态")
@Schema(description = "公积金购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金购买状态")
private String processStatus;
/**
* 预计派单时间
*/
@ExcelAttribute(name = "预计派单时间")
@Schema(description = "预计派单时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("预计派单时间")
private LocalDateTime expectedCollectionTime;
/**
* 前端客服姓名
*/
@ExcelAttribute(name = "前端客服")
@Schema(description = "前端客服")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("前端客服")
private String customerUsername;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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;
/**
* 参保人员信息VO
*/
@Data
public class UnFundInfoVo implements Serializable {
/**
* 主键ID
*/
private String id;
/**
* 公积金户名称
*/
private String fundHouseholdName;
/**
* 缴费政策类型 0-最低 1-自定义 2-最高
*/
private String paymentType;
/**
* 公积金状态
*/
private String fundStatus;
/**
* 项目编码
*/
private String deptNo;
/**
* 项目名称
*/
private String deptName;
/**
* 缴纳地-省
*/
private String fundProvince;
/**
* 缴纳地-市
*/
private String fundCity;
/**
* 缴纳地-县
*/
private String fundTown;
/**
* 派单人姓名
*/
private String dispatchName;
/**
* 创建时间
*/
private String dispatchTime;
/**
* 单位公积金缴纳比例
*/
private BigDecimal unitProvidentPer;
/**
* 个人公积金缴纳比例
*/
private BigDecimal personalProvidentPer;
/**
* 单位公积金缴纳基数
*/
private BigDecimal providentCardinal;
}
...@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeePreSocialListVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeePreSocialListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
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.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; 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.dapr.util.MenuUtil;
...@@ -43,7 +45,7 @@ public class TDispatchInfoPreController { ...@@ -43,7 +45,7 @@ public class TDispatchInfoPreController {
* 简单分页查询 * 简单分页查询
* *
* @param page 分页对象 * @param page 分页对象
* @param tDispatchInfoPre 社保待购买表 * @param tDispatchInfoPre 社保或公积金待购买表
* @return * @return
*/ */
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
...@@ -51,6 +53,12 @@ public class TDispatchInfoPreController { ...@@ -51,6 +53,12 @@ public class TDispatchInfoPreController {
public R<IPage<TDispatchInfoPre>> getTDispatchInfoPrePage(Page<TDispatchInfoPre> page, TDispatchInfoPreSearchVo tDispatchInfoPre) { public R<IPage<TDispatchInfoPre>> getTDispatchInfoPrePage(Page<TDispatchInfoPre> page, TDispatchInfoPreSearchVo tDispatchInfoPre) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tDispatchInfoPre); menuUtil.setAuthSql(user, tDispatchInfoPre);
//typeSuB 0 社保 1 公积金
if (Common.isEmpty(tDispatchInfoPre.getTypeSub())){
tDispatchInfoPre.setTypeSub(CommonConstants.ZERO_STRING);
}else if (Common.isEmpty(tDispatchInfoPre.getTypeSub())){
tDispatchInfoPre.setTypeSub(tDispatchInfoPre.getTypeSub());
}
return new R<>(tDispatchInfoPreService.getTDispatchInfoPrePage(page, tDispatchInfoPre)); return new R<>(tDispatchInfoPreService.getTDispatchInfoPrePage(page, tDispatchInfoPre));
} }
...@@ -65,6 +73,12 @@ public class TDispatchInfoPreController { ...@@ -65,6 +73,12 @@ public class TDispatchInfoPreController {
public R<List<TDispatchInfoPre>> getTDispatchInfoPreNoPage(@RequestBody TDispatchInfoPreSearchVo tDispatchInfoPre) { public R<List<TDispatchInfoPre>> getTDispatchInfoPreNoPage(@RequestBody TDispatchInfoPreSearchVo tDispatchInfoPre) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tDispatchInfoPre); menuUtil.setAuthSql(user, tDispatchInfoPre);
//typeSun 0 社保 1 公积金
if (Common.isEmpty(tDispatchInfoPre.getTypeSub())){
tDispatchInfoPre.setTypeSub(CommonConstants.ZERO_STRING);
}else if (Common.isEmpty(tDispatchInfoPre.getTypeSub())){
tDispatchInfoPre.setTypeSub(tDispatchInfoPre.getTypeSub());
}
return R.ok(tDispatchInfoPreService.getNoPageList(tDispatchInfoPre)); return R.ok(tDispatchInfoPreService.getNoPageList(tDispatchInfoPre));
} }
...@@ -121,6 +135,21 @@ public class TDispatchInfoPreController { ...@@ -121,6 +135,21 @@ public class TDispatchInfoPreController {
tDispatchInfoPreService.listExport(response, searchVo); tDispatchInfoPreService.listExport(response, searchVo);
} }
/**
* @Author fxj
* @Description 公积金待购买表 批量导出
* @Date 16:00 2025/11/7
* @Param
* @return
**/
@Operation(description = "导出公积金待购买表")
@PostMapping("/exportFund")
public void exportFund(HttpServletResponse response, @RequestBody TDispatchInfoPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
tDispatchInfoPreService.listExportFund(response, searchVo);
}
/** /**
* 社保待购买信息单个/批量确认 * 社保待购买信息单个/批量确认
* @author huych * @author huych
...@@ -132,6 +161,19 @@ public class TDispatchInfoPreController { ...@@ -132,6 +161,19 @@ public class TDispatchInfoPreController {
return tDispatchInfoPreService.confirm(idList); return tDispatchInfoPreService.confirm(idList);
} }
/**
* @Author fxj
* @Description 公积金待购买信息单个/批量确认
* @Date 15:20 2025/11/10
* @Param
* @return
**/
@Operation(description = "公积金待购买信息单个/批量确认")
@PostMapping("/confirmFund")
public R confirmFund(@RequestBody List<String> idList) {
return tDispatchInfoPreService.confirmFund(idList);
}
/** /**
* 社保待购买信息单个/批量发起购买任务 * 社保待购买信息单个/批量发起购买任务
* @param idList id数组 * @param idList id数组
...@@ -143,7 +185,20 @@ public class TDispatchInfoPreController { ...@@ -143,7 +185,20 @@ public class TDispatchInfoPreController {
} }
/** /**
* 社保待购买数量查询 * @Author fxj
* @Description 手动派单-公积金待购买信息单个/批量发起购买任务
* @Date 14:08 2025/11/7
* @Param
* @return
**/
@Operation(description = "公积金待购买信息单个/批量发起购买任务")
@PostMapping("/dispatcherFund")
public R dispatcherFund(@RequestBody List<String> idList) {
return tDispatchInfoPreService.dispatcherFund(idList,"1");
}
/**
* 社保待购买数量查询 公积金可用这个接口
* @param searchVo 社保待购买任务表 * @param searchVo 社保待购买任务表
* @return * @return
*/ */
...@@ -155,6 +210,21 @@ public class TDispatchInfoPreController { ...@@ -155,6 +210,21 @@ public class TDispatchInfoPreController {
return R.ok(tDispatchInfoPreService.getDispatchInfoCount(searchVo)); return R.ok(tDispatchInfoPreService.getDispatchInfoCount(searchVo));
} }
/**
* 公积金待购买数量查询
* @param searchVo 公积金待购买任务表
* @return
*/
@Operation(description = "公积金待购买数量查询")
@PostMapping("/getListFundCount")
public R getListCountFund(@RequestBody TDispatchInfoPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
return R.ok(tDispatchInfoPreService.getDispatchInfoFundCount(searchVo));
}
/** /**
* 新增社保待购买 * 新增社保待购买
* @author huych * @author huych
...@@ -167,6 +237,20 @@ public class TDispatchInfoPreController { ...@@ -167,6 +237,20 @@ public class TDispatchInfoPreController {
return tDispatchInfoPreService.saveSocialPreInfo(preVo); return tDispatchInfoPreService.saveSocialPreInfo(preVo);
} }
/**
* @Author fxj
* @Description 新增公积金待购买
* @Date 14:08 2025/11/7
* @Param
* @return \
**/
@Operation(description = "新增公积金待购买")
@Inner
@PostMapping("/saveFundPreInfo")
public Boolean saveFundPreInfo(@RequestBody EmployeeRegistrationPreVo preVo) {
return tDispatchInfoPreService.saveFundPreInfo(preVo);
}
/** /**
* 更新社保待购买的前端客服姓名 * 更新社保待购买的前端客服姓名
* @author huych * @author huych
...@@ -191,6 +275,20 @@ public class TDispatchInfoPreController { ...@@ -191,6 +275,20 @@ public class TDispatchInfoPreController {
return tDispatchInfoPreService.getSocialPreInfoList(id); return tDispatchInfoPreService.getSocialPreInfoList(id);
} }
/**
* @Author fxj
* @Description 入职确认信息详情中的公积金明细信息
* @Date 14:08 2025/11/7
* @Param
* @return
**/
@Operation(description = "入职确认信息详情中的公积金明细信息")
@Inner
@PostMapping("/getFundPreInfoList")
public EmployeePreSocialListVo getFundPreInfoList(@RequestBody String id) {
return tDispatchInfoPreService.getFundPreInfoList(id);
}
/** /**
* 查询社保待购买的状态 * 查询社保待购买的状态
* @author huych * @author huych
...@@ -204,7 +302,21 @@ public class TDispatchInfoPreController { ...@@ -204,7 +302,21 @@ public class TDispatchInfoPreController {
} }
/** /**
* 删除非流程中的社保待购买数据 * @Author fxj
* @Description 查询公积金待购买的状态
* @Date 14:08 2025/11/7
* @Param
* @return
**/
@Operation(description = "查询公积金待购买的状态")
@Inner
@PostMapping("/getFundPreInfoStatus")
public EmployeePreSocialListVo getFundPreInfoStatus(@RequestBody String id) {
return tDispatchInfoPreService.getFundPreInfoStatus(id);
}
/**
* 删除非流程中的社保待购买数据 公积金可以通用
* @author huych * @author huych
* @date 2025-10-11 15:30:02 * @date 2025-10-11 15:30:02
**/ **/
...@@ -216,7 +328,22 @@ public class TDispatchInfoPreController { ...@@ -216,7 +328,22 @@ public class TDispatchInfoPreController {
} }
/** /**
* 派单当日9点统一推送确认信息 * @Author fxj
* @Description 删除非流程中的公积金待购买数据
* @Date 15:06 2025/11/10
* @Param
* @return
**/
@Operation(description = "删除非流程中的公积金待购买数据")
@Inner
@PostMapping("/deleteUnProcessFundPreInfo")
public void deleteUnProcessFundPreInfo(@RequestBody String id) {
tDispatchInfoPreService.deleteUnProcessFundPreInfo(id);
}
/**
* 派单当日9点统一推送确认信息 公积金可以通用
* @author huych * @author huych
* @date 2025-10-11 18:50:16 * @date 2025-10-11 18:50:16
* @return void * @return void
...@@ -229,7 +356,7 @@ public class TDispatchInfoPreController { ...@@ -229,7 +356,7 @@ public class TDispatchInfoPreController {
} }
/** /**
* 每天下午三点二十推送待购买数据 * 每天下午三点二十推送待购买数据 公积金可以通用
* @author huych * @author huych
* @date 2025-10-11 18:51:58 * @date 2025-10-11 18:51:58
* @return void * @return void
......
...@@ -225,7 +225,7 @@ public class TSocialFundInfoController { ...@@ -225,7 +225,7 @@ public class TSocialFundInfoController {
/** /**
* 通过身份证查询在途或在保的数据 * 通过身份证查询在途或在保的数据
* @param UnSocialFundInfoVo 社保公积金查询表 * @param empIdcard 社保公积金查询表
* @return * @return
*/ */
@Operation(summary = "通过身份证查询在途或在保的数据", description = "通过身份证查询在途或在保的数据") @Operation(summary = "通过身份证查询在途或在保的数据", description = "通过身份证查询在途或在保的数据")
...@@ -234,6 +234,17 @@ public class TSocialFundInfoController { ...@@ -234,6 +234,17 @@ public class TSocialFundInfoController {
return R.ok(tSocialFundInfoService.selectUnSocialFundInfoByEmpIdcard(empIdcard)); return R.ok(tSocialFundInfoService.selectUnSocialFundInfoByEmpIdcard(empIdcard));
} }
/**
* 通过身份证查询在途或在保的公积金数据
* @param empIdcard 社保公积金查询表
* @return
*/
@Operation(summary = "通过身份证查询在途或在保的公积金数据", description = "通过身份证查询在途或在保的公积金数据")
@PostMapping("/selectUnFundInfoByEmpIdcard" )
public R<List<UnFundInfoVo>> selectUnFundInfoByEmpIdcard(@RequestParam String empIdcard) {
return R.ok(tSocialFundInfoService.selectUnFundInfoByEmpIdcard(empIdcard));
}
/** /**
* @Author huych * @Author huych
...@@ -249,4 +260,18 @@ public class TSocialFundInfoController { ...@@ -249,4 +260,18 @@ public class TSocialFundInfoController {
return tSocialFundInfoService.selectExitEmpSocail(cardVo); return tSocialFundInfoService.selectExitEmpSocail(cardVo);
} }
/**
* @Author fxj
* @Description 查询是否存在正常或者在途的公积金
* @Date 10:13 2025/11/7
* @Param
* @return
**/
@Operation(summary = "查询是否存在正常或者在途的公积金", description = "查询是否存在正常或者在途的公积金")
@Inner
@PostMapping("/selectExitEmpFund")
public Boolean selectExitEmpFund(@RequestBody TEmployeeAutoRegistCheckVo cardVo) {
return tSocialFundInfoService.selectExitEmpFund(cardVo);
}
} }
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre; import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreFundExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreSearchVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -35,8 +36,16 @@ public interface TDispatchInfoPreMapper extends BaseMapper<TDispatchInfoPre> { ...@@ -35,8 +36,16 @@ public interface TDispatchInfoPreMapper extends BaseMapper<TDispatchInfoPre> {
List<TDispatchImportVo> getDisPatcherSocialList(@Param("idList") List<String> idList, @Param("statusList") List<String> statusList, @Param("type") String type); List<TDispatchImportVo> getDisPatcherSocialList(@Param("idList") List<String> idList, @Param("statusList") List<String> statusList, @Param("type") String type);
List<TDispatchImportVo> getDisPatcherFundList(@Param("idList") List<String> idList, @Param("statusList") List<String> statusList, @Param("type") String type);
List<TDispatchInfoPre> getAllUnDisData(); List<TDispatchInfoPre> getAllUnDisData();
List<String> getAllUnDisDataIdList(); List<String> getAllUnDisDataIdList();
List<String> getAllUnDisDataIdFundList();
List<TDispatchInfoPreFundExportVo> selectFundExportList(@Param("tDispatchInfoPre")TDispatchInfoPreSearchVo searchVo);
long selectFundExportCount(@Param("tDispatchInfoPre") TDispatchInfoPreSearchVo searchVo);
} }
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TFundPreDetail;
import org.apache.ibatis.annotations.Mapper;
/**
* 入职确认信息公积金已购买记录
*
* @author fxj
* @date 2025-11-07 10:30
*/
@Mapper
public interface TFundPreDetailMapper extends BaseMapper<TFundPreDetail> {
}
\ No newline at end of file
...@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo; ...@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoExportVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.UnFundInfoVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.UnSocialFundInfoVo; import com.yifu.cloud.plus.v1.yifu.social.vo.UnSocialFundInfoVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -101,4 +102,7 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> { ...@@ -101,4 +102,7 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
long selectSocialFundInfoCountByEmpIdcard(@Param("empIdcard") String empIdcard); long selectSocialFundInfoCountByEmpIdcard(@Param("empIdcard") String empIdcard);
long selectFundCountByEmpIdcard(@Param("empIdcard") String empIdcard);
List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(@Param("empIdcard")String empIdcard);
} }
...@@ -57,6 +57,13 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> { ...@@ -57,6 +57,13 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
*/ */
Boolean saveSocialPreInfo(EmployeeRegistrationPreVo preVo); Boolean saveSocialPreInfo(EmployeeRegistrationPreVo preVo);
/**
* 新增公积金待购买信息
* @param preVo
* @return
*/
Boolean saveFundPreInfo(EmployeeRegistrationPreVo preVo);
/** /**
* 更新社保待购买前端客服信息 * 更新社保待购买前端客服信息
* @param updateVo * @param updateVo
...@@ -70,6 +77,8 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> { ...@@ -70,6 +77,8 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
void deleteUnProcessSocialPreInfo(String id); void deleteUnProcessSocialPreInfo(String id);
void deleteUnProcessFundPreInfo(String id);
/** /**
* 社保待购买信息单个/批量发起签署任务 * 社保待购买信息单个/批量发起签署任务
* @param idList id集合 * @param idList id集合
...@@ -81,4 +90,16 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> { ...@@ -81,4 +90,16 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
void pushWxConfrimMessage(); void pushWxConfrimMessage();
void pushDisConfrimSocial(); void pushDisConfrimSocial();
R dispatcherFund(List<String> idList, String s);
EmployeePreSocialListVo getFundPreInfoList(String id);
void listExportFund(HttpServletResponse response, TDispatchInfoPreSearchVo searchVo);
EmployeePreSocialListVo getFundPreInfoStatus(String id);
long getDispatchInfoFundCount(TDispatchInfoPreSearchVo searchVo);
R confirmFund(List<String> idList);
} }
...@@ -99,4 +99,14 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> { ...@@ -99,4 +99,14 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo); Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo);
/**
* @Author fxj
* @Description 查询是否存在正常或者在途的公积金
* @Date 10:14 2025/11/7
* @Param
* @return
**/
Boolean selectExitEmpFund(TEmployeeAutoRegistCheckVo cardVo);
List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard);
} }
...@@ -758,12 +758,16 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -758,12 +758,16 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
} }
infoVo.setUpPersion(excel.getUpPersion()); infoVo.setUpPersion(excel.getUpPersion());
infoVo.setLowerPersion(excel.getLowerPersion()); infoVo.setLowerPersion(excel.getLowerPersion());
infoVo.setUpInjury(excel.getUpInjury()); infoVo.setUpInjury(excel.getUpInjury());
infoVo.setLowerInjury(excel.getLowerInjury()); infoVo.setLowerInjury(excel.getLowerInjury());
infoVo.setUpMedical(excel.getUpMedical()); infoVo.setUpMedical(excel.getUpMedical());
infoVo.setLowerMedical(excel.getLowerMedical()); infoVo.setLowerMedical(excel.getLowerMedical());
infoVo.setUpBirth(excel.getUpBirth()); infoVo.setUpBirth(excel.getUpBirth());
infoVo.setLowerBirth(excel.getLowerBirth()); infoVo.setLowerBirth(excel.getLowerBirth());
infoVo.setUpUnemployment(excel.getUpUnemployment()); infoVo.setUpUnemployment(excel.getUpUnemployment());
infoVo.setLowerUnemployment(excel.getLowerUnemployment()); infoVo.setLowerUnemployment(excel.getLowerUnemployment());
...@@ -771,6 +775,46 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -771,6 +775,46 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
excel.setLowerBig(excel.getLowerBig()); excel.setLowerBig(excel.getLowerBig());
} }
//养老基数下限不可大于养老基数上限
if (null != infoVo.getUpPersion()
&& null != infoVo.getLowerPersion()
&& infoVo.getUpPersion().compareTo(infoVo.getLowerPersion()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"养老基数下限不可大于养老基数上限,请修改后重新提交。");
errorMessageList.add(errorMsg);
continue;
}
//工伤基数下限不可大于工伤基数上限
if (null != infoVo.getUpInjury()
&& null != infoVo.getLowerInjury()
&& infoVo.getUpInjury().compareTo(infoVo.getLowerInjury()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"工伤基数下限不可大于工伤基数上限,请修改后重新提交。");
errorMessageList.add(errorMsg);
continue;
}
//医疗基数下限不可大于医疗基数上限
if (null != infoVo.getUpMedical()
&& null != infoVo.getLowerMedical()
&& infoVo.getUpMedical().compareTo(infoVo.getLowerMedical()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"医疗基数下限不可大于医疗基数上限,请修改后重新提交。");
errorMessageList.add(errorMsg);
continue;
}
//生育基数下限不可大于生育基数上限
if (null != infoVo.getUpBirth()
&& null != infoVo.getLowerBirth()
&& infoVo.getUpBirth().compareTo(infoVo.getLowerBirth()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"生育基数下限不可大于生育基数上限,请修改后重新提交。");
errorMessageList.add(errorMsg);
continue;
}
//失业基数下限不可大于失业基数上限
if (null != infoVo.getUpUnemployment()
&& null !=infoVo.getLowerUnemployment()
&& infoVo.getUpUnemployment().compareTo(infoVo.getLowerUnemployment()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"失业基数下限不可大于失业基数上限,请修改后重新提交。");
errorMessageList.add(errorMsg);
continue;
}
//大病是否收取 //大病是否收取
if (!CommonConstants.ZERO_STRING.equals(excel.getIsIllness()) && !CommonConstants.ONE_STRING.equals(excel.getIsIllness())){ if (!CommonConstants.ZERO_STRING.equals(excel.getIsIllness()) && !CommonConstants.ONE_STRING.equals(excel.getIsIllness())){
if (!CommonConstants.ZERO_STRING.equals(excel.getIsIllness())){ if (!CommonConstants.ZERO_STRING.equals(excel.getIsIllness())){
...@@ -860,7 +904,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -860,7 +904,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
infoVo.setPayCompany(excel.getChargeCompany()); infoVo.setPayCompany(excel.getChargeCompany());
infoVo.setPayPersonal(excel.getChargePersonal()); infoVo.setPayPersonal(excel.getChargePersonal());
} }
//大病基数下限不可大于失大病基数上限
if (null != infoVo.getUpBig()
&& null !=infoVo.getLowerBig()
&& infoVo.getUpBig().compareTo(infoVo.getLowerBig()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病基数下限不可大于大病基数上限,请修改后重新提交。");
errorMessageList.add(errorMsg);
continue;
}
} }
//是否可补缴 只可以填写是或否,必填 //是否可补缴 只可以填写是或否,必填
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getCanOverpay())) { if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getCanOverpay())) {
...@@ -1114,6 +1165,12 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1114,6 +1165,12 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
//基数上下限赋值 //基数上下限赋值
infoVo.setLowerLimit(excel.getLowerLimit()); infoVo.setLowerLimit(excel.getLowerLimit());
infoVo.setUpperLimit(excel.getUpperLimit()); infoVo.setUpperLimit(excel.getUpperLimit());
//基数下限不可大于基数上限
if (excel.getLowerLimit().compareTo(excel.getUpperLimit()) > 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"基数下限不可大于基数上限,请修改后重新提交。");
errorMessageList.add(errorMsg);
continue;
}
infoVo.setFundPayLowerLimit(excel.getLowerLimit()); infoVo.setFundPayLowerLimit(excel.getLowerLimit());
infoVo.setFundPayUpperLimit(excel.getUpperLimit()); infoVo.setFundPayUpperLimit(excel.getUpperLimit());
//单边小数点 //单边小数点
...@@ -1146,6 +1203,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1146,6 +1203,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != splitSub && splitSub.length == 2){ if (null != splitSub && splitSub.length == 2){
fundPro.setCompanyPro(Double.valueOf(splitSub[0])); fundPro.setCompanyPro(Double.valueOf(splitSub[0]));
fundPro.setPersonalPro(Double.valueOf(splitSub[1])); fundPro.setPersonalPro(Double.valueOf(splitSub[1]));
//如果单位比例大于100或小于等于0 则报错
if (fundPro.getCompanyPro() > 100 || fundPro.getCompanyPro() <= 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"单位比例必填,只可填写“0-100”之间的数字,请修改后重新提交");
errorMessageList.add(errorMsg);
continue;
}
//如果个人比例大于100或小于等于0 则报错
if (fundPro.getPersonalPro() > 100 || fundPro.getPersonalPro() <= 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"个人比例必填,只可填写“0-100”之间的数字,请修改后重新提交");
errorMessageList.add(errorMsg);
continue;
}
} }
fundProList.add(fundPro); fundProList.add(fundPro);
} }
......
...@@ -22,14 +22,12 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils; ...@@ -22,14 +22,12 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.config.WxConfig; import com.yifu.cloud.plus.v1.yifu.social.config.WxConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre; import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre;
import com.yifu.cloud.plus.v1.yifu.social.entity.TFundPreDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoLog; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialPreDetail; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialPreDetail;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchInfoPreMapper; import com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchInfoPreMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.*; import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo; import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -68,6 +66,8 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -68,6 +66,8 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
private final TSocialPreDetailService socialPreDetailService; private final TSocialPreDetailService socialPreDetailService;
private final TFundPreDetailService fundPreDetailService;
private final THolidayInfoService tHolidayInfoService; private final THolidayInfoService tHolidayInfoService;
private final TDispatchInfoService dispatchInfoService; private final TDispatchInfoService dispatchInfoService;
...@@ -159,12 +159,34 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -159,12 +159,34 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
return R.ok(); return R.ok();
} }
@Override
public R confirmFund(List<String> idList) {
List<TDispatchInfoPre> preList = baseMapper.selectList(Wrappers.<TDispatchInfoPre>query()
.lambda().in(TDispatchInfoPre::getId, idList)
.eq(TDispatchInfoPre::getProcessStatus, CommonConstants.ZERO_STRING));
if (Common.isEmpty(preList)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
LambdaUpdateWrapper<TDispatchInfoPre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(TDispatchInfoPre::getId,idList)
.eq(TDispatchInfoPre::getProcessStatus, CommonConstants.ZERO_STRING)
.set(TDispatchInfoPre::getProcessStatus, CommonConstants.ONE_STRING);
this.update(updateWrapper);
return R.ok();
}
@Override @Override
public long getDispatchInfoCount(TDispatchInfoPreSearchVo searchVo) { public long getDispatchInfoCount(TDispatchInfoPreSearchVo searchVo) {
initSearchVo(searchVo); initSearchVo(searchVo);
return baseMapper.selectExportCount(searchVo); return baseMapper.selectExportCount(searchVo);
} }
@Override
public long getDispatchInfoFundCount(TDispatchInfoPreSearchVo searchVo) {
initSearchVo(searchVo);
return baseMapper.selectFundExportCount(searchVo);
}
@Override @Override
public Boolean saveSocialPreInfo(EmployeeRegistrationPreVo registrationPreVo) { public Boolean saveSocialPreInfo(EmployeeRegistrationPreVo registrationPreVo) {
if (Common.isNotNull(registrationPreVo.getSocialIsBuy()) if (Common.isNotNull(registrationPreVo.getSocialIsBuy())
...@@ -215,6 +237,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -215,6 +237,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
TDispatchInfoPre preExit = baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda() TDispatchInfoPre preExit = baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getRegisterId, preVo.getRegisterId()) .eq(TDispatchInfoPre::getRegisterId, preVo.getRegisterId())
.eq(TDispatchInfoPre::getEmpIdcard, preVo.getEmpIdcard()) .eq(TDispatchInfoPre::getEmpIdcard, preVo.getEmpIdcard())
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ZERO_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4", "8")) .in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4", "8"))
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
TDispatchInfoPre pre = new TDispatchInfoPre(); TDispatchInfoPre pre = new TDispatchInfoPre();
...@@ -273,6 +296,123 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -273,6 +296,123 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
} }
return true; return true;
} }
/**
* 新增公积金待购买信息
* @param registrationPreVo
* @return
*/
@Override
public Boolean saveFundPreInfo(EmployeeRegistrationPreVo registrationPreVo) {
if (Common.isNotNull(registrationPreVo.getFundIsBuy())
&& registrationPreVo.getFundIsBuy().equals(CommonConstants.ZERO_STRING)
&& !registrationPreVo.getExitSocialInfoList().isEmpty()) {
//删除已存在的入职确认信息对应的公积金明细
fundPreDetailService.remove(Wrappers.<TFundPreDetail>lambdaQuery()
.eq(TFundPreDetail::getRegisterId, registrationPreVo.getExitFundInfoList()
.get(0).getRegisterId()));
//批量新增
for (TFundPreDetailVo vo : registrationPreVo.getExitFundInfoList()) {
TFundPreDetail preDetal = new TFundPreDetail();
BeanUtils.copyProperties(vo, preDetal);
fundPreDetailService.save(preDetal);
}
//批量删除公积金待购买列表中的待确认、待派单、派单失败、审核、办理失败的数据
baseMapper.delete(Wrappers.<TDispatchInfoPre>query().lambda().in(
TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4", "8"))
.eq(TDispatchInfoPre::getRegisterId, registrationPreVo.getExitSocialInfoList()
.get(0).getRegisterId()));
} else {
//删除已存在的入职确认信息对应的公积金明细
TDispatchInfoPreVo preVo = registrationPreVo.getDispatchInfoFundPreVo();
fundPreDetailService.remove(Wrappers.<TFundPreDetail>lambdaQuery()
.eq(TFundPreDetail::getRegisterId, preVo.getRegisterId()));
try {
if (Common.isNotNull(preVo)) {
//判断是否存在公积金待购买信息
TDispatchInfoPre preExit = baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getRegisterId, preVo.getRegisterId())
.eq(TDispatchInfoPre::getEmpIdcard, preVo.getEmpIdcard())
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4", "8"))
.last(CommonConstants.LAST_ONE_SQL));
TDispatchInfoPre pre = new TDispatchInfoPre();
BeanUtils.copyProperties(preVo, pre);
//时间格式转化
if (Common.isNotNull(preVo.getExpectedCollectionTime())) {
preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE));
pre.setExpectedCollectionTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedCollectionTime()));
}
if (Common.isNotNull(preVo.getExpectedConfirmTime())) {
preVo.setExpectedConfirmTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 09:00", DateUtil.DATETIME_PATTERN_MINUTE));
pre.setExpectedConfirmTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedConfirmTime()));
}
if (Common.isEmpty(pre.getDispatchItem())) {
pre.setDispatchItem("公积金");
}
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis())
&& Common.isNotNull(preVo.getExpectedCollectionType())) {
TEmployeeContractDateVo vo = new TEmployeeContractDateVo();
//接收方式 0项目配置 1自定义
if (CommonConstants.ONE_STRING.equals(preVo.getReceiveType())){
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getSocialStartDate());
}else {
//先计算起缴日期
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getJoinLeaveDate());
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setYearAfter(CommonConstants.ONE_INT);
vo.setRegistDate(preVo.getJoinLeaveDate());
}else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){
//用户自定义取值用户填写的起缴日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getSocialStartDate());
}
}
Date date = this.addYearsMonths(vo);
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date);
dayVo.setRegistType(0);
TEmployeeInsuranceWorkDayVo dataR = tHolidayInfoService.selectBeforeOrAfterWorkDayCommon(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getPriDisDate())) {
preVo.setExpectedCollectionTime(dataR.getRegistDate());
preVo.setExpectedConfirmTime(dataR.getRegistDate());
} else {
preVo.setExpectedCollectionTime(date);
preVo.setExpectedConfirmTime(date);
}
preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE));
preVo.setExpectedConfirmTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 09:00", DateUtil.DATETIME_PATTERN_MINUTE));
pre.setExpectedCollectionTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedCollectionTime()));
pre.setExpectedConfirmTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedConfirmTime()));
}
if (Common.isNotNull(preExit)) {
pre.setId(preExit.getId());
baseMapper.deleteById(preExit);
}
pre.setTypeSub(CommonConstants.ONE_STRING);
baseMapper.insert(pre);
}
} catch (Exception e) {
log.error("执行异常", e);
return false;
}
}
return true;
}
@Override @Override
public void updateSocialPreCustomerName(EmployeeRegistrationCustomerUserUpdateVo updateVo) { public void updateSocialPreCustomerName(EmployeeRegistrationCustomerUserUpdateVo updateVo) {
...@@ -318,6 +458,45 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -318,6 +458,45 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
} }
return preSocialListVo; return preSocialListVo;
} }
/**
* @Author fxj
* @Description 入职确认信息详情中的公积金明细信息
* @Date 14:07 2025/11/7
* @Param
* @return
**/
public EmployeePreSocialListVo getFundPreInfoList(String id) {
EmployeePreSocialListVo preFundListVo = new EmployeePreSocialListVo();
//获取公积金已购买和待购买信息
List<TFundPreDetail> exitFundInfoList = fundPreDetailService.list(Wrappers.<TFundPreDetail>query().lambda()
.eq(TFundPreDetail::getRegisterId, id));
if (Common.isNotNull(exitFundInfoList) && !exitFundInfoList.isEmpty()) {
List<TFundPreDetailVo> exitFundInfoListVo = exitFundInfoList.stream()
.map(detail -> {
TFundPreDetailVo vo = new TFundPreDetailVo();
BeanUtils.copyProperties(detail, vo);
return vo;
})
.collect(Collectors.toList());
preFundListVo.setExitFundInfoList(exitFundInfoListVo);
return preFundListVo;
}
TDispatchInfoPre preExit = baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getTypeSub, CommonConstants.ONE_STRING)
.eq(TDispatchInfoPre::getRegisterId, id)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(preExit)) {
TDispatchInfoPreVo pre = new TDispatchInfoPreVo();
BeanUtils.copyProperties(preExit, pre);
if (Common.isNotNull(preExit.getExpectedCollectionTime())) {
pre.setExpectedCollectionTime(LocalDateTimeUtils.convertLDTToDate(preExit.getExpectedCollectionTime()));
pre.setExpectedConfirmTime(LocalDateTimeUtils.convertLDTToDate(preExit.getExpectedConfirmTime()));
}
preFundListVo.setDispatchInfoPreFundVo(pre);
}
return preFundListVo;
}
@Override @Override
public EmployeePreSocialListVo getSocialPreInfoStatus(String id) { public EmployeePreSocialListVo getSocialPreInfoStatus(String id) {
...@@ -336,6 +515,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -336,6 +515,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
public void deleteUnProcessSocialPreInfo(String id) { public void deleteUnProcessSocialPreInfo(String id) {
//删除未处理的社保待购买信息 //删除未处理的社保待购买信息
this.remove(Wrappers.<TDispatchInfoPre>query().lambda() this.remove(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ZERO_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8")) .in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8"))
.eq(TDispatchInfoPre::getRegisterId, id)); .eq(TDispatchInfoPre::getRegisterId, id));
...@@ -343,12 +523,24 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -343,12 +523,24 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.eq(TSocialPreDetail::getRegisterId, id)); .eq(TSocialPreDetail::getRegisterId, id));
} }
@Override
public void deleteUnProcessFundPreInfo(String id) {
//删除未处理的社保待购买信息
this.remove(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8"))
.eq(TDispatchInfoPre::getRegisterId, id));
socialPreDetailService.remove(Wrappers.<TSocialPreDetail>query().lambda()
.eq(TSocialPreDetail::getRegisterId, id));
}
@Override @Override
public R dispatcherSocial(List<String> idList,String type) { public R dispatcherSocial(List<String> idList,String type) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
List<TDispatchInfoPre> contractPreList = baseMapper.selectList(Wrappers.<TDispatchInfoPre>query() List<TDispatchInfoPre> contractPreList = baseMapper.selectList(Wrappers.<TDispatchInfoPre>query()
.lambda().in(TDispatchInfoPre::getId, idList) .lambda().in(TDispatchInfoPre::getId, idList)
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("1","2","4","8","9"))); .in(TDispatchInfoPre::getProcessStatus, Arrays.asList("1","2","4","8","9")));
// 如果没有找到任何未处理的社保待购买数据,返回失败消息 // 如果没有找到任何未处理的社保待购买数据,返回失败消息
if (Common.isEmpty(contractPreList)) { if (Common.isEmpty(contractPreList)) {
...@@ -427,7 +619,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -427,7 +619,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
String preLoginName = entry.getKey(); String preLoginName = entry.getKey();
int failureCount = entry.getValue(); int failureCount = entry.getValue();
int sum = sumMap.get(preLoginName); int sum = sumMap.get(preLoginName);
sendDisFalureMessageToWx(preLoginName ,sum, failureCount, loginNameMap); sendDisFalureMessageToWx(preLoginName ,sum, failureCount, loginNameMap,"社保");
} }
} }
...@@ -452,7 +644,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -452,7 +644,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
@Override @Override
public void pushDisConfrimSocial() { public void pushDisConfrimSocial() {
//获取所有待派单的数据 //获取所有待派单的社保数据
List<String> unConfirmList = baseMapper.getAllUnDisDataIdList(); List<String> unConfirmList = baseMapper.getAllUnDisDataIdList();
if (null != unConfirmList && !unConfirmList.isEmpty()) { if (null != unConfirmList && !unConfirmList.isEmpty()) {
try { try {
...@@ -461,10 +653,25 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -461,10 +653,25 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
log.error("执行异常", e); log.error("执行异常", e);
} }
} }
//获取所有待派单的公积金数据
List<String> unConfirmFundList = baseMapper.getAllUnDisDataIdFundList();
if (null != unConfirmFundList && !unConfirmFundList.isEmpty()) {
try {
this.dispatcherFund(unConfirmFundList,"2");
} catch (Exception e) {
log.error("执行异常", e);
}
}
} }
//发送企业微信待办 //发送企业微信待办
private void sendMessageToWx(TDispatchInfoPre pre) { private void sendMessageToWx(TDispatchInfoPre pre) {
String code = "04";
String item = "社保";
if (CommonConstants.ONE_STRING.equals(pre.getTypeSub())){
code = "05";
item = "公积金";
}
//获取前端客服 //获取前端客服
SysUser user; SysUser user;
if (Common.isEmpty(pre.getCustomerUserLoginName())) { if (Common.isEmpty(pre.getCustomerUserLoginName())) {
...@@ -484,10 +691,10 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -484,10 +691,10 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>(); Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>(); Map<String, Object> textcard = new HashMap<>();
String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", "04" + pre.getCustomerUserLoginName()); String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", code + pre.getCustomerUserLoginName());
StringBuilder description = new StringBuilder(); StringBuilder description = new StringBuilder();
String title = "社保购买确认"; String title = item+"购买确认";
description.append("您有新的社保待购买确认数据,请及时确认").append("<br>"); description.append("您有新的"+item+"待购买确认数据,请及时确认").append("<br>");
textcard.put("title", title); textcard.put("title", title);
textcard.put("url", authUrl); textcard.put("url", authUrl);
textcard.put("description", description.toString()); textcard.put("description", description.toString());
...@@ -503,7 +710,11 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -503,7 +710,11 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
} }
//发送企业微信待办 //发送企业微信待办
private void sendDisFalureMessageToWx(String LoginName, int sum, int falureNum,Map<String, String> loginNameMap) { private void sendDisFalureMessageToWx(String LoginName, int sum, int falureNum,Map<String, String> loginNameMap,String item) {
String code = "67";
if ("公积金".equals(item)){
code = "74";
}
//获取前端客服 //获取前端客服
SysUser user; SysUser user;
if (Common.isEmpty(LoginName)) { if (Common.isEmpty(LoginName)) {
...@@ -523,10 +734,10 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -523,10 +734,10 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>(); Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>(); Map<String, Object> textcard = new HashMap<>();
String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", "67" + loginNameMap.get(LoginName)); String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", code + loginNameMap.get(LoginName));
StringBuilder description = new StringBuilder(); StringBuilder description = new StringBuilder();
String title = "作业自动化——社保派单发起失败提醒"; String title = "作业自动化——"+item+"派单发起失败提醒";
description.append("社保派单数:").append(sum).append("份,失败份数:").append(falureNum).append("份;").append("<br>"); description.append(item+"派单数:").append(sum).append("份,失败份数:").append(falureNum).append("份;").append("<br>");
description.append("点击查看详情").append("<br>"); description.append("点击查看详情").append("<br>");
description.append("<br>"); description.append("<br>");
description.append("请及时至HRO系统处理,以免耽误购买进度!").append("<br>"); description.append("请及时至HRO系统处理,以免耽误购买进度!").append("<br>");
...@@ -604,4 +815,163 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -604,4 +815,163 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.toInstant()); .toInstant());
} }
} }
/**
* @Author fxj
* @Description 手动派单-公积金待购买信息单个/批量发起购买任务
* @Date 11:53 2025/11/7
* @Param
* @return
**/
@Override
public R dispatcherFund(List<String> idList,String type) {
YifuUser user = SecurityUtils.getUser();
List<TDispatchInfoPre> contractPreList = baseMapper.selectList(Wrappers.<TDispatchInfoPre>query()
.lambda().in(TDispatchInfoPre::getId, idList)
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("1","2","4","8")));
// 如果没有找到任何未处理的公积金待购买数据,返回失败消息
if (Common.isEmpty(contractPreList)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
//发起派单
List<ErrorMessage> errorMessageListAll = new ArrayList<>();
List<TDispatchImportVo> excelVOList = baseMapper.getDisPatcherFundList(idList,Arrays.asList("1","2","4","8"),type);
if (Common.isNotNull(excelVOList) && !excelVOList.isEmpty()) {
List<TDispatchImportVo> disList;
int k = 0;
int i = (int) Math.ceil((double) excelVOList.size() / CommonConstants.INTEGER_HUNDRED);
//前端客服对应的成功和失败数量
Map<String,Integer> sumMap = new HashMap<>();
Map<String,Integer> falureMap = new HashMap<>();
// 先统计每个登录名的总派单数量
for (TDispatchImportVo vo : excelVOList) {
String preLoginName = vo.getPreLoginName();
sumMap.put(preLoginName, sumMap.getOrDefault(preLoginName, 0) + 1);
// 初始化失败数量为0
falureMap.putIfAbsent(preLoginName, 0);
}
Map<String, String> loginNameMap = new HashMap<>();
for (int j = 0; j < i; j++) {
if (j == i - 1) {
disList = excelVOList.subList(k, excelVOList.size());
} else {
disList = excelVOList.subList(k, k + 100);
}
k = k + 100;
if (Common.isNotNull(disList)) {
//调用批量派单接口100条处理一次,同原合同派单保持一致
List<ErrorMessage> errorMessageList = new ArrayList<>();
dispatchInfoService.importTDispatchInfo(disList, errorMessageList,user, null, new HashMap<>());
if (!errorMessageList.stream().allMatch(message -> message.getMessage().equals(CommonConstants.SAVE_SUCCESS))) {
List<ErrorMessage> relErrorMessageList = errorMessageList.stream().filter(message -> !message.getMessage().equals(CommonConstants.SAVE_SUCCESS)).collect(Collectors.toList());
errorMessageListAll.addAll(relErrorMessageList);
//更新公积金状态为2发起失败
for (ErrorMessage errorMessage : errorMessageList) {
if (!errorMessage.getMessage().equals(CommonConstants.SAVE_SUCCESS)) {
TDispatchImportVo contractVO = disList.stream().filter(vo -> Objects.equals(
vo.getRowIndex(), errorMessage.getLineNum())).collect(Collectors.toList()).get(0);
LambdaUpdateWrapper<TDispatchInfoPre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(TDispatchInfoPre::getId, contractVO.getPreId())
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("1","2","4","8"))
.set(TDispatchInfoPre::getProcessStatus, CommonConstants.TWO_STRING)
.set(TDispatchInfoPre::getErrorInfo, errorMessage.getMessage())
.set(TDispatchInfoPre::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()));
// 执行更新操作
errorMessage.setData(contractVO);
this.update(updateWrapper);
// 统计失败数量
String preLoginName = contractVO.getPreLoginName();
falureMap.put(preLoginName, falureMap.getOrDefault(preLoginName, 0) + 1);
//生成快照数据
if(type.equals("2")) {
if (null == loginNameMap.get(preLoginName)) {
UUID uuid = UUID.randomUUID();
loginNameMap.put(preLoginName, uuid.toString());
}
TSocialAutoLog socialAutoLog = new TSocialAutoLog();
socialAutoLog.setSocialId(loginNameMap.get(preLoginName));
socialAutoLog.setEmpName(contractVO.getEmpName());
socialAutoLog.setEmpIdcard(contractVO.getEmpIdcard());
socialAutoLog.setErrorInfo(errorMessage.getMessage());
socialAutoLogService.save(socialAutoLog);
}
}
}
}
}
}
//针对定时任务派单的记录失败次数,集中提醒至该项目的“前端客服”
if (!falureMap.isEmpty() && type.equals("2")) {
for (Map.Entry<String, Integer> entry : falureMap.entrySet()) {
String preLoginName = entry.getKey();
int failureCount = entry.getValue();
int sum = sumMap.get(preLoginName);
sendDisFalureMessageToWx(preLoginName ,sum, failureCount, loginNameMap, "公积金");
}
}
}
return R.ok(errorMessageListAll);
}
/**
* 公积金待购买表批量导出
* @param searchVo 公积金待购买表
* @return
*/
@Override
public void listExportFund(HttpServletResponse response, TDispatchInfoPreSearchVo searchVo){
String fileName = "公积金待购买批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TDispatchInfoPreFundExportVo> list = new ArrayList<>();
initSearchVo(searchVo);
long count = baseMapper.selectFundExportCount(searchVo);
try (ServletOutputStream out= response.getOutputStream();){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchInfoPreFundExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.selectFundExportList(searchVo);
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("公积金待购买"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("公积金待购买"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}
}
@Override
public EmployeePreSocialListVo getFundPreInfoStatus(String id) {
EmployeePreSocialListVo preSocialListVo = new EmployeePreSocialListVo();
//获取社保已购买信息
TDispatchInfoPre preExit = baseMapper.selectById(id);
if (Common.isNotNull(preExit)) {
TDispatchInfoPreVo pre = new TDispatchInfoPreVo();
BeanUtils.copyProperties(preExit, pre);
preSocialListVo.setDispatchInfoPreFundVo(pre);
}
return preSocialListVo;
}
} }
...@@ -3708,6 +3708,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3708,6 +3708,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//派单审核通过更新社保待购买表的状态 //派单审核通过更新社保待购买表的状态
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda() TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getSocialFundId, sf.getId()) .eq(TDispatchInfoPre::getSocialFundId, sf.getId())
.eq(TDispatchInfoPre::getTypeSub, CommonConstants.ZERO_STRING)
.eq(TDispatchInfoPre::getProcessStatus, CommonConstants.THREE_STRING) .eq(TDispatchInfoPre::getProcessStatus, CommonConstants.THREE_STRING)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
// 派增审核 // 派增审核
...@@ -3847,6 +3848,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3847,6 +3848,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue; continue;
} }
if (Common.isNotNull(providentFund)) { if (Common.isNotNull(providentFund)) {
//派单审核通过更新社保待购买表的状态
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getSocialFundId, sf.getId())
.eq(TDispatchInfoPre::getTypeSub, CommonConstants.ONE_STRING)
.eq(TDispatchInfoPre::getProcessStatus, CommonConstants.THREE_STRING)
.last(CommonConstants.LAST_ONE_SQL));
//派增 //派增
if (CommonConstants.dingleDigitStrArray[0].equals(dis.getType())) { if (CommonConstants.dingleDigitStrArray[0].equals(dis.getType())) {
// 审核通过 // 审核通过
...@@ -3856,6 +3863,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3856,6 +3863,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setFundAddStatus(CommonConstants.ONE_STRING); sf.setFundAddStatus(CommonConstants.ONE_STRING);
sf.setFundStatus(CommonConstants.ONE_STRING); sf.setFundStatus(CommonConstants.ONE_STRING);
} }
//审核通过更新状态
if (Common.isNotNull(dispatchInfoPre)) {
dispatchInfoPre.setProcessStatus(CommonConstants.FIVE_STRING);
dispatchInfoPre.setErrorBackInfo(null);
dispatchInfoPreMapper.updateById(dispatchInfoPre);
}
// 审核不通过 // 审核不通过
} else if (CommonConstants.ONE_INT == flag) { } else if (CommonConstants.ONE_INT == flag) {
// 作废更新:公积金状态、同步档案的公积金状态、同步预估数据 // 作废更新:公积金状态、同步档案的公积金状态、同步预估数据
...@@ -3863,6 +3876,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3863,6 +3876,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
providentFund.setDeleteFlag(CommonConstants.ONE_STRING); providentFund.setDeleteFlag(CommonConstants.ONE_STRING);
sf.setFundAddStatus(CommonConstants.FOUR_STRING); sf.setFundAddStatus(CommonConstants.FOUR_STRING);
sf.setFundStatus(CommonConstants.NINE_STRING); sf.setFundStatus(CommonConstants.NINE_STRING);
//审核不通过更新状态
if (Common.isNotNull(dispatchInfoPre)) {
dispatchInfoPre.setProcessStatus(CommonConstants.FOUR_STRING);
dispatchInfoPre.setErrorBackInfo(auditRemark);
dispatchInfoPreMapper.updateById(dispatchInfoPre);
TSocialAutoLog socialAutoLog = new TSocialAutoLog();
socialAutoLog.setSocialId(UUID.randomUUID().toString());
socialAutoLog.setEmpName(dispatchInfoPre.getEmpName());
socialAutoLog.setEmpIdcard(dispatchInfoPre.getEmpIdcard());
socialAutoLog.setErrorInfo(auditRemark);
socialAutoLog.setPhone(dispatchInfoPre.getPhone());
socialAutoLogService.save(socialAutoLog);
sendDisFalureMessageToWx(dispatchInfoPre,socialAutoLog.getId());
}
} }
providentFund.setAuditTime(now); providentFund.setAuditTime(now);
providentFund.setAuditUser(user.getId()); providentFund.setAuditUser(user.getId());
...@@ -4453,6 +4482,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4453,6 +4482,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//针对社保自动化过来的数据,办理更新待购买数据状态 //针对社保自动化过来的数据,办理更新待购买数据状态
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda() TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getSocialFundId, sf.getId()) .eq(TDispatchInfoPre::getSocialFundId, sf.getId())
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ZERO_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("5","6","9")) .in(TDispatchInfoPre::getProcessStatus, Arrays.asList("5","6","9"))
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(dispatchInfoPre)) { if (Common.isNotNull(dispatchInfoPre)) {
...@@ -4577,6 +4607,32 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4577,6 +4607,32 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_FAIL + handleRemark), CommonConstants.FOUR_STRING, user, (DispatchConstants.DISPATCH_FUND_ADD_FAIL + handleRemark), remark); initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_FAIL + handleRemark), CommonConstants.FOUR_STRING, user, (DispatchConstants.DISPATCH_FUND_ADD_FAIL + handleRemark), remark);
} }
auditInfo.setProvidentId(dis.getId()); auditInfo.setProvidentId(dis.getId());
//针对社保自动化过来的数据,办理更新待购买数据状态
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getSocialFundId, sf.getId())
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("5","6","9"))
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(dispatchInfoPre)) {
if (sf.getFundStatus().equals(CommonConstants.FOUR_STRING)) {
dispatchInfoPre.setProcessStatus(CommonConstants.EIGHT_STRING);
dispatchInfoPre.setErrorBackInfo(handleRemark);
TSocialAutoLog socialAutoLog = new TSocialAutoLog();
socialAutoLog.setSocialId(UUID.randomUUID().toString());
socialAutoLog.setEmpName(dispatchInfoPre.getEmpName());
socialAutoLog.setEmpIdcard(dispatchInfoPre.getEmpIdcard());
socialAutoLog.setErrorInfo(handleRemark);
socialAutoLog.setPhone(dispatchInfoPre.getPhone());
socialAutoLogService.save(socialAutoLog);
sendDisFalureMessageToWx(dispatchInfoPre,socialAutoLog.getId());
}
if (sf.getFundStatus().equals(CommonConstants.THREE_STRING)) {
dispatchInfoPre.setErrorBackInfo(null);
dispatchInfoPre.setProcessStatus(CommonConstants.SEVEN_STRING);
}
dispatchInfoPreMapper.updateById(dispatchInfoPre);
}
} else { } else {
errorList.add(new ErrorMessage(-1, "找不到对应员工公积金派增派单数据:" + dis.getEmpName())); errorList.add(new ErrorMessage(-1, "找不到对应员工公积金派增派单数据:" + dis.getEmpName()));
return true; return true;
...@@ -8862,6 +8918,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -8862,6 +8918,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//发送企业微信待办 //发送企业微信待办
private void sendDisFalureMessageToWx(TDispatchInfoPre pre,String id) { private void sendDisFalureMessageToWx(TDispatchInfoPre pre,String id) {
String code = "68";
String item = "社保";
if (CommonConstants.ONE_STRING.equals(pre.getTypeSub())){
code = "75";
item = "公积金";
}
//获取前端客服 //获取前端客服
SysUser user; SysUser user;
if (Common.isEmpty(pre.getCustomerUserLoginName())) { if (Common.isEmpty(pre.getCustomerUserLoginName())) {
...@@ -8882,11 +8944,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -8882,11 +8944,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map<String, Object> requestMap = new HashMap<>(); Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>(); Map<String, Object> textcard = new HashMap<>();
String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid() String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid()
, wxConfig.getDomainName() + "/auth/oauth/wxLogin", "68" + id); , wxConfig.getDomainName() + "/auth/oauth/wxLogin", code + id);
StringBuilder description = new StringBuilder(); StringBuilder description = new StringBuilder();
String title = "作业自动化——社保办理失败提醒"; String title = "作业自动化——"+item+"办理失败提醒";
description.append(pre.getEmpName()).append("-").append(pre.getEmpIdcard()).append("-") description.append(pre.getEmpName()).append("-").append(pre.getEmpIdcard()).append("-")
.append(pre.getPhone()).append(",社保派单审核/办理失败").append("<br>"); .append(pre.getPhone()).append(","+item+"派单审核/办理失败").append("<br>");
description.append("请及时处理,以免产生用工风险!").append("<br>"); description.append("请及时处理,以免产生用工风险!").append("<br>");
textcard.put("title", title); textcard.put("title", title);
textcard.put("url", authUrl); textcard.put("url", authUrl);
......
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TFundPreDetail;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TFundPreDetailMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TFundPreDetailService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 入职确认信息公积金已购买记录
*
* @author fxj
* @date 2025-11-07 10:30
*/
@Log4j2
@Service
public class TFundPreDetailServiceImpl extends ServiceImpl<TFundPreDetailMapper, TFundPreDetail> implements TFundPreDetailService {
}
\ No newline at end of file
...@@ -956,7 +956,10 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -956,7 +956,10 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
public List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard) { public List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard) {
return baseMapper.selectUnSocialFundInfoByEmpIdcard(empIdcard); return baseMapper.selectUnSocialFundInfoByEmpIdcard(empIdcard);
} }
@Override
public List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard) {
return baseMapper.selectUnFundInfoByEmpIdcard(empIdcard);
}
@Override @Override
public Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo) { public Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo) {
if (Common.isNotNull(cardVo) && Common.isNotNull(cardVo.getEmpIdcard())) { if (Common.isNotNull(cardVo) && Common.isNotNull(cardVo.getEmpIdcard())) {
...@@ -965,4 +968,20 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -965,4 +968,20 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
return false; return false;
} }
} }
/**
* @Author fxj
* @Description 查询是否存在正常或者在途的公积金
* @Date 10:14 2025/11/7
* @Param
* @return
**/
@Override
public Boolean selectExitEmpFund(TEmployeeAutoRegistCheckVo cardVo) {
if (Common.isNotNull(cardVo) && Common.isNotNull(cardVo.getEmpIdcard())) {
return baseMapper.selectFundCountByEmpIdcard(cardVo.getEmpIdcard()) > 0;
} else {
return false;
}
}
} }
...@@ -82,6 +82,13 @@ ...@@ -82,6 +82,13 @@
<result property="lowerInjury" column="LOWER_INJURY"/> <result property="lowerInjury" column="LOWER_INJURY"/>
<result property="lowerBirth" column="LOWER_BIRTH"/> <result property="lowerBirth" column="LOWER_BIRTH"/>
<result property="lowerBig" column="LOWER_BIG"/> <result property="lowerBig" column="LOWER_BIG"/>
<result property="providentCardinal" column="PROVIDENT_CARDINAL"/>
<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
</resultMap> </resultMap>
<resultMap id="tDispatchInfoPreExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo"> <resultMap id="tDispatchInfoPreExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo">
...@@ -97,6 +104,22 @@ ...@@ -97,6 +104,22 @@
<result property="recordBase" column="RECORD_BASE"/> <result property="recordBase" column="RECORD_BASE"/>
<result property="contractStatus" column="CONTRACT_STATUS"/> <result property="contractStatus" column="CONTRACT_STATUS"/>
</resultMap> </resultMap>
<resultMap id="tDispatchInfoPreFundExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreFundExportVo">
<result property="empName" column="emp_name"/>
<result property="empIdcard" column="emp_idcard"/>
<result property="joinLeaveDate" column="join_leave_date"/>
<result property="processStatus" column="process_status"/>
<result property="customerUsername" column="customer_username"/>
<result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/>
<result property="expectedCollectionTime" column="expected_collection_time"/>
<result property="fundHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="providentCardinal" column="PROVIDENT_CARDINAL"/>
<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
<result property="contractStatus" column="CONTRACT_STATUS"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
a.EMP_NAME, a.EMP_NAME,
...@@ -162,7 +185,10 @@ ...@@ -162,7 +185,10 @@
a.LOWER_UNEMPLOYMENT, a.LOWER_UNEMPLOYMENT,
a.LOWER_INJURY, a.LOWER_INJURY,
a.LOWER_BIRTH, a.LOWER_BIRTH,
a.LOWER_BIG a.LOWER_BIG,
a.PROVIDENT_CARDINAL,
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER
</sql> </sql>
<sql id="tDispatchInfoPre_other_where"> <sql id="tDispatchInfoPre_other_where">
<if test="tDispatchInfoPre != null"> <if test="tDispatchInfoPre != null">
...@@ -363,7 +389,17 @@ ...@@ -363,7 +389,17 @@
FROM t_dispatch_info_pre a FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where> <where>
1=1 1=1 and a.type_sub = '0'
<include refid="tDispatchInfoPre_where"/>
</where>
</select>
<select id="selectFundExportCount" resultType="java.lang.Long">
SELECT
count(1)
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
1=1 and a.type_sub = '1'
<include refid="tDispatchInfoPre_where"/> <include refid="tDispatchInfoPre_where"/>
</where> </where>
</select> </select>
...@@ -394,7 +430,44 @@ ...@@ -394,7 +430,44 @@
FROM t_dispatch_info_pre a FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where> <where>
a.DELETE_FLAG = '0' a.DELETE_FLAG = '0' and a.type_sub = '0'
<include refid="tDispatchInfoPre_where"/>
</where>
group by a.id
order by a.create_time desc
<if test="tDispatchInfoPre.limitStart != null">
limit #{tDispatchInfoPre.limitStart},#{tDispatchInfoPre.limitEnd}
</if>
</select>
<select id="selectFundExportList" resultMap="tDispatchInfoPreFundExportMap">
SELECT
a.dept_name,
a.dept_no,
a.emp_name,
a.emp_idcard,
a.PROVIDENT_HOUSEHOLD_NAME,
a.PROVIDENT_CARDINAL,
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER,
DATE_FORMAT(a.join_leave_date,'%Y-%m-%d') as join_leave_date,
if(b.id is not null,'已签署','未签署') as CONTRACT_STATUS,
CASE WHEN a.process_status ='0' THEN "待确认"
WHEN a.process_status='1' THEN "待派单"
WHEN a.process_status ='2' THEN "派单失败"
WHEN a.process_status ='3' THEN "待审核"
WHEN a.process_status ='4' THEN "审核不通过"
WHEN a.process_status ='5' THEN "待办理"
WHEN a.process_status ='6' THEN "办理中"
WHEN a.process_status ='7' THEN "办理成功"
WHEN a.process_status ='8' THEN "办理失败"
WHEN a.process_status ='9' THEN "部分办理失败"
ELSE a.process_status END as process_status,
a.expected_collection_time,
a.customer_username
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
a.DELETE_FLAG = '0' and a.type_sub = '1'
<include refid="tDispatchInfoPre_where"/> <include refid="tDispatchInfoPre_where"/>
</where> </where>
group by a.id group by a.id
...@@ -403,7 +476,6 @@ ...@@ -403,7 +476,6 @@
limit #{tDispatchInfoPre.limitStart},#{tDispatchInfoPre.limitEnd} limit #{tDispatchInfoPre.limitStart},#{tDispatchInfoPre.limitEnd}
</if> </if>
</select> </select>
<!--tDispatchInfoPre c端不分页查询--> <!--tDispatchInfoPre c端不分页查询-->
<select id="geNoPageList" resultMap="tDispatchInfoPreMap"> <select id="geNoPageList" resultMap="tDispatchInfoPreMap">
SELECT SELECT
...@@ -458,7 +530,37 @@ ...@@ -458,7 +530,37 @@
</foreach> </foreach>
</where> </where>
</select> </select>
<!--tDispatchInfoPre公积金待派单数据查询-->
<select id="getDisPatcherFundList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo">
SELECT
(@i :=@i+1) as rowIndex,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
a.dept_no settleDomainCode,
a.RECORD_BASE recordBase,
a.PROVIDENT_HOUSEHOLD_NAME providentHousehold,
a.PROVIDENT_CARDINAL providentCardinal,
a.PROVIDENT_START providentStart,
a.PER_FLAG perFlag,
a.PROVIDENT_PER providentPer,
a.PERSONAL_PROVIDENT_PER personalProvidentPer,
a.id preId,
a.TRUST_REMARK trustRemark,
a.CUSTOMER_USER_LOGIN_NAME as preLoginName,
if(#{type} = '1',concat('手动派单-',a.customer_username),concat('自动化派单-',a.customer_username)) preName
FROM t_dispatch_info_pre a,(select @i:=0) as itable
<where>
1=1
AND a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
AND a.process_status in
<foreach item="status" index="index" collection="statusList" open="(" separator="," close=")">
#{status}
</foreach>
</where>
</select>
<select id="getAllUnDisData" resultMap="tDispatchInfoPreMap"> <select id="getAllUnDisData" resultMap="tDispatchInfoPreMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -467,7 +569,6 @@ ...@@ -467,7 +569,6 @@
a.expected_collection_time is not null a.expected_collection_time is not null
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE() and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
and a.process_status = '0' and a.process_status = '0'
group by a.customer_user_login_name
</select> </select>
<select id="getAllUnDisDataIdList" resultType="java.lang.String"> <select id="getAllUnDisDataIdList" resultType="java.lang.String">
...@@ -478,5 +579,17 @@ ...@@ -478,5 +579,17 @@
a.expected_collection_time is not null a.expected_collection_time is not null
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE() and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
and a.process_status in ('1','2','4','8','9') and a.process_status in ('1','2','4','8','9')
and a.type_sub = '0'
</select>
<select id="getAllUnDisDataIdFundList" resultType="java.lang.String">
SELECT
id
FROM t_dispatch_info_pre a
where
a.expected_collection_time is not null
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
and a.process_status in ('1','2','4','8','9')
and a.type_sub = '1'
</select> </select>
</mapper> </mapper>
<?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.yifu.social.mapper.TFundPreDetailMapper">
<resultMap id="tFundPreDetailMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TFundPreDetail">
<id property="id" column="ID"/>
<result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="fundHouseholdName" column="FUND_HOUSEHOLD_NAME"/>
<result property="registerId" column="REGISTER_ID"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="dispatchName" column="DISPATCH_NAME"/>
<result property="dispatchTime" column="DISPATCH_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.FUND_PROVINCE,
a.FUND_CITY,
a.FUND_TOWN,
a.DEPT_NAME,
a.DEPT_NO,
a.FUND_HOUSEHOLD_NAME,
a.REGISTER_ID,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME,
a.CREATE_TIME,
a.DISPATCH_NAME,
a.DISPATCH_TIME
</sql>
<sql id="tFundPreDetail_where">
<if test="tFUNDPreDetail != null">
<if test="tFUNDPreDetail.id != null and tFUNDPreDetail.id.trim() != ''">
AND a.ID = #{tFUNDPreDetail.id}
</if>
<if test="tFUNDPreDetail.FUNDProvince != null and tFUNDPreDetail.FUNDProvince.trim() != ''">
AND a.FUND_PROVINCE = #{tFUNDPreDetail.fundProvince}
</if>
<if test="tFundPreDetail.fundCity != null and tFundPreDetail.fundCity.trim() != ''">
AND a.FUND_CITY = #{tFundPreDetail.fundCity}
</if>
<if test="tFundPreDetail.fundTown != null and tFundPreDetail.fundTown.trim() != ''">
AND a.FUND_TOWN = #{tFundPreDetail.fundTown}
</if>
<if test="tFundPreDetail.deptName != null and tFundPreDetail.deptName.trim() != ''">
AND a.DEPT_NAME = #{tFundPreDetail.deptName}
</if>
<if test="tFundPreDetail.deptNo != null and tFundPreDetail.deptNo.trim() != ''">
AND a.DEPT_NO = #{tFundPreDetail.deptNo}
</if>
<if test="tFundPreDetail.fundHouseholdName != null and tFundPreDetail.fundHouseholdName.trim() != ''">
AND a.FUND_HOUSEHOLD_NAME = #{tFundPreDetail.fundHouseholdName}
</if>
<if test="tFundPreDetail.registerId != null and tFundPreDetail.registerId.trim() != ''">
AND a.REGISTER_ID = #{tFundPreDetail.registerId}
</if>
<if test="tFundPreDetail.createBy != null and tFundPreDetail.createBy.trim() != ''">
AND a.CREATE_BY = #{tFundPreDetail.createBy}
</if>
<if test="tFundPreDetail.updateBy != null and tFundPreDetail.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tFundPreDetail.updateBy}
</if>
<if test="tFundPreDetail.createName != null and tFundPreDetail.createName.trim() != ''">
AND a.CREATE_NAME = #{tFundPreDetail.createName}
</if>
<if test="tFundPreDetail.updateTime != null">
AND a.UPDATE_TIME = #{tFundPreDetail.updateTime}
</if>
<if test="tFundPreDetail.createTime != null">
AND a.CREATE_TIME = #{tFundPreDetail.createTime}
</if>
<if test="tFundPreDetail.dispatchName != null and tFundPreDetail.dispatchName.trim() != ''">
AND a.DISPATCH_NAME = #{tFundPreDetail.dispatchName}
</if>
<if test="tFundPreDetail.dispatchTime != null">
AND a.DISPATCH_TIME = #{tFundPreDetail.dispatchTime}
</if>
</if>
</sql>
</mapper>
...@@ -284,6 +284,23 @@ ...@@ -284,6 +284,23 @@
<result property="socialTown" column="SOCIAL_TOWN"/> <result property="socialTown" column="SOCIAL_TOWN"/>
</resultMap> </resultMap>
<resultMap id="unFundInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.UnFundInfoVo">
<result property="id" column="ID"/>
<result property="fundHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="paymentType" column="PAYMENT_TYPE"/>
<result property="fundStatus" column="FUND_STATUS"/>
<result property="deptNo" column="SETTLE_DOMAIN_CODE_FUND"/>
<result property="deptName" column="SETTLE_DOMAIN_NAME_FUND"/>
<result property="dispatchName" column="dispatchName"/>
<result property="dispatchTime" column="dispatchTime"/>
<result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/>
<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
<result property="providentCardinal" column="UNIT_PROVIDENG_CARDINAL"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
a.EMP_ID, a.EMP_ID,
...@@ -1232,15 +1249,48 @@ ...@@ -1232,15 +1249,48 @@
FROM t_social_fund_info a FROM t_social_fund_info a
inner join t_dispatch_info d on a.DISPATCH_ID = d.ID inner join t_dispatch_info d on a.DISPATCH_ID = d.ID
where a.EMP_IDCARD = #{empIdcard} where a.EMP_IDCARD = #{empIdcard}
<!-- 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败 10 审核不通过)、派减(6待审核 7待办理 8办理成功 9 办理失败 11派减办理中 12 派减部分办理失败) -->
and a.social_status in ('0', '1', '2', '3', '4', '6', '7', '9', '11', '12') and a.social_status in ('0', '1', '2', '3', '4', '6', '7', '9', '11', '12')
</select> </select>
<!--tSocialFundInfo简单分页查询-->
<select id="selectUnFundInfoByEmpIdcard" resultMap="unFundInfoMap">
SELECT a.ID,
a.PROVIDENT_HOUSEHOLD_NAME,
'1' as 'PAYMENT_TYPE',
a.FUND_STATUS,
a.SETTLE_DOMAIN_CODE_FUND,
a.SETTLE_DOMAIN_NAME_FUND,
a.FUND_PROVINCE,
a.FUND_CITY,
a.FUND_TOWN,
d.CREATE_NAME as dispatchName,
DATE_FORMAT(d.CREATE_TIME, '%Y-%m-%d %H:%i:%s') as dispatchTime,
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER,
a.UNIT_PROVIDENG_CARDINAL as 'providentCardinal'
FROM t_social_fund_info a
inner join t_dispatch_info d on a.DISPATCH_ID = d.ID
where a.EMP_IDCARD = #{empIdcard}
<!-- 派增(0待审核、1待办理、3办理成功、4办理失败9 审核不通过)、派减(5待审核 6待办理 7 办理成功 8 办理失败 ) -->
and a.fund_status in ('0', '1', '3', '5', '6', '8')
</select>
<select id="selectSocialFundInfoCountByEmpIdcard" resultType="java.lang.Long"> <select id="selectSocialFundInfoCountByEmpIdcard" resultType="java.lang.Long">
SELECT count(1) SELECT count(1)
FROM t_social_fund_info a FROM t_social_fund_info a
inner join t_dispatch_info d on a.DISPATCH_ID = d.ID inner join t_dispatch_info d on a.DISPATCH_ID = d.ID
where a.EMP_IDCARD = #{empIdcard} where a.EMP_IDCARD = #{empIdcard}
<!-- 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败 10 审核不通过)、派减(6待审核 7待办理 8办理成功 9 办理失败 11派减办理中 12 派减部分办理失败) -->
and a.social_status in ('0', '1', '2', '3', '4', '6', '7', '9', '11', '12') and a.social_status in ('0', '1', '2', '3', '4', '6', '7', '9', '11', '12')
</select> </select>
<select id="selectFundCountByEmpIdcard" resultType="java.lang.Long">
SELECT count(1)
FROM t_social_fund_info a
inner join t_dispatch_info d on a.DISPATCH_ID = d.ID
where a.EMP_IDCARD = #{empIdcard}
<!-- 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败9 审核不通过)、派减(5待审核 6待办理 7 办理成功 8 办理失败 ) -->
and a.fund_status in ('0', '1', '3', '5', '6', '8')
</select>
</mapper> </mapper>
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