Commit f1f354d3 authored by hongguangwu's avatar hongguangwu

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

parents 4212197a b7d51874
......@@ -507,7 +507,7 @@ public class TEmployeeContractInfo extends BaseEntity {
* @Date 14:50 2022/11/7
**/
@ExcelAttribute(name = "审核类型",readConverterExp = "0=派增,1=派减")
@Schema(description = "审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止")
@Schema(description = "审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止、5自动化派单-无需审核")
private String type;
/**
......
......@@ -88,6 +88,9 @@ public class TEmployeeContractPre extends BaseEntity {
@Schema(description = "法大大模版名称")
private String fadadaTemplate;
@Schema(description = "电子签转线下签的原因")
private String changeTypeReason;
@Schema(description = "数据来源1客户端 2客服端")
private String dataSource;
......
......@@ -49,7 +49,7 @@ public class EmployeeContractExportAuditVO implements Serializable {
* 3、合同申请处申请类型为:作废——审核类型统一为:派减-作废;终止——审核类型统一为:派减-终止;
* @Date 14:50 2022/11/7
**/
@ExcelAttribute(name = "审核类型",readConverterExp = "0=派增-社保派单,1=派增-无社保新签,2=派增-续签,3=派减-作废,4=派减-终止")
@ExcelAttribute(name = "审核类型",readConverterExp = "0=派增-社保派单,1=派增-无社保新签,2=派增-续签,3=派减-作废,4=派减-终止,5=自动化派单-无需审核")
@Schema(description = "审核类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核类型")
......
......@@ -46,14 +46,14 @@ public class EmployeeContractExportVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* @Author fxj
* @Description 0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
* @Description 0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止、5自动化派单-无需审核
* 1、增加“审核类型”,内容为:派增-社保派单、派增-无社保新签、派增-续签、派减-作废、派减-终止
* 2、社保派单过来的合同,审核类型统一为:派增-社保派单;
* 3、合同申请处申请类型为:新签(正常签订)——审核类型为:派增-无社保新签、;续签(合同未到期重新签订、离职再入职、商务合同更改)——审核类型统一为:派增-续签;
* 3、合同申请处申请类型为:作废——审核类型统一为:派减-作废;终止——审核类型统一为:派减-终止;
* @Date 14:50 2022/11/7
**/
@ExcelAttribute(name = "审核类型",readConverterExp = "0=派增-社保派单,1=派增-无社保新签,2=派增-续签,3=派减-作废,4=派减-终止")
@ExcelAttribute(name = "审核类型",readConverterExp = "0=派增-社保派单,1=派增-无社保新签,2=派增-续签,3=派减-作废,4=派减-终止,5=自动化派单-无需审核")
@Schema(description = "审核类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核类型")
......
......@@ -86,6 +86,27 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "社保缴纳地-县")
@ExcelProperty("社保缴纳地-县")
private String socialTown;
/**
* 社保缴纳地-省
*/
@ExcelAttribute(name = "社保缴纳地-省id")
@ExcelProperty("社保缴纳地-省")
@Schema(description = "社保缴纳地-省")
private String socialProvinceId;
/**
* 社保缴纳地-市
*/
@ExcelAttribute(name = "社保缴纳地-市")
@ExcelProperty("社保缴纳地-市")
@Schema(description = "社保缴纳地-市")
private String socialCityId;
/**
* 社保缴纳地-县
*/
@ExcelAttribute(name = "社保缴纳地-县")
@ExcelProperty("社保缴纳地-县")
@Schema(description = "社保缴纳地-县")
private String socialTownId;
/**
* 公积金缴纳地-省
*/
......
......@@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.fadada.api.utils.crypt.FddCryptUtil;
import com.fasc.open.api.constants.RequestConstants;
import com.fasc.open.api.exception.ApiException;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.archives.config.FascConfig;
import com.yifu.cloud.plus.v1.yifu.archives.config.WxConfig;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
......@@ -14,6 +16,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.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -23,6 +26,7 @@ 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.client.RestTemplate;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
......@@ -43,6 +47,12 @@ public class FascController {
@Autowired
private FascConfig fascConfig;
@Autowired
private WxConfig wxConfig;
@Autowired
private UpmsDaprUtils upmsDaprUtils;
private final TFascPushLogService tFascPushLogService;
private final TEmployeeContractPreService tEmployeeContractPreService;
private final TEmployeeContractInfoService tEmployeeContractInfoService;
......@@ -252,6 +262,9 @@ public class FascController {
contractInfo.setInUse(CommonConstants.ONE_STRING);
tEmployeeContractInfoService.updateById(contractInfo);
//签署失败发送企微消息
sendFddFalureInfoToWx(pre);
// 加日志
this.saveAuditLogFail(pre, "签署失败", terminationNote);
pushLog.setReturnData("签署任务参与方签署失败事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
......@@ -325,4 +338,48 @@ public class FascController {
return true;
}
/**
* 发送法大大失败提醒通知到企微
* @param pre 合同待购买
*/
private void sendFddFalureInfoToWx(TEmployeeContractPre pre) {
//获取前端客服
SysUser user;
if (Common.isEmpty(pre.getCustomerUserLoginname())) {
return;
}
R<SysUser> res = upmsDaprUtils.getSimpleUserByLoginName(pre.getCustomerUserLoginname());
if (Common.isNotNull(res) && Common.isNotNull(res.getData())) {
user = res.getData();
} else {
return;
}
StringBuilder sendUser = null;
if (Common.isNotKong(user.getWxMessage())) {
sendUser = new StringBuilder(user.getWxMessage());
}
if (sendUser != null) {
RestTemplate restTemplate = new RestTemplate();
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", "72" + pre.getId());
StringBuilder description = new StringBuilder();
String title = "作业自动化——电子合同签署超期自动撤回提醒";
description.append(pre.getEmployeeName() + "-" + pre.getEmpIdcard()+ "-" + pre.getEmpPhone() +
",电子合同签署失败").append("<br>");
description.append("请及时处理,以免产生用工风险!").append("<br>");
textcard.put("title", title);
textcard.put("url", authUrl);
textcard.put("description", description.toString());
requestMap.put("touser", sendUser);
requestMap.put("agentid", wxConfig.getAgentid());
requestMap.put("msgtype", "textcard");
requestMap.put("textcard", textcard);
// 必须加上header说明
if (!wxConfig.sendTextCard(restTemplate, requestMap)) {
wxConfig.sendTextCard(restTemplate, requestMap);
}
}
}
}
......@@ -621,6 +621,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//正常签订
tEmployeeContractInfo.setType(CommonConstants.ONE_STRING);
}
if (Common.isNotNull(tEmployeeContractInfo.getSignType()) && "0".equals(tEmployeeContractInfo.getSignType())) {
tEmployeeContractInfo.setType(CommonConstants.FIVE_STRING);
}
}
/**
......@@ -1436,8 +1439,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} else {
insert.setEmpId(project.getEmpId());
insert.setSettleDomain(project.getDeptId());
// 批量直接待审核
insert.setAuditStatus(CommonConstants.ONE_INT);
//电子签更新为签署中
if (Common.isNotNull(insert.getSignType()) && "0".equals(insert.getSignType())) {
insert.setAuditStatus(CommonConstants.FOUR_INT);
} else {
// 批量直接待审核
insert.setAuditStatus(CommonConstants.ONE_INT);
}
if (Common.isEmpty(insert.getContractTerm())
&& Common.isNotNull(insert.getContractStart())
&& Common.isNotNull(insert.getContractEnd())) {
......
......@@ -403,7 +403,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
// 更新processStatus为电子签发起失败
LambdaUpdateWrapper<TEmployeeContractPre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeContractPre::getId, contractPre.getId())
.set(TEmployeeContractPre::getProcessStatus, CommonConstants.SIX_STRING)
.set(TEmployeeContractPre::getProcessStatus, CommonConstants.FIVE_STRING)
.set(TEmployeeContractPre::getErrorInfo, errorMsg)
.set(TEmployeeContractPre::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()));
this.update(updateWrapper);
......@@ -765,7 +765,8 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
updateWrapper.eq(TEmployeeContractPre::getId, contractPre.getId())
.set(TEmployeeContractPre::getProcessStatus, CommonConstants.ONE_STRING) // 待发起
.set(TEmployeeContractPre::getSignType, CommonConstants.ONE_STRING) // 线下签
.set(TEmployeeContractPre::getRevokeReason, "超时未签署自行变更为线下签");
.set(TEmployeeContractPre::getRevokeReason, "超时未签署自行变更为线下签")
.set(TEmployeeContractPre::getChangeTypeReason, "超时未签署自行变更为线下签");
this.update(updateWrapper);
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("撤销签署");
......
......@@ -517,6 +517,7 @@
WHEN a.type =2 THEN "派增-续签"
WHEN a.type =3 THEN "派减-作废"
WHEN a.type =4 THEN "派减-终止"
WHEN a.type =5 THEN "自动化派单-无需审核"
ELSE a.type END as "type",
b.REMARK,
a.REMARK as memo,
......@@ -597,6 +598,7 @@
WHEN a.type =2 THEN "派增-续签"
WHEN a.type =3 THEN "派减-作废"
WHEN a.type =4 THEN "派减-终止"
WHEN a.type =5 THEN "自动化派单-无需审核"
ELSE a.type END as "type",
a.CREATE_TIME,
count(1) CREATE_NUM,
......
......@@ -98,6 +98,27 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("社保缴纳地-县")
@Schema(description = "社保缴纳地-县")
private String socialTown;
/**
* 社保缴纳地-省
*/
@ExcelAttribute(name = "社保缴纳地-省id")
@ExcelProperty("社保缴纳地-省")
@Schema(description = "社保缴纳地-省")
private String socialProvinceId;
/**
* 社保缴纳地-市
*/
@ExcelAttribute(name = "社保缴纳地-市")
@ExcelProperty("社保缴纳地-市")
@Schema(description = "社保缴纳地-市")
private String socialCityId;
/**
* 社保缴纳地-县
*/
@ExcelAttribute(name = "社保缴纳地-县")
@ExcelProperty("社保缴纳地-县")
@Schema(description = "社保缴纳地-县")
private String socialTownId;
/**
* 公积金缴纳地-省
*/
......
......@@ -291,6 +291,10 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
TDispatchInfoPreVo pre = new TDispatchInfoPreVo();
BeanUtils.copyProperties(preExit, pre);
if (Common.isNotNull(preExit.getExpectedCollectionTime())) {
pre.setExpectedCollectionTime(LocalDateTimeUtils.convertLDTToDate(preExit.getExpectedCollectionTime()));
pre.setExpectedConfirmTime(LocalDateTimeUtils.convertLDTToDate(preExit.getExpectedConfirmTime()));
}
preSocialListVo.setDispatchInfoPreVo(pre);
}
return preSocialListVo;
......
......@@ -11,8 +11,11 @@
<result property="processStatus" column="PROCESS_STATUS"/>
<result property="deptId" column="DEPT_ID"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialProvinceId" column="SOCIAL_PROVINCE_ID"/>
<result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialCityId" column="SOCIAL_CITY_ID"/>
<result property="socialTown" column="SOCIAL_TOWN"/>
<result property="socialTownId" column="SOCIAL_TOWN_ID"/>
<result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/>
......@@ -135,7 +138,8 @@
a.CREATE_NAME,
a.UPDATE_TIME,
a.CREATE_TIME,
a.DELETE_FLAG,error_info,error_time,a.DISPATCHER_ID,a.error_back_info,a.position,SOCIAL_FUND_ID,a.phone
a.DELETE_FLAG,error_info,error_time,a.DISPATCHER_ID,a.error_back_info,a.position,SOCIAL_FUND_ID,a.phone,
a.SOCIAL_PROVINCE_ID,a.SOCIAL_CITY_ID,a.SOCIAL_TOWN_ID
</sql>
<sql id="tDispatchInfoPre_where">
<if test="tDispatchInfoPre != null">
......
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