Merge #26 into master from cc_20260105_partner
feat:测试 * cc_20260105_partner: (8 commits squashed) - feat:加盟商意向书字段调整 - feat:意向审核 - feat:加盟商意向申请 - feat:新增其他备注 - feat:返回信息缺失 - feat:资质阶段审核完成才回成为加盟商 - feat:大区查询阶段状态是6 - feat:测试 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/26
This commit is contained in:
@@ -14,7 +14,7 @@ import java.util.stream.Collectors;
|
||||
public enum UserRoleEnum {
|
||||
INVESTMENT_COMMISSIONER(100000000L, "招商专员"),
|
||||
SELECT_SITE_COMMISSIONER(110000000L, "选址专员"),
|
||||
REGION_MANAGER(120000000L, "大区执行总经理"),
|
||||
REGION_MANAGER(120000000L, "招商大区老总"),
|
||||
THEATER_MANAGER(130000000L, "战区经理"),
|
||||
OPERATIONS_MANAGER(140000000L, "营运经理"),
|
||||
TRAINER(150000000L, "训练"),
|
||||
|
||||
@@ -9,7 +9,8 @@ public enum WorkflowSubStageStatusEnum {
|
||||
|
||||
//意向申请
|
||||
INTENT_0(0,"待提交"),
|
||||
INTENT_5(5,"待审核"),
|
||||
INTENT_5(5,"待招商经理审核"),
|
||||
INTENT_6(6,"待招商大区老总审核"),
|
||||
INTENT_7(7,"未通过"),
|
||||
|
||||
//缴纳意向金
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -72,7 +73,7 @@ public class LineInfoDAO {
|
||||
return lineInfoMapper.updateByPrimaryKeySelective(param);
|
||||
}
|
||||
|
||||
public Integer updateWorkflowStage(Long lineId, WorkflowSubStageEnum workflowSubStage, WorkflowSubStageStatusEnum workflowSubStageStatus,String userId) {
|
||||
public Integer updateWorkflowStage(Long lineId, WorkflowSubStageEnum workflowSubStage, WorkflowSubStageStatusEnum workflowSubStageStatus,String userId,Boolean flag) {
|
||||
if(Objects.isNull(workflowSubStageStatus)){
|
||||
log.info("更新线索阶段,子阶段 和 子阶段状态不能同时为空");
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
@@ -85,8 +86,10 @@ public class LineInfoDAO {
|
||||
if(StringUtils.isNotEmpty(userId)){
|
||||
lineInfo.setUpdateUserId(userId);
|
||||
}
|
||||
//准加盟商
|
||||
lineInfo.setJoinStatus(CommonConstants.ONE);
|
||||
//资质审核阶段完成 才会到成为加盟商
|
||||
if (flag){
|
||||
lineInfo.setJoinStatus(CommonConstants.ONE);
|
||||
}
|
||||
lineInfo.setPartnerNum(RandomEightCharCodeUtils.getCode());
|
||||
lineInfo.setWorkflowSubStageStatus(workflowSubStageStatus.getCode());
|
||||
return lineInfoMapper.updateByPrimaryKeySelective(lineInfo);
|
||||
@@ -119,11 +122,11 @@ public class LineInfoDAO {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<LineInfoDO> listByInvestmentManager(String investmentManagerUserId,List<Integer> subStageStatus,String keyword) {
|
||||
if (StringUtils.isBlank(investmentManagerUserId)){
|
||||
return null;
|
||||
public List<LineInfoDO> listByInvestmentManager(String investmentManagerUserId,List<Integer> subStageStatus,String keyword,List<String> authRegionIds) {
|
||||
if (StringUtils.isBlank(investmentManagerUserId)&&CollectionUtils.isEmpty(authRegionIds)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<LineInfoDO> lineInfo = lineInfoMapper.listByInvestmentManager(investmentManagerUserId,subStageStatus,keyword);
|
||||
List<LineInfoDO> lineInfo = lineInfoMapper.listByInvestmentManager(investmentManagerUserId,subStageStatus,keyword, authRegionIds);
|
||||
return lineInfo;
|
||||
}
|
||||
public List<LineInfoDO> listByInterview(String interviewId, Integer interviewType,List<Integer> pendingInterviewStatusList,
|
||||
|
||||
@@ -29,7 +29,10 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
* @param investmentManagerUserId
|
||||
* @return
|
||||
*/
|
||||
List<LineInfoDO> listByInvestmentManager(@Param("investmentManagerUserId") String investmentManagerUserId, @Param("codes") List<Integer> codes,@Param("keyword")String keyword);
|
||||
List<LineInfoDO> listByInvestmentManager(@Param("investmentManagerUserId") String investmentManagerUserId,
|
||||
@Param("codes") List<Integer> codes,
|
||||
@Param("keyword")String keyword,
|
||||
@Param("authRegionIds") List<String> authRegionIds);
|
||||
|
||||
/**
|
||||
* 面试官待处理
|
||||
|
||||
@@ -366,6 +366,11 @@
|
||||
<if test="keyword !=null and keyword !=''">
|
||||
and (username like concat('%',#{keyword},'%') or mobile like concat('%',#{keyword},'%'))
|
||||
</if>
|
||||
<if test="authRegionIds !=null and authRegionIds.size>0">
|
||||
<foreach collection="authRegionIds" item="regionId" open="and invest_region_id in (" close=")" separator=",">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by update_time desc
|
||||
</select>
|
||||
|
||||
|
||||
@@ -40,6 +40,12 @@
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="electronic_email" jdbcType="VARCHAR" property="electronicEmail" />
|
||||
<result column="info_source" jdbcType="VARCHAR" property="infoSource" />
|
||||
<result column="other_remark" jdbcType="VARCHAR" property="otherRemark" />
|
||||
<result column="capital_strength" jdbcType="INTEGER" property="capitalStrength" />
|
||||
<result column="has_retail_experience" jdbcType="INTEGER" property="hasRetailExperience" />
|
||||
<result column="willing_station_duration" jdbcType="INTEGER" property="willingStationDuration" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertOrUpdate" keyProperty="id" parameterType="com.cool.store.entity.QualificationsInfoDO" useGeneratedKeys="true">
|
||||
@@ -76,7 +82,12 @@
|
||||
<if test="request.financialManagerName != null">financial_manager_name,</if>
|
||||
<if test="request.financialManagerMobile != null">financial_manager_mobile,</if>
|
||||
<if test="request.businessLicense != null">business_license,</if>
|
||||
<if test="request.unifiedSocialCreditCode != null">unified_social_credit_code,</if>
|
||||
<if test="request.electronicEmail != null">electronic_email,</if>
|
||||
<if test="request.infoSource != null">info_source,</if>
|
||||
<if test="request.otherRemark != null">other_remark,</if>
|
||||
<if test="request.capitalStrength != null">capital_strength,</if>
|
||||
<if test="request.hasRetailExperience != null">has_retail_experience,</if>
|
||||
<if test="request.willingStationDuration != null">willing_station_duration,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="request.auditId != null">#{request.auditId},</if>
|
||||
@@ -111,6 +122,12 @@
|
||||
<if test="request.financialManagerMobile != null">#{request.financialManagerMobile},</if>
|
||||
<if test="request.businessLicense != null">#{request.businessLicense},</if>
|
||||
<if test="request.unifiedSocialCreditCode != null">#{request.unifiedSocialCreditCode},</if>
|
||||
<if test="request.electronicEmail != null">#{request.electronicEmail},</if>
|
||||
<if test="request.infoSource != null">#{request.infoSource},</if>
|
||||
<if test="request.otherRemark != null">#{request.otherRemark},</if>
|
||||
<if test="request.capitalStrength != null">#{request.capitalStrength},</if>
|
||||
<if test="request.hasRetailExperience != null">#{request.hasRetailExperience},</if>
|
||||
<if test="request.willingStationDuration != null">#{request.willingStationDuration},</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
@@ -146,6 +163,13 @@
|
||||
<if test="request.financialManagerMobile != null">financial_manager_mobile = #{request.financialManagerMobile},</if>
|
||||
<if test="request.businessLicense != null">business_license = #{request.businessLicense},</if>
|
||||
<if test="request.unifiedSocialCreditCode != null">unified_social_credit_code = #{request.unifiedSocialCreditCode},</if>
|
||||
<if test="request.electronicEmail != null">electronic_email = #{request.electronicEmail},</if>
|
||||
<if test="request.infoSource != null">info_source = #{request.infoSource},</if>
|
||||
<if test="request.otherRemark != null">other_remark = #{request.otherRemark},</if>
|
||||
<if test="request.capitalStrength != null">capital_strength = #{request.capitalStrength},</if>
|
||||
<if test="request.hasRetailExperience != null">has_retail_experience = #{request.hasRetailExperience},</if>
|
||||
<if test="request.willingStationDuration != null">willing_station_duration = #{request.willingStationDuration},</if>
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -215,4 +215,23 @@ public class QualificationsInfoDO {
|
||||
@Column(name = "unified_social_credit_code")
|
||||
private String unifiedSocialCreditCode;
|
||||
|
||||
@Column(name = "electronic_email")
|
||||
private String electronicEmail;
|
||||
|
||||
@Column(name = "info_source")
|
||||
private String infoSource;
|
||||
|
||||
@Column(name = "capital_strength")
|
||||
private Integer capitalStrength;
|
||||
|
||||
@Column(name = "has_retail_experience")
|
||||
private Integer hasRetailExperience;
|
||||
|
||||
@Column(name = "willing_station_duration")
|
||||
private Integer willingStationDuration;
|
||||
|
||||
@Column(name = "other_remark")
|
||||
private String otherRemark;
|
||||
|
||||
|
||||
}
|
||||
@@ -106,6 +106,25 @@ public class JoinIntentionRequest {
|
||||
@ApiModelProperty("督导")
|
||||
private String supervisor;
|
||||
|
||||
@ApiModelProperty("电子邮件")
|
||||
private String electronicEmail;
|
||||
|
||||
@ApiModelProperty("信息来源")
|
||||
private String infoSource;
|
||||
|
||||
@ApiModelProperty("信息来源选择其他时 可输入")
|
||||
private String otherRemark;
|
||||
|
||||
@ApiModelProperty("资金实力")
|
||||
private Integer capitalStrength;
|
||||
|
||||
@ApiModelProperty("是否有从事零售业经验")
|
||||
private Integer hasRetailExperience;
|
||||
|
||||
@ApiModelProperty("是否愿意驻点大于等于90小时")
|
||||
private Integer willingStationDuration;
|
||||
|
||||
|
||||
public LineInfoDO toLineInfoDO() {
|
||||
LineInfoDO lineInfoDO = new LineInfoDO();
|
||||
lineInfoDO.setPartnerId(this.partnerId);
|
||||
@@ -158,6 +177,12 @@ public class JoinIntentionRequest {
|
||||
qualificationsInfoDO.setFinancialManagerName(this.financialManagerName);
|
||||
qualificationsInfoDO.setFinancialManagerMobile(this.financialManagerMobile);
|
||||
qualificationsInfoDO.setBusinessLicense(this.businessLicense);
|
||||
qualificationsInfoDO.setElectronicEmail(this.electronicEmail);
|
||||
qualificationsInfoDO.setInfoSource(this.infoSource);
|
||||
qualificationsInfoDO.setCapitalStrength(this.capitalStrength);
|
||||
qualificationsInfoDO.setHasRetailExperience(this.hasRetailExperience);
|
||||
qualificationsInfoDO.setWillingStationDuration(this.willingStationDuration);
|
||||
qualificationsInfoDO.setOtherRemark(this.otherRemark);
|
||||
return qualificationsInfoDO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.cool.store.entity.QualificationsInfoDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -111,6 +112,24 @@ public class PartnerBaseInfoVO {
|
||||
@ApiModelProperty("督导手机号")
|
||||
private String supervisorMobile;
|
||||
|
||||
@Column(name = "电子邮件")
|
||||
private String electronicEmail;
|
||||
|
||||
@Column(name = "信息来源 字典")
|
||||
private String infoSource;
|
||||
|
||||
@Column(name = "资金实力(万元)")
|
||||
private Integer capitalStrength;
|
||||
|
||||
@Column(name = "是否有从事零售业的经营经验:0-否,1-是")
|
||||
private Integer hasRetailExperience;
|
||||
|
||||
@Column(name = "是否愿意驻点时长≥90小时:0-否,1-是")
|
||||
private Integer willingStationDuration;
|
||||
|
||||
@Column(name = "其他备注")
|
||||
private String otherRemark;
|
||||
|
||||
|
||||
public static PartnerBaseInfoVO from(QualificationsInfoDO qualificationsInfoDO, LineInfoDO lineInfoDO) {
|
||||
if (Objects.isNull(qualificationsInfoDO) && Objects.isNull(lineInfoDO)) {
|
||||
@@ -156,6 +175,13 @@ public class PartnerBaseInfoVO {
|
||||
partnerBaseInfoVO.setSex(Integer.valueOf(lineInfoDO.getSex()));
|
||||
partnerBaseInfoVO.setAreaCode(String.valueOf(lineInfoDO.getWantShopAreaId()));
|
||||
partnerBaseInfoVO.setBigRegionId(lineInfoDO.getBigRegionId());
|
||||
|
||||
partnerBaseInfoVO.setElectronicEmail(qualificationsInfoDO.getElectronicEmail());
|
||||
partnerBaseInfoVO.setInfoSource(qualificationsInfoDO.getInfoSource());
|
||||
partnerBaseInfoVO.setCapitalStrength(qualificationsInfoDO.getCapitalStrength());
|
||||
partnerBaseInfoVO.setHasRetailExperience(qualificationsInfoDO.getHasRetailExperience());
|
||||
partnerBaseInfoVO.setWillingStationDuration(qualificationsInfoDO.getWillingStationDuration());
|
||||
partnerBaseInfoVO.setOtherRemark(qualificationsInfoDO.getOtherRemark());
|
||||
return partnerBaseInfoVO;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,18 +80,18 @@ public class BankServiceImpl extends LineFlowService implements BankService {
|
||||
|
||||
@Override
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
||||
redisUtilPool.delKey(key);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_6,
|
||||
map);
|
||||
// WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
// WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
// //更新线索阶段
|
||||
// lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
// String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
||||
// redisUtilPool.delKey(key);
|
||||
// HashMap<String, String> map = new HashMap<>();
|
||||
// map.put("partnerUsername",lineInfo.getUsername());
|
||||
// map.put("partnerMobile",lineInfo.getMobile());
|
||||
// commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
// MessageEnum.MESSAGE_6,
|
||||
// map);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.cool.store.enums.WorkflowSubStageStatusEnum.INTENT_5;
|
||||
import static com.cool.store.enums.WorkflowSubStageStatusEnum.*;
|
||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
import static com.cool.store.utils.poi.DateUtils.SPECIAL_DATE_START;
|
||||
import static com.cool.store.utils.poi.DateUtils.YYYY_MM_DD_HH_MM_SS;
|
||||
@@ -107,8 +107,18 @@ public class DeskServiceImpl implements DeskService {
|
||||
|
||||
@Override
|
||||
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize, String userId, String keyword) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId, Arrays.asList(INTENT_5.getCode()), keyword);
|
||||
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(userId);
|
||||
List<LineInfoDO> lineInfoDOS = null;
|
||||
if (userRoleIds.contains(UserRoleEnum.REGION_MANAGER.getCode())){
|
||||
//大区总 根据管辖查询
|
||||
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdByUserId(userId);
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
lineInfoDOS = lineInfoDAO.listByInvestmentManager(null, Arrays.asList(INTENT_6.getCode()), keyword,authRegionIds);
|
||||
}else {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId, Arrays.asList(INTENT_5.getCode()), keyword,null);
|
||||
}
|
||||
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
@@ -135,7 +145,7 @@ public class DeskServiceImpl implements DeskService {
|
||||
@Override
|
||||
public PageInfo<PayStagePendingVO> payStagePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user, String keyword) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(), Arrays.asList(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()), keyword);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(), Arrays.asList(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()), keyword,null);
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
@@ -165,7 +175,7 @@ public class DeskServiceImpl implements DeskService {
|
||||
public PageInfo<SigningPendingVO> signingPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user, String keyword) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(),
|
||||
Arrays.asList(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode()), keyword);
|
||||
Arrays.asList(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode()), keyword,null);
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
|
||||
@@ -142,7 +142,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
public Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
if (!lineInfo.getWorkflowStage().equals(WorkflowStageEnum.INTENT.getCode())){
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
|
||||
@@ -85,15 +85,6 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
lineInfoParam.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||
lineInfoParam.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
||||
lineInfoParam.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
||||
// if ((Objects.nonNull(request.getAreaCode()) && Objects.nonNull(lineInfoDO) && StringUtils.isBlank(lineInfoDO.getInvestmentManager())) || (Objects.isNull(lineInfoDO))) {
|
||||
// EnterpriseUserDO userByRoleNameAndAreaId = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.SUPERVISION, Long.valueOf(request.getAreaCode()));
|
||||
// lineInfoParam.setInvestmentManager(userByRoleNameAndAreaId.getUserId());
|
||||
// }
|
||||
//强加盟 前期不确定意向区域
|
||||
// if (lineInfoParam.getWantShopAreaId() != null&&lineInfoDO.getJoinMode()==1) {
|
||||
// Long regionId = regionAreaConfigDao.getByWantShopAreaId(lineInfoParam.getWantShopAreaId());
|
||||
// lineInfoParam.setRegionId(regionId);
|
||||
// }
|
||||
if (StringUtils.isBlank(lineInfoParam.getInvestmentManager()) &&StringUtils.isBlank(lineInfoDO.getInvestmentManager())) {
|
||||
lineInfoParam.setFranchiseBrand(String.valueOf(FranchiseBrandEnum.ZXJP.getCode()));
|
||||
lineInfoParam.setLineStatus(0);
|
||||
@@ -116,32 +107,46 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
public Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
WorkflowSubStageEnum nextStage = null;
|
||||
WorkflowSubStageStatusEnum nextStageStatus = null;
|
||||
Integer workflowSubStageStatus = lineInfo.getWorkflowSubStageStatus();
|
||||
Boolean flag = false;
|
||||
if (WorkflowSubStageStatusEnum.INTENT_5.getCode().equals(workflowSubStageStatus)){
|
||||
//如果状态为待加盟商审核 则下一阶段不变
|
||||
nextStage = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
nextStageStatus = WorkflowSubStageStatusEnum.INTENT_6;
|
||||
}else {
|
||||
//如果状态为待大区总审核
|
||||
nextStage = workflowSubStageEnum.getNextStage();
|
||||
nextStageStatus = nextStage.getInitStatus();
|
||||
flag = Boolean.TRUE;
|
||||
}
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStageStatus, userId,flag);
|
||||
//更新加盟问卷信息
|
||||
qualificationsInfoDAO.updateAuditIdByLineId(auditId, lineInfo.getId());
|
||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfo.getId());
|
||||
if (StringUtils.isBlank(qualificationsInfoDO.getIdCardNo()) || qualificationsInfoDO.getIdCardNo().length() < 6) {
|
||||
throw new ServiceException(ErrorCodeEnum.CREATE_PASSWORD_FAIL);
|
||||
if ( flag ){
|
||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfo.getId());
|
||||
if (StringUtils.isBlank(qualificationsInfoDO.getIdCardNo()) || qualificationsInfoDO.getIdCardNo().length() < 6) {
|
||||
throw new ServiceException(ErrorCodeEnum.CREATE_PASSWORD_FAIL);
|
||||
}
|
||||
String substring = qualificationsInfoDO.getIdCardNo().substring(qualificationsInfoDO.getIdCardNo().length() - 6);
|
||||
//生成密码和盐值
|
||||
byte[] saltBytes = PasswordUtil.generateSalt();
|
||||
String salt = PasswordUtil.bytesToHex(saltBytes);
|
||||
String password = PasswordUtil.encryptPassword(substring, salt);
|
||||
GetPasswordDTO getPasswordDTO = new GetPasswordDTO();
|
||||
getPasswordDTO.setPassword(substring);
|
||||
String downstreamSystemSecondaryPassword = thirdXinGuanJiaService.getPassword(getPasswordDTO);
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
||||
hyPartnerUserInfoDO.setDownstreamSystemPassword(password);
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSecondaryPassword(downstreamSystemSecondaryPassword);
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSalting(salt);
|
||||
hyPartnerUserInfoDO.setUpdateTime(new Date());
|
||||
hyPartnerUserInfoDAO.updatePasswordByPartnerId(hyPartnerUserInfoDO);
|
||||
}
|
||||
String substring = qualificationsInfoDO.getIdCardNo().substring(qualificationsInfoDO.getIdCardNo().length() - 6);
|
||||
//生成密码和盐值
|
||||
byte[] saltBytes = PasswordUtil.generateSalt();
|
||||
String salt = PasswordUtil.bytesToHex(saltBytes);
|
||||
String password = PasswordUtil.encryptPassword(substring, salt);
|
||||
GetPasswordDTO getPasswordDTO = new GetPasswordDTO();
|
||||
getPasswordDTO.setPassword(substring);
|
||||
String downstreamSystemSecondaryPassword = thirdXinGuanJiaService.getPassword(getPasswordDTO);
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
||||
hyPartnerUserInfoDO.setDownstreamSystemPassword(password);
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSecondaryPassword(downstreamSystemSecondaryPassword);
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSalting(salt);
|
||||
hyPartnerUserInfoDO.setUpdateTime(new Date());
|
||||
hyPartnerUserInfoDAO.updatePasswordByPartnerId(hyPartnerUserInfoDO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -804,6 +804,10 @@ public class ShopServiceImpl implements ShopService {
|
||||
}
|
||||
return userList;
|
||||
}
|
||||
List<Integer> bigRegionManagerList = Arrays.asList(INTENT_6.getCode());
|
||||
if (bigRegionManagerList.contains(lineInfo.getWorkflowSubStageStatus())) {
|
||||
return getUsersByRolesAndRegion(Arrays.asList(REGION_MANAGER), lineInfo.getInvestRegionId());
|
||||
}
|
||||
return userList;
|
||||
}
|
||||
|
||||
|
||||
@@ -168,10 +168,10 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
|
||||
@Override
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
// WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
// WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
// //更新线索阶段
|
||||
// lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,22 +27,22 @@ public class KdzApiController {
|
||||
@Resource
|
||||
KdzApiService kdzApiService;
|
||||
|
||||
@ApiOperation("审核结果")
|
||||
@PostMapping("/audit/result")
|
||||
public ResponseResult<Boolean> auditResult(@PathVariable(value = "enterprise-id") String eid,
|
||||
@RequestBody XfsgOpenApiRequest request) {
|
||||
log.info("auditResult requestBody :{}", JSONObject.toJSONString(request));
|
||||
if (!verifyMD5(request, eid)) {
|
||||
log.error("验签失败,request:{};eid:{}", JSONObject.toJSONString(request), eid);
|
||||
return ResponseResult.fail(ErrorCodeEnum.VERIFY_MD5_FALSE);
|
||||
}
|
||||
if (eid == null || request.getBizContent() == null) {
|
||||
log.error("参数校验失败,BizContent:{}", JSONObject.toJSONString(request.getBizContent()));
|
||||
return ResponseResult.fail(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
AuditResultRequest auditResultRequest = JSONObject.parseObject(request.getBizContent(), AuditResultRequest.class);
|
||||
return ResponseResult.success(kdzApiService.auditResult(auditResultRequest));
|
||||
}
|
||||
// @ApiOperation("审核结果")
|
||||
// @PostMapping("/audit/result")
|
||||
// public ResponseResult<Boolean> auditResult(@PathVariable(value = "enterprise-id") String eid,
|
||||
// @RequestBody XfsgOpenApiRequest request) {
|
||||
// log.info("auditResult requestBody :{}", JSONObject.toJSONString(request));
|
||||
// if (!verifyMD5(request, eid)) {
|
||||
// log.error("验签失败,request:{};eid:{}", JSONObject.toJSONString(request), eid);
|
||||
// return ResponseResult.fail(ErrorCodeEnum.VERIFY_MD5_FALSE);
|
||||
// }
|
||||
// if (eid == null || request.getBizContent() == null) {
|
||||
// log.error("参数校验失败,BizContent:{}", JSONObject.toJSONString(request.getBizContent()));
|
||||
// return ResponseResult.fail(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
// }
|
||||
// AuditResultRequest auditResultRequest = JSONObject.parseObject(request.getBizContent(), AuditResultRequest.class);
|
||||
// return ResponseResult.success(kdzApiService.auditResult(auditResultRequest));
|
||||
// }
|
||||
|
||||
@ApiOperation("证照信息回调")
|
||||
@PostMapping("/license")
|
||||
|
||||
Reference in New Issue
Block a user