Commit 6f52fdf4 authored by hongguangwu's avatar hongguangwu

MVP1.7.16-场景码免验签

parent 1dae489c
...@@ -87,5 +87,13 @@ public class TFascCompany extends BaseEntity { ...@@ -87,5 +87,13 @@ public class TFascCompany extends BaseEntity {
@ExcelProperty("openId") @ExcelProperty("openId")
@Schema(description = "openId") @Schema(description = "openId")
private String openId; private String openId;
/**
* 场景码
*/
@ExcelAttribute(name = "场景码", maxLength = 100)
@Length(max = 100, message = "场景码不能超过100个字符")
@ExcelProperty("场景码")
@Schema(description = "场景码")
private String businessId;
} }
...@@ -163,6 +163,20 @@ public class TFascTemplate extends BaseEntity { ...@@ -163,6 +163,20 @@ public class TFascTemplate extends BaseEntity {
@ExcelProperty("必填是否已配置0未配置1部分配置2已配置") @ExcelProperty("必填是否已配置0未配置1部分配置2已配置")
@Schema(description = "必填是否已配置0未配置1部分配置2已配置") @Schema(description = "必填是否已配置0未配置1部分配置2已配置")
private String isMustEdit; private String isMustEdit;
/**
* 发起方ID
*/
@ExcelAttribute(name = "发起方ID")
@ExcelProperty("发起方ID")
@Schema(description = "发起方ID")
private String companyActorId;
/**
* 签署方ID
*/
@ExcelAttribute(name = "签署方ID")
@ExcelProperty("签署方ID")
@Schema(description = "签署方ID")
private String personActorId;
@TableField(exist = false) @TableField(exist = false)
@ExcelProperty("当前必填已配置数量") @ExcelProperty("当前必填已配置数量")
......
...@@ -243,6 +243,27 @@ public class FascUtil { ...@@ -243,6 +243,27 @@ public class FascUtil {
pushLog.setTaskStatus(res.isSuccess() ? CommonConstants.ONE_STRING : CommonConstants.TWO_STRING); pushLog.setTaskStatus(res.isSuccess() ? CommonConstants.ONE_STRING : CommonConstants.TWO_STRING);
tFascPushLogService.updateById(pushLog); tFascPushLogService.updateById(pushLog);
if (res.isSuccess() && res.getData() != null && res.getData().getActors() != null
&& !res.getData().getActors().isEmpty()) {
String companyActorId = null;
String personActorId = null;
for (SignTaskActorInfo actor : res.getData().getActors()) {
if (Common.isEmpty(companyActorId) && actor.getActorInfo() != null
&& Common.isNotNull(actor.getActorInfo().getActorType())
&& "corp".equals(actor.getActorInfo().getActorType())
&& Common.isNotNull(actor.getActorInfo().getActorId())) {
companyActorId = actor.getActorInfo().getActorId();
}
if (Common.isEmpty(personActorId) && actor.getActorInfo() != null
&& Common.isNotNull(actor.getActorInfo().getActorType())
&& "person".equals(actor.getActorInfo().getActorType())
&& Common.isNotNull(actor.getActorInfo().getActorId())) {
personActorId = actor.getActorInfo().getActorId();
}
}
template.setCompanyActorId(companyActorId);
template.setPersonActorId(personActorId);
}
if (res.isSuccess() && res.getData() != null && res.getData().getDocs() != null if (res.isSuccess() && res.getData() != null && res.getData().getDocs() != null
&& !res.getData().getDocs().isEmpty()) { && !res.getData().getDocs().isEmpty()) {
if (list == null) { if (list == null) {
...@@ -335,7 +356,7 @@ public class FascUtil { ...@@ -335,7 +356,7 @@ public class FascUtil {
createWithTemplateReq.setSignTemplateId(contract.getFadadaTemplateId()); createWithTemplateReq.setSignTemplateId(contract.getFadadaTemplateId());
// 核心代码:设置参与方列表 // 核心代码:设置参与方列表
createWithTemplateReq.setActors(this.buildActors(contract, company)); createWithTemplateReq.setActors(this.buildActors(contract, company, tFascTemplate));
// 新增推送日志 // 新增推送日志
TFascPushLog pushLog = new TFascPushLog(); TFascPushLog pushLog = new TFascPushLog();
pushLog.setTransReferenceId(company.getOpenId()); pushLog.setTransReferenceId(company.getOpenId());
...@@ -509,14 +530,18 @@ public class FascUtil { ...@@ -509,14 +530,18 @@ public class FascUtil {
/** /**
* 构建参与方列表 * 构建参与方列表
*/ */
private List<AddActorsTempInfo> buildActors(TEmployeeContractPre contract, TFascCompany company) { private List<AddActorsTempInfo> buildActors(TEmployeeContractPre contract, TFascCompany company, TFascTemplate tFascTemplate) {
List<AddActorsTempInfo> actors = new ArrayList<>(); List<AddActorsTempInfo> actors = new ArrayList<>();
// 添加企业方(甲方) if (Common.isNotNull(tFascTemplate.getCompanyActorId())) {
actors.add(buildCompanyActor(contract, company)); // 添加企业方(甲方)
actors.add(buildCompanyActor(company, tFascTemplate.getCompanyActorId()));
// 核心代码:添加员工方(乙方) }
actors.add(buildEmployeeActor(contract)); if (Common.isNotNull(tFascTemplate.getPersonActorId())) {
// 添加企业方(甲方)
// 核心代码:添加员工方(乙方)
actors.add(buildEmployeeActor(contract, tFascTemplate.getPersonActorId()));
}
return actors; return actors;
} }
...@@ -524,16 +549,14 @@ public class FascUtil { ...@@ -524,16 +549,14 @@ public class FascUtil {
/** /**
* 构建企业方参与方 * 构建企业方参与方
*/ */
private AddActorsTempInfo buildCompanyActor(TEmployeeContractPre contract, TFascCompany company) { private AddActorsTempInfo buildCompanyActor(TFascCompany company, String actorId) {
AddActorsTempInfo companyActor = new AddActorsTempInfo(); AddActorsTempInfo companyActor = new AddActorsTempInfo();
Actor actor = new Actor(); Actor actor = new Actor();
// TODO - 改造签署openID到mysql表里配置 actor.setActorId(actorId); // 与模板中的参与方标识一致
// TODO - 参与方1 在模板详情接口返回
actor.setActorId("发起企业"); // 与模板中的参与方标识一致
actor.setActorType(CacheConstants.FASC_ID_TYPE); actor.setActorType(CacheConstants.FASC_ID_TYPE);
actor.setActorName("安徽皖信人力资源管理有限公司"); actor.setActorName(company.getCompanyName());
// 权限设置 // 权限设置
actor.setPermissions(Collections.singletonList("sign")); actor.setPermissions(Collections.singletonList("sign"));
...@@ -551,19 +574,29 @@ public class FascUtil { ...@@ -551,19 +574,29 @@ public class FascUtil {
companyActor.setActor(actor); companyActor.setActor(actor);
if (Common.isNotNull(company.getBusinessId())) {
// 添加免验签
companyActor.setSignConfigInfo(buildZhang());
}
return companyActor; return companyActor;
} }
private TemplateSignConfigInfoReq buildZhang() {
TemplateSignConfigInfoReq templateSignConfigInfoReq1 = new TemplateSignConfigInfoReq() ;
templateSignConfigInfoReq1.setOrderNo(1) ;
templateSignConfigInfoReq1.setRequestVerifyFree(true) ;
return templateSignConfigInfoReq1;
}
/** /**
* 构建员工方参与方 * 构建员工方参与方
*/ */
private AddActorsTempInfo buildEmployeeActor(TEmployeeContractPre contract) { private AddActorsTempInfo buildEmployeeActor(TEmployeeContractPre contract, String actorId) {
AddActorsTempInfo employeeActor = new AddActorsTempInfo(); AddActorsTempInfo employeeActor = new AddActorsTempInfo();
Actor actor = new Actor(); Actor actor = new Actor();
// TODO - 改造签署openID到mysql表里配置 actor.setActorId(actorId); // 与模板中的参与方标识一致
// TODO - 参与方1 在模板详情接口返回
actor.setActorId("个人签署"); // 与模板中的参与方标识一致
actor.setActorType(CacheConstants.FASC_ID_TYPE_PERSON); actor.setActorType(CacheConstants.FASC_ID_TYPE_PERSON);
actor.setActorName(contract.getEmployeeName()); actor.setActorName(contract.getEmployeeName());
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="businessId" column="business_id"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.id, a.id,
...@@ -47,7 +48,8 @@ ...@@ -47,7 +48,8 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_BY, a.UPDATE_BY,
a.UPDATE_TIME a.UPDATE_TIME,
a.business_id
</sql> </sql>
<sql id="tFascCompany_where"> <sql id="tFascCompany_where">
<if test="tFascCompany != null"> <if test="tFascCompany != null">
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="companyActorId" column="company_actor_id"/>
<result property="personActorId" column="person_actor_id"/>
<!-- 非数据库字段,用来比较厚,更新日志 --> <!-- 非数据库字段,用来比较厚,更新日志 -->
<result property="isMustNow" column="is_must_now"/> <result property="isMustNow" column="is_must_now"/>
...@@ -84,7 +86,9 @@ ...@@ -84,7 +86,9 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_BY, a.UPDATE_BY,
a.UPDATE_TIME a.UPDATE_TIME,
a.company_actor_id,
a.person_actor_id
</sql> </sql>
<sql id="tFascTemplate_where"> <sql id="tFascTemplate_where">
<if test="tFascTemplate != null"> <if test="tFascTemplate != 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