Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner

This commit is contained in:
zhangchenbiao
2023-06-27 14:17:49 +08:00
11 changed files with 300 additions and 53 deletions

View File

@@ -85,6 +85,24 @@
<if test="record.updateTime != null">
update_time,
</if>
<if test="record.shopCode != null">
shop_code,
</if>
<if test="record.shopName != null">
shop_name,
</if>
<if test="record.shopId != null">
shop_id,
</if>
<if test="record.recommendPartnerId != null">
recommend_partner_id,
</if>
<if test="record.recommendPartnerName != null">
recommend_partner_name,
</if>
<if test="record.recommendPartnerMobile != null">
recommend_partner_mobile,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.partnerId != null">
@@ -117,6 +135,24 @@
<if test="record.updateTime != null">
#{record.updateTime},
</if>
<if test="record.shopCode != null">
#{record.shopCode},
</if>
<if test="record.shopName != null">
#{record.shopName},
</if>
<if test="record.shopId != null">
#{record.shopId},
</if>
<if test="record.recommendPartnerId != null">
#{record.recommendPartnerId},
</if>
<if test="record.recommendPartnerName != null">
#{record.recommendPartnerName},
</if>
<if test="record.recommendPartnerMobile != null">
#{record.recommendPartnerMobile},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
@@ -152,6 +188,24 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime},
</if>
<if test="record.shopCode != null">
shop_code = #{record.shopCode},
</if>
<if test="record.shopName != null">
shop_name = #{record.shopName},
</if>
<if test="record.shopId != null">
shop_id = #{record.shopId},
</if>
<if test="record.recommendPartnerId != null">
recommend_partner_id = #{record.recommendPartnerId},
</if>
<if test="record.recommendPartnerName != null">
recommend_partner_name = #{record.recommendPartnerName},
</if>
<if test="record.recommendPartnerMobile != null">
recommend_partner_mobile = #{record.recommendPartnerMobile},
</if>
</set>
where id = #{record.id}
</update>

View File

@@ -1,15 +0,0 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class FraSourceDO {
@ApiModelProperty("key")
private String key;
@ApiModelProperty("text")
private String text;
}

View File

@@ -42,6 +42,9 @@ public class HyPartnerCertificationInfoDO implements Serializable {
@ApiModelProperty("意向签约时间")
private Date wantSignTime;
@ApiModelProperty("数据来源")
private String dataSource;
@ApiModelProperty("加盟费")
private String partnerFee;

View File

@@ -1,9 +1,14 @@
package com.cool.store.request;
import com.cool.store.request.data.flow.IdName;
import com.cool.store.request.data.flow.KeyText;
import com.cool.store.request.data.flow.SkrRelshipProve;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @Author: young.yu
* @Date: 2023-06-14 14:18
@@ -30,23 +35,38 @@ public class CreateQualifyVerifyReq {
@ApiModelProperty(value = "面试表现记录", required = true)
private String summary;
@ApiModelProperty(value = "合作关系: 1总部下属; 2小区代直营; 3县代直营; 4县代下属; 5区代直营; 6区代下属", required = true)
private Integer partnership;
@ApiModelProperty(value = "加盟商类型", required = true)
private KeyText fraType;
@ApiModelProperty(value = "合作关系", required = true)
private KeyText partnership;
@ApiModelProperty(value = "意向人email", required = true)
private String intendedEmail;
@ApiModelProperty(value = "意向人联系地址", required = true)
private String intendedAddress;
@ApiModelProperty(value = "意向人身份证号", required = true)
private String intendedDCardNum;
@ApiModelProperty(value = "意向签约时间", required = true, example = "YYYY-MM-DD")
private String wantSignTime;
@ApiModelProperty(value = "数据来源", required = true)
private String dataSource;
@ApiModelProperty(value = "加盟费", required = true)
private String partnerFee;
private Integer partnerFee;
@ApiModelProperty(value = "保证金", required = true)
private String securityFund;
private Integer securityFund;
@ApiModelProperty(value = "技术服务费", required = true)
private String technicalServiceFee;
private Integer technicalServiceFee;
@ApiModelProperty(value = "意向金金额", required = true)
private String intentionMoney;
private Integer intentionMoney;
@ApiModelProperty(value = "意向签约人姓名", required = true)
private String intentionSignerUsername;
@@ -54,8 +74,8 @@ public class CreateQualifyVerifyReq {
@ApiModelProperty(value = "意向签约人手机号", required = true)
private String intentionSignerMobile;
@ApiModelProperty(value = "意向签约人学历: 1.初中及以下 2.高中 3.大专 4.本科 5.硕士及以上", required = true)
private String intentionEdu;
@ApiModelProperty(value = "意向签约人学历", required = true)
private KeyText intentionEdu;
@ApiModelProperty(value = "实控人姓名", required = true)
private String realControlUsername;
@@ -63,16 +83,34 @@ public class CreateQualifyVerifyReq {
@ApiModelProperty(value = "实控人身份证", required = true)
private String realControlIdcard;
@ApiModelProperty(value = "实控人与签约人关系: 1.本人 2.配偶 3.二代直系亲属 4.雇佣 5.其他", required = true)
private String signerRealControlRelation;
@ApiModelProperty(value = "实控人与签约人关系", required = true)
private KeyText signerRealControlRelation;
@ApiModelProperty(value = "其他实控人与签约人关系")
private String signerOtherRealControlRelation;
@ApiModelProperty(value = "实控人与签约人关系证明(文件上传地址,多个以英文逗号隔开)")
@ApiModelProperty(value = "实控人与签约人关系证明(文件上传地址,多个以英文逗号隔开)", required = true)
private String signerRealControlRelationCert;
@ApiModelProperty(value = "", required = true)
private IdName linkProv;
@ApiModelProperty(value = "省编码", required = true)
private String provID;
@ApiModelProperty(value = "", required = true)
private IdName linkCity;
@ApiModelProperty(value = "市编码", required = true)
private String cityID;
@ApiModelProperty(value = "所属大区", required = true)
private IdName linkOrgRegion;
@ApiModelProperty(value = "业务战区", required = true)
private IdName linkbuArea;
@ApiModelProperty(value = "实控人手机号", required = true)
private String skrPhone;
}

View File

@@ -1,9 +1,13 @@
package com.cool.store.request;
import com.cool.store.entity.FraSourceDO;
import com.cool.store.request.data.flow.IdName;
import com.cool.store.request.data.flow.KeyText;
import com.cool.store.request.data.flow.SkrRelshipProve;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @Author: young.yu
* @Date: 2023-06-14 15:06
@@ -14,14 +18,15 @@ public class RpcCreateQualifyVerifyReq {
@lombok.Data
public class Data {
@ApiModelProperty(value = "意向签约时间", required = true)
private String intendedSignDate;
@ApiModelProperty(value = "请求来源", required = true)
private FraSourceDO fraSource;
@ApiModelProperty(value = "请求来源", required = false)
private KeyText fraSource;
@ApiModelProperty(value = "保证金(元)", required = true, example = "5000")
private int amtDeposit;
private Integer amtDeposit;
@ApiModelProperty(value = "授权码", required = true)
private String authCode;
@@ -29,9 +34,72 @@ public class RpcCreateQualifyVerifyReq {
@ApiModelProperty(value = "意向签约人", required = true)
private String intendedSigner;
@ApiModelProperty(value = "手机号", required = true)
@ApiModelProperty(value = "意向签约人手机号", required = true)
private String intendedSignerTel;
@ApiModelProperty(value = "合作关系", required = true)
private KeyText partnership;
@ApiModelProperty(value = "所属大区", required = true)
private IdName linkOrgRegion;
@ApiModelProperty(value = "", required = true)
private IdName linkProv;
@ApiModelProperty(value = "省编码", required = true)
private String provID;
@ApiModelProperty(value = "", required = true)
private IdName linkCity;
@ApiModelProperty(value = "市编码", required = true)
private String cityID;
@ApiModelProperty(value = "加盟商类型", required = true)
private KeyText fraType;
@ApiModelProperty(value = "意向人email", required = true)
private String intendedEmail;
@ApiModelProperty(value = "意向人联系地址", required = true)
private String intendedAddress;
@ApiModelProperty(value = "意向人身份证号", required = true)
private String intendedDCardNum;
@ApiModelProperty(value = "签约人学历", required = true)
private KeyText signerEdu;
@ApiModelProperty(value = "实控人", required = true)
private String skrName;
@ApiModelProperty(value = "实控人身份证号", required = true)
private String skrIDCard;
@ApiModelProperty(value = "实控人与签约人关系", required = true)
private KeyText skrRelship;
@ApiModelProperty("实控人与签约人关系证明文件")
private List<SkrRelshipProve> skrRelshipProve;
@ApiModelProperty("其他实控人与签约人关系")
private String skrRelshipOther;
@ApiModelProperty(value = "加盟费(元)", required = true)
private Integer amtJoin;
@ApiModelProperty(value = "技术服务费", required = true)
private Integer amtTechSer;
@ApiModelProperty(value = "意向金金额", required = true)
private Integer amtIntended;
@ApiModelProperty(value = "业务战区", required = true)
private IdName linkbuArea;
@ApiModelProperty(value = "实控人手机号", required = true)
private String skrPhone;
}
@ApiModelProperty(value = "数据体", required = true)

View File

@@ -0,0 +1,25 @@
package com.cool.store.request.data.flow;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 800 发起审批入参用
* 对应 800 系统中需要入参格式为
* "linkProv": {
* "id": "1645610037222441004",
* "name": "广东省"
* },
* 的地方
* 暂时使用,后期应该使用各字段对应的枚举类
*/
@Data
public class IdName {
@ApiModelProperty(value = "id", required = true)
private String id;
@ApiModelProperty(value = "name", required = true)
private String name;
}

View File

@@ -0,0 +1,25 @@
package com.cool.store.request.data.flow;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 800 发起审批入参用
* 对应 800 系统中需要入参格式为
* "fraType": {
* "key": "LEGAL",
* "text": "法人"
* },
* 的地方
* 暂时使用,后期应该使用各字段对应的枚举类
*/
@Data
public class KeyText {
@ApiModelProperty(value = "id", required = true)
private String key;
@ApiModelProperty(value = "text", required = true)
private String text;
}

View File

@@ -0,0 +1,27 @@
package com.cool.store.request.data.flow;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 实控人与签约人关系证明文件
*/
@Data
public class SkrRelshipProve {
@ApiModelProperty("id")
private String id;
@ApiModelProperty("文件名")
private String name;
@ApiModelProperty("大小")
private String size;
@ApiModelProperty("文件后缀")
private String suffix;
@ApiModelProperty("文件类型")
private String type;
}

View File

@@ -19,4 +19,7 @@ public class ApplyBaseInfoVO {
@ApiModelProperty("所选省内是否含有开放城市")
private Boolean provinceHasOpenArea;
@ApiModelProperty("线索状态:0公海线索;1跟进中;2合作中;3黑名单")
private Integer lineStatus;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
@@ -22,6 +23,7 @@ import com.cool.store.request.CreateQualifyVerifyReq;
import com.cool.store.request.QualificationCallbackReq;
import com.cool.store.request.RpcCreateQualifyVerifyReq;
import com.cool.store.request.RpcGetMdmTokenReq;
import com.cool.store.request.data.flow.KeyText;
import com.cool.store.service.FlowService;
import com.cool.store.utils.PDFUtils;
import com.cool.store.utils.PassLetterUtils;
@@ -37,10 +39,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.*;
/**
* @Author: young.yu
@@ -89,13 +88,29 @@ public class FlowServiceImpl implements FlowService {
public void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException {
//1.发起加盟商资质审核
RpcCreateQualifyVerifyReq rpcRequest = new RpcCreateQualifyVerifyReq();
RpcCreateQualifyVerifyReq.Data data = new RpcCreateQualifyVerifyReq().new Data();
rpcRequest.setData(data);
FraSourceDO fraSourceDO = new FraSourceDO();
fraSourceDO.setKey("HSAYPartner");
fraSourceDO.setText("沪上阿姨合伙人");
data.setFraSource(fraSourceDO);
data.setAmtDeposit(Integer.parseInt(request.getSecurityFund()));
RpcCreateQualifyVerifyReq.Data dataBody = rpcRequest.getData();
KeyText fraSource = new KeyText();
fraSource.setKey("HSAYPartner");
fraSource.setText("沪上阿姨合伙人");
dataBody.setFraSource(fraSource);
//copy properties
BeanUtil.copyProperties(request, rpcRequest);
dataBody.setIntendedSignDate(request.getWantSignTime());
dataBody.setAmtDeposit(request.getSecurityFund());
dataBody.setIntendedSigner(request.getIntentionSignerUsername());
dataBody.setIntendedSignerTel(request.getIntentionSignerMobile());
dataBody.setSignerEdu(request.getIntentionEdu());
dataBody.setSkrName(request.getRealControlUsername());
dataBody.setSkrIDCard(request.getRealControlIdcard());
dataBody.setSkrRelship(request.getSignerRealControlRelation());
String[] split = request.getSignerRealControlRelationCert().split(",");
//TODO 文件需要通过MDM上传并获取链接
// dataBody.setSkrRelshipProve();
dataBody.setSkrRelshipOther(request.getSignerOtherRealControlRelation());
dataBody.setAmtJoin(request.getPartnerFee());
dataBody.setAmtTechSer(request.getTechnicalServiceFee());
dataBody.setAmtIntended(request.getIntentionMoney());
rpcRequest.setData(dataBody);
//获取授权码
String authCode = null;
@@ -114,13 +129,11 @@ public class FlowServiceImpl implements FlowService {
}
rpcRequest.setDingUserId(dingdingUserDO.getUserid());
authCode = generateAuthCode(jobNumber);
data.setAuthCode(authCode);
rpcRequest.getData().setAuthCode(authCode);
}
}
}
data.setIntendedSigner(request.getIntentionSignerUsername());
data.setIntendedSignerTel(request.getIntentionSignerMobile());
//通过 rpc 请求审核系统获取返回数据
Map<String, String> qualifyVerifyRespData = JSON.parseObject(createQualifyVerify(rpcRequest), new TypeReference<HashMap<String,String>>() {});
@@ -131,18 +144,19 @@ public class FlowServiceImpl implements FlowService {
partnerCertificationInfoDO.setPartnerInterviewId(Long.valueOf(request.getInterviewId()));
partnerCertificationInfoDO.setPartnership(String.valueOf(request.getPartnership()));
partnerCertificationInfoDO.setWantSignTime(DateUtil.parse(request.getWantSignTime()));
partnerCertificationInfoDO.setPartnerFee(request.getPartnerFee());
partnerCertificationInfoDO.setSecurityFund(request.getSecurityFund());
partnerCertificationInfoDO.setTechnicalServiceFee(request.getTechnicalServiceFee());
partnerCertificationInfoDO.setIntentionMoney(request.getIntentionMoney());
partnerCertificationInfoDO.setPartnerFee(request.getPartnerFee().toString());
partnerCertificationInfoDO.setSecurityFund(request.getSecurityFund().toString());
partnerCertificationInfoDO.setTechnicalServiceFee(request.getTechnicalServiceFee().toString());
partnerCertificationInfoDO.setIntentionMoney(request.getIntentionMoney().toString());
partnerCertificationInfoDO.setIntentionSignerUsername(request.getIntentionSignerUsername());
partnerCertificationInfoDO.setIntentionSignerMobile(request.getIntentionSignerMobile());
partnerCertificationInfoDO.setIntentionEdu(request.getIntentionEdu());
partnerCertificationInfoDO.setIntentionEdu(request.getIntentionEdu().toString());
partnerCertificationInfoDO.setRealControlUsername(request.getRealControlUsername());
partnerCertificationInfoDO.setRealControlIdcard(request.getRealControlIdcard());
partnerCertificationInfoDO.setSignerRealControlRelation(request.getSignerRealControlRelation());
partnerCertificationInfoDO.setSignerRealControlRelation(request.getSignerRealControlRelation().toString());
partnerCertificationInfoDO.setSignerOtherRealControlRelation(request.getSignerOtherRealControlRelation());
partnerCertificationInfoDO.setSignerRealControlRelationCert(request.getSignerRealControlRelationCert());
partnerCertificationInfoDO.setSignerRealControlRelationCert(request.getSignerRealControlRelationCert().toString());
partnerCertificationInfoDO.setCreateTime(new Date());
partnerCertificationInfoDO.setUpdateTime(new Date());
//set 资质审核流程id

View File

@@ -16,11 +16,13 @@ import com.cool.store.vo.ApplyBaseInfoVO;
import com.cool.store.vo.InviteCodeDetailVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
@Service
@Slf4j
@@ -103,6 +105,7 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
if (CollectionUtils.isNotEmpty(hyOpenAreaInfoDOS)) {
applyBaseInfoVO.setProvinceHasOpenArea(true);
}
applyBaseInfoVO.setLineStatus(hyPartnerLineInfoDO.getLineStatus());
return applyBaseInfoVO;
}
@@ -111,7 +114,9 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
hyPartnerUserInfoDO.setMobile(partnerUserInfoRequest.getMobile());
hyPartnerUserInfoDO.setLiveArea(partnerUserInfoRequest.getLiveArea());
hyPartnerUserInfoDO.setWantShopArea(partnerUserInfoRequest.getWantShopArea());
hyPartnerUserInfoDO.setAcceptAdjustType(partnerUserInfoRequest.getAcceptAdjustType());
if (!Objects.isNull(partnerUserInfoRequest.getAcceptAdjustType())){
hyPartnerUserInfoDO.setAcceptAdjustType(partnerUserInfoRequest.getAcceptAdjustType());
}
hyPartnerUserInfoDO.setInviteCode(partnerUserInfoRequest.getInviteCode());
hyPartnerUserInfoDO.setShopCode(partnerUserInfoRequest.getShopCode());
hyPartnerUserInfoDO.setShopName(partnerUserInfoRequest.getShopName());