Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -52,6 +52,7 @@ public enum ErrorCodeEnum {
|
|||||||
GET_PHONENUMBER_INFO_ERROR(1021079, "手机号归属地获取异常", null),
|
GET_PHONENUMBER_INFO_ERROR(1021079, "手机号归属地获取异常", null),
|
||||||
IDENTITY_CARD_PARSE_FAIL(1021080, "身份证解析失败", null),
|
IDENTITY_CARD_PARSE_FAIL(1021080, "身份证解析失败", null),
|
||||||
WECHAT_BIND_OTHER_MOBILE(1021081, "授权号码有误,请核对", null),
|
WECHAT_BIND_OTHER_MOBILE(1021081, "授权号码有误,请核对", null),
|
||||||
|
BUSINESS_LICENSE_PARSE_FAIL(1021082, "营业证照解析失败", null),
|
||||||
PARAMS_REQUIRED(400002, "参数缺失!", null),
|
PARAMS_REQUIRED(400002, "参数缺失!", null),
|
||||||
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
|
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
|
||||||
PARENT_NODE_NOT_EXIST(400002, "父节点不存在", null),
|
PARENT_NODE_NOT_EXIST(400002, "父节点不存在", null),
|
||||||
@@ -78,31 +79,31 @@ public enum ErrorCodeEnum {
|
|||||||
TIME_OCCUPIED(500018, "预约时间被占用", null),
|
TIME_OCCUPIED(500018, "预约时间被占用", null),
|
||||||
|
|
||||||
|
|
||||||
INTERVIEW_ENTER_FAIL(1021101, "进入面试间失败", null),
|
INTERVIEW_ENTER_FAIL(1021101, "进入面审间失败", null),
|
||||||
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),
|
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),
|
||||||
INTERVIEW_NOT_EXIST(1021103, "面试信息不存在!", null),
|
INTERVIEW_NOT_EXIST(1021103, "面审信息不存在!", null),
|
||||||
INTERVIEW_AND_PARTNER_ID_IS_NULL(1021104, "加盟商用户ID&线索ID和面试官ID不能同时为空!", null),
|
INTERVIEW_AND_PARTNER_ID_IS_NULL(1021104, "加盟商用户ID&线索ID和面审官ID不能同时为空!", null),
|
||||||
INTERVIEW_PLAN_IS_NULL(1021105, "未查询到相关面试安排!", null),
|
INTERVIEW_PLAN_IS_NULL(1021105, "未查询到相关面审安排!", null),
|
||||||
DATE_PARAMS_IS_ERROR(1021106, "日期参数错误!", null),
|
DATE_PARAMS_IS_ERROR(1021106, "日期参数错误!", null),
|
||||||
INTERVIEW_PLAN_NOT_EXIST(1021107, "面试计划不存在!", null),
|
INTERVIEW_PLAN_NOT_EXIST(1021107, "面审计划不存在!", null),
|
||||||
FEISHU_DELETE_SCHEDULE_ERROR(1021108, "删除原面试安排失败!", null),
|
FEISHU_DELETE_SCHEDULE_ERROR(1021108, "删除原面审安排失败!", null),
|
||||||
CREATE_CALENDAR_EVENT_FAIL(1021109, "创建面试安排失败!", null),
|
CREATE_CALENDAR_EVENT_FAIL(1021109, "创建面审安排失败!", null),
|
||||||
FEISHU_UPDATE_SCHEDULE_ERROR(1021110, "修改面试安排失败!", null),
|
FEISHU_UPDATE_SCHEDULE_ERROR(1021110, "修改面审安排失败!", null),
|
||||||
INTERVIEW_STATUS_ERROR(1021111, "当前面试状态不允许该操作!", null),
|
INTERVIEW_STATUS_ERROR(1021111, "当前面审状态不允许该操作!", null),
|
||||||
INTERVIEW_PLAN_ALREADY_EXIST(1021112, "面试计划已存在,请勿重复申请!", null),
|
INTERVIEW_PLAN_ALREADY_EXIST(1021112, "面审计划已存在,请勿重复申请!", null),
|
||||||
INTERVIEW_LINE_ID_IS_NULL(1021113, "线索id为空!", null),
|
INTERVIEW_LINE_ID_IS_NULL(1021113, "线索id为空!", null),
|
||||||
INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE(1021114, "当前预约时间不可用,请和线索用户协商其他时间后确定预约时间\n面试人:{0} 手机号:{1}", null),
|
INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE(1021114, "当前预约时间不可用,请和线索用户协商其他时间后确定预约时间\n面审人:{0} 手机号:{1}", null),
|
||||||
INTERVIEW_PARTNER_NOT_EXIST(1021115, "线索下的加盟商不存在!", null),
|
INTERVIEW_PARTNER_NOT_EXIST(1021115, "线索下的加盟商不存在!", null),
|
||||||
INTERVIEW_STATUS_NOT_TRANSFER(1021116, "当前面试状态不允许转让! 面试状态:{0}", null),
|
INTERVIEW_STATUS_NOT_TRANSFER(1021116, "当前面审状态不允许转让! 面审状态:{0}", null),
|
||||||
MOBILE_WECHAT_EXIST(1021116, "此号码已绑定其他微信", null),
|
MOBILE_WECHAT_EXIST(1021116, "此号码已绑定其他微信", null),
|
||||||
|
|
||||||
ROOM_STATUS_ERROR(10211156, "当前面试房间状态不允许进行该操作!", null),
|
ROOM_STATUS_ERROR(10211156, "当前面审房间状态不允许进行该操作!", null),
|
||||||
MOBILE_APP_NOT_ONLINE_ERROR(10211157, "呼叫失败,请确认呼出号码正确并检查是否安装并打开呼叫插件", null),
|
MOBILE_APP_NOT_ONLINE_ERROR(10211157, "呼叫失败,请确认呼出号码正确并检查是否安装并打开呼叫插件", null),
|
||||||
CALL_RECORD_NOT_EXIST_ERROR(10211158, "通话记录不存在!", null),
|
CALL_RECORD_NOT_EXIST_ERROR(10211158, "通话记录不存在!", null),
|
||||||
CALL_UP_ERROR(10211159, "拨出电话异常!", null),
|
CALL_UP_ERROR(10211159, "拨出电话异常!", null),
|
||||||
CREATE_CALL_REQUEST_ERROR(10211160, "创建电话请求失败!", null),
|
CREATE_CALL_REQUEST_ERROR(10211160, "创建电话请求失败!", null),
|
||||||
|
|
||||||
CREATE_APPOINTMENT_TIME_ERROR(10211161, "当前时间不可预约面试,请选择其他时间", null),
|
CREATE_APPOINTMENT_TIME_ERROR(10211161, "当前时间不可预约面审,请选择其他时间", null),
|
||||||
|
|
||||||
USER_CHANNEL_NOT_EXISTS(10211162, "当前用户渠道不存在", null),
|
USER_CHANNEL_NOT_EXISTS(10211162, "当前用户渠道不存在", null),
|
||||||
LINE_ALREADY_EXISTS(10211163, "该线索已存在,跟进人为{0}", null),
|
LINE_ALREADY_EXISTS(10211163, "该线索已存在,跟进人为{0}", null),
|
||||||
@@ -129,7 +130,7 @@ public enum ErrorCodeEnum {
|
|||||||
EXHIBITION_NOT_EXIST(106003, "会销不存在或被删除", null),
|
EXHIBITION_NOT_EXIST(106003, "会销不存在或被删除", null),
|
||||||
EXHIBITION_NOT_SIGNED(106004, "线索未进行会销签到", null),
|
EXHIBITION_NOT_SIGNED(106004, "线索未进行会销签到", null),
|
||||||
EXHIBITION_NOT_SUBMIT_INTENTION(106005, "线索未提交意向申请", null),
|
EXHIBITION_NOT_SUBMIT_INTENTION(106005, "线索未提交意向申请", null),
|
||||||
EXHIBITION_LINE_INTERVIEWED(106006, "线索已预约面试", null),
|
EXHIBITION_LINE_INTERVIEWED(106006, "线索已预约面审", null),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public enum InterviewTypeEnum {
|
public enum InterviewTypeEnum {
|
||||||
|
|
||||||
MEET(0, "面谈", 120, 8, 19),
|
MEET(0, "面谈", 120, 9, 19),
|
||||||
|
|
||||||
INTERVIEW(1, "一面", 30, 9, 18),
|
INTERVIEW(1, "一面", 30, 9, 18),
|
||||||
|
|
||||||
@@ -91,4 +91,17 @@ public enum InterviewTypeEnum {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static WorkflowSubStageStatusEnum getWorkflowSubStageStatus(InterviewTypeEnum interviewType){
|
||||||
|
if(MEET.equals(interviewType)){
|
||||||
|
return WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_15;
|
||||||
|
}
|
||||||
|
if(INTERVIEW.equals(interviewType)){
|
||||||
|
return WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_30;
|
||||||
|
}
|
||||||
|
if(SECOND_INTERVIEW.equals(interviewType)){
|
||||||
|
return WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_105;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,20 +13,20 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
public enum WorkflowStageEnum {
|
public enum WorkflowStageEnum {
|
||||||
|
|
||||||
INTENT("1","意向申请阶段"),
|
INTENT(1,"意向申请阶段"),
|
||||||
STORE("2","新店进展"),
|
STORE(2,"新店进展"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private String code;
|
private Integer code;
|
||||||
|
|
||||||
private String message;
|
private String message;
|
||||||
|
|
||||||
WorkflowStageEnum(String code, String message) {
|
WorkflowStageEnum(Integer code, String message) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCode() {
|
public Integer getCode() {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ public enum WorkflowStageEnum {
|
|||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static final Map<String, WorkflowStageEnum> map = Arrays.stream(values()).collect(
|
protected static final Map<Integer, WorkflowStageEnum> map = Arrays.stream(values()).collect(
|
||||||
Collectors.toMap(WorkflowStageEnum::getCode, Function.identity()));
|
Collectors.toMap(WorkflowStageEnum::getCode, Function.identity()));
|
||||||
|
|
||||||
public static WorkflowStageEnum getWorkflowStageByCode(String code) {
|
public static WorkflowStageEnum getWorkflowStageByCode(String code) {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public enum WorkflowSubStageStatusEnum {
|
|||||||
SIGN_INTENT_AGREEMENT_60(60,"待补充"),
|
SIGN_INTENT_AGREEMENT_60(60,"待补充"),
|
||||||
SIGN_INTENT_AGREEMENT_65(65,"不通过"),
|
SIGN_INTENT_AGREEMENT_65(65,"不通过"),
|
||||||
SIGN_INTENT_AGREEMENT_70(70,"待提交"),
|
SIGN_INTENT_AGREEMENT_70(70,"待提交"),
|
||||||
SIGN_INTENT_AGREEMENT_75(75,"待审核"),
|
SIGN_INTENT_AGREEMENT_75(75,"待OA审核"),
|
||||||
SIGN_INTENT_AGREEMENT_80(80,"签约失败"),
|
SIGN_INTENT_AGREEMENT_80(80,"签约失败"),
|
||||||
|
|
||||||
|
|
||||||
@@ -78,4 +78,13 @@ public enum WorkflowSubStageStatusEnum {
|
|||||||
return INVITING_INTERVIEWS_15.getCode().equals(workflowSubStageStatus) || FIRST_INTERVIEWS_30.getCode().equals(workflowSubStageStatus) || SECOND_INTERVIEWS_105.getCode().equals(workflowSubStageStatus);
|
return INVITING_INTERVIEWS_15.getCode().equals(workflowSubStageStatus) || FIRST_INTERVIEWS_30.getCode().equals(workflowSubStageStatus) || SECOND_INTERVIEWS_105.getCode().equals(workflowSubStageStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WorkflowSubStageStatusEnum getNextStatus(WorkflowSubStageStatusEnum workflowSubStageStatusEnum) {
|
||||||
|
switch (workflowSubStageStatusEnum) {
|
||||||
|
case INTENT_0:
|
||||||
|
return INTENT_5;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public class LineCalendarsEventDAO {
|
|||||||
* @param endTime
|
* @param endTime
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Boolean isOccupied(Integer interviewType, Long regionId, String interviewerUserId, String startTime, String endTime){
|
public Boolean isOccupied(Integer interviewType, Long regionId, String interviewerUserId, String startTime, String endTime, Long excludeInterviewId){
|
||||||
return lineCalendarsEventMapper.getOccupiedCount(interviewType, regionId, interviewerUserId, startTime, endTime) > 0;
|
return lineCalendarsEventMapper.getOccupiedCount(interviewType, regionId, interviewerUserId, startTime, endTime, excludeInterviewId) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
import com.cool.store.entity.LineInfoDO;
|
import com.cool.store.entity.LineInfoDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.WorkflowStageEnum;
|
||||||
|
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||||
|
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.LineInfoMapper;
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@@ -38,6 +43,28 @@ public class LineInfoDAO {
|
|||||||
return lineInfoMapper.updateByPrimaryKeySelective(param);
|
return lineInfoMapper.updateByPrimaryKeySelective(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer updateWorkflowStage(Long lineId, WorkflowSubStageEnum workflowSubStage, WorkflowSubStageStatusEnum workflowSubStageStatus) {
|
||||||
|
if(Objects.isNull(workflowSubStage) && Objects.isNull(workflowSubStageStatus)){
|
||||||
|
log.info("更新线索阶段,子阶段 和 子阶段状态不能同时为空");
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
LineInfoDO lineInfo = new LineInfoDO();
|
||||||
|
lineInfo.setId(lineId);
|
||||||
|
lineInfo.setWorkflowSubStage(workflowSubStage.getCode());
|
||||||
|
lineInfo.setWorkflowSubStageStatus(workflowSubStageStatus.getCode());
|
||||||
|
return lineInfoMapper.updateByPrimaryKeySelective(lineInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer updateWorkflowStageAndInterviewer(Long lineId, WorkflowSubStageStatusEnum workflowSubStageStatus, String firstInterviewer, String secondInterviewer) {
|
||||||
|
LineInfoDO lineInfo = new LineInfoDO();
|
||||||
|
lineInfo.setId(lineId);
|
||||||
|
lineInfo.setWorkflowSubStageStatus(workflowSubStageStatus.getCode());
|
||||||
|
lineInfo.setFirstInterviewer(firstInterviewer);
|
||||||
|
lineInfo.setSecondInterviewer(secondInterviewer);
|
||||||
|
return lineInfoMapper.updateByPrimaryKeySelective(lineInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public LineInfoDO getByPartnerId(String partnerId) {
|
public LineInfoDO getByPartnerId(String partnerId) {
|
||||||
LineInfoDO lineInfo = lineInfoMapper.getByPartnerId(partnerId);
|
LineInfoDO lineInfo = lineInfoMapper.getByPartnerId(partnerId);
|
||||||
if(Objects.nonNull(lineInfo) && !lineInfo.getDeleted()){
|
if(Objects.nonNull(lineInfo) && !lineInfo.getDeleted()){
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.SigningBaseInfoDO;
|
||||||
|
import com.cool.store.request.IntentAgreementSubmitRequest;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface IntentAgreementMapper {
|
||||||
|
|
||||||
|
boolean insert(@Param("request") SigningBaseInfoDO request);
|
||||||
|
}
|
||||||
@@ -16,12 +16,14 @@ public interface LineCalendarsEventMapper extends Mapper<LineCalendarsEventDO> {
|
|||||||
* 被占用次数
|
* 被占用次数
|
||||||
* @param interviewType
|
* @param interviewType
|
||||||
* @param regionId
|
* @param regionId
|
||||||
* @param interviewer
|
* @param interviewerUserId
|
||||||
* @param startTime
|
* @param startTime
|
||||||
* @param endTime
|
* @param endTime
|
||||||
|
* @param excludeInterviewId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer getOccupiedCount(@Param("interviewType") Integer interviewType, @Param("regionId") Long regionId, @Param("interviewerUserId") String interviewerUserId, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
Integer getOccupiedCount(@Param("interviewType") Integer interviewType, @Param("regionId") Long regionId, @Param("interviewerUserId") String interviewerUserId,
|
||||||
|
@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("excludeInterviewId")Long excludeInterviewId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.IntentAgreementMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.SigningBaseInfoDO">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="partner_base_info_id" jdbcType="VARCHAR" property="partnerBaseInfoId" />
|
||||||
|
<result column="sign_name" jdbcType="VARCHAR" property="signName" />
|
||||||
|
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||||
|
<result column="sex" jdbcType="TINYINT" property="sex" />
|
||||||
|
<result column="id_card_front" jdbcType="VARCHAR" property="idCardFront" />
|
||||||
|
<result column="id_card_reverse" jdbcType="VARCHAR" property="idCardReverse" />
|
||||||
|
<result column="id_card_no" jdbcType="VARCHAR" property="idCardNo" />
|
||||||
|
<result column="id_card_address" jdbcType="VARCHAR" property="idCardAddress" />
|
||||||
|
<result column="current_residence" jdbcType="VARCHAR" property="currentResidence" />
|
||||||
|
<result column="address_detail" jdbcType="VARCHAR" property="addressDetail" />
|
||||||
|
<result column="business_license" jdbcType="VARCHAR" property="businessLicense" />
|
||||||
|
<result column="business_license_code" jdbcType="VARCHAR" property="businessLicenseCode" />
|
||||||
|
<result column="business_license_address" jdbcType="VARCHAR" property="businessLicenseAddress" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="deleted" jdbcType="TINYINT" property="deleted"/>
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
partner_base_info_id,
|
||||||
|
sign_name
|
||||||
|
mobile,
|
||||||
|
sex,
|
||||||
|
id_card_front,
|
||||||
|
id_card_reverse,
|
||||||
|
id_card_no,
|
||||||
|
id_card_address,
|
||||||
|
current_residence,
|
||||||
|
address_detail,
|
||||||
|
business_license,
|
||||||
|
business_license_code,
|
||||||
|
business_license_address,
|
||||||
|
create_time,
|
||||||
|
update_time,
|
||||||
|
deleted
|
||||||
|
</sql>
|
||||||
|
<insert id="insert" parameterType="com.cool.store.entity.SigningBaseInfoDO" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into xfsg_signing_base_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="request.partnerId != null">partner_id,</if>
|
||||||
|
<if test="request.lineId != null">line_id,</if>
|
||||||
|
<if test="request.signName != null">sign_name,</if>
|
||||||
|
<if test="request.mobile != null">mobile,</if>
|
||||||
|
<if test="request.sex != null">sex,</if>
|
||||||
|
<if test="request.idCardFront != null">id_card_front,</if>
|
||||||
|
<if test="request.idCardReverse != null">id_card_reverse,</if>
|
||||||
|
<if test="request.idCardNo != null">id_card_no,</if>
|
||||||
|
<if test="request.idCardAddress != null">id_card_address,</if>
|
||||||
|
<if test="request.currentResidence != null">current_residence,</if>
|
||||||
|
<if test="request.addressDetail != null">address_detail,</if>
|
||||||
|
<if test="request.businessLicense != null">business_license,</if>
|
||||||
|
<if test="request.businessLicenseCode != null">business_license_code,</if>
|
||||||
|
<if test="request.businessLicenseAddress != null">business_license_address,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="request.partnerId != null">#{request.partnerId},</if>
|
||||||
|
<if test="request.lineId != null">#{request.lineId},</if>
|
||||||
|
<if test="request.signName != null">#{request.signName},</if>
|
||||||
|
<if test="request.mobile != null">#{request.mobile},</if>
|
||||||
|
<if test="request.sex != null">#{request.sex},</if>
|
||||||
|
<if test="request.idCardFront != null">#{request.idCardFront},</if>
|
||||||
|
<if test="request.idCardReverse != null">#{request.idCardReverse},</if>
|
||||||
|
<if test="request.idCardNo != null">#{request.idCardNo},</if>
|
||||||
|
<if test="request.idCardAddress != null">#{request.idCardAddress},</if>
|
||||||
|
<if test="request.currentResidence != null">#{request.currentResidence},</if>
|
||||||
|
<if test="request.addressDetail != null">#{request.addressDetail},</if>
|
||||||
|
<if test="request.businessLicense != null">#{request.businessLicense},</if>
|
||||||
|
<if test="request.businessLicenseCode != null">#{request.businessLicenseCode},</if>
|
||||||
|
<if test="request.businessLicenseAddress != null">#{request.businessLicenseAddress},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -40,5 +40,8 @@
|
|||||||
<if test="regionId == 1">
|
<if test="regionId == 1">
|
||||||
and region_id = #{regionId}
|
and region_id = #{regionId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="excludeInterviewId != null">
|
||||||
|
and id != #{excludeInterviewId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -71,6 +71,9 @@
|
|||||||
<if test="lineSource != null and lineSource != ''">
|
<if test="lineSource != null and lineSource != ''">
|
||||||
and b.line_source = #{lineSource}
|
and b.line_source = #{lineSource}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="interviewStartTime != null and interviewEndTime != null ">
|
||||||
|
and a.start_time between #{interviewStartTime} and #{interviewEndTime}
|
||||||
|
</if>
|
||||||
<if test="interviewerUserId != null and interviewerUserId != ''">
|
<if test="interviewerUserId != null and interviewerUserId != ''">
|
||||||
and a.interviewer_user_id = #{interviewerUserId}
|
and a.interviewer_user_id = #{interviewerUserId}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SigningBaseInfoDO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String partnerId;
|
||||||
|
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
private String signName;
|
||||||
|
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
|
private String idCardFront;
|
||||||
|
|
||||||
|
private String idCardReverse;
|
||||||
|
|
||||||
|
private String idCardNo;
|
||||||
|
|
||||||
|
private String idCardAddress;
|
||||||
|
|
||||||
|
private String currentResidence;
|
||||||
|
|
||||||
|
private String addressDetail;
|
||||||
|
|
||||||
|
private String businessLicense;
|
||||||
|
|
||||||
|
private String businessLicenseCode;
|
||||||
|
|
||||||
|
private String businessLicenseAddress;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.cool.store.entity.SigningBaseInfoDO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel("提交意向签署协议Request")
|
||||||
|
public class IntentAgreementSubmitRequest {
|
||||||
|
|
||||||
|
private String partnerId;
|
||||||
|
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("签约人姓名")
|
||||||
|
private String signName;
|
||||||
|
@ApiModelProperty("手机号")
|
||||||
|
private String mobile;
|
||||||
|
@ApiModelProperty("1男 2女")
|
||||||
|
private Integer sex;
|
||||||
|
@ApiModelProperty("身份证人像面url")
|
||||||
|
private String idCardFront;
|
||||||
|
@ApiModelProperty("身份证国徽面url")
|
||||||
|
private String idCardReverse;
|
||||||
|
@ApiModelProperty("身份证号")
|
||||||
|
private String idCardNo;
|
||||||
|
@ApiModelProperty("身份证地址")
|
||||||
|
private String idCardAddress;
|
||||||
|
@ApiModelProperty("现居住地")
|
||||||
|
private String currentResidence;
|
||||||
|
@ApiModelProperty("详细地址")
|
||||||
|
private String addressDetail;
|
||||||
|
@ApiModelProperty("营业执照图片")
|
||||||
|
private String businessLicense;
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private String businessLicenseCode;
|
||||||
|
@ApiModelProperty("公司地址")
|
||||||
|
private String businessLicenseAddress;
|
||||||
|
|
||||||
|
|
||||||
|
public SigningBaseInfoDO toSigningBaseInfoDO() {
|
||||||
|
SigningBaseInfoDO signingBaseInfoDO = new SigningBaseInfoDO();
|
||||||
|
signingBaseInfoDO.setPartnerId(this.partnerId);
|
||||||
|
signingBaseInfoDO.setLineId(this.lineId);
|
||||||
|
signingBaseInfoDO.setSignName(this.signName);
|
||||||
|
signingBaseInfoDO.setMobile(this.mobile);
|
||||||
|
signingBaseInfoDO.setSex(this.sex);
|
||||||
|
signingBaseInfoDO.setIdCardFront(this.idCardFront);
|
||||||
|
signingBaseInfoDO.setIdCardReverse(this.idCardReverse);
|
||||||
|
signingBaseInfoDO.setIdCardNo(this.idCardNo);
|
||||||
|
signingBaseInfoDO.setIdCardAddress(this.idCardAddress);
|
||||||
|
signingBaseInfoDO.setCurrentResidence(this.currentResidence);
|
||||||
|
signingBaseInfoDO.setAddressDetail(this.addressDetail);
|
||||||
|
signingBaseInfoDO.setBusinessLicense(this.businessLicense);
|
||||||
|
signingBaseInfoDO.setBusinessLicenseCode(this.businessLicenseCode);
|
||||||
|
signingBaseInfoDO.setBusinessLicenseAddress(this.businessLicenseAddress);
|
||||||
|
return signingBaseInfoDO;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusinessLicenseInfoVO {
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private String registerNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
public BusinessLicenseInfoVO(String registerNumber, String address) {
|
||||||
|
this.registerNumber = registerNumber;
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class IdentityCardInfoVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("用户名")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ApiModelProperty("地址")
|
||||||
|
private String liveAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("出生日期")
|
||||||
|
private String birthdate;
|
||||||
|
|
||||||
|
@ApiModelProperty("性别")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
@ApiModelProperty("身份证号")
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
@ApiModelProperty("民族")
|
||||||
|
private String nation;
|
||||||
|
|
||||||
|
public IdentityCardInfoVO(String username, String liveAddress, String birthdate, String sex, String idCard, String nation) {
|
||||||
|
this.username = username;
|
||||||
|
this.liveAddress = liveAddress;
|
||||||
|
this.birthdate = birthdate;
|
||||||
|
this.sex = sex;
|
||||||
|
this.idCard = idCard;
|
||||||
|
this.nation = nation;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.enums.IDCardSideEnum;
|
||||||
|
import com.cool.store.exception.ApiException;
|
||||||
|
import com.cool.store.vo.BusinessLicenseInfoVO;
|
||||||
|
import com.cool.store.vo.IdentityCardInfoVO;
|
||||||
|
|
||||||
|
public interface AliyunService {
|
||||||
|
/**
|
||||||
|
* ORC识别身份证信息
|
||||||
|
* @param faceImageUrl
|
||||||
|
* @param sideEnum
|
||||||
|
* @return
|
||||||
|
* @throws ApiException
|
||||||
|
*/
|
||||||
|
IdentityCardInfoVO getIdentityCardInfo(String faceImageUrl, IDCardSideEnum sideEnum) throws ApiException;
|
||||||
|
|
||||||
|
BusinessLicenseInfoVO getBusinessLicenseInfo(String imageUrl) throws ApiException;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.request.IntentAgreementSubmitRequest;
|
||||||
|
|
||||||
|
public interface IntentAgreementService {
|
||||||
|
/**
|
||||||
|
* 签署意向协议
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean submit(IntentAgreementSubmitRequest request);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -89,7 +89,7 @@ public interface LineInterviewService {
|
|||||||
* @param videoUrlList
|
* @param videoUrlList
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Boolean uploadVideo(Long interviewId, List<String> videoUrlList);
|
Integer uploadVideo(Long interviewId, List<String> videoUrlList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重新预约面审
|
* 重新预约面审
|
||||||
|
|||||||
@@ -0,0 +1,136 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.aliyun.ocr20191230.models.*;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.IDCardSideEnum;
|
||||||
|
import com.cool.store.exception.ApiException;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.service.AliyunService;
|
||||||
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
|
import com.cool.store.vo.BusinessLicenseInfoVO;
|
||||||
|
import com.cool.store.vo.IdentityCardInfoVO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class AliyunServiceImpl implements AliyunService {
|
||||||
|
|
||||||
|
@Value("${aliyun.accessKeyId:null}")
|
||||||
|
private String accessKeyId;
|
||||||
|
|
||||||
|
@Value("${aliyun.accessKeySecret:null}")
|
||||||
|
private String accessKeySecret;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IdentityCardInfoVO getIdentityCardInfo(String faceImageUrl,
|
||||||
|
IDCardSideEnum sideEnum) throws ApiException {
|
||||||
|
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
|
||||||
|
.setAccessKeyId(accessKeyId)
|
||||||
|
.setAccessKeySecret(accessKeySecret);
|
||||||
|
// 访问的域名
|
||||||
|
config.endpoint = "ocr.cn-shanghai.aliyuncs.com";
|
||||||
|
try {
|
||||||
|
com.aliyun.ocr20191230.Client client = new com.aliyun.ocr20191230.Client(config);
|
||||||
|
URL url = new URL(faceImageUrl);
|
||||||
|
InputStream inputStream = url.openConnection().getInputStream();
|
||||||
|
com.aliyun.ocr20191230.models.RecognizeIdentityCardAdvanceRequest recognizeIdentityCardAdvanceRequest = new com.aliyun.ocr20191230.models.RecognizeIdentityCardAdvanceRequest()
|
||||||
|
.setImageURLObject(inputStream)
|
||||||
|
.setSide(sideEnum.getCode());
|
||||||
|
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
|
||||||
|
RecognizeIdentityCardResponse idCardResponse = client.recognizeIdentityCardAdvance(recognizeIdentityCardAdvanceRequest, runtime);
|
||||||
|
log.info("身份证解析结果:{}", JSONObject.toJSONString(idCardResponse));
|
||||||
|
RecognizeIdentityCardResponseBody.RecognizeIdentityCardResponseBodyDataFrontResult frontResult = Optional.ofNullable(idCardResponse).map(o -> o.getBody()).map(o -> o.data).map(o -> o.frontResult).orElse(null);
|
||||||
|
if(Objects.nonNull(frontResult)){
|
||||||
|
String username = frontResult.name;
|
||||||
|
String liveAddress = frontResult.address;
|
||||||
|
String birthdate = frontResult.birthDate;
|
||||||
|
if(StringUtils.isNotBlank(birthdate)){
|
||||||
|
birthdate = convertDate(birthdate, "yyyyMMdd");
|
||||||
|
}
|
||||||
|
String sex = frontResult.gender;
|
||||||
|
String idCard = frontResult.IDNumber;
|
||||||
|
String nation = frontResult.nationality;
|
||||||
|
IdentityCardInfoVO result = new IdentityCardInfoVO(username, liveAddress, birthdate, sex, idCard, nation);
|
||||||
|
log.info("身份证解析:{}", JSONObject.toJSONString(result));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} catch (com.aliyun.tea.TeaException e) {
|
||||||
|
log.error("身份证解析报错TeaException:{}", e);
|
||||||
|
throw new ApiException(e.getMessage());
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
log.error("身份证解析报错MalformedURLException:{}", e);
|
||||||
|
throw new ApiException(e.getMessage());
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("身份证解析报错IOException:{}", e);
|
||||||
|
throw new ApiException(e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("身份证解析报错Exception:{}", e);
|
||||||
|
throw new ApiException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String convertDate(String date, String format) {
|
||||||
|
try {
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
|
||||||
|
LocalDate localDate = LocalDate.parse(date, formatter);
|
||||||
|
return localDate.toString();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.DATA_CONVERT_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusinessLicenseInfoVO getBusinessLicenseInfo(String imageUrl) throws ApiException {
|
||||||
|
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
|
||||||
|
.setAccessKeyId(accessKeyId)
|
||||||
|
.setAccessKeySecret(accessKeySecret);
|
||||||
|
config.endpoint = "ocr.cn-shanghai.aliyuncs.com";
|
||||||
|
try {
|
||||||
|
com.aliyun.ocr20191230.Client client = new com.aliyun.ocr20191230.Client(config);
|
||||||
|
//非上海区域OSS必须使用流转换后使用
|
||||||
|
URL url = new URL(imageUrl);
|
||||||
|
InputStream inputStream = url.openConnection().getInputStream();
|
||||||
|
RecognizeBusinessLicenseAdvanceRequest recognizeBusinessLicenseRequest = new RecognizeBusinessLicenseAdvanceRequest()
|
||||||
|
.setImageURLObject(inputStream);
|
||||||
|
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
|
||||||
|
// RecognizeBusinessLicenseResponse recognizeBusinessLicenseResponse = client.recognizeBusinessLicenseWithOptions(RecognizeBusinessLicenseAdvanceRequest, runtime);
|
||||||
|
RecognizeBusinessLicenseResponse recognizeBusinessLicenseResponse = client.recognizeBusinessLicenseAdvance(recognizeBusinessLicenseRequest, runtime);
|
||||||
|
log.info("营业执照解析结果:{}", JSONObject.toJSONString(recognizeBusinessLicenseResponse));
|
||||||
|
RecognizeBusinessLicenseResponseBody.RecognizeBusinessLicenseResponseBodyData result = Optional.ofNullable(recognizeBusinessLicenseResponse).map(o -> o.getBody()).map(o -> o.data).orElse(null);
|
||||||
|
if (Objects.nonNull(result)){
|
||||||
|
String address = result.address;
|
||||||
|
String registerNumber = result.registerNumber;
|
||||||
|
BusinessLicenseInfoVO response = new BusinessLicenseInfoVO(registerNumber,address);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} catch (com.aliyun.tea.TeaException e) {
|
||||||
|
log.error("营业执照解析报错TeaException:{}", e);
|
||||||
|
throw new ApiException(e.getMessage());
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
log.error("营业执照解析报错MalformedURLException:{}", e);
|
||||||
|
throw new ApiException(e.getMessage());
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("营业执照解析报错IOException:{}", e);
|
||||||
|
throw new ApiException(e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("营业执照解析报错Exception:{}", e);
|
||||||
|
throw new ApiException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,14 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
|
import com.cool.store.enums.UserRoleEnum;
|
||||||
import com.cool.store.enums.WorkflowSubStageEnum;
|
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhangchenbiao
|
* @author zhangchenbiao
|
||||||
* @FileName: CommonService
|
* @FileName: CommonService
|
||||||
@@ -16,9 +20,22 @@ public class CommonService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ApplicationContext applicationContext;
|
private ApplicationContext applicationContext;
|
||||||
|
@Resource
|
||||||
|
private EnterpriseUserDAO enterpriseUserDAO;
|
||||||
|
|
||||||
public LineFlowService getLineFlowService(Integer workflowSubStage){
|
public LineFlowService getLineFlowService(Integer workflowSubStage){
|
||||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(workflowSubStage);
|
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(workflowSubStage);
|
||||||
return (LineFlowService)applicationContext.getBean(workflowSubStageEnum.getClazz());
|
return (LineFlowService)applicationContext.getBean(workflowSubStageEnum.getClazz());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户id
|
||||||
|
* @param areaId 城市id
|
||||||
|
* @param userRole
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getUserIdByAreaAndUserRole(Long areaId, UserRoleEnum userRole){
|
||||||
|
//随机一个
|
||||||
|
return enterpriseUserDAO.getUserInfoByUserIds(null).stream().findAny().get().getUserId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LineInfoDO;
|
||||||
|
import com.cool.store.entity.SigningBaseInfoDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.IntentAgreementMapper;
|
||||||
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
|
import com.cool.store.request.IntentAgreementSubmitRequest;
|
||||||
|
import com.cool.store.service.IntentAgreementService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class IntentAgreementServiceImpl implements IntentAgreementService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
IntentAgreementMapper intentAgreementMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
LineInfoMapper lineInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean submit(IntentAgreementSubmitRequest request) {
|
||||||
|
SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO();
|
||||||
|
boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO);
|
||||||
|
if (submitStatus){
|
||||||
|
LineInfoDO lineInfoDO = lineInfoMapper.getByPartnerId(request.getPartnerId());
|
||||||
|
if (Objects.isNull(lineInfoDO)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
||||||
|
}
|
||||||
|
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60.getCode());
|
||||||
|
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -46,8 +46,9 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
}
|
}
|
||||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
||||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||||
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
return Boolean.TRUE;
|
return Boolean.FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.request.AuditPassRequest;
|
import com.cool.store.request.AuditPassRequest;
|
||||||
import com.cool.store.request.AuditRejectRequest;
|
import com.cool.store.request.AuditRejectRequest;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
@@ -34,6 +35,7 @@ public abstract class LineFlowService {
|
|||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean auditPass(AuditPassRequest request){
|
public Boolean auditPass(AuditPassRequest request){
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||||
if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){
|
if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){
|
||||||
@@ -55,6 +57,7 @@ public abstract class LineFlowService {
|
|||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean auditReject(AuditRejectRequest request){
|
public Boolean auditReject(AuditRejectRequest request){
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||||
if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){
|
if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){
|
||||||
@@ -77,6 +80,7 @@ public abstract class LineFlowService {
|
|||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean auditClose(AuditRejectRequest request){
|
public Boolean auditClose(AuditRejectRequest request){
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||||
if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){
|
if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){
|
||||||
@@ -91,8 +95,10 @@ public abstract class LineFlowService {
|
|||||||
auditInfo.setRejectRealReason(request.getRejectRealReason());
|
auditInfo.setRejectRealReason(request.getRejectRealReason());
|
||||||
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
|
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
|
||||||
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo);
|
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo);
|
||||||
lineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
|
LineInfoDO updateLineInfo = new LineInfoDO();
|
||||||
lineInfoDAO.updateLineInfo(lineInfo);
|
updateLineInfo.setId(request.getLineId());
|
||||||
|
updateLineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
|
||||||
|
lineInfoDAO.updateLineInfo(updateLineInfo);
|
||||||
return auditClose(auditId, lineInfo);
|
return auditClose(auditId, lineInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@@ -63,6 +64,8 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
private HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
private HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private LineAuditInfoDAO lineAuditInfoDAO;
|
private LineAuditInfoDAO lineAuditInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private CommonService commonService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AppointmentTimeVO> getAppointmentTime(Long lineId, Integer interviewType, LocalDate appointmentDate) {
|
public List<AppointmentTimeVO> getAppointmentTime(Long lineId, Integer interviewType, LocalDate appointmentDate) {
|
||||||
@@ -84,6 +87,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean appointmentTime(AppointmentTimeRequest request) {
|
public Boolean appointmentTime(AppointmentTimeRequest request) {
|
||||||
//查询线索信息
|
//查询线索信息
|
||||||
//如果是面谈获取招商经理 如果是面试获取大区经理
|
//如果是面谈获取招商经理 如果是面试获取大区经理
|
||||||
@@ -97,17 +101,22 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage());
|
InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage());
|
||||||
String interviewer = InterviewTypeEnum.MEET.equals(interviewType) ? lineInfo.getInvestmentManager() : InterviewTypeEnum.INTERVIEW.equals(interviewType) ? lineInfo.getFirstInterviewer() : lineInfo.getSecondInterviewer();
|
UserRoleEnum userRole = InterviewTypeEnum.MEET.equals(interviewType) ? UserRoleEnum.INVESTMENT_MANAGER : UserRoleEnum.REGION_MANAGER;
|
||||||
Boolean occupied = lineCalendarsEventDAO.isOccupied(interviewType.getCode(), lineInfo.getRegionId(), interviewer, request.getStartTime(), request.getEndTime());
|
//获取面试官
|
||||||
|
String interviewerUserId = InterviewTypeEnum.MEET.equals(interviewType) ? lineInfo.getInvestmentManager() : commonService.getUserIdByAreaAndUserRole(lineInfo.getWantShopAreaId(), userRole);
|
||||||
|
String firstInterviewer = InterviewTypeEnum.INTERVIEW.equals(interviewType) ? interviewerUserId : null;
|
||||||
|
String secondInterviewer = InterviewTypeEnum.SECOND_INTERVIEW.equals(interviewType) ? interviewerUserId : null;
|
||||||
|
Boolean occupied = lineCalendarsEventDAO.isOccupied(interviewType.getCode(), lineInfo.getRegionId(), interviewerUserId, request.getStartTime(), request.getEndTime(), null);
|
||||||
if(occupied){
|
if(occupied){
|
||||||
throw new ServiceException(ErrorCodeEnum.TIME_OCCUPIED);
|
throw new ServiceException(ErrorCodeEnum.TIME_OCCUPIED);
|
||||||
}
|
}
|
||||||
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||||
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||||
LineCalendarsEventDO calendarsEvent = LineCalendarsEventDO.convertDO(lineInfo, interviewType.getCode(), startTime, endTime, interviewer);
|
LineCalendarsEventDO calendarsEvent = LineCalendarsEventDO.convertDO(lineInfo, interviewType.getCode(), startTime, endTime, interviewerUserId);
|
||||||
Long eventId = lineCalendarsEventDAO.addCalendarsEvent(calendarsEvent);
|
Long eventId = lineCalendarsEventDAO.addCalendarsEvent(calendarsEvent);
|
||||||
|
WorkflowSubStageStatusEnum workflowSubStageStatus = InterviewTypeEnum.getWorkflowSubStageStatus(interviewType);
|
||||||
//跟新线索状态为已预约
|
//跟新线索状态为已预约
|
||||||
lineInfoDAO.updateLineInfo(lineInfo);
|
lineInfoDAO.updateWorkflowStageAndInterviewer(lineInfo.getId(), workflowSubStageStatus, firstInterviewer, secondInterviewer);
|
||||||
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
|
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
|
||||||
if(Objects.nonNull(interviewInfo)){
|
if(Objects.nonNull(interviewInfo)){
|
||||||
if(!WorkflowSubStageStatusEnum.isReappointmentStatus(lineInfo.getWorkflowSubStageStatus())){
|
if(!WorkflowSubStageStatusEnum.isReappointmentStatus(lineInfo.getWorkflowSubStageStatus())){
|
||||||
@@ -117,12 +126,13 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
//删除该面试记录
|
//删除该面试记录
|
||||||
lineInterviewDAO.deleteInterviewInfo(interviewInfo.getId());
|
lineInterviewDAO.deleteInterviewInfo(interviewInfo.getId());
|
||||||
}
|
}
|
||||||
LineInterviewDO addInterview = LineInterviewDO.convertDO(lineInfo, startTime, endTime, UUIDUtils.get8UUID(), interviewer, interviewType.getCode(), eventId);
|
LineInterviewDO addInterview = LineInterviewDO.convertDO(lineInfo, startTime, endTime, UUIDUtils.get8UUID(), interviewerUserId, interviewType.getCode(), eventId);
|
||||||
lineInterviewDAO.addInterviewInfo(addInterview);
|
lineInterviewDAO.addInterviewInfo(addInterview);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean modifyAppointmentTime(AppointmentTimeRequest request) {
|
public Boolean modifyAppointmentTime(AppointmentTimeRequest request) {
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||||
if(Objects.isNull(lineInfo)){
|
if(Objects.isNull(lineInfo)){
|
||||||
@@ -144,6 +154,10 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
}
|
}
|
||||||
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||||
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||||
|
Boolean occupied = lineCalendarsEventDAO.isOccupied(interviewType.getCode(), lineInfo.getRegionId(), interviewInfo.getInterviewerUserId(), request.getStartTime(), request.getEndTime(), interviewInfo.getId());
|
||||||
|
if(occupied){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.TIME_OCCUPIED);
|
||||||
|
}
|
||||||
interviewInfo.setInterviewDate(startTime);
|
interviewInfo.setInterviewDate(startTime);
|
||||||
interviewInfo.setStartTime(startTime);
|
interviewInfo.setStartTime(startTime);
|
||||||
interviewInfo.setEndTime(endTime);
|
interviewInfo.setEndTime(endTime);
|
||||||
@@ -227,6 +241,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Integer finishInterview(Long interviewId, String userId) {
|
public Integer finishInterview(Long interviewId, String userId) {
|
||||||
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfoById(interviewId);
|
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfoById(interviewId);
|
||||||
if(Objects.isNull(interviewInfo)){
|
if(Objects.isNull(interviewInfo)){
|
||||||
@@ -236,20 +251,25 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
if (interviewInfo.getRoomStatus().equals(RoomStatus.CLOSED.getCode())) {
|
if (interviewInfo.getRoomStatus().equals(RoomStatus.CLOSED.getCode())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.ROOM_STATUS_ERROR);
|
throw new ServiceException(ErrorCodeEnum.ROOM_STATUS_ERROR);
|
||||||
}
|
}
|
||||||
interviewInfo.setRoomStatus(RoomStatus.CLOSED.getCode());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(interviewInfo.getLineId());
|
||||||
interviewInfo.setActualEndTime(new Date());
|
if(!WorkflowSubStageEnum.isReappointmentStage(lineInfo.getWorkflowSubStage())){
|
||||||
interviewInfo.setInterviewStatus(InterviewStatusEnum.WAIT_AUDIT.getCode());
|
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
LineInterviewDO updateInterviewInfo = new LineInterviewDO();
|
||||||
|
updateInterviewInfo.setId(interviewId);
|
||||||
|
updateInterviewInfo.setRoomStatus(RoomStatus.CLOSED.getCode());
|
||||||
|
updateInterviewInfo.setActualEndTime(new Date());
|
||||||
|
updateInterviewInfo.setInterviewStatus(InterviewStatusEnum.WAIT_AUDIT.getCode());
|
||||||
//更新线索状态
|
//更新线索状态
|
||||||
LineInfoDO lineInfo = new LineInfoDO();
|
WorkflowSubStageStatusEnum workflowSubStageStatus = null;
|
||||||
lineInfo.setId(interviewInfo.getLineId());
|
|
||||||
if(InterviewTypeEnum.INTERVIEW.getCode().equals(interviewInfo.getInterviewType())){
|
if(InterviewTypeEnum.INTERVIEW.getCode().equals(interviewInfo.getInterviewType())){
|
||||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_35.getCode());
|
workflowSubStageStatus = WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_35;
|
||||||
}
|
}
|
||||||
if(InterviewTypeEnum.SECOND_INTERVIEW.getCode().equals(interviewInfo.getInterviewType())){
|
if(InterviewTypeEnum.SECOND_INTERVIEW.getCode().equals(interviewInfo.getInterviewType())){
|
||||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_110.getCode());
|
workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_110;
|
||||||
}
|
}
|
||||||
lineInfoDAO.updateLineInfo(lineInfo);
|
lineInfoDAO.updateWorkflowStage(interviewInfo.getLineId(), null, workflowSubStageStatus);
|
||||||
return lineInterviewDAO.updateInterviewInfo(interviewInfo);
|
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -271,7 +291,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean uploadVideo(Long interviewId, List<String> videoUrlList) {
|
public Integer uploadVideo(Long interviewId, List<String> videoUrlList) {
|
||||||
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfoById(interviewId);
|
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfoById(interviewId);
|
||||||
if(Objects.isNull(interviewInfo)){
|
if(Objects.isNull(interviewInfo)){
|
||||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
|
||||||
@@ -281,8 +301,10 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
videoList = new ArrayList<>();
|
videoList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
videoList.addAll(videoUrlList);
|
videoList.addAll(videoUrlList);
|
||||||
interviewInfo.setVideoUrl(JSONObject.toJSONString(videoList.stream().distinct().collect(Collectors.toList())));
|
LineInterviewDO updateInterviewInfo = new LineInterviewDO();
|
||||||
return lineInterviewDAO.updateInterviewInfo(interviewInfo) > 0;
|
updateInterviewInfo.setId(interviewId);
|
||||||
|
updateInterviewInfo.setVideoUrl(JSONObject.toJSONString(videoList.stream().distinct().collect(Collectors.toList())));
|
||||||
|
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -295,15 +317,14 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
log.info("当前线索状态不允许重新预约");
|
log.info("当前线索状态不允许重新预约");
|
||||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
Integer workflowSubStageStatus = null;
|
WorkflowSubStageStatusEnum workflowSubStageStatus = null;
|
||||||
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
||||||
workflowSubStageStatus = WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_41.getCode();
|
workflowSubStageStatus = WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_41;
|
||||||
}
|
}
|
||||||
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
||||||
workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_120.getCode();
|
workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_120;
|
||||||
}
|
}
|
||||||
lineInfo.setWorkflowSubStageStatus(workflowSubStageStatus);
|
return lineInfoDAO.updateWorkflowStage(lineInfo.getId(), null, workflowSubStageStatus);
|
||||||
return lineInfoDAO.updateLineInfo(lineInfo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -314,44 +335,33 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) {
|
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) {
|
||||||
InterviewTypeEnum interviewType = null;
|
InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage());
|
||||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||||
Integer nextStageInitStatus = nextStage.getInitStatus().getCode();
|
|
||||||
if(WorkflowSubStageEnum.INVITING_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
|
||||||
interviewType = InterviewTypeEnum.MEET;
|
|
||||||
}
|
|
||||||
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
|
||||||
interviewType = InterviewTypeEnum.INTERVIEW;
|
|
||||||
}
|
|
||||||
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
|
||||||
interviewType = InterviewTypeEnum.SECOND_INTERVIEW;
|
|
||||||
nextStageInitStatus = InterviewStatusEnum.PASS.getCode();
|
|
||||||
}
|
|
||||||
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
|
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
|
||||||
interviewInfo.setAuditId(auditId);
|
if(Objects.isNull(interviewInfo)){
|
||||||
interviewInfo.setInterviewStatus(InterviewStatusEnum.PASS.getCode());
|
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
|
||||||
lineInfo.setWorkflowSubStage(nextStage.getCode());
|
}
|
||||||
lineInfo.setWorkflowSubStageStatus(nextStageInitStatus);
|
LineInterviewDO updateInterviewInfo = new LineInterviewDO();
|
||||||
lineInfoDAO.updateLineInfo(lineInfo);
|
updateInterviewInfo.setId(interviewInfo.getId());
|
||||||
return lineInterviewDAO.updateInterviewInfo(interviewInfo) > 0;
|
updateInterviewInfo.setAuditId(auditId);
|
||||||
|
updateInterviewInfo.setInterviewStatus(InterviewStatusEnum.PASS.getCode());
|
||||||
|
//更新线索阶段
|
||||||
|
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus());
|
||||||
|
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) {
|
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) {
|
||||||
InterviewTypeEnum interviewType = null;
|
InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage());
|
||||||
if(WorkflowSubStageEnum.INVITING_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
|
||||||
interviewType = InterviewTypeEnum.MEET;
|
|
||||||
}
|
|
||||||
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
|
||||||
interviewType = InterviewTypeEnum.INTERVIEW;
|
|
||||||
}
|
|
||||||
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
|
||||||
interviewType = InterviewTypeEnum.SECOND_INTERVIEW;
|
|
||||||
}
|
|
||||||
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
|
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
|
||||||
interviewInfo.setAuditId(auditId);
|
if(Objects.isNull(interviewInfo)){
|
||||||
interviewInfo.setInterviewStatus(InterviewStatusEnum.NOT_PASS.getCode());
|
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
|
||||||
|
}
|
||||||
|
LineInterviewDO updateInterviewInfo = new LineInterviewDO();
|
||||||
|
updateInterviewInfo.setId(interviewInfo.getId());
|
||||||
|
updateInterviewInfo.setAuditId(auditId);
|
||||||
|
updateInterviewInfo.setInterviewStatus(InterviewStatusEnum.NOT_PASS.getCode());
|
||||||
return lineInterviewDAO.updateInterviewInfo(interviewInfo) > 0;
|
return lineInterviewDAO.updateInterviewInfo(interviewInfo) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,11 +46,20 @@ public class SignValidateFilter implements Filter {
|
|||||||
private static AntPathMatcher matcher = new AntPathMatcher();
|
private static AntPathMatcher matcher = new AntPathMatcher();
|
||||||
|
|
||||||
private static List<String> patternList =
|
private static List<String> patternList =
|
||||||
Lists.newArrayList("/web/check/ok","/check/ok",
|
Lists.newArrayList(
|
||||||
"/xfsg/doc.html","/xfsg/favicon.ico","/xfsg/v2/api-docs","/**/test/**",
|
"/web/check/ok",
|
||||||
|
"/check/ok",
|
||||||
|
"/xfsg/doc.html",
|
||||||
|
"/xfsg/favicon.ico",
|
||||||
|
"/xfsg/v2/api-docs","/**/test/**",
|
||||||
"/xfsg/mini/program/oss/getUploadFileConfig",
|
"/xfsg/mini/program/oss/getUploadFileConfig",
|
||||||
"/xfsg/mini/program/v1/partnerManage/partner/getIdentityCardInfo",
|
"/xfsg/mini/program/v1/partnerManage/partner/getIdentityCardInfo",
|
||||||
"/**/swagger*/**", "/**/webjars/**","/xfsg/mini/program/v1/partnerManage/openArea/areaApplyQuery");
|
"/**/swagger*/**",
|
||||||
|
"/**/webjars/**",
|
||||||
|
"/xfsg/mini/program/v1/partnerManage/openArea/areaApplyQuery",
|
||||||
|
"/xfsg/mini/**"
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -78,8 +78,7 @@ public class PCLineInterviewController {
|
|||||||
@ApiOperation("上传文件")
|
@ApiOperation("上传文件")
|
||||||
@GetMapping("/upload/video")
|
@GetMapping("/upload/video")
|
||||||
public ResponseResult uploadVideo(@RequestParam("interviewId")Long interviewId, @RequestParam("videoUrlList") List<String> videoUrlList) throws ApiException {
|
public ResponseResult uploadVideo(@RequestParam("interviewId")Long interviewId, @RequestParam("videoUrlList") List<String> videoUrlList) throws ApiException {
|
||||||
Boolean result = lineInterviewService.uploadVideo(interviewId, videoUrlList);
|
return ResponseResult.success(lineInterviewService.uploadVideo(interviewId, videoUrlList));
|
||||||
return ResponseResult.success(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("重新面审")
|
@ApiOperation("重新面审")
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.cool.store.request.IntentAgreementSubmitRequest;
|
||||||
|
import com.cool.store.request.JoinIntentionRequest;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.IntentAgreementService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping({"/mini/IntentAgreement"})
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "小程序意向协议")
|
||||||
|
public class MiniIntentAgreementController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
IntentAgreementService intentAgreementService;
|
||||||
|
|
||||||
|
@PostMapping(path = "/submit")
|
||||||
|
@ApiOperation("签署意向协议")
|
||||||
|
public ResponseResult<Boolean> submit(@RequestBody IntentAgreementSubmitRequest request) {
|
||||||
|
boolean resp = intentAgreementService.submit(request);
|
||||||
|
return ResponseResult.success(resp);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,7 +24,7 @@ public class MiniJoinIntentionController {
|
|||||||
@Resource
|
@Resource
|
||||||
private JoinIntentionService joinIntentionService;
|
private JoinIntentionService joinIntentionService;
|
||||||
|
|
||||||
@PostMapping(path = "/getOpenAreaList")
|
@PostMapping(path = "/submit")
|
||||||
@ApiOperation("填写加盟意向申请书")
|
@ApiOperation("填写加盟意向申请书")
|
||||||
public ResponseResult<Boolean> submit(@RequestBody @Valid JoinIntentionRequest request) {
|
public ResponseResult<Boolean> submit(@RequestBody @Valid JoinIntentionRequest request) {
|
||||||
return ResponseResult.success(joinIntentionService.submit(request));
|
return ResponseResult.success(joinIntentionService.submit(request));
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.IDCardSideEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.AliyunService;
|
||||||
|
import com.cool.store.vo.BusinessLicenseInfoVO;
|
||||||
|
import com.cool.store.vo.IdentityCardInfoVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://ocr.console.aliyun.com/overview?spm=5176.6660585.ocr_enterprisecard_public_cn-top.i1.3d657992vcDnCC
|
||||||
|
* 目前接入了身份证识别、营业执照识别
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping({"/mini/orc"})
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "文字识别OCR")
|
||||||
|
public class OcrController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
AliyunService aliyunService;
|
||||||
|
|
||||||
|
@GetMapping(path = "/getIdentityCardInfo")
|
||||||
|
@ApiOperation("根据身份证正面解析获取数据")
|
||||||
|
public ResponseResult<IdentityCardInfoVO> getIdentityCardInfo(@RequestParam(value = "faceImageUrl")String faceImageUrl,
|
||||||
|
@RequestParam("side") IDCardSideEnum sideEnum){
|
||||||
|
try {
|
||||||
|
IdentityCardInfoVO identityCardInfo = aliyunService.getIdentityCardInfo(faceImageUrl, sideEnum);
|
||||||
|
return ResponseResult.success(identityCardInfo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.IDENTITY_CARD_PARSE_FAIL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(path = "/getBusinessLicenseInfo")
|
||||||
|
@ApiOperation("根据营业证照解析获取数据")
|
||||||
|
public ResponseResult<BusinessLicenseInfoVO> getBusinessLicenseInfo(@RequestParam(value = "imageUrl")String imageUrl){
|
||||||
|
try {
|
||||||
|
BusinessLicenseInfoVO businessLicenseInfo = aliyunService.getBusinessLicenseInfo(imageUrl);
|
||||||
|
return ResponseResult.success(businessLicenseInfo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.BUSINESS_LICENSE_PARSE_FAIL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -69,4 +69,7 @@ xxl.job.accessToken=25365115eed84e9ba5e0040abb255a09
|
|||||||
exhibition.channel.id=52399
|
exhibition.channel.id=52399
|
||||||
recommended.channel.id=52400
|
recommended.channel.id=52400
|
||||||
|
|
||||||
wx.pay.privateKeyPath=D:\\weixin\\apiclient_key.pem
|
wx.pay.privateKeyPath=D:\\weixin\\apiclient_key.pem
|
||||||
|
|
||||||
|
aliyun.accessKeyId=LTAI5tQ6QBnWaB5LaJYz6zcD
|
||||||
|
aliyun.accessKeySecret=spqsOgtfr54cwK861O3N3fInydTgjA
|
||||||
@@ -57,4 +57,7 @@ wx.pay.privateKeyPath=/opt/apps/coolcollege/apiclient/apiclient_key.pem
|
|||||||
wx.pay.merchantSerialNumber=66B8E966AFE796BA06006664FCBFBC3F0E2F5A1B
|
wx.pay.merchantSerialNumber=66B8E966AFE796BA06006664FCBFBC3F0E2F5A1B
|
||||||
wx.pay.apiV3Key=wxpayzhenghu123JKJHkjafWXCertUt1
|
wx.pay.apiV3Key=wxpayzhenghu123JKJHkjafWXCertUt1
|
||||||
wx.pay.payNotifyUrl=https://abstore-api.coolstore.cn/xfsg/mini/wechatPay/payNotify
|
wx.pay.payNotifyUrl=https://abstore-api.coolstore.cn/xfsg/mini/wechatPay/payNotify
|
||||||
wx.pay.backNotifyUrl=https://abstore-api.coolstore.cn/xfsg/mini/wechatPay/refundNotify
|
wx.pay.backNotifyUrl=https://abstore-api.coolstore.cn/xfsg/mini/wechatPay/refundNotify
|
||||||
|
|
||||||
|
aliyun.accessKeyId=LTAI5tQ6QBnWaB5LaJYz6zcD
|
||||||
|
aliyun.accessKeySecret=spqsOgtfr54cwK861O3N3fInydTgjA
|
||||||
Reference in New Issue
Block a user