Merge remote-tracking branch 'hsayi/dev/feat/partner1.6_20231226' into dev/feat/partner1.6_20231226
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.cool.store.dto.exhibition.ExhibitionDTO;
|
||||
import com.cool.store.dto.exhibition.ExhibitionStatisticsDTO;
|
||||
import com.cool.store.entity.HyExhibitionDO;
|
||||
import com.cool.store.mapper.HyExhibitionMapper;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import io.swagger.models.auth.In;
|
||||
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
|
||||
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -119,4 +117,31 @@ public class HyExhibitionDAO {
|
||||
return hyExhibitionMapper.listByExhibitionGroupId(exhibitionGroupId,includeClose);
|
||||
}
|
||||
|
||||
public List<PartnerExhibitionListVO> getPartnerExhibitionList(Long partnerLineId) {
|
||||
if (partnerLineId == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyExhibitionMapper.getPartnerExhibitionList(partnerLineId);
|
||||
}
|
||||
|
||||
public PartnerExhibitionInfoVO getPartnerExhibitionInfo(Integer exhibitionId, Long partnerLineId) {
|
||||
if (exhibitionId == null || partnerLineId == null) {
|
||||
return new PartnerExhibitionInfoVO();
|
||||
}
|
||||
return hyExhibitionMapper.getPartnerExhibitionInfo(exhibitionId, partnerLineId);
|
||||
}
|
||||
|
||||
public List<HyExhibitionDO> querySelective(HyExhibitionDO hyExhibitionDO) {
|
||||
if (hyExhibitionDO == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyExhibitionMapper.querySelective(hyExhibitionDO);
|
||||
}
|
||||
|
||||
public int batchCloseExhibition(List<Integer> hyExhibitionIds) {
|
||||
if (CollectionUtil.isEmpty(hyExhibitionIds)) {
|
||||
return 0;
|
||||
}
|
||||
return hyExhibitionMapper.batchCloseExhibition(hyExhibitionIds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,4 +72,7 @@ public class HyExhibitionGroupDAO {
|
||||
}
|
||||
|
||||
|
||||
public int batchCloseExhibitionGroup() {
|
||||
return hyExhibitionGroupMapper.batchCloseExhibitionGroup();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,4 +143,11 @@ public class HyPartnerExhibitionDAO {
|
||||
}
|
||||
return hyPartnerExhibitionMapper.partnerSignUpCount(lineIds);
|
||||
}
|
||||
|
||||
public List<Long> getCloseExhibitionLineIds(List<Integer> exhibitionIds) {
|
||||
if (CollectionUtils.isEmpty(exhibitionIds)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyPartnerExhibitionMapper.getCloseExhibitionLineIds(exhibitionIds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.DingdingUserDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-06-15 10:03
|
||||
*/
|
||||
@Mapper
|
||||
public interface DingdingUserMapper {
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -2,8 +2,6 @@ package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.exhibition.MyExhibitionGroupDTO;
|
||||
import com.cool.store.entity.HyExhibitionGroupDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -42,4 +40,10 @@ public interface HyExhibitionGroupMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
List<MyExhibitionGroupDTO> listByCreator(String userId);
|
||||
|
||||
/**
|
||||
* 批量关闭需要关闭的会销组
|
||||
* @return
|
||||
*/
|
||||
int batchCloseExhibitionGroup();
|
||||
}
|
||||
@@ -3,9 +3,9 @@ package com.cool.store.mapper;
|
||||
import com.cool.store.dto.exhibition.ExhibitionDTO;
|
||||
import com.cool.store.dto.exhibition.ExhibitionStatisticsDTO;
|
||||
import com.cool.store.entity.HyExhibitionDO;
|
||||
import io.swagger.models.auth.In;
|
||||
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
|
||||
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -66,4 +66,28 @@ public interface HyExhibitionMapper {
|
||||
*/
|
||||
List<HyExhibitionDO> listByExhibitionGroupId(@Param("exhibitionGroupId") Integer exhibitionGroupId, @Param("includeClose") Boolean includeClose);
|
||||
|
||||
/**
|
||||
* 获取线索报名参加的会销列表
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
List<PartnerExhibitionListVO> getPartnerExhibitionList(@Param("partnerLineId") Long partnerLineId);
|
||||
|
||||
/**
|
||||
* 获取线索报名的会销详情
|
||||
*
|
||||
* @param exhibitionId
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
PartnerExhibitionInfoVO getPartnerExhibitionInfo(@Param("exhibitionId") Integer exhibitionId, @Param("partnerLineId") Long partnerLineId);
|
||||
|
||||
/**
|
||||
* 查询符合条件的会销列表
|
||||
* @param hyExhibitionDO
|
||||
* @return
|
||||
*/
|
||||
List<HyExhibitionDO> querySelective(HyExhibitionDO hyExhibitionDO);
|
||||
|
||||
int batchCloseExhibition(@Param("hyExhibitionIds") List<Integer> hyExhibitionIds);
|
||||
}
|
||||
@@ -3,9 +3,7 @@ package com.cool.store.mapper;
|
||||
import com.cool.store.dto.exhibition.ExhibitionLineBaseDTO;
|
||||
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
|
||||
import com.cool.store.dto.exhibition.PartnerSignUpDTO;
|
||||
import com.cool.store.entity.HyExhibitionDO;
|
||||
import com.cool.store.entity.HyPartnerExhibitionDO;
|
||||
import io.swagger.models.auth.In;
|
||||
import com.cool.store.entity.HyPartnerExhibitionInterviewDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -104,4 +102,11 @@ public interface HyPartnerExhibitionMapper {
|
||||
* @return
|
||||
*/
|
||||
List<PartnerSignUpDTO> partnerSignUpCount(@Param("lineIds") List<Long> lineIds );
|
||||
|
||||
/**
|
||||
* 获取待修改会销中状态的线索 ids
|
||||
* @param exhibitionIds
|
||||
* @return
|
||||
*/
|
||||
List<Long> getCloseExhibitionLineIds(@Param("exhibitionIds") List<Integer> exhibitionIds);
|
||||
}
|
||||
@@ -55,5 +55,5 @@ public interface HyPartnerTaskInfoLogMapper {
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
HyPartnerTaskInfoLogDO getLastTipsLog(Long partnerLineId);
|
||||
HyPartnerTaskInfoLogDO getLastTipsLog(@Param("lineId") Long partnerLineId);
|
||||
}
|
||||
@@ -150,4 +150,23 @@
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<update id="batchCloseExhibitionGroup">
|
||||
UPDATE `hy_exhibition_group` t1
|
||||
INNER JOIN (
|
||||
-- 所有关联的会销都结束的会销组(不包含未关联会销的会销组)
|
||||
SELECT eg.id
|
||||
FROM `hy_exhibition_group` eg
|
||||
LEFT JOIN `hy_exhibition` e ON eg.id = e.exhibition_group_id
|
||||
WHERE eg.deleted = 0
|
||||
AND e.deleted = 0
|
||||
AND eg.closed = 0
|
||||
GROUP BY eg.id
|
||||
HAVING COUNT(e.id) = COUNT(CASE WHEN e.closed_type != 0 THEN 1 END)
|
||||
) AS t2 ON t1.id = t2.id
|
||||
SET closed = 1
|
||||
WHERE t1.deleted = 0
|
||||
AND t1.closed = 0
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -34,6 +34,59 @@
|
||||
from hy_exhibition
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="querySelective" resultType="com.cool.store.entity.HyExhibitionDO">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from hy_exhibition
|
||||
<where>
|
||||
<if test="exhibitionGroupId != null">
|
||||
and exhibition_group_id = #{exhibitionGroupId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="exhibitionCode != null">
|
||||
and exhibition_code = #{exhibitionCode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="exhibitionName != null">
|
||||
and exhibition_name = #{exhibitionName,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
and start_date = #{startDate,jdbcType=DATE}
|
||||
</if>
|
||||
<if test="startDateStr != null">
|
||||
and start_date = #{startDateStr,jdbcType=DATE}
|
||||
</if>
|
||||
<if test="location != null">
|
||||
and location = #{location,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="closedType != null">
|
||||
and closed_type = #{closedType,jdbcType=TINYINT}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
and creator = #{creator,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="updater != null">
|
||||
and updater = #{updater,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
and deleted = #{deleted,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="closeTime != null">
|
||||
and close_time = #{closeTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="collaborators != null">
|
||||
and collaborators = #{collaborators,jdbcType=LONGVARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from hy_exhibition
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
@@ -372,4 +425,47 @@
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<select id="getPartnerExhibitionList" resultType="com.cool.store.vo.exhibition.PartnerExhibitionListVO">
|
||||
SELECT
|
||||
t2.id AS exhibitionId,
|
||||
t2.exhibition_code AS exhibitionCode,
|
||||
t2.exhibition_name AS exhibitionName,
|
||||
t2.start_date AS exhibitionDate
|
||||
FROM `hy_partner_exhibition` t1
|
||||
INNER JOIN `hy_exhibition` t2 ON t1.exhibition_id = t2.id
|
||||
WHERE t1.deleted = 0
|
||||
AND t2.deleted = 0
|
||||
AND t1.participation_status != 7
|
||||
AND t2.closed_type = 0
|
||||
AND t1.partner_line_id = #{partnerLineId}
|
||||
</select>
|
||||
|
||||
<select id="getPartnerExhibitionInfo" resultType="com.cool.store.vo.exhibition.PartnerExhibitionInfoVO">
|
||||
SELECT
|
||||
t1.id AS exhibitionId,
|
||||
t1.exhibition_code AS exhibitionCode,
|
||||
t1.exhibition_name AS exhibitionName,
|
||||
t1.start_date AS exhibitionDate,
|
||||
t1.location AS exhibitionPosition
|
||||
FROM `hy_exhibition` t1
|
||||
INNER JOIN `hy_partner_exhibition` t2 ON t1.id = t2.exhibition_id
|
||||
WHERE t1.deleted = 0
|
||||
AND t1.closed_type = 0
|
||||
AND t2.deleted = 0
|
||||
AND t2.participation_status != 7
|
||||
AND t2.partner_line_id = #{partnerLineId}
|
||||
AND t1.id = #{exhibitionId}
|
||||
</select>
|
||||
|
||||
<update id="batchCloseExhibition">
|
||||
update hy_exhibition
|
||||
set closed_type = 2, close_time = now()
|
||||
where id in (
|
||||
<foreach collection="hyExhibitionIds" item="hyExhibitionId" separator=",">
|
||||
#{hyExhibitionId}
|
||||
</foreach>
|
||||
)
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -460,4 +460,16 @@
|
||||
</foreach>
|
||||
group by a.partner_line_id
|
||||
</select>
|
||||
|
||||
<select id="getCloseExhibitionLineIds" resultType="java.lang.Long">
|
||||
SELECT DISTINCT partner_line_id
|
||||
FROM hy_partner_exhibition
|
||||
WHERE deleted = 0
|
||||
AND exhibition_id IN (
|
||||
<foreach collection="exhibitionIds" item="exhibitionId" separator=",">
|
||||
#{exhibitionId}
|
||||
</foreach>
|
||||
)
|
||||
AND participation_status != 7
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -168,7 +168,7 @@
|
||||
SELECT <include refid="Base_Column_List"></include>, <include refid="Blob_Column_List"></include>
|
||||
FROM `hy_partner_task_info_log`
|
||||
WHERE deleted = 0
|
||||
AND partner_line_id = 38711
|
||||
AND partner_line_id = #{lineId}
|
||||
AND operate_type IN (
|
||||
'interview_appointment',
|
||||
'interview_appointment_agreement',
|
||||
@@ -176,7 +176,8 @@
|
||||
'interviewer_book_interview',
|
||||
'modify_interview_time',
|
||||
'finish_interview',
|
||||
'create_qualifyverify'
|
||||
'create_qualifyverify',
|
||||
'exhibition_create_qualifyverify'
|
||||
)
|
||||
ORDER BY create_time DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
@@ -35,6 +35,9 @@ public class HyExhibitionDO implements Serializable {
|
||||
@ApiModelProperty("举办日期")
|
||||
private Date startDate;
|
||||
|
||||
@ApiModelProperty("举办日期str")
|
||||
private String startDateStr;
|
||||
|
||||
@ApiModelProperty("举办地点")
|
||||
private String location;
|
||||
|
||||
|
||||
@@ -119,4 +119,7 @@ public class CreateQualifyVerifyReq {
|
||||
@ApiModelProperty(value = "实控人手机号", required = true)
|
||||
private String skrPhone;
|
||||
|
||||
@ApiModelProperty(value = "是否由会销发起审批", required = false)
|
||||
private Boolean whetherExhibition;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.cool.store.vo.exhibition;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/12/18 17:15
|
||||
* @version 1.0
|
||||
* 线索报名的会销详情
|
||||
*/
|
||||
@Data
|
||||
public class PartnerExhibitionInfoVO {
|
||||
|
||||
@ApiModelProperty(value = "参会人名称", example = "John Doe")
|
||||
private String participantName;
|
||||
|
||||
@ApiModelProperty(value = "报名的展会编号", example = "34632023")
|
||||
private String exhibitionCode;
|
||||
|
||||
@ApiModelProperty(value = "参加的相应展会名称", example = "某某某次展会")
|
||||
private String exhibitionName;
|
||||
|
||||
@ApiModelProperty(value = "展会时间", example = "2023-07-25")
|
||||
private String exhibitionDate;
|
||||
|
||||
@ApiModelProperty(value = "展会地点", example = "维也纳大酒店")
|
||||
private String exhibitionPosition;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.vo.exhibition;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/12/18 16:42
|
||||
* @version 1.0
|
||||
* 线索报名的会销列表
|
||||
*/
|
||||
@Data
|
||||
public class PartnerExhibitionListVO {
|
||||
|
||||
@ApiModelProperty(value = "展会id", example = "123")
|
||||
private String exhibitionId;
|
||||
|
||||
@ApiModelProperty(value = "展会编号", example = "12202312")
|
||||
private String exhibitionCode;
|
||||
|
||||
@ApiModelProperty(value = "展会名称", example = "某某某次展会")
|
||||
private String exhibitionName;
|
||||
|
||||
@ApiModelProperty(value = "展会时间", example = "2023-07-25")
|
||||
private String exhibitionDate;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.cool.store.job;
|
||||
|
||||
import com.cool.store.service.ExhibitionService;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -13,11 +15,16 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class ExhibitionJob {
|
||||
|
||||
@XxlJob("finishExhibition")
|
||||
@Autowired
|
||||
private ExhibitionService exhibitionService;
|
||||
|
||||
@XxlJob("autoCloseExhibition")
|
||||
public void syncUserSourceJob() {
|
||||
XxlJobHelper.log("-------------------------------自动结束会销任务开始-------------------------------");
|
||||
|
||||
XxlJobHelper.log("-------------------------------自动结束会销任务结束-------------------------------");
|
||||
log.info("-------------------------------自动结束会销任务开始-------------------------------");
|
||||
int res = exhibitionService.autoCloseExhibition();
|
||||
log.info("-------------------------------自动结束会销任务结束,共结束" + res + "个会销-------------------------------");
|
||||
XxlJobHelper.log("-------------------------------自动结束会销任务结束,共结束" + res + "个会销-------------------------------");
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
|
||||
|
||||
@@ -137,4 +137,26 @@ public interface ExhibitionService {
|
||||
* @return
|
||||
*/
|
||||
Boolean closeExhibition(Integer exhibitionId,LoginUserInfo userInfo);
|
||||
|
||||
/**
|
||||
* 获取线索参加的会销列表
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
List<PartnerExhibitionListVO> getPartnerExhibitionList(Long partnerLineId);
|
||||
|
||||
/**
|
||||
* 获取线索参加的会销详情
|
||||
*
|
||||
* @param exhibitionId
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
PartnerExhibitionInfoVO getExhibitionInfo(Integer exhibitionId, Long partnerLineId);
|
||||
|
||||
/**
|
||||
* 自动结束会销
|
||||
*/
|
||||
int autoCloseExhibition();
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.cool.store.request.GetTipsInfoReq;
|
||||
import com.cool.store.service.CommonService;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -73,7 +72,7 @@ public class CommonServiceImpl implements CommonService {
|
||||
if (partnerExhibitionDO == null || partnerExhibitionDO.getParticipationStatus().compareTo(ExhibitionPartnerStatus.INTERVIEWING.getCode()) < 0) {
|
||||
return getCommonTipsFix(Long.parseLong(request.getPartnerLineId()));
|
||||
} else {
|
||||
return getExhibitionTipsInfo(workflowStage, workflowStatus, partnerLineId);
|
||||
return getExhibitionTipsInfoFix(Long.parseLong(request.getPartnerLineId()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,19 +93,54 @@ public class CommonServiceImpl implements CommonService {
|
||||
interviewTips = getInterviewTipsFix(lastLog, "于", "修改面试预约时间");
|
||||
break;
|
||||
case INTERVIEW_APPOINTMENT_AGREEMENT:
|
||||
interviewTips = getInterviewTipsFix(lastLog, "于", "同意面试预约申请");
|
||||
interviewTips = getInterviewTipsFix(lastLog, "于", "同意了客户的预约面试申请");
|
||||
break;
|
||||
case AUTO_OPEN_INTERVIEW:
|
||||
interviewTips = getInterviewTipsFix(lastLog, "面试房间于", "正式开放");
|
||||
interviewTips = getInterviewTipsFix(lastLog, "面试房间于", "正式开放").trim();
|
||||
break;
|
||||
case FINISH_INTERVIEW:
|
||||
interviewTips = getInterviewTipsFix(lastLog, "于", "结束面试");
|
||||
break;
|
||||
case QUALIFYVERIFY_PASS:
|
||||
interviewTips = getInterviewTipsFix(lastLog, "于", "审核通过");
|
||||
case CREATE_QUALIFYVERIFY:
|
||||
interviewTips = getInterviewTipsFix(lastLog, "于", "发起加盟商资质审核");
|
||||
break;
|
||||
case QUALIFYVERIFY_REJECT:
|
||||
interviewTips = getInterviewTipsFix(lastLog, "于", "审核拒绝");
|
||||
case QUALIFYVERIFY_PASS:
|
||||
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
|
||||
String intentionContractNo = null;
|
||||
if(partnerCertificationInfoDO != null){
|
||||
intentionContractNo = partnerCertificationInfoDO.getIntentionContractNo();
|
||||
}
|
||||
interviewTips = getVerifyResultTips(partnerLineId, OperateTypeEnum.QUALIFYVERIFY_PASS, "审核通过 | " + intentionContractNo);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return interviewTips;
|
||||
}
|
||||
|
||||
private String getExhibitionTipsInfoFix(Long partnerLineId) {
|
||||
String interviewTips = "";
|
||||
//1. 查询需要展示的操作类型最新一条
|
||||
HyPartnerTaskInfoLogDO lastLog = hyPartnerTaskInfoLogMapper.getLastTipsLog(partnerLineId);
|
||||
//2. 判断类型并返回对应的tips
|
||||
OperateTypeEnum operateType = OperateTypeEnum.getOperateTypeEnum(lastLog.getOperateType());
|
||||
switch (operateType) {
|
||||
case INTERVIEWER_BOOK_INTERVIEW:
|
||||
interviewTips = getInterviewTipsFix(lastLog, "通过展会于", "发起面试");
|
||||
break;
|
||||
case FINISH_INTERVIEW:
|
||||
interviewTips = getInterviewTipsFix(lastLog, "通过展会于", "结束面试");
|
||||
break;
|
||||
case EXHIBITION_CREATE_QUALIFYVERIFY:
|
||||
interviewTips = getInterviewTipsFix(lastLog, "通过展会于", "发起加盟商资质审核");
|
||||
break;
|
||||
case QUALIFYVERIFY_PASS:
|
||||
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
|
||||
String intentionContractNo = null;
|
||||
if(partnerCertificationInfoDO != null){
|
||||
intentionContractNo = partnerCertificationInfoDO.getIntentionContractNo();
|
||||
}
|
||||
interviewTips = getVerifyResultTips(partnerLineId, OperateTypeEnum.QUALIFYVERIFY_PASS, "审核通过 | " + intentionContractNo);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -149,7 +183,8 @@ public class CommonServiceImpl implements CommonService {
|
||||
return MessageFormat.format(content, params.toArray());
|
||||
}
|
||||
|
||||
//普通线索
|
||||
//普通线索
|
||||
@Deprecated
|
||||
private String getCommonTipsInfo(String workflowStage, String workflowStatus, Long partnerLineId) {
|
||||
String interviewTips = "";
|
||||
//1. 预约面试待审核
|
||||
@@ -200,6 +235,7 @@ public class CommonServiceImpl implements CommonService {
|
||||
}
|
||||
|
||||
//会销面试线索,通过会销进行面试的线索已开始就是面试已开始状态
|
||||
@Deprecated
|
||||
private String getExhibitionTipsInfo(String workflowStage, String workflowStatus, Long partnerLineId) {
|
||||
String interviewTips = "";
|
||||
//1. 面试已开始
|
||||
|
||||
@@ -253,7 +253,12 @@ public class FlowServiceImpl implements FlowService {
|
||||
//记录日志
|
||||
CreateQualifyVerifyDTO log = CreateQualifyVerifyDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getUserId()).operateUsername(operator.getName()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
|
||||
.summary(request.getSummary()).qualiVerifyContent(JSON.toJSONString(partnerCertificationInfoDO)).build();
|
||||
logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.CREATE_QUALIFYVERIFY,log);
|
||||
//是否由会销发起面试
|
||||
if (request.getWhetherExhibition() == null || Boolean.FALSE.equals(request.getWhetherExhibition())) {
|
||||
logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.CREATE_QUALIFYVERIFY, log);
|
||||
} else {
|
||||
logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.EXHIBITION_CREATE_QUALIFYVERIFY, log);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -677,6 +677,53 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PartnerExhibitionListVO> getPartnerExhibitionList(Long partnerLineId) {
|
||||
return hyExhibitionDAO.getPartnerExhibitionList(partnerLineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PartnerExhibitionInfoVO getExhibitionInfo(Integer exhibitionId, Long partnerLineId) {
|
||||
return hyExhibitionDAO.getPartnerExhibitionInfo(exhibitionId, partnerLineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int autoCloseExhibition() {
|
||||
//1. 查询需要关闭的会销
|
||||
HyExhibitionDO hyExhibitionDO = new HyExhibitionDO();
|
||||
hyExhibitionDO.setClosedType(0);
|
||||
hyExhibitionDO.setStartDateStr(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_DAY));
|
||||
hyExhibitionDO.setDeleted(Boolean.FALSE);
|
||||
List<HyExhibitionDO> hyExhibitionDOS = hyExhibitionDAO.querySelective(hyExhibitionDO);
|
||||
if (CollectionUtils.isEmpty(hyExhibitionDOS)) {
|
||||
return 0;
|
||||
}
|
||||
List<Integer> exhibitionIds = hyExhibitionDOS.stream().map(HyExhibitionDO::getId).collect(Collectors.toList());
|
||||
|
||||
//2. 批量刷新会销为结束状态
|
||||
hyExhibitionDOS.forEach(x->{
|
||||
x.setClosedType(1);
|
||||
x.setCloseTime(new Date());
|
||||
});
|
||||
int res = hyExhibitionDAO.batchCloseExhibition(exhibitionIds);
|
||||
|
||||
//3. 处理需要关闭的会销组
|
||||
hyExhibitionGroupDAO.batchCloseExhibitionGroup();
|
||||
|
||||
//4. 批量处理报名线索是否会销中状态
|
||||
//4.1 查询可能需要修改状态的会销线索 lineId
|
||||
List<Long> lineIds = hyPartnerExhibitionDAO.getCloseExhibitionLineIds(exhibitionIds);
|
||||
if (CollectionUtils.isEmpty(lineIds)){
|
||||
return res;
|
||||
}
|
||||
//4.2 处理会销线索是否会销中状态
|
||||
whetherInExhibition(lineIds, Boolean.FALSE);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算是否会销中
|
||||
* @param lineId
|
||||
|
||||
@@ -22,4 +22,10 @@ class ExhibitionServiceTest extends AbstractJUnit4SpringContextTests {
|
||||
log.debug("");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testAutoCloseExhibition() {
|
||||
int i = exhibitionService.autoCloseExhibition();
|
||||
log.info(i + "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dto.exhibition.SignUpExhibitionDTO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ExhibitionService;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
|
||||
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
|
||||
import com.cool.store.vo.exhibition.SignUpExhibitionVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -13,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -28,7 +32,6 @@ public class ExhibitionController {
|
||||
@Resource
|
||||
ExhibitionService exhibitionService;
|
||||
|
||||
|
||||
@ApiOperation("报名会销")
|
||||
@PostMapping("/signUpExhibition")
|
||||
public ResponseResult<SignUpExhibitionVO> signUpExhibition(@RequestBody SignUpExhibitionDTO dto) throws ApiException {
|
||||
@@ -41,4 +44,18 @@ public class ExhibitionController {
|
||||
return ResponseResult.success(exhibitionService.getExhibitionGroupDetail(exhibitionGroupId,Boolean.FALSE,Boolean.TRUE));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getPartnerExhibitionList")
|
||||
@ApiOperation("线索参加的会销列表")
|
||||
public ResponseResult<List<PartnerExhibitionListVO>> getPartnerExhibitionList() {
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(exhibitionService.getPartnerExhibitionList(user.getPartnerLineId()));
|
||||
}
|
||||
|
||||
@GetMapping("/getExhibitionInfo")
|
||||
@ApiOperation("线索参加的会销详情")
|
||||
public ResponseResult<PartnerExhibitionInfoVO> getExhibitionInfo(@RequestParam(required = true, value = "exhibitionId") Integer exhibitionId) {
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(exhibitionService.getExhibitionInfo(exhibitionId, user.getPartnerLineId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user