Commit 5e6bb4e8 authored by hongguangwu's avatar hongguangwu

MVP1.7.16-税友-是否强制停保

parent a2773c1e
...@@ -61,10 +61,10 @@ public class LGuaziOfferRecord extends BaseEntity { ...@@ -61,10 +61,10 @@ public class LGuaziOfferRecord extends BaseEntity {
/** /**
* 记录来源 * 记录来源
* (1:手动更新状态;2:编辑offer信息;3:发送Offer查阅短信;4:发送信息收集短信;5:收集短信发送成功;6:(系统触发)C端采集提交; * (1:手动更新状态;2:编辑offer信息;3:发送Offer查阅短信;4:发送信息收集短信;5:收集短信发送成功;6:(系统触发)C端采集提交;
* 7:档案审核;9:发起合同申请10:合同审核通过;11:合同归档;12:发送合同下载短信) * 7:档案审核;9:发起合同申请10:合同审核通过;11:合同归档;12:发送合同下载短信;13:瓜子系统更新状态
*/ */
@Length(max = 2, message = "记录来源不能超过2个字符") @Length(max = 2, message = "记录来源不能超过2个字符")
@Schema(description = "记录来源(1:手动更新状态;2:编辑offer信息;3:发送Offer查阅短信;4:发送信息收集短信;5:收集短信发送成功;6:(系统触发)C端采集提交;7:档案审核通过;9:发起合同申请10:合同审核通过;11:合同归档;12:发送合同下载短信)") @Schema(description = "记录来源(1:手动更新状态;2:编辑offer信息;3:发送Offer查阅短信;4:发送信息收集短信;5:收集短信发送成功;6:(系统触发)C端采集提交;7:档案审核通过;9:发起合同申请10:合同审核通过;11:合同归档;12:发送合同下载短信;13:瓜子系统更新状态)")
private String recordFrom; private String recordFrom;
/** /**
* 删除标记 * 删除标记
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
/**
* 瓜子取消offer vo
*
* @author hgw
* @date 2025-10-21 18:22:49
*/
@Data
public class TGzOfferInfoCancelVo {
@Schema(description = "流程ID(瓜子推过来的主键)")
private String bizId;
@Schema(description = "取消原因")
private String reason;
}
...@@ -264,7 +264,10 @@ public class FascController { ...@@ -264,7 +264,10 @@ public class FascController {
contractInfo.setAuditStatus(CommonConstants.ZERO_INT); contractInfo.setAuditStatus(CommonConstants.ZERO_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING); contractInfo.setInUse(CommonConstants.ONE_STRING);
tEmployeeContractInfoService.updateById(contractInfo); tEmployeeContractInfoService.updateById(contractInfo);
} else if (fddEvent.equals("sign-task-sign-failed")) { } else if (fddEvent.equals("sign-task-sign-failed")
|| fddEvent.equals("sign-task-sign-rejected")
|| fddEvent.equals("sign-task-ignore")
|| fddEvent.equals("sign-task-fill-rejected")) {
// 3:签署任务参与方签署失败事件 // 3:签署任务参与方签署失败事件
pre.setProcessStatus(CommonConstants.dingleDigitStrArray[7]); pre.setProcessStatus(CommonConstants.dingleDigitStrArray[7]);
pre.setRequestId(""); pre.setRequestId("");
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.controller; package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.archives.config.GzConfig; import com.yifu.cloud.plus.v1.yifu.archives.config.GzConfig;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo;
...@@ -28,17 +29,20 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TGzEmpInfoService; ...@@ -28,17 +29,20 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TGzEmpInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.utils.GZSign; import com.yifu.cloud.plus.v1.yifu.archives.utils.GZSign;
import com.yifu.cloud.plus.v1.yifu.archives.utils.ReturnGz; import com.yifu.cloud.plus.v1.yifu.archives.utils.ReturnGz;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoPushGzAttaVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoPushGzContractVo; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoPushGzFileVo; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoPushGzVo;
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.OSSUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
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.authority.AuthorityUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
...@@ -74,6 +78,45 @@ public class TGzController { ...@@ -74,6 +78,45 @@ public class TGzController {
@Autowired @Autowired
private OSSUtil ossUtil; private OSSUtil ossUtil;
/**
* @Description: 接收瓜子推送过来的取消Offer的信息
* @Author: hgw
* @Date: 2025-10-22 08:35:57
* @return: com.yifu.cloud.plus.v1.yifu.archives.utils.ReturnGz<java.lang.String>
**/
@PostMapping("/doCancelOfferInfo")
public ReturnGz<String> doCancelOfferInfo(@RequestBody TGzOfferInfoCancelVo vo) {
if (Common.isEmpty(vo.getBizId())) {
return ReturnGz.failed("BizId必传");
}
TGzOfferInfo nowGzOfferInfo = tGzOfferInfoService.getOne(Wrappers.<TGzOfferInfo>query().lambda()
.eq(TGzOfferInfo::getBizId, vo.getBizId())
.last(CommonConstants.LAST_ONE_SQL));
if (nowGzOfferInfo == null || Common.isEmpty(nowGzOfferInfo.getId())) {
return ReturnGz.failed("根据BizId,未找到瓜子offer信息");
}
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
YifuUser user = new YifuUser("2", 1L, "", "预入职扫码",
"瓜子系统", "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null,null);
// 10:取消offer
nowGzOfferInfo.setOfferStatus(CommonConstants.TEN_STRING);
// 5. 签名验证通过,处理业务逻辑
R<String> r = tGzOfferInfoService.gzUpdateStatus(nowGzOfferInfo, user);
if (R.isSuccess(r)) {
return ReturnGz.ok();
} else {
return ReturnGz.failed(r.getMsg());
}
}
/** /**
* @Description: 接收瓜子推送过来的Offer信息 * @Description: 接收瓜子推送过来的Offer信息
* @Author: hgw * @Author: hgw
......
...@@ -22,10 +22,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -22,10 +22,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo;
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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
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.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
...@@ -128,7 +131,11 @@ public class TGzOfferInfoController { ...@@ -128,7 +131,11 @@ public class TGzOfferInfoController {
@PutMapping("/updateStatus") @PutMapping("/updateStatus")
// @PreAuthorize("@pms.hasPermission('archives_tgzofferinfo_edit')" ) // @PreAuthorize("@pms.hasPermission('archives_tgzofferinfo_edit')" )
public R<String> updateStatus(@RequestBody TGzOfferInfo tGzOfferInfo) { public R<String> updateStatus(@RequestBody TGzOfferInfo tGzOfferInfo) {
return tGzOfferInfoService.updateStatus(tGzOfferInfo); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
}
return tGzOfferInfoService.updateStatus(tGzOfferInfo, user);
} }
/** /**
......
...@@ -43,6 +43,7 @@ public interface TFascTemplateMapper extends BaseMapper<TFascTemplate> { ...@@ -43,6 +43,7 @@ public interface TFascTemplateMapper extends BaseMapper<TFascTemplate> {
*/ */
IPage<TFascTemplate> getTFascTemplatePage(Page<TFascTemplate> page, @Param("tFascTemplate") TFascTemplate tFascTemplate); IPage<TFascTemplate> getTFascTemplatePage(Page<TFascTemplate> page, @Param("tFascTemplate") TFascTemplate tFascTemplate);
List<TFascTemplate> getTFascTemplateListAll(@Param("tFascTemplate") TFascTemplate tFascTemplate);
List<TFascTemplate> getTFascTemplateList(@Param("tFascTemplate") TFascTemplate tFascTemplate); List<TFascTemplate> getTFascTemplateList(@Param("tFascTemplate") TFascTemplate tFascTemplate);
List<TFascTemplateExportVo> getTFascTemplateExport(@Param("tFascTemplate") TFascTemplateSearchVo tFascTemplate, @Param("idList") List<String> idList); List<TFascTemplateExportVo> getTFascTemplateExport(@Param("tFascTemplate") TFascTemplateSearchVo tFascTemplate, @Param("idList") List<String> idList);
......
...@@ -25,6 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzPushEntrySearchVo; ...@@ -25,6 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzPushEntrySearchVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 瓜子系统交互任务跟进表 * 瓜子系统交互任务跟进表
* *
...@@ -40,4 +42,10 @@ public interface TGzPushEntryMapper extends BaseMapper<TGzPushEntry> { ...@@ -40,4 +42,10 @@ public interface TGzPushEntryMapper extends BaseMapper<TGzPushEntry> {
* @return * @return
*/ */
IPage<TGzPushEntrySearchVo> getTGzPushEntryPage(Page<TGzPushEntry> page, @Param("tGzPushEntry") TGzPushEntrySearchVo tGzPushEntry); IPage<TGzPushEntrySearchVo> getTGzPushEntryPage(Page<TGzPushEntry> page, @Param("tGzPushEntry") TGzPushEntrySearchVo tGzPushEntry);
// 取消offer,同步取消任务,先查询,组装文字,再取消
List<String> getTGzPushEntryListForStatus(@Param("bizId") String bizId);
// 取消offer,同步取消任务
void deleteByBizId(@Param("bizId") String bizId);
} }
...@@ -46,7 +46,7 @@ public interface LGuaziOfferRecordService extends IService<LGuaziOfferRecord> { ...@@ -46,7 +46,7 @@ public interface LGuaziOfferRecordService extends IService<LGuaziOfferRecord> {
* 5:收集短信发送成功更新状态;6:(系统触发)C端采集提交;7:档案审核通过;8:档案审核不通过; * 5:收集短信发送成功更新状态;6:(系统触发)C端采集提交;7:档案审核通过;8:档案审核不通过;
* 9:发起合同申请;10:合同审核通过;11:合同归档;12:发送合同下载短信) * 9:发起合同申请;10:合同审核通过;11:合同归档;12:发送合同下载短信)
*/ */
void saveRecordOne(LGuaziOfferRecordVo lGuaziOfferRecordVo); void saveRecordOne(LGuaziOfferRecordVo lGuaziOfferRecordVo, String cancelTaskName);
/** /**
......
...@@ -41,6 +41,8 @@ public interface TFascTemplateService extends IService<TFascTemplate> { ...@@ -41,6 +41,8 @@ public interface TFascTemplateService extends IService<TFascTemplate> {
* @return * @return
*/ */
IPage<TFascTemplate> getTFascTemplatePage(Page<TFascTemplate> page, TFascTemplateSearchVo tFascTemplate); IPage<TFascTemplate> getTFascTemplatePage(Page<TFascTemplate> page, TFascTemplateSearchVo tFascTemplate);
// 获取列表,包含已删除(可以选择过滤)
List<TFascTemplate> getTFascTemplateListAll(TFascTemplateSearchVo tFascTemplate);
R<List<ErrorMessage>> batchUpdate(InputStream inputStream); R<List<ErrorMessage>> batchUpdate(InputStream inputStream);
......
...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo; ...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
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 javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
...@@ -71,13 +72,21 @@ public interface TGzOfferInfoService extends IService<TGzOfferInfo> { ...@@ -71,13 +72,21 @@ public interface TGzOfferInfoService extends IService<TGzOfferInfo> {
*/ */
R<String> updateDataById(TGzOfferInfo tGzOfferInfo); R<String> updateDataById(TGzOfferInfo tGzOfferInfo);
/**
* @Description:
* @Author: hgw
* @Date: 2025/10/21 15:55
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> gzUpdateStatus(TGzOfferInfo tGzOfferInfo, YifuUser user);
/** /**
* 瓜子offer手动状态更新 * 瓜子offer手动状态更新
* *
* @param tGzOfferInfo 字典 * @param tGzOfferInfo 字典
* @return R<String> * @return R<String>
*/ */
R<String> updateStatus(TGzOfferInfo tGzOfferInfo); R<String> updateStatus(TGzOfferInfo tGzOfferInfo, YifuUser user);
/** /**
* 瓜子候选人信息审核 * 瓜子候选人信息审核
......
...@@ -24,6 +24,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -24,6 +24,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzPushEntrySearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzPushEntrySearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List;
/** /**
* 瓜子系统交互任务跟进表 * 瓜子系统交互任务跟进表
* *
...@@ -38,6 +40,9 @@ public interface TGzPushEntryService extends IService<TGzPushEntry> { ...@@ -38,6 +40,9 @@ public interface TGzPushEntryService extends IService<TGzPushEntry> {
*/ */
IPage<TGzPushEntrySearchVo> getTGzPushEntryPage(Page<TGzPushEntry> page, TGzPushEntrySearchVo tGzPushEntry); IPage<TGzPushEntrySearchVo> getTGzPushEntryPage(Page<TGzPushEntry> page, TGzPushEntrySearchVo tGzPushEntry);
// 取消offer,同步取消任务
String getTGzPushEntryListForStatus(String bizId);
/** /**
* 任务推送重试 * 任务推送重试
* @param tGzPushEntry 瓜子系统交互任务跟进表 * @param tGzPushEntry 瓜子系统交互任务跟进表
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasc.open.api.exception.ApiException; import com.fasc.open.api.exception.ApiException;
import com.fasc.open.api.v5_1.res.template.SignTemplateListInfo; import com.fasc.open.api.v5_1.res.template.SignTemplateListInfo;
...@@ -77,7 +79,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -77,7 +79,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
List<TFascTemplate> updateMain = new ArrayList<>(); List<TFascTemplate> updateMain = new ArrayList<>();
List<TFascTemplateDetail> updateDetail = new ArrayList<>(); List<TFascTemplateDetail> updateDetail = new ArrayList<>();
List<TFascTemplate> allMain = tFascTemplateService.noPageDiy(null); List<TFascTemplate> allMain = tFascTemplateService.getTFascTemplateListAll(null);
List<TFascTemplateDetail> allDetail = tFascTemplateDetailService.getTFascTemplateDetailList(null); List<TFascTemplateDetail> allDetail = tFascTemplateDetailService.getTFascTemplateDetailList(null);
List<TFascEditLog> logList = new ArrayList<>(); List<TFascEditLog> logList = new ArrayList<>();
if (allMain == null || allMain.isEmpty()) { if (allMain == null || allMain.isEmpty()) {
...@@ -126,6 +128,8 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -126,6 +128,8 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
oldDetail = oldDetailMap.get(t.getSignTemplateId() + CommonConstants.DOWN_LINE_STRING + t.getFascFieldId()); oldDetail = oldDetailMap.get(t.getSignTemplateId() + CommonConstants.DOWN_LINE_STRING + t.getFascFieldId());
if (oldDetail != null) { if (oldDetail != null) {
t.setId(oldDetail.getId()); t.setId(oldDetail.getId());
t.setHrField(oldDetail.getHrField());
t.setHrFieldId(oldDetail.getHrFieldId());
} else { } else {
logId = String.valueOf(UUID.randomUUID()).replaceAll("-", ""); logId = String.valueOf(UUID.randomUUID()).replaceAll("-", "");
t.setId(logId); t.setId(logId);
...@@ -206,20 +210,26 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -206,20 +210,26 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
} }
if (Common.isEmpty(contract.getSignType())) { if (Common.isEmpty(contract.getSignType())) {
return R.failed("签署方式为空,请联系管理员"); return R.failed("签署方式为空,请联系管理员");
} else if (!CommonConstants.ONE_STRING.equals(contract.getSignType())) { } else if (!CommonConstants.ZERO_STRING.equals(contract.getSignType())) {
return R.failed("签署方式不是电子签,不可发起电子签署"); return R.failed("签署方式不是电子签,不可发起电子签署");
} }
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[2].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("合同状态不是待发起、发起失败、签署失败,不可发起电子签署!");
} }
// 如果状态过多,可以改为这个:
// ArrayUtils.contains(forbidStatusArr, tGzOfferInfo.getOfferStatus())
if (Common.isNotNull(contract.getRequestId())) { if (Common.isNotNull(contract.getRequestId())) {
return R.failed("合同已发起,请勿重复发起!"); return R.failed("合同已发起,请勿重复发起!");
} }
TFascTemplate tFascTemplate = tFascTemplateService.getById(contract.getFadadaTemplateId()); TFascTemplate tFascTemplate = tFascTemplateService.getOne(Wrappers.<TFascTemplate>query()
.lambda().eq(TFascTemplate::getSignTemplateId, contract.getFadadaTemplateId())
.last(CommonConstants.LAST_ONE_SQL));
if (tFascTemplate == null) { if (tFascTemplate == null) {
return R.failed(FASC_NO_TEMPLATE); return R.failed(FASC_NO_TEMPLATE);
} else if (!"valid".equals(tFascTemplate.getSignTemplateStatus())) { } else if (!"valid".equals(tFascTemplate.getSignTemplateStatus())) {
......
...@@ -63,10 +63,17 @@ public class LGuaziOfferRecordServiceImpl extends ServiceImpl<LGuaziOfferRecordM ...@@ -63,10 +63,17 @@ public class LGuaziOfferRecordServiceImpl extends ServiceImpl<LGuaziOfferRecordM
* @param lGuaziOfferRecordVo 瓜子offer操作日志包装类 * @param lGuaziOfferRecordVo 瓜子offer操作日志包装类
*/ */
@Override @Override
public void saveRecordOne(LGuaziOfferRecordVo lGuaziOfferRecordVo) { public void saveRecordOne(LGuaziOfferRecordVo lGuaziOfferRecordVo, String cancelTaskName) {
if(Common.isNotNull(lGuaziOfferRecordVo.getOfferId())){ if(Common.isNotNull(lGuaziOfferRecordVo.getOfferId())){
// 生成操作内容 // 生成操作内容
handleContent(lGuaziOfferRecordVo); handleContent(lGuaziOfferRecordVo);
if (Common.isNotNull(cancelTaskName)) {
if (Common.isNotNull(lGuaziOfferRecordVo.getContent())) {
lGuaziOfferRecordVo.setContent(lGuaziOfferRecordVo.getContent() + ";" + cancelTaskName);
} else {
lGuaziOfferRecordVo.setContent(cancelTaskName);
}
}
lGuaziOfferRecordVo.setCreateTime(LocalDateTime.now()); lGuaziOfferRecordVo.setCreateTime(LocalDateTime.now());
this.save(lGuaziOfferRecordVo); this.save(lGuaziOfferRecordVo);
} }
......
...@@ -2392,7 +2392,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -2392,7 +2392,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
lGuaziOfferRecordVo.setChangeStatusList(changeStatusList); lGuaziOfferRecordVo.setChangeStatusList(changeStatusList);
lGuaziOfferRecordVo.setCreateBy(userId); lGuaziOfferRecordVo.setCreateBy(userId);
lGuaziOfferRecordVo.setCreateName(nickname); lGuaziOfferRecordVo.setCreateName(nickname);
lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo); lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo, null);
} }
} }
......
...@@ -2674,7 +2674,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2674,7 +2674,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
lGuaziOfferRecordVo.setChangeStatusList(changeStatusList); lGuaziOfferRecordVo.setChangeStatusList(changeStatusList);
lGuaziOfferRecordVo.setCreateBy(vo.getCreateBy()); lGuaziOfferRecordVo.setCreateBy(vo.getCreateBy());
lGuaziOfferRecordVo.setCreateName(vo.getCreateName()); lGuaziOfferRecordVo.setCreateName(vo.getCreateName());
lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo); lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo, null);
} }
} }
} }
...@@ -2822,7 +2822,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2822,7 +2822,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
lGuaziOfferRecordVo.setChangeStatusList(changeStatusList); lGuaziOfferRecordVo.setChangeStatusList(changeStatusList);
lGuaziOfferRecordVo.setCreateBy(contract.getCreateBy()); lGuaziOfferRecordVo.setCreateBy(contract.getCreateBy());
lGuaziOfferRecordVo.setCreateName(contract.getCreateName()); lGuaziOfferRecordVo.setCreateName(contract.getCreateName());
lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo); lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo, null);
} }
} }
} }
......
...@@ -85,6 +85,11 @@ public class TFascTemplateServiceImpl extends ServiceImpl<TFascTemplateMapper, T ...@@ -85,6 +85,11 @@ public class TFascTemplateServiceImpl extends ServiceImpl<TFascTemplateMapper, T
return baseMapper.getTFascTemplatePage(page, tFascTemplate); return baseMapper.getTFascTemplatePage(page, tFascTemplate);
} }
@Override
public List<TFascTemplate> getTFascTemplateListAll(TFascTemplateSearchVo tFascTemplate) {
return baseMapper.getTFascTemplateListAll(tFascTemplate);
}
/** /**
* 法大大专业版模板表批量导出 * 法大大专业版模板表批量导出
* *
......
...@@ -675,7 +675,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -675,7 +675,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
lGuaziOfferRecordVo.setChangeStatusList(changeStatusList); lGuaziOfferRecordVo.setChangeStatusList(changeStatusList);
lGuaziOfferRecordVo.setCreateBy(userId); lGuaziOfferRecordVo.setCreateBy(userId);
lGuaziOfferRecordVo.setCreateName(nickname); lGuaziOfferRecordVo.setCreateName(nickname);
lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo); lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo, null);
} }
} }
......
...@@ -182,12 +182,23 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -182,12 +182,23 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
lGuaziOfferRecordVo.setChangeInfoMap(changeInfoMap); lGuaziOfferRecordVo.setChangeInfoMap(changeInfoMap);
lGuaziOfferRecordVo.setCreateBy(user.getId()); lGuaziOfferRecordVo.setCreateBy(user.getId());
lGuaziOfferRecordVo.setCreateName(user.getNickname()); lGuaziOfferRecordVo.setCreateName(user.getNickname());
lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo); lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo, null);
} }
return R.ok(CommonConstants.RESULT_DATA_SUCESS); return R.ok(CommonConstants.RESULT_DATA_SUCESS);
} }
/**
* 瓜子方调皖信接口取消offer
*
* @param tGzOfferInfo 字典
* @return R<String>
*/
@Override
public R<String> gzUpdateStatus(TGzOfferInfo tGzOfferInfo, YifuUser user) {
return updateStatusCore(tGzOfferInfo, user, false);
}
/** /**
* 瓜子offer手动状态更新 * 瓜子offer手动状态更新
* *
...@@ -195,11 +206,12 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -195,11 +206,12 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
* @return R<String> * @return R<String>
*/ */
@Override @Override
public R<String> updateStatus(TGzOfferInfo tGzOfferInfo) { public R<String> updateStatus(TGzOfferInfo tGzOfferInfo, YifuUser user) {
YifuUser user = SecurityUtils.getUser(); return updateStatusCore(tGzOfferInfo, user, true);
if (user == null || Common.isEmpty(user.getId())) { }
return R.failed(CommonConstants.PLEASE_LOG_IN);
} private R<String> updateStatusCore(TGzOfferInfo tGzOfferInfo, YifuUser user, boolean isPushGz) {
if (Common.isEmpty(tGzOfferInfo.getId())) { if (Common.isEmpty(tGzOfferInfo.getId())) {
return R.failed(CommonConstants.PARAM_IS_NOT_EMPTY); return R.failed(CommonConstants.PARAM_IS_NOT_EMPTY);
} }
...@@ -236,20 +248,41 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -236,20 +248,41 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
.set(TGzOfferInfo::getUpdateBy, user.getId()); .set(TGzOfferInfo::getUpdateBy, user.getId());
this.update(null, updateOfferWrapper); this.update(null, updateOfferWrapper);
// 记录状态变更的offer操作日志 记录来源: 手动更新状态 // 记录状态变更的offer操作日志 记录来源: 1:手动更新状态;13:瓜子系统更新状态
this.saveOfferStatusRecord(tGzOfferInfo.getId(),CommonConstants.ONE_STRING, String recordFrom = CommonConstants.ONE_STRING;
findInfo.getOfferStatus(),tGzOfferInfo.getOfferStatus(),user.getId(),user.getNickname()); if (!isPushGz) {
recordFrom = CommonConstants.dingleDigitStrArray[13];
}
if (CommonConstants.TEN_STRING.equals(tGzOfferInfo.getOfferStatus())) {
// 取消 offer,额外取消任务
String cancelTaskName = null;
if (Common.isNotNull(findInfo.getBizId())) {
cancelTaskName = tGzPushEntryService.getTGzPushEntryListForStatus(tGzOfferInfo.getBizId());
}
// 加日志,追加取消任务的名称
this.saveOfferStatusRecord(tGzOfferInfo.getId(), recordFrom,
findInfo.getOfferStatus(), tGzOfferInfo.getOfferStatus()
, user.getId(), user.getNickname(), cancelTaskName);
} else {
this.saveOfferStatusRecord(tGzOfferInfo.getId(), recordFrom,
findInfo.getOfferStatus(), tGzOfferInfo.getOfferStatus(), user.getId(), user.getNickname(), null);
// 1.7.13:推送状态给瓜子 }
if(!CommonConstants.ZERO_STRING.equals(findInfo.getBizId())){ // true:手动取消offer,推送瓜子。
TGzPushEntry tGzPushEntry = new TGzPushEntry(); // false:瓜子通知我们取消offer,不再推送瓜子
tGzPushEntry.setCreateBy(user.getId()); if (isPushGz) {
tGzPushEntry.setCreateName(user.getNickname()); // 1.7.13:推送状态给瓜子
tGzPushEntry.setBizId(findInfo.getBizId()); if (!CommonConstants.ZERO_STRING.equals(findInfo.getBizId())) {
tGzPushEntry.setTaskType(tGzOfferInfo.getOfferStatus()); TGzPushEntry tGzPushEntry = new TGzPushEntry();
tGzPushEntry.setName(findInfo.getName()); tGzPushEntry.setCreateBy(user.getId());
tGzPushEntry.setNationalId(findInfo.getNationalId()); tGzPushEntry.setCreateName(user.getNickname());
tGzPushEntryService.addPushEntry(tGzPushEntry); tGzPushEntry.setBizId(findInfo.getBizId());
tGzPushEntry.setTaskType(tGzOfferInfo.getOfferStatus());
tGzPushEntry.setName(findInfo.getName());
tGzPushEntry.setNationalId(findInfo.getNationalId());
tGzPushEntryService.addPushEntry(tGzPushEntry);
}
} }
return R.ok(CommonConstants.RESULT_DATA_SUCESS); return R.ok(CommonConstants.RESULT_DATA_SUCESS);
...@@ -324,7 +357,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -324,7 +357,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
// 记录状态变更的offer操作日志 记录来源: 档案审核 // 记录状态变更的offer操作日志 记录来源: 档案审核
this.saveOfferStatusRecord(findInfo.getId(),CommonConstants.SEVEN_STRING, this.saveOfferStatusRecord(findInfo.getId(),CommonConstants.SEVEN_STRING,
findInfo.getOfferStatus(),tGzOfferInfo.getOfferStatus(),user.getId(),user.getNickname()); findInfo.getOfferStatus(),tGzOfferInfo.getOfferStatus(),user.getId(),user.getNickname(), null);
// 1.7.13 变更到合同相关的状态,推合同信息给瓜子 // 1.7.13 变更到合同相关的状态,推合同信息给瓜子
if(CommonConstants.THIRTEEN_STRING.equals(tGzOfferInfo.getOfferStatus()) if(CommonConstants.THIRTEEN_STRING.equals(tGzOfferInfo.getOfferStatus())
...@@ -1122,7 +1155,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -1122,7 +1155,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
// 记录状态变更的offer操作日志 记录来源: 手动更新状态 // 记录状态变更的offer操作日志 记录来源: 手动更新状态
this.saveOfferStatusRecord(findInfo.getId(),CommonConstants.ONE_STRING, this.saveOfferStatusRecord(findInfo.getId(),CommonConstants.ONE_STRING,
findInfo.getOfferStatus(),tGzOfferInfo.getOfferStatus(),user.getId(),user.getNickname()); findInfo.getOfferStatus(),tGzOfferInfo.getOfferStatus(),user.getId(),user.getNickname(), null);
// 1.7.13:推送状态给瓜子 // 1.7.13:推送状态给瓜子
if(!CommonConstants.ZERO_STRING.equals(findInfo.getBizId())){ if(!CommonConstants.ZERO_STRING.equals(findInfo.getBizId())){
...@@ -1147,14 +1180,16 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -1147,14 +1180,16 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
/** /**
* 记录单个状态变更的offer操作日志 * 记录单个状态变更的offer操作日志
* @param offerId offerId * @param offerId offerId
* @param recordFrom 记录来源:1:手动更新状态;7:档案审核 * @param recordFrom 记录来源:1:手动更新状态;7:档案审核;13:瓜子系统更新状态
* @param beforeStatus 变更前状态 * @param beforeStatus 变更前状态
* @param nowStatus 当前状态 * @param nowStatus 当前状态
* @param userId 触发人ID * @param userId 触发人ID
* @param nickname 触发人名称 * @param nickname 触发人名称
* @param cancelTaskName 取消offer,同步取消任务,此处存了任务名称等
*/ */
private void saveOfferStatusRecord(Integer offerId, String recordFrom, private void saveOfferStatusRecord(Integer offerId, String recordFrom,
String beforeStatus, String nowStatus, String userId, String nickname){ String beforeStatus, String nowStatus, String userId
, String nickname, String cancelTaskName){
// 记录offer操作日志 // 记录offer操作日志
LGuaziOfferRecordVo lGuaziOfferRecordVo = new LGuaziOfferRecordVo(); LGuaziOfferRecordVo lGuaziOfferRecordVo = new LGuaziOfferRecordVo();
// 存变更前后的状态到 状态数组里 // 存变更前后的状态到 状态数组里
...@@ -1169,7 +1204,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -1169,7 +1204,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
lGuaziOfferRecordVo.setChangeStatusList(changeStatusList); lGuaziOfferRecordVo.setChangeStatusList(changeStatusList);
lGuaziOfferRecordVo.setCreateBy(userId); lGuaziOfferRecordVo.setCreateBy(userId);
lGuaziOfferRecordVo.setCreateName(nickname); lGuaziOfferRecordVo.setCreateName(nickname);
lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo); lGuaziOfferRecordService.saveRecordOne(lGuaziOfferRecordVo, cancelTaskName);
} }
} }
......
...@@ -38,6 +38,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -38,6 +38,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 瓜子系统交互任务跟进表 * 瓜子系统交互任务跟进表
...@@ -68,6 +71,48 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz ...@@ -68,6 +71,48 @@ public class TGzPushEntryServiceImpl extends ServiceImpl<TGzPushEntryMapper, TGz
return baseMapper.getTGzPushEntryPage(page, tGzPushEntry); return baseMapper.getTGzPushEntryPage(page, tGzPushEntry);
} }
// 取消offer,同步取消任务
@Override
public String getTGzPushEntryListForStatus(String bizId) {
List<String> taskInfoList = baseMapper.getTGzPushEntryListForStatus(bizId);
StringBuilder taskTypeName = new StringBuilder();
if (taskInfoList != null && !taskInfoList.isEmpty()) {
Map<String, String> taskTypeNameMap = new HashMap<>();
taskTypeNameMap.put("4", "待接受Offer");
taskTypeNameMap.put("5", "拒绝Offer");
taskTypeNameMap.put("6", "接受offer");
taskTypeNameMap.put("8", "合同信息推送");
taskTypeNameMap.put("9", "候选人填写信息");
taskTypeNameMap.put("10", "取消offer");
taskTypeNameMap.put("12", "候选人信息审核");
taskTypeNameMap.put("13", "待签署");
taskTypeNameMap.put("97", "档案信息推送");
taskTypeNameMap.put("99", "合同附件推送");
// 交互任务类型(4:待接受Offer,5:拒绝Offer,6:接受offer,
// 8:合同信息推送,9:候选人填写信息,10:取消offer,12:候选人信息审核,13:待签署,
// 97:档案信息推送,99:合同附件推送)
String info;
for (String taskInfo : taskInfoList) {
info = taskTypeNameMap.get(taskInfo);
if (info != null) {
taskTypeName.append(info).append("、");
} else {
taskTypeName.append(taskInfo).append("、");
}
}
if (taskTypeName.length() > 0) {
taskTypeName.deleteCharAt(taskTypeName.length() - 1);
}
// 同步取消任务,非已完成的都取消 2025-10-21 18:20:06 倩倩同意
baseMapper.deleteByBizId(bizId);
}
if (taskTypeName.length() > 0) {
return "任务取消:" + taskTypeName + ";";
} else {
return null;
}
}
/** /**
* 任务推送重试 * 任务推送重试
* *
......
...@@ -23,7 +23,7 @@ import java.io.Serializable; ...@@ -23,7 +23,7 @@ import java.io.Serializable;
/** /**
* 响应瓜子 * 响应瓜子
* @author lengleng * @author hgw
*/ */
@ToString @ToString
@NoArgsConstructor @NoArgsConstructor
......
...@@ -60,6 +60,7 @@ security: ...@@ -60,6 +60,7 @@ security:
- /tgzempinfo/saveTGzEmpInfo - /tgzempinfo/saveTGzEmpInfo
- /gz/core/saveOfferInfo - /gz/core/saveOfferInfo
- /gz/core/getGzBank - /gz/core/getGzBank
- /gz/core/doCancelOfferInfo
- /fasc/api/fascCallback - /fasc/api/fascCallback
- /fasc/getFileByRequestId - /fasc/getFileByRequestId
......
...@@ -167,6 +167,17 @@ ...@@ -167,6 +167,17 @@
<include refid="tFascTemplate_where"/> <include refid="tFascTemplate_where"/>
</where> </where>
ORDER BY a.fasc_create_time ASC ORDER BY a.fasc_create_time ASC
</select>
<!--全量-->
<select id="getTFascTemplateListAll" resultMap="tFascTemplateMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_fasc_template a
<where>
1=1
<include refid="tFascTemplate_where"/>
</where>
ORDER BY a.fasc_create_time ASC
</select> </select>
<!--导出--> <!--导出-->
<select id="getTFascTemplateExport" resultMap="tFascTemplateExportMap"> <select id="getTFascTemplateExport" resultMap="tFascTemplateExportMap">
......
...@@ -135,4 +135,22 @@ ...@@ -135,4 +135,22 @@
</where> </where>
ORDER by a.biz_id asc,a.create_time asc,a.id asc ORDER by a.biz_id asc,a.create_time asc,a.id asc
</select> </select>
<!--取消OFFER,同步取消任务-->
<select id="getTGzPushEntryListForStatus" resultType="java.lang.String">
SELECT
a.task_type
FROM t_gz_push_entry a
where a.del_flag = '0' and a.biz_id = #{bizId} and a.push_status != '0'
ORDER by a.biz_id asc,a.create_time asc,a.id asc
</select>
<!--取消OFFER,同步取消任务-->
<update id="deleteByBizId" >
update t_gz_push_entry a
set a.del_flag = '1'
where a.del_flag = '0' and a.biz_id = #{bizId} and a.push_status != '0'
</update>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment