Commit 81393e62 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.16' into MVP1.7.16

parents 03d43cae 0a0f3f12
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex; import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
...@@ -389,4 +390,21 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -389,4 +390,21 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "更新人") @Schema(description = "更新人")
private String updateBy; private String updateBy;
/**
* 基数上限(社保或公积金)
*/
@ExcelAttribute(name = "基数上限(社保或公积金)" )
@Schema(description = "基数上限(社保或公积金)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数上限(社保或公积金)" )
private BigDecimal upperLimit;
/**
* 基数下限(社保或公积金)
*/
@ExcelAttribute(name = "基数下限(社保或公积金)" )
@Schema(description = "基数下限(社保或公积金)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数下限(社保或公积金)" )
private BigDecimal lowerLimit;
} }
...@@ -14,6 +14,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; ...@@ -14,6 +14,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.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.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
...@@ -21,10 +22,7 @@ import org.apache.commons.lang.StringUtils; ...@@ -21,10 +22,7 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -55,6 +53,19 @@ public class FascController { ...@@ -55,6 +53,19 @@ public class FascController {
private static String FASC_SUCCESS = "success"; private static String FASC_SUCCESS = "success";
private static String FASC_BIZ_CONTENT_STR = ";fddBizContent:"; private static String FASC_BIZ_CONTENT_STR = ";fddBizContent:";
/**
* @Description: 获取模板
* @Author: hgw
* @Date: 2025/9/26 16:21
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "每日定时获取法大大模板和详情")
@PostMapping("/inner/everyDayGetFascTemplate")
@Inner
public R<String> everyDayGetFascTemplate() throws ApiException {
return fascService.getTemplate(null);
}
/** /**
* @param templateName 签署任务模板名称,如果传了该参数,会根据名称模糊匹配查询,长度最大100个字符。 * @param templateName 签署任务模板名称,如果传了该参数,会根据名称模糊匹配查询,长度最大100个字符。
* @Description: 获取模板 * @Description: 获取模板
......
...@@ -71,6 +71,22 @@ public class TEmployeeContractPreController { ...@@ -71,6 +71,22 @@ public class TEmployeeContractPreController {
return R.ok(tEmployeeContractPreService.getById(id)); return R.ok(tEmployeeContractPreService.getById(id));
} }
/**
* @param contractId 合同ID
* @Description: 通过合同ID查询(原合同查电子签详情专用)
* @Author: hgw
* @Date: 2025/10/20 10:19
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre>
**/
@Operation(summary = "通过合同ID查询", description = "通过合同ID查询")
@GetMapping("/getByContractId" )
public R<TEmployeeContractPre> getByContractId(@RequestParam("contractId" ) String contractId) {
// 2025-10-20 10:29:41 倩倩说不过滤状态,只要是自动化生成的合同,都要看电子签详情
TEmployeeContractPre pre = tEmployeeContractPreService.getOne(Wrappers.<TEmployeeContractPre>lambdaQuery()
.eq(TEmployeeContractPre::getContractId, contractId).last(CommonConstants.LAST_ONE_SQL));
return R.ok(pre);
}
/** /**
* 不分页查询 * 不分页查询
* @param tEmployeeContractPre 商险待办任务表 * @param tEmployeeContractPre 商险待办任务表
......
...@@ -22,6 +22,7 @@ import com.fasc.open.api.v5_1.res.template.SignTemplateListInfo; ...@@ -22,6 +22,7 @@ import com.fasc.open.api.v5_1.res.template.SignTemplateListInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.FddContractInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.FddContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractPreMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractPreMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.*; import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.utils.FascUtil; import com.yifu.cloud.plus.v1.yifu.archives.utils.FascUtil;
...@@ -53,10 +54,13 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -53,10 +54,13 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
private final TFascTemplateService tFascTemplateService; private final TFascTemplateService tFascTemplateService;
private final TFascTemplateDetailService tFascTemplateDetailService; private final TFascTemplateDetailService tFascTemplateDetailService;
private final TEmployeeContractPreMapper tEmployeeContractPreMapper; private final TEmployeeContractPreMapper tEmployeeContractPreMapper;
private final TEmployeeContractInfoMapper tEmployeeContractInfoMapper;
private final TAttaInfoMapper tAttaInfoMapper; private final TAttaInfoMapper tAttaInfoMapper;
private final OSSUtil ossUtil; private final OSSUtil ossUtil;
private final static String FASC_NO_CONTRACT = "未找到合同"; private final static String FASC_NO_CONTRACT = "未找到合同自动化";
private final static String FASC_NO_EMP_CONTRACT = "未找到自动生成的员工合同";
private final static String FASC_NO_TEMPLATE = "未找到新法大大模板";
@Override @Override
public R<String> getTemplate(String templateName) throws ApiException { public R<String> getTemplate(String templateName) throws ApiException {
...@@ -181,6 +185,9 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -181,6 +185,9 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
if (contract == null) { if (contract == null) {
return R.failed(FASC_NO_CONTRACT); return R.failed(FASC_NO_CONTRACT);
} }
if (Common.isEmpty(contract.getContractId())) {
return R.failed("未生成合同,请联系管理员");
}
if (Common.isEmpty(contract.getFadadaTemplateId())) { if (Common.isEmpty(contract.getFadadaTemplateId())) {
return R.failed("未找到合同模板ID,请联系管理员"); return R.failed("未找到合同模板ID,请联系管理员");
} }
...@@ -191,14 +198,27 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -191,14 +198,27 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
} }
if (Common.isEmpty(contract.getProcessStatus())) { if (Common.isEmpty(contract.getProcessStatus())) {
return R.failed("合同无状态,请联系管理员"); return R.failed("合同无状态,请联系管理员");
} else if (!CommonConstants.dingleDigitStrArray[1].equals(contract.getProcessStatus()) } else if (!(CommonConstants.dingleDigitStrArray[1].equals(contract.getProcessStatus())
&& !CommonConstants.dingleDigitStrArray[5].equals(contract.getProcessStatus()) || CommonConstants.dingleDigitStrArray[5].equals(contract.getProcessStatus())
&& !CommonConstants.dingleDigitStrArray[7].equals(contract.getProcessStatus())) { || CommonConstants.dingleDigitStrArray[7].equals(contract.getProcessStatus()))) {
return R.failed("合同状态不是待发起、发起失败、签署失败,不可发起电子签署!"); return R.failed("合同状态不是待发起、发起失败、签署失败,不可发起电子签署!");
} }
if (Common.isNotNull(contract.getRequestId())) { if (Common.isNotNull(contract.getRequestId())) {
return R.failed("合同已发起,请勿重复发起!"); return R.failed("合同已发起,请勿重复发起!");
} }
TEmployeeContractInfo empContract = tEmployeeContractInfoMapper.selectById(contract.getContractId());
if (empContract == null) {
return R.failed(FASC_NO_EMP_CONTRACT);
}
TFascTemplate tFascTemplate = tFascTemplateService.getById(contract.getFadadaTemplateId());
if (tFascTemplate == null) {
return R.failed(FASC_NO_TEMPLATE);
} else if (!"valid".equals(tFascTemplate.getSignTemplateStatus())) {
return R.failed("法大大模版状态不是“启用”,不可发起电子签署");
}
TFascTemplateDetail detail = new TFascTemplateDetail();
detail.setSignTemplateId(contract.getFadadaTemplateId());
List<TFascTemplateDetail> detailList = tFascTemplateDetailService.getTFascTemplateDetailList(detail);
// TODO - 判断是否入职超过1个月 // TODO - 判断是否入职超过1个月
R<String> requestInfo = fascUtil.submitContract(contract, tFascPushLogService, tEmployeeContractPreMapper); R<String> requestInfo = fascUtil.submitContract(contract, tFascPushLogService, tEmployeeContractPreMapper);
......
...@@ -52,6 +52,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties ...@@ -52,6 +52,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.ParseException;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
...@@ -356,13 +357,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -356,13 +357,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
diffTitle = "商险信息"; diffTitle = "商险信息";
} }
} }
} else {
// 没有变更
if (Common.isNotNull(diffTitle)) {
diffTitle += "、商险信息";
} else {
diffTitle = "商险信息";
}
} }
String differenceContractKey = null; String differenceContractKey = null;
...@@ -497,6 +491,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -497,6 +491,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (newInfo.getServerItem().contains("社保")) { if (newInfo.getServerItem().contains("社保")) {
EmployeeRegistrationPreVo preVo = new EmployeeRegistrationPreVo(); EmployeeRegistrationPreVo preVo = new EmployeeRegistrationPreVo();
BeanUtils.copyProperties(newInfo,preVo); BeanUtils.copyProperties(newInfo,preVo);
initSocialPreInfo(preVo, preVo.getDispatchInfoPreVo(), user,empPreId);
socialDaprUtils.saveSocialPreInfo(preVo); socialDaprUtils.saveSocialPreInfo(preVo);
} }
if (!saveOrUpdateList.isEmpty()) { if (!saveOrUpdateList.isEmpty()) {
...@@ -784,4 +779,29 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -784,4 +779,29 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
} }
} }
//社保待购买数据初始化
private void initSocialPreInfo(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.ZERO_STRING);
preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("养老、医疗、生育、失业、工伤、大病");
if (CommonConstants.ZERO_STRING.equals(preVo.getIsCreateDate()) && Common.isEmpty(preVo.getSocialStartDate())) {
preVo.setSocialStartDate(pre.getJoinLeaveDate());
}
}
} }
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
AND a.id = #{tFascHrField.id} AND a.id = #{tFascHrField.id}
</if> </if>
<if test="tFascHrField.hrField != null and tFascHrField.hrField.trim() != ''"> <if test="tFascHrField.hrField != null and tFascHrField.hrField.trim() != ''">
AND a.hr_field = #{tFascHrField.hrField} AND a.hr_field like concat('%', #{tFascHrField.hrField}, '%')
</if> </if>
<if test="tFascHrField.hrFieldId != null and tFascHrField.hrFieldId.trim() != ''"> <if test="tFascHrField.hrFieldId != null and tFascHrField.hrFieldId.trim() != ''">
AND a.hr_field_id = #{tFascHrField.hrFieldId} AND a.hr_field_id = #{tFascHrField.hrFieldId}
......
...@@ -168,4 +168,18 @@ public class ArchiveTask { ...@@ -168,4 +168,18 @@ public class ArchiveTask {
log.info("-------------每日早9点电子签合同即将超期提醒-定时任务结束------------"); log.info("-------------每日早9点电子签合同即将超期提醒-定时任务结束------------");
} }
/**
* @Author hgw
* @Description 每日定时获取法大大模板和详情
* @Date 2025-10-20 16:15:32
* @Param
**/
public void everyDayGetFascTemplate() {
log.info("-------------每日定时获取法大大模板和详情-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/fasc/inner/everyDayGetFascTemplate", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每日定时获取法大大模板和详情-定时任务结束------------");
}
} }
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.entity; package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
...@@ -431,4 +432,21 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -431,4 +432,21 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("就职岗位") @ExcelProperty("就职岗位")
private String position; private String position;
/**
* 基数上限(社保或公积金)
*/
@ExcelAttribute(name = "基数上限(社保或公积金)" )
@Schema(description = "基数上限(社保或公积金)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数上限(社保或公积金)" )
private BigDecimal upperLimit;
/**
* 基数下限(社保或公积金)
*/
@ExcelAttribute(name = "基数下限(社保或公积金)" )
@Schema(description = "基数下限(社保或公积金)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数下限(社保或公积金)" )
private BigDecimal lowerLimit;
} }
...@@ -186,12 +186,18 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -186,12 +186,18 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.eq(TDispatchInfoPre::getRegisterId,registrationPreVo.getExitSocialInfoList() .eq(TDispatchInfoPre::getRegisterId,registrationPreVo.getExitSocialInfoList()
.get(0).getRegisterId())); .get(0).getRegisterId()));
} else { } else {
//删除已存在的入职确认信息对应的社保明细
TDispatchInfoPreVo preVo = registrationPreVo.getDispatchInfoPreVo(); TDispatchInfoPreVo preVo = registrationPreVo.getDispatchInfoPreVo();
if (null != preVo) { socialPreDetailService.remove(Wrappers.<TSocialPreDetail>lambdaQuery()
.eq(TSocialPreDetail::getRegisterId, preVo.getRegisterId()));
if (Common.isNotNull(preVo) && Common.isNotNull(preVo.getId())) {
//更新逻辑
TDispatchInfoPre pre = new TDispatchInfoPre();
BeanUtils.copyProperties(preVo, pre);
baseMapper.updateById(pre);
}
if (Common.isNotNull(preVo) && Common.isEmpty(preVo.getId())) {
try { try {
//删除已存在的入职确认信息对应的社保明细
socialPreDetailService.remove(Wrappers.<TSocialPreDetail>lambdaQuery()
.eq(TSocialPreDetail::getRegisterId, preVo.getRegisterId()));
//判断是否存在社保待购买信息 //判断是否存在社保待购买信息
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())
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
<result property="configId" column="CONFIG_ID"/> <result property="configId" column="CONFIG_ID"/>
<result property="receiveType" column="RECEIVE_TYPE"/> <result property="receiveType" column="RECEIVE_TYPE"/>
<result property="registerId" column="REGISTER_ID"/> <result property="registerId" column="REGISTER_ID"/>
<result property="upperLimit" column="UPPER_LIMIT"/>
<result property="lowerLimit" column="LOWER_LIMIT"/>
<result property="pensionStart" column="PENSION_START"/> <result property="pensionStart" column="PENSION_START"/>
<result property="medicalStart" column="MEDICAL_START"/> <result property="medicalStart" column="MEDICAL_START"/>
<result property="unemployStart" column="UNEMPLOY_START"/> <result property="unemployStart" column="UNEMPLOY_START"/>
......
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