Commit 4eafd399 authored by fangxinjiang's avatar fangxinjiang

公积金自动化-fxj

parent 2279880f
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TDispatchInfoPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TFundPreDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSocialPreDetailVo;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
......@@ -109,6 +110,9 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "商险是否已购买 0 是 1 否")
private String socialIsBuy;
@Schema(description = "公积金是否已参保 0 是 1 否")
private String fundIsBuy;
@Schema(description = "档案所在地-县编号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String townCode;
......@@ -143,10 +147,18 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField(exist = false)
private TDispatchInfoPreVo dispatchInfoPreVo;
@Schema(description = "公积金待购买信息")
@TableField(exist = false)
private TDispatchInfoPreVo dispatchInfoFundPreVo;
@Schema(description = "社保流程中信息集合")
@TableField(exist = false)
private List<TSocialPreDetailVo> exitSocialInfoList;
@Schema(description = "公积金流程中信息集合")
@TableField(exist = false)
private List<TFundPreDetailVo> exitFundInfoList;
@Schema(description = "附件集合")
@TableField(exist = false)
private List<TAttaInfo> attaList;
......
......@@ -20,7 +20,13 @@ public class EmployeePreSocialListVo implements Serializable {
@Schema(description = "社保待购买信息")
private TDispatchInfoPreVo dispatchInfoPreVo;
@Schema(description = "公积金待购买信息")
private TDispatchInfoPreVo dispatchInfoPreFundVo;
@Schema(description = "社保流程中信息集合")
private List<TSocialPreDetailVo> exitSocialInfoList;
@Schema(description = "公积金流程中信息集合")
private List<TFundPreDetailVo> exitFundInfoList;
}
......@@ -123,6 +123,9 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "社保是否已参保 0 是 1 否")
private String socialIsBuy;
@Schema(description = "公积金是否已参保 0 是 1 否")
private String fundIsBuy;
@Schema(description = "身份证合集")
private List<String> idcardList;
......@@ -138,9 +141,15 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "社保待购买信息")
private TDispatchInfoPreVo dispatchInfoPreVo;
@Schema(description = "公积金待购买信息")
private TDispatchInfoPreVo dispatchInfoFundPreVo;
@Schema(description = "社保流程中信息集合")
private List<TSocialPreDetailVo> exitSocialInfoList;
@Schema(description = "公积金流程中信息集合")
private List<TFundPreDetailVo> exitFundInfoList;
@Schema(description = "附件集合")
private List<TAttaInfoSaveVo> attaList;
......
......@@ -220,7 +220,7 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
private Date expectedCollectionTime;
/**
* 预计派单时间
* 预计派单时间:社保(入职日期当天 0 入职一个月 1 ...)公积金(起缴日期当日)
*/
@Schema(description = "预计派单类型 入职日期当天 0 入职一个月 1 ...")
private String expectedCollectionType;
......@@ -267,14 +267,46 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "入职确认信息主表id")
@ExcelProperty("入职确认信息主表id")
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)
@Schema(description = "起缴日期")
@Schema(description = "起缴日期(社保起缴日期)")
@ExcelProperty("起缴日期")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
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 {
@ExcelProperty("生育基数")
private BigDecimal birthCardinal;
/**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳 (3固定基数--公积金特有)
*/
@ExcelAttribute(name = "缴纳类型")
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)")
......@@ -537,4 +569,53 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@ExcelProperty("基数下限(社保或公积金)" )
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
}
}
//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 natureItemAfter = null;
......@@ -1602,6 +1640,15 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
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;
}
......
......@@ -1639,6 +1639,12 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
rel.setProvince(setInfo.getProvince());
rel.setCity(setInfo.getCity());
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 {
return R.failed("获取公积金配置信息失败!");
}
......
......@@ -262,6 +262,14 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
String isBuyOld = oldInfo.getInsuranceIsBuy();
String isBuyNew = 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);
//如果有差异保存差异
......@@ -274,10 +282,11 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
TEmployeePreLogDetail detailEmpLog = null;
if (Common.isNotNull(differenceKey) && !"insurancePreList".equals(differenceKey)
&& !"attaIdList".equals(differenceKey) && !"employeeContractPre".equals(differenceKey)
&& !"dispatchInfoPreVo".equals(differenceKey)) {
&& !"dispatchInfoPreVo".equals(differenceKey) && !"dispatchInfoFundPreVo".equals(differenceKey)) {
differenceKey = differenceKey.replace("insurancePreList","");
differenceKey = differenceKey.replace("employeeContractPre","");
differenceKey = differenceKey.replace("dispatchInfoPreVo","");
differenceKey = differenceKey.replace("dispatchInfoFundPreVo","");
diffTitle = "档案信息";
detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.TWO_STRING);
......@@ -506,6 +515,73 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
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)) {
......@@ -546,6 +622,17 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
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()) {
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId()
, "/temployeeinsurancepre/inner/saveOrUpdateInsuranceList"
......@@ -858,5 +945,29 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
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 {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),
"/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
* @Description 获取社保配置信息
......@@ -293,6 +313,20 @@ public class SocialDaprUtils {
, 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
* @Description 删除社保已购买非流程中的数据
......@@ -305,4 +339,28 @@ public class SocialDaprUtils {
, daprProperties.getAppId(),"/tdispatchinfopre/deleteUnProcessSocialPreInfo" , id
, 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
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();
......@@ -717,6 +733,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
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) {
log.error("自动化办理执行异常", e);
......@@ -724,6 +751,81 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
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
}
}
// 公积金自动化校验逻辑
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();
......@@ -1056,6 +1170,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
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) {
log.error("执行异常", e);
......
......@@ -245,21 +245,23 @@ public class WeComSmartSheetManager {
log.warn("未找到任何工作表");
}
} else {
log.error("查询工作表失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
// 特别处理一些常见的错误代码
switch (errCode) {
case 404:
log.error("请求的文档未找到,请检查docId是否正确,并确保是通过API创建的智能表格");
log.error("请求的文档未找到,请检查docId是否正确,并确保是通过API创建的智能表格;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break;
case 400:
log.error("请求参数错误,请检查docId格式是否正确");
log.error("请求参数错误,请检查docId格式是否正确;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break;
case 48002:
log.error("应用没有权限访问该文档,请检查应用权限配置");
log.error("应用没有权限访问该文档,请检查应用权限配置;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break;
default:
log.error("未知错误,请参考企业微信API文档");
log.error("查询工作表失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
}
}
} else {
......@@ -563,21 +565,23 @@ public class WeComSmartSheetManager {
}
}
} else {
log.error("查询记录失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
// 特别处理一些常见的错误代码
switch (errCode) {
case 404:
log.error("请求的文档或表格未找到,请检查docId和sheetId是否正确,并确保是通过API创建的智能表格");
log.error("请求的文档或表格未找到,请检查docId和sheetId是否正确,并确保是通过API创建的智能表格;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break;
case 400:
log.error("请求参数错误,请检查docId和sheetId格式是否正确");
log.error("请求参数错误,请检查docId和sheetId格式是否正确;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break;
case 48002:
log.error("应用没有权限访问该文档,请检查应用权限配置");
log.error("应用没有权限访问该文档,请检查应用权限配置;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break;
default:
log.error("未知错误,请参考企业微信API文档");
log.error("查询记录失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
}
}
} else {
......@@ -633,21 +637,23 @@ public class WeComSmartSheetManager {
if (errCode == null || errCode == 0) {
return true;
} else {
log.error("删除记录失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
// 特别处理一些常见的错误代码
switch (errCode) {
case 404:
log.error("请求的文档或表格未找到,请检查docId和sheetId是否正确");
log.error("请求的文档或表格未找到,请检查docId和sheetId是否正确;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break;
case 400:
log.error("请求参数错误,请检查参数格式是否正确");
log.error("请求参数错误,请检查参数格式是否正确;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break;
case 48002:
log.error("应用没有权限访问该文档,请检查应用权限配置");
log.error("应用没有权限访问该文档,请检查应用权限配置;"+"错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
break;
default:
log.error("未知错误,请参考企业微信API文档");
log.error("删除记录失败,错误代码:" + errCode
+ ",错误信息:" + jsonObject.getString("errmsg"));
}
return false;
}
......@@ -978,7 +984,6 @@ public class WeComSmartSheetManager {
totalDeleted += records.size();
log.info("成功删除 {} 条记录,当前总计已删除 {} 条记录", records.size(), totalDeleted);
} else {
log.error("删除记录失败");
return false;
}
}
......
......@@ -60,6 +60,7 @@ public class TDispatchInfoPre extends BaseEntity {
private String phone;
/**
* 社保购买状态,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)
@Length(max = 2, message = "社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败不能超过2个字符")
......@@ -135,6 +136,7 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("公积金缴纳地-市")
@Schema(description = "公积金缴纳地-市")
private String fundCity;
/**
* 公积金缴纳地-县
*/
......@@ -143,6 +145,32 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("公积金缴纳地-县")
@Schema(description = "公积金缴纳地-县")
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 {
@Schema(description = "起缴日期")
@ExcelProperty("起缴日期")
private Date socialStartDate;
/**
* 起缴日期 (公积金起缴日期)
*/
@ExcelAttribute(name = "起缴日期", isDate = true)
@Schema(description = "起缴日期(公积金起缴日期)")
@ExcelProperty("起缴日期")
private Date fundStartDate;
/**
* 配置名称
*/
......@@ -341,6 +378,29 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("委托备注")
@Schema(description = "委托备注")
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 {
private BigDecimal lowerBig;
/**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳 (3固定基数--公积金特有))
*/
@ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)", maxLength = 1)
@Length(max = 1, message = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)不能超过1个字符")
......@@ -579,4 +639,22 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("基数下限(社保或公积金)" )
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 {
/**
* 基数上限
*/
@ExcelAttribute(name = "基数上限",isNotEmpty = true)
@ExcelAttribute(name = "基数上限",isNotEmpty = true,isFloat = true,max = "999999999.99",min = 0 )
@Schema(description = "基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数上限")
......@@ -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 = "基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数下限")
......@@ -147,7 +147,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable {
/**
* 补缴政策
*/
@ExcelAttribute(name = "补缴政策")
@ExcelAttribute(name = "补缴政策",maxLength = 200)
@Schema(description = "补缴政策")
@HeadFontStyle(fontHeightInPoints = 11)
@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;
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.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.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
......@@ -43,7 +45,7 @@ public class TDispatchInfoPreController {
* 简单分页查询
*
* @param page 分页对象
* @param tDispatchInfoPre 社保待购买表
* @param tDispatchInfoPre 社保或公积金待购买表
* @return
*/
@Operation(description = "简单分页查询")
......@@ -51,6 +53,12 @@ public class TDispatchInfoPreController {
public R<IPage<TDispatchInfoPre>> getTDispatchInfoPrePage(Page<TDispatchInfoPre> page, TDispatchInfoPreSearchVo tDispatchInfoPre) {
YifuUser user = SecurityUtils.getUser();
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));
}
......@@ -65,6 +73,12 @@ public class TDispatchInfoPreController {
public R<List<TDispatchInfoPre>> getTDispatchInfoPreNoPage(@RequestBody TDispatchInfoPreSearchVo tDispatchInfoPre) {
YifuUser user = SecurityUtils.getUser();
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));
}
......@@ -121,6 +135,21 @@ public class TDispatchInfoPreController {
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
......@@ -132,6 +161,19 @@ public class TDispatchInfoPreController {
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数组
......@@ -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 社保待购买任务表
* @return
*/
......@@ -155,6 +210,21 @@ public class TDispatchInfoPreController {
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
......@@ -167,6 +237,20 @@ public class TDispatchInfoPreController {
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
......@@ -191,6 +275,20 @@ public class TDispatchInfoPreController {
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
......@@ -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
* @date 2025-10-11 15:30:02
**/
......@@ -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
* @date 2025-10-11 18:50:16
* @return void
......@@ -229,7 +356,7 @@ public class TDispatchInfoPreController {
}
/**
* 每天下午三点二十推送待购买数据
* 每天下午三点二十推送待购买数据 公积金可以通用
* @author huych
* @date 2025-10-11 18:51:58
* @return void
......
......@@ -225,7 +225,7 @@ public class TSocialFundInfoController {
/**
* 通过身份证查询在途或在保的数据
* @param UnSocialFundInfoVo 社保公积金查询表
* @param empIdcard 社保公积金查询表
* @return
*/
@Operation(summary = "通过身份证查询在途或在保的数据", description = "通过身份证查询在途或在保的数据")
......@@ -234,6 +234,17 @@ public class TSocialFundInfoController {
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
......@@ -249,4 +260,18 @@ public class TSocialFundInfoController {
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;
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.TDispatchInfoPreExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreFundExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -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> getDisPatcherFundList(@Param("idList") List<String> idList, @Param("statusList") List<String> statusList, @Param("type") String type);
List<TDispatchInfoPre> getAllUnDisData();
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;
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.TSocialFundInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.UnFundInfoVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.UnSocialFundInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -101,4 +102,7 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
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> {
*/
Boolean saveSocialPreInfo(EmployeeRegistrationPreVo preVo);
/**
* 新增公积金待购买信息
* @param preVo
* @return
*/
Boolean saveFundPreInfo(EmployeeRegistrationPreVo preVo);
/**
* 更新社保待购买前端客服信息
* @param updateVo
......@@ -70,6 +77,8 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
void deleteUnProcessSocialPreInfo(String id);
void deleteUnProcessFundPreInfo(String id);
/**
* 社保待购买信息单个/批量发起签署任务
* @param idList id集合
......@@ -81,4 +90,16 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
void pushWxConfrimMessage();
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> {
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,
}
infoVo.setUpPersion(excel.getUpPersion());
infoVo.setLowerPersion(excel.getLowerPersion());
infoVo.setUpInjury(excel.getUpInjury());
infoVo.setLowerInjury(excel.getLowerInjury());
infoVo.setUpMedical(excel.getUpMedical());
infoVo.setLowerMedical(excel.getLowerMedical());
infoVo.setUpBirth(excel.getUpBirth());
infoVo.setLowerBirth(excel.getLowerBirth());
infoVo.setUpUnemployment(excel.getUpUnemployment());
infoVo.setLowerUnemployment(excel.getLowerUnemployment());
......@@ -771,6 +775,46 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
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())){
......@@ -860,7 +904,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
infoVo.setPayCompany(excel.getChargeCompany());
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())) {
......@@ -1114,6 +1165,12 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
//基数上下限赋值
infoVo.setLowerLimit(excel.getLowerLimit());
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.setFundPayUpperLimit(excel.getUpperLimit());
//单边小数点
......@@ -1146,6 +1203,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != splitSub && splitSub.length == 2){
fundPro.setCompanyPro(Double.valueOf(splitSub[0]));
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);
}
......
......@@ -3708,6 +3708,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//派单审核通过更新社保待购买表的状态
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getSocialFundId, sf.getId())
.eq(TDispatchInfoPre::getTypeSub, CommonConstants.ZERO_STRING)
.eq(TDispatchInfoPre::getProcessStatus, CommonConstants.THREE_STRING)
.last(CommonConstants.LAST_ONE_SQL));
// 派增审核
......@@ -3847,6 +3848,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue;
}
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())) {
// 审核通过
......@@ -3856,6 +3863,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setFundAddStatus(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) {
// 作废更新:公积金状态、同步档案的公积金状态、同步预估数据
......@@ -3863,6 +3876,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
providentFund.setDeleteFlag(CommonConstants.ONE_STRING);
sf.setFundAddStatus(CommonConstants.FOUR_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.setAuditUser(user.getId());
......@@ -4453,6 +4482,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//针对社保自动化过来的数据,办理更新待购买数据状态
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getSocialFundId, sf.getId())
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ZERO_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("5","6","9"))
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(dispatchInfoPre)) {
......@@ -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);
}
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 {
errorList.add(new ErrorMessage(-1, "找不到对应员工公积金派增派单数据:" + dis.getEmpName()));
return true;
......@@ -8862,6 +8918,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//发送企业微信待办
private void sendDisFalureMessageToWx(TDispatchInfoPre pre,String id) {
String code = "68";
String item = "社保";
if (CommonConstants.ONE_STRING.equals(pre.getTypeSub())){
code = "75";
item = "公积金";
}
//获取前端客服
SysUser user;
if (Common.isEmpty(pre.getCustomerUserLoginName())) {
......@@ -8882,11 +8944,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map<String, Object> requestMap = 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", "68" + id);
, wxConfig.getDomainName() + "/auth/oauth/wxLogin", code + id);
StringBuilder description = new StringBuilder();
String title = "作业自动化——社保办理失败提醒";
String title = "作业自动化——"+item+"办理失败提醒";
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>");
textcard.put("title", title);
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
public List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard) {
return baseMapper.selectUnSocialFundInfoByEmpIdcard(empIdcard);
}
@Override
public List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard) {
return baseMapper.selectUnFundInfoByEmpIdcard(empIdcard);
}
@Override
public Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo) {
if (Common.isNotNull(cardVo) && Common.isNotNull(cardVo.getEmpIdcard())) {
......@@ -965,4 +968,20 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
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 @@
<result property="lowerInjury" column="LOWER_INJURY"/>
<result property="lowerBirth" column="LOWER_BIRTH"/>
<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 id="tDispatchInfoPreExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo">
......@@ -97,6 +104,22 @@
<result property="recordBase" column="RECORD_BASE"/>
<result property="contractStatus" column="CONTRACT_STATUS"/>
</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">
a.ID,
a.EMP_NAME,
......@@ -162,7 +185,10 @@
a.LOWER_UNEMPLOYMENT,
a.LOWER_INJURY,
a.LOWER_BIRTH,
a.LOWER_BIG
a.LOWER_BIG,
a.PROVIDENT_CARDINAL,
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER
</sql>
<sql id="tDispatchInfoPre_other_where">
<if test="tDispatchInfoPre != null">
......@@ -363,7 +389,17 @@
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
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"/>
</where>
</select>
......@@ -394,7 +430,44 @@
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'
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"/>
</where>
group by a.id
......@@ -403,7 +476,6 @@
limit #{tDispatchInfoPre.limitStart},#{tDispatchInfoPre.limitEnd}
</if>
</select>
<!--tDispatchInfoPre c端不分页查询-->
<select id="geNoPageList" resultMap="tDispatchInfoPreMap">
SELECT
......@@ -458,7 +530,37 @@
</foreach>
</where>
</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
<include refid="Base_Column_List"/>
......@@ -467,7 +569,6 @@
a.expected_collection_time is not null
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
and a.process_status = '0'
group by a.customer_user_login_name
</select>
<select id="getAllUnDisDataIdList" resultType="java.lang.String">
......@@ -478,5 +579,17 @@
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 = '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>
</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 @@
<result property="socialTown" column="SOCIAL_TOWN"/>
</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">
a.ID,
a.EMP_ID,
......@@ -1232,15 +1249,48 @@
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待办理、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')
</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 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待办理、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')
</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>
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