Merge branch 'dev/feat/partner1.1_20230727' into hxd/feat/interviewSelect

# Conflicts:
#	coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInterviewInspectionLogMapper.java
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java
This commit is contained in:
xiaodong.hu
2023-07-21 17:12:35 +08:00
28 changed files with 467 additions and 459 deletions

View File

@@ -120,5 +120,10 @@ public class CommonConstants {
public static final String ALLOCATION = "allocation";
public static final String TRANSFER = "transfer";
// 短信模版-意向申请审批通过
public static final String SMS_TEMPLATE_CODE_INTENT = "SMS_461990823";
// 短信模版-资质审核通过
public static final String SMS_TEMPLATE_CODE_VERIFY = "SMS_461980876";
}

View File

@@ -83,7 +83,8 @@ public enum ErrorCodeEnum {
GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误", null),
NEW_MOBILE_HAS_EXIST(600002,"加盟商用户信息已存在",null),
INSPECTION_USER_OCCUPY(600002,"当前稽核人已经配置其他战区",null),
INSPECTION_INFO_NOT_EXIST(600005, "稽核信息不存在!", null)
INSPECTION_INFO_NOT_EXIST(600005, "稽核信息不存在!", null),
OPEN_AREA_NULL(600006,"归属地区不能为空",null),
;

View File

@@ -0,0 +1,40 @@
package com.cool.store.enums;
/**
* @Author: young.yu
* @Date: 2023-07-19 16:49
* @Description:
*/
public enum FeiShuNoticeMsgEnum {
//分配招商经理
ALLOCATION_INVESTMENT_MANAGER("分配招商经理", "有新的线索 于 {0} 分配给您,线索信息{1}手机号{2},请及时跟进"),
//转让招商经理
TRANS_INVESTMENT_MANAGER("转让招商经理", "有新的线索 于 {0} 转让给您,线索信息{1}手机号{2},请及时跟进"),
//意向申请通知
INTENTION_APPLY("加盟意向申请", "您有一个【加盟意向申请】待审核,申请人{0}手机号{1}于 {2} 提交加盟意向申请,请及时处理");
private String title;
private String content;
FeiShuNoticeMsgEnum(String title, String content) {
this.title = title;
this.content = content;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}

View File

@@ -116,4 +116,17 @@ public class HyOpenAreaInfoDAO {
public List<HyOpenAreaInfoDO> getAllOpenArea(){
return hyOpenAreaInfoMapper.getAllOpenArea();
}
/**
* 过滤叶子节点
* @param openAreaIds
* @return 叶子节点id
*/
public List<Long> filterLeafNode(List<Long> openAreaIds){
if(CollectionUtils.isEmpty(openAreaIds)){
return Lists.newArrayList();
}
return hyOpenAreaInfoMapper.filterLeafNode(openAreaIds);
}
}

View File

@@ -1,6 +1,6 @@
package com.cool.store.mapper;
import com.cool.store.entity.HyInspection;
import com.cool.store.entity.HyInspectionDO;
import com.cool.store.request.GetInterviewInspectionListReq;
import com.cool.store.request.GetInterviewInspectionResultListReq;
import com.cool.store.vo.interview.InterviewInspectionHistoryInfo;
@@ -16,15 +16,15 @@ import java.util.List;
public interface HyInspectionMapper {
int deleteByPrimaryKey(Long id);
int insert(HyInspection record);
int insert(HyInspectionDO record);
int insertSelective(HyInspection record);
int insertSelective(HyInspectionDO record);
HyInspection selectByPrimaryKey(Long id);
HyInspectionDO selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(HyInspection record);
int updateByPrimaryKeySelective(HyInspectionDO record);
int updateByPrimaryKey(HyInspection record);
int updateByPrimaryKey(HyInspectionDO record);
List<InterviewInspectionVO> interviewInspectionGetList(GetInterviewInspectionListReq request);

View File

@@ -57,5 +57,5 @@ public interface HyInspectionSettingMapper {
* @param inspectionUserId
* @return
*/
List<HyInspectionSettingDO> getHyInspectionSettingByUserId(String inspectionUserId, Long excludeInspectionSettingId);
List<HyInspectionSettingDO> getHyInspectionSettingByUserId(@Param("inspectionUserId") String inspectionUserId, @Param("excludeInspectionSettingId") Long excludeInspectionSettingId);
}

View File

@@ -2,6 +2,7 @@ package com.cool.store.mapper;
import com.cool.store.entity.HyInterviewInspectionLog;
import com.cool.store.vo.interview.InterviewInspectionHistoryInfo;
import com.cool.store.entity.HyInterviewInspectionLogDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -11,15 +12,16 @@ import java.util.List;
public interface HyInterviewInspectionLogMapper {
int deleteByPrimaryKey(Long id);
int insert(HyInterviewInspectionLog record);
int insert(HyInterviewInspectionLogDO record);
int insertSelective(HyInterviewInspectionLog record);
int insertSelective(HyInterviewInspectionLogDO record);
HyInterviewInspectionLog selectByPrimaryKey(Long id);
HyInterviewInspectionLogDO selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(HyInterviewInspectionLog record);
int updateByPrimaryKeySelective(HyInterviewInspectionLogDO record);
int updateByPrimaryKey(HyInterviewInspectionLog record);
List<InterviewInspectionHistoryInfo> interviewInspectionGetHistoryDetail(@Param("inspectionId") Long id);
int updateByPrimaryKey(HyInterviewInspectionLogDO record);
}

View File

@@ -111,5 +111,11 @@ public interface HyOpenAreaInfoMapper {
*/
List<HyOpenAreaInfoDO> getAllOpenArea();
/**
* 过滤叶子节点
* @param openAreaIds
* @return
*/
List<Long> filterLeafNode(@Param("openAreaIds") List<Long> openAreaIds);
}

View File

@@ -1,22 +1,22 @@
<?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.HyInspectionMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyInspection">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyInspectionDO">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="interview_plan_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="operator_user_id" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="type" javaType="java.lang.Integer" jdbcType="TINYINT" />
<arg column="status" javaType="java.lang.Integer" jdbcType="TINYINT" />
<arg column="files" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="description" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="inspection_time" javaType="java.lang.String" jdbcType="TIMESTAMP" />
<arg column="creator" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="updator" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="remark" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="deleted" javaType="java.lang.Boolean" jdbcType="BIT" />
<arg column="create_time" javaType="java.lang.String" jdbcType="TIMESTAMP" />
<arg column="update_time" javaType="java.lang.String" jdbcType="TIMESTAMP" />
<idArg column="id" javaType="java.lang.Long" />
<arg column="interview_plan_id" javaType="java.lang.Long" />
<arg column="operator_user_id" javaType="java.lang.String" />
<arg column="type" javaType="java.lang.Integer" />
<arg column="status" javaType="java.lang.Integer" />
<arg column="files" javaType="java.lang.String" />
<arg column="description" javaType="java.lang.String" />
<arg column="inspection_time" javaType="java.lang.String" />
<arg column="creator" javaType="java.lang.String" />
<arg column="updator" javaType="java.lang.String" />
<arg column="remark" javaType="java.lang.String" />
<arg column="deleted" javaType="java.lang.Boolean" />
<arg column="create_time" javaType="java.lang.String" />
<arg column="update_time" javaType="java.lang.String" />
</constructor>
</resultMap>
<sql id="Base_Column_List">
@@ -148,19 +148,19 @@
delete from hy_inspection
where id = #{id}
</delete>
<insert id="insert" parameterType="com.cool.store.entity.HyInspection">
<insert id="insert" parameterType="com.cool.store.entity.HyInspectionDO">
insert into hy_inspection (id, interview_plan_id, operator_user_id,
type, status, files,
description, inspection_time, creator,
updator, remark, deleted,
create_time, update_time)
values (#{id}, #{interviewPlanId}, #{operatorUserId,jdbcType=VARCHAR},
#{type,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{files,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{inspectionTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR},
#{updator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
values (#{id}, #{interviewPlanId}, #{operatorUserId},
#{type}, #{status}, #{files},
#{description}, #{inspectionTime}, #{creator},
#{updator}, #{remark}, #{deleted},
#{createTime}, #{updateTime})
</insert>
<insert id="insertSelective" parameterType="com.cool.store.entity.HyInspection">
<insert id="insertSelective" parameterType="com.cool.store.entity.HyInspectionDO">
insert into hy_inspection
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -214,103 +214,103 @@
#{interviewPlanId},
</if>
<if test="operatorUserId != null">
#{operatorUserId,jdbcType=VARCHAR},
#{operatorUserId},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
#{type},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
#{status},
</if>
<if test="files != null">
#{files,jdbcType=VARCHAR},
#{files},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
#{description},
</if>
<if test="inspectionTime != null">
#{inspectionTime,jdbcType=TIMESTAMP},
#{inspectionTime},
</if>
<if test="creator != null">
#{creator,jdbcType=VARCHAR},
#{creator},
</if>
<if test="updator != null">
#{updator,jdbcType=VARCHAR},
#{updator},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
#{remark},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
#{deleted},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
#{updateTime},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyInspection">
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyInspectionDO">
update hy_inspection
<set>
<if test="interviewPlanId != null">
interview_plan_id = #{interviewPlanId},
</if>
<if test="operatorUserId != null">
operator_user_id = #{operatorUserId,jdbcType=VARCHAR},
operator_user_id = #{operatorUserId},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
type = #{type},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
status = #{status},
</if>
<if test="files != null">
files = #{files,jdbcType=VARCHAR},
files = #{files},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
description = #{description},
</if>
<if test="inspectionTime != null">
inspection_time = #{inspectionTime,jdbcType=TIMESTAMP},
inspection_time = #{inspectionTime},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=VARCHAR},
creator = #{creator},
</if>
<if test="updator != null">
updator = #{updator,jdbcType=VARCHAR},
updator = #{updator},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
remark = #{remark},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
deleted = #{deleted},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_time = #{updateTime},
</if>
</set>
where id = #{id}
</update>
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyInspection">
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyInspectionDO">
update hy_inspection
set interview_plan_id = #{interviewPlanId},
operator_user_id = #{operatorUserId,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
status = #{status,jdbcType=TINYINT},
files = #{files,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
inspection_time = #{inspectionTime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=VARCHAR},
updator = #{updator,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
deleted = #{deleted,jdbcType=BIT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
operator_user_id = #{operatorUserId},
type = #{type},
status = #{status},
files = #{files},
description = #{description},
inspection_time = #{inspectionTime},
creator = #{creator},
updator = #{updator},
remark = #{remark},
deleted = #{deleted},
create_time = #{createTime},
update_time = #{updateTime}
where id = #{id}
</update>
</mapper>

View File

@@ -130,7 +130,7 @@
from
hy_inspection_setting
where
deleted = '0' and inspection_user_id = #{excludeInspectionSettingId}
deleted = '0' and inspection_user_id = #{inspectionUserId}
<if test="excludeInspectionSettingId != null">
and id != #{excludeInspectionSettingId}
</if>

View File

@@ -115,7 +115,7 @@
where
open_area_mapping_id in <foreach collection="openAreaMappingIds" separator="," open="(" close=")" item="openAreaMappingId" >#{openAreaMappingId}</foreach>
<if test="excludeInspectionSettingId != null">
and inspection_setting_id != #{inspectionSettingId}
and inspection_setting_id != #{excludeInspectionSettingId}
</if>
</update>
</mapper>

View File

@@ -1,18 +1,18 @@
<?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.HyInterviewInspectionLogMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyInterviewInspectionLog">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyInterviewInspectionLogDO">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="operator_user_id" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="inspection_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="operation_type" javaType="java.lang.Byte" jdbcType="TINYINT" />
<arg column="description" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="files" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="operation_time" javaType="java.lang.String" jdbcType="TIMESTAMP" />
<arg column="remark" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="create_time" javaType="java.lang.String" jdbcType="TIMESTAMP" />
<arg column="update_time" javaType="java.lang.String" jdbcType="TIMESTAMP" />
<idArg column="id" javaType="java.lang.Long" />
<arg column="operator_user_id" javaType="java.lang.String" />
<arg column="inspection_id" javaType="java.lang.Long" />
<arg column="operation_type" javaType="java.lang.Byte" />
<arg column="description" javaType="java.lang.String" />
<arg column="files" javaType="java.lang.String" />
<arg column="operation_time" javaType="java.lang.String" />
<arg column="remark" javaType="java.lang.String" />
<arg column="create_time" javaType="java.lang.String" />
<arg column="update_time" javaType="java.lang.String" />
</constructor>
</resultMap>
<sql id="Base_Column_List">
@@ -23,7 +23,7 @@
select
<include refid="Base_Column_List" />
from hy_interview_inspection_log
where id = #{id,jdbcType=BIGINT}
where id = #{id}
</select>
<select id="interviewInspectionGetHistoryDetail" resultType="com.cool.store.vo.interview.InterviewInspectionHistoryInfo">
SELECT a.id, b.`name` as auditorName, b.mobile as auditorMobile,operation_time as inspectionTime, operation_type as operationType ,description,files as filesStr
@@ -31,19 +31,19 @@
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hy_interview_inspection_log
where id = #{id,jdbcType=BIGINT}
where id = #{id}
</delete>
<insert id="insert" parameterType="com.cool.store.entity.HyInterviewInspectionLog">
<insert id="insert" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
insert into hy_interview_inspection_log (id, operator_user_id, inspection_id,
operation_type, description, files,
operation_time, remark, create_time,
update_time)
values (#{id,jdbcType=BIGINT}, #{operatorUserId,jdbcType=VARCHAR}, #{inspectionId,jdbcType=BIGINT},
#{operationType,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR}, #{files,jdbcType=VARCHAR},
#{operationTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
values (#{id}, #{operatorUserId}, #{inspectionId},
#{operationType}, #{description}, #{files},
#{operationTime}, #{remark}, #{createTime},
#{updateTime})
</insert>
<insert id="insertSelective" parameterType="com.cool.store.entity.HyInterviewInspectionLog">
<insert id="insertSelective" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
insert into hy_interview_inspection_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -79,81 +79,81 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
#{id},
</if>
<if test="operatorUserId != null">
#{operatorUserId,jdbcType=VARCHAR},
#{operatorUserId},
</if>
<if test="inspectionId != null">
#{inspectionId,jdbcType=BIGINT},
#{inspectionId},
</if>
<if test="operationType != null">
#{operationType,jdbcType=TINYINT},
#{operationType},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
#{description},
</if>
<if test="files != null">
#{files,jdbcType=VARCHAR},
#{files},
</if>
<if test="operationTime != null">
#{operationTime,jdbcType=TIMESTAMP},
#{operationTime},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
#{remark},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
#{updateTime},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyInterviewInspectionLog">
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
update hy_interview_inspection_log
<set>
<if test="operatorUserId != null">
operator_user_id = #{operatorUserId,jdbcType=VARCHAR},
operator_user_id = #{operatorUserId},
</if>
<if test="inspectionId != null">
inspection_id = #{inspectionId,jdbcType=BIGINT},
inspection_id = #{inspectionId},
</if>
<if test="operationType != null">
operation_type = #{operationType,jdbcType=TINYINT},
operation_type = #{operationType},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
description = #{description},
</if>
<if test="files != null">
files = #{files,jdbcType=VARCHAR},
files = #{files},
</if>
<if test="operationTime != null">
operation_time = #{operationTime,jdbcType=TIMESTAMP},
operation_time = #{operationTime},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
remark = #{remark},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_time = #{updateTime},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id}
</update>
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyInterviewInspectionLog">
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
update hy_interview_inspection_log
set operator_user_id = #{operatorUserId,jdbcType=VARCHAR},
inspection_id = #{inspectionId,jdbcType=BIGINT},
operation_type = #{operationType,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR},
files = #{files,jdbcType=VARCHAR},
operation_time = #{operationTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
set operator_user_id = #{operatorUserId},
inspection_id = #{inspectionId},
operation_type = #{operationType},
description = #{description},
files = #{files},
operation_time = #{operationTime},
remark = #{remark},
create_time = #{createTime},
update_time = #{updateTime}
where id = #{id}
</update>
</mapper>

View File

@@ -285,4 +285,13 @@
select <include refid="Base_Column_List"/> from hy_open_area_info
</select>
<select id="filterLeafNode" resultType="long">
select
id
from
hy_open_area_info
where
deleted = '0' and province_city_flag = '0' and id in <foreach collection="openAreaIds" item="openAreaId" separator="," open="(" close=")">#{openAreaId}</foreach>
</select>
</mapper>

View File

@@ -1,164 +0,0 @@
package com.cool.store.entity;
public class HyInspection {
private Long id;
private Long interviewPlanId;
private String operatorUserId;
private Integer type;
private Integer status;
private String files;
private String description;
private String inspectionTime;
private String creator;
private String updator;
private String remark;
private Boolean deleted;
private String createTime;
private String updateTime;
public HyInspection(Long id, Long interviewPlanId, String operatorUserId, Integer type, Integer status, String files, String description, String inspectionTime, String creator, String updator, String remark, Boolean deleted, String createTime, String updateTime) {
this.id = id;
this.interviewPlanId = interviewPlanId;
this.operatorUserId = operatorUserId;
this.type = type;
this.status = status;
this.files = files;
this.description = description;
this.inspectionTime = inspectionTime;
this.creator = creator;
this.updator = updator;
this.remark = remark;
this.deleted = deleted;
this.createTime = createTime;
this.updateTime = updateTime;
}
public HyInspection() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getInterviewPlanId() {
return interviewPlanId;
}
public void setInterviewPlanId(Long interviewPlanId) {
this.interviewPlanId = interviewPlanId;
}
public String getOperatorUserId() {
return operatorUserId;
}
public void setOperatorUserId(String operatorUserId) {
this.operatorUserId = operatorUserId == null ? null : operatorUserId.trim();
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getFiles() {
return files;
}
public void setFiles(String files) {
this.files = files == null ? null : files.trim();
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
public String getInspectionTime() {
return inspectionTime;
}
public void setInspectionTime(String inspectionTime) {
this.inspectionTime = inspectionTime;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator == null ? null : creator.trim();
}
public String getUpdator() {
return updator;
}
public void setUpdator(String updator) {
this.updator = updator == null ? null : updator.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Boolean getDeleted() {
return deleted;
}
public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
}

View File

@@ -0,0 +1,57 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HyInspectionDO {
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("面试计划Id")
private Long interviewPlanId;
@ApiModelProperty("稽核人user_id")
private String operatorUserId;
@ApiModelProperty("稽核类型0面试稽核后续可能有其他稽核")
private Integer type;
@ApiModelProperty("稽核状态0为未稽核1为合格2为不合格")
private Integer status;
@ApiModelProperty("多个凭证文件(以英文逗号分隔)")
private String files;
@ApiModelProperty("稽核说明")
private String description;
@ApiModelProperty("稽核时间")
private String inspectionTime;
@ApiModelProperty("enterprise_user.user_id创建人")
private String creator;
@ApiModelProperty("enterprise_user.user_id修改人")
private String updator;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("是否删除0表示未删除1表示删除")
private Boolean deleted;
@ApiModelProperty("创建时间")
private String createTime;
@ApiModelProperty("修改时间")
private String updateTime;
}

View File

@@ -1,120 +0,0 @@
package com.cool.store.entity;
public class HyInterviewInspectionLog {
private Long id;
private String operatorUserId;
private Long inspectionId;
private Integer operationType;
private String description;
private String files;
private String operationTime;
private String remark;
private String createTime;
private String updateTime;
public HyInterviewInspectionLog(Long id, String operatorUserId, Long inspectionId, Integer operationType, String description, String files, String operationTime, String remark, String createTime, String updateTime) {
this.id = id;
this.operatorUserId = operatorUserId;
this.inspectionId = inspectionId;
this.operationType = operationType;
this.description = description;
this.files = files;
this.operationTime = operationTime;
this.remark = remark;
this.createTime = createTime;
this.updateTime = updateTime;
}
public HyInterviewInspectionLog() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOperatorUserId() {
return operatorUserId;
}
public void setOperatorUserId(String operatorUserId) {
this.operatorUserId = operatorUserId == null ? null : operatorUserId.trim();
}
public Long getInspectionId() {
return inspectionId;
}
public void setInspectionId(Long inspectionId) {
this.inspectionId = inspectionId;
}
public Integer getOperationType() {
return operationType;
}
public void setOperationType(Integer operationType) {
this.operationType = operationType;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
public String getFiles() {
return files;
}
public void setFiles(String files) {
this.files = files == null ? null : files.trim();
}
public String getOperationTime() {
return operationTime;
}
public void setOperationTime(String operationTime) {
this.operationTime = operationTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
}

View File

@@ -0,0 +1,44 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HyInterviewInspectionLogDO {
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("enterprise_user.user_id操作人用户id")
private String operatorUserId;
@ApiModelProperty("稽核信息表id(hy_inspection.id)")
private Long inspectionId;
@ApiModelProperty("操作类型0为合格1为不合格2为撤销")
private Integer operationType;
@ApiModelProperty("操作说明")
private String description;
@ApiModelProperty("多个凭证文件,以英文逗号分隔")
private String files;
@ApiModelProperty("操作时间")
private String operationTime;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("创建时间")
private String createTime;
@ApiModelProperty("修改时间")
private String updateTime;
}

View File

@@ -0,0 +1,13 @@
package com.cool.store.request;
import lombok.Data;
/**
* @Author: young.yu
* @Date: 2023-06-21 11:17
* @Description:
*/
@Data
public class IntentSmsReq {
private String deadLine;
}

View File

@@ -37,7 +37,7 @@ public class InspectionSettingPageVO {
private Date updateTime;
@ApiModelProperty("更新人名称")
private String updateUsername;
private String updateUserName;
/**
* dto转vo
@@ -57,7 +57,7 @@ public class InspectionSettingPageVO {
result.setInspectionUserId(inspectionSetting.getInspectionUserId());
result.setInspectionUserName(userNameMap.get(inspectionSetting.getInspectionUserId()));
result.setUpdateTime(inspectionSetting.getUpdateTime());
result.setUpdateUsername(userNameMap.get(inspectionSetting.getUpdateUserId()));
result.setUpdateUserName(userNameMap.get(inspectionSetting.getUpdateUserId()));
resultList.add(result);
}
return resultList;

View File

@@ -98,7 +98,7 @@ public class InterviewVO {
private Integer status;
@ApiModelProperty(value = "面试过程信息视频URL数组", required = true)
private List<String> vedioList;
private List<String> videoList;
@ApiModelProperty(value = "面试过程信息未解析String", required = false)
private String processInfo;

View File

@@ -5,16 +5,19 @@ import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.cool.store.constants.CommonConstants;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dao.HyPartnerBaseInfoDAO;
import com.cool.store.dto.log.CreateQualifyVerifyDTO;
import com.cool.store.dto.log.LogBasicDTO;
import com.cool.store.dto.mdm.AccessTokenDTO;
import com.cool.store.dto.response.MDMResultDTO;
import com.cool.store.entity.*;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.InspectionTyeEnum;
import com.cool.store.enums.OperateTypeEnum;
import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ApiException;
@@ -27,6 +30,7 @@ import com.cool.store.request.data.flow.SkrRelshipProve;
import com.cool.store.service.FlowService;
import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.service.LogService;
import com.cool.store.service.SmsService;
import com.cool.store.utils.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -91,6 +95,11 @@ public class FlowServiceImpl implements FlowService {
@Autowired
private HyPartnerLineInfoService hyPartnerLineInfoService;
@Autowired
private SmsService smsService;
@Autowired
private HyPartnerBaseInfoDAO hyPartnerBaseInfoDAO;
@Autowired
private HyInspectionMapper inspectionMapper;
@@ -262,9 +271,14 @@ public class FlowServiceImpl implements FlowService {
//TODO 问题:如果因为 pdf 生成失败或者其他原因导致异常,但是由于 MDM 只是做回调,不对回调是否成功负责,会导致流程信息缺失
genPassLetterAndUpdateDB(partnerName, verifyCity, passDate, interviewId);
//4. 向面试稽核表中新增一条信息
HyInspection hyInspection = new HyInspection();
hyInspection.setInterviewPlanId(Long.parseLong(interviewPlanId));
inspectionMapper.insertSelective(hyInspection);
HyInspectionDO hyInspectionDO = new HyInspectionDO();
hyInspectionDO.setInterviewPlanId(Long.parseLong(interviewPlanId));
hyInspectionDO.setCreateTime(DateUtil.formatDateTime(passDate));
hyInspectionDO.setType(InspectionTyeEnum.INTERVIEW_INSPECTION.getCode());
inspectionMapper.insertSelective(hyInspectionDO);
//发送加盟商资质审核通过短信
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = hyPartnerBaseInfoDAO.getByPartnerLineId(partnerLineId);
smsService.sendSms(null, CommonConstants.SMS_TEMPLATE_CODE_VERIFY, hyPartnerBaseInfoDO.getMobile());
//记录日志
LogBasicDTO log = LogBasicDTO.builder().operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.build();

View File

@@ -8,15 +8,11 @@ import com.cool.store.constants.RedisConstant;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.*;
import com.cool.store.dto.log.AddTagsDTO;
import com.cool.store.dto.log.LineLogInfo;
import com.cool.store.dto.log.UserInfoUpdateDTO;
import com.cool.store.dto.log.WantInfoUpdateDTO;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.HyPartnerIntentInfoDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.exception.ServiceException;
import com.cool.store.request.BaseUserInfoRequest;
@@ -78,6 +74,9 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
@Autowired
private LogService logService;
@Autowired
private NoticeService noticeService;
@Override
public PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber) {
PartnerIntentApplyInfoVO partnerIntentApplyInfoVO = new PartnerIntentApplyInfoVO();
@@ -181,6 +180,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
@Override
public Integer submitPartnerIntentInfo(PartnerIntentInfoRequest request) {
boolean isUpdateIntentInfo = true;
log.info("HyPartnerClerkServiceImpl#submitPartnerIntentInfo request:{}", JSONObject.toJSONString(request));
if (StringUtil.isBlank(request.getPartnerId()) || Objects.isNull(request.getPartnerLineId())){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
@@ -196,6 +196,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
OperateTypeEnum operateTypeEnum = OperateTypeEnum.INTENT_INFO_UPDATE;
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
if(intentInfoDO == null){
isUpdateIntentInfo = false;
intentInfoDO = new HyPartnerIntentInfoDO();
fillIntentInfo(intentInfoDO, request);
hyPartnerIntentInfoDAO.insertSelective(intentInfoDO);
@@ -220,11 +221,19 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
if (LineStatusEnum.PUBLIC_SEAS.getCode().equals(hyPartnerLineInfoDO.getLineStatus())){
Boolean flag = hyPartnerLineInfoService.assignFollowUser(request.getPartnerId(), request.getWantShopArea(), request.getAcceptAdjustType());
hyPartnerLineInfoDO.setLineStatus(flag ? LineStatusEnum.PRIVATE_SEAS.getCode() : LineStatusEnum.PUBLIC_SEAS.getCode());
List<String> userIdList = new ArrayList<>();
if (flag){
String investmentManager = hyPartnerLineInfoService.getAssignFollowUser(request.getPartnerId(), "intent");
hyPartnerLineInfoDO.setInvestmentManager(investmentManager);
userIdList.add(investmentManager);
}
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
if(!isUpdateIntentInfo){
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTENTION_APPLY,userIdList,hyPartnerUserInfoDO.getUsername(),hyPartnerUserInfoDO.getMobile(),DateUtil.formatDateTime(new Date()));
}
if(flag){//分配招商经理成功才发送分配招商经理的飞书工作通知
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER,userIdList,DateUtil.formatDateTime(new Date()),hyPartnerUserInfoDO.getUsername(),hyPartnerUserInfoDO.getMobile());
}
}
}
//记录日志

View File

@@ -2,6 +2,7 @@ package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants;
import com.cool.store.constants.RedisConstant;
@@ -26,12 +27,11 @@ import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.sql.Array;
import java.text.MessageFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -78,6 +78,11 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
@Resource
HyPhoneLocationService hyPhoneLocationService;
@Autowired
private NoticeService noticeService;
@Autowired
private SmsService smsService;
@Override
public StageCountVO selectStagePendingCount(String userId) {
@@ -161,6 +166,9 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
&& WorkflowStatusEnum.INTERVIEW_2.getCode().equals(hyPartnerLineInfoDO.getWorkflowStatus())){
workFlowService.transferInvestmentManager(WorkflowStageEnum.getWorkflowStageByCode(hyPartnerLineInfoDO.getWorkflowStage()),request);
}
//发送飞书工作通知
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = hyPartnerBaseInfoDAO.getByPartnerLineId(request.getLineId());
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.TRANS_INVESTMENT_MANAGER,userIdList,DateUtil.formatDateTime(new Date()),hyPartnerBaseInfoDO.getUsername(),hyPartnerBaseInfoDO.getMobile());
//添加日志
LineLogInfo lineLogInfo = new LineLogInfo(hyPartnerLineInfoDO.getPartnerId(), hyPartnerLineInfoDO.getId(), user.getUserId(),
@@ -215,9 +223,15 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
List<HyPartnerLineInfoDO> otherLineList = partnerLineInfoList.stream().filter(x -> x.getCloseTime() == null).collect(Collectors.toList());
List<Long> otherLineIdList = otherLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList());
hyPartnerLineInfoDAO.updateInvestmentManager(user.getUserId(), otherLineIdList);
//添加日志
partnerLineInfoList.forEach(x->{
//给招商经理发送飞书工作通知
List<String> userIdList = new ArrayList<>();
userIdList.add(user.getUserId());
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = hyPartnerBaseInfoDAO.getByPartnerLineId(x.getId());
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER,userIdList,DateUtil.formatDateTime(new Date()),hyPartnerBaseInfoDO.getUsername(),hyPartnerBaseInfoDO.getMobile());
LineLogInfo lineLogInfo = new LineLogInfo(x.getPartnerId(), x.getId(), user.getUserId(),
user.getName(), OperateTypeEnum.ALLOCATION_INVESTMENT_MANAGER,
WorkflowStageEnum.getWorkflowStageByCode(x.getWorkflowStage()),
@@ -362,6 +376,9 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
hy.setCertifyFile(JSONObject.toJSONString(closeFollowRequest.getCertifyFile()));
}
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hy);
IntentSmsReq intentSmsReq = new IntentSmsReq();
intentSmsReq.setDeadLine(DateUtil.formatDateTime(hyPartnerLineInfoDO.getDeadline()));
smsService.sendSms(JSON.toJSONString(intentSmsReq),CommonConstants.SMS_TEMPLATE_CODE_INTENT, hy.getMobile());
}
//拒绝
@@ -710,6 +727,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
}
}
//发送飞书工作通知
if(flag){
List<String> userIdList = new ArrayList<>();
userIdList.add(investmentManager);
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(partnerId);
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER,userIdList,DateUtil.formatDateTime(new Date()),hyPartnerUserInfoDO.getUsername(),hyPartnerUserInfoDO.getMobile());
}
return hyPartnerLineInfoDO;
}

View File

@@ -79,13 +79,18 @@ public class InspectionSettingServiceImpl implements InspectionSettingService {
if(CollectionUtils.isNotEmpty(inspectionUserSetting)){
throw new ServiceException(ErrorCodeEnum.INSPECTION_USER_OCCUPY);
}
List<Long> openAreaMappingIds = hyOpenAreaInfoDAO.filterLeafNode(param.getOpenAreaMappingIds());
if(CollectionUtils.isEmpty(openAreaMappingIds)){
throw new ServiceException(ErrorCodeEnum.OPEN_AREA_NULL);
}
HyInspectionSettingDO inspectionSetting = new HyInspectionSettingDO();
inspectionSetting.setInspectionUserId(param.getInspectionUserId());
inspectionSetting.setZoneName(param.getZoneName());
inspectionSetting.setCreateUserId(userId);
inspectionSetting.setCreateTime(new Date());
inspectionSetting.setUpdateUserId(userId);
inspectionSetting.setUpdateTime(new Date());
Long inspectionSettingId = hyInspectionSettingDAO.addInspectionSetting(inspectionSetting);
List<Long> openAreaMappingIds = param.getOpenAreaMappingIds();
hyInspectionSettingMappingDAO.addInspectionSettingMapping(inspectionSettingId, openAreaMappingIds);
return inspectionSettingId;
}
@@ -97,6 +102,10 @@ public class InspectionSettingServiceImpl implements InspectionSettingService {
if(CollectionUtils.isNotEmpty(inspectionUserSetting)){
throw new ServiceException(ErrorCodeEnum.INSPECTION_USER_OCCUPY);
}
List<Long> openAreaMappingIds = hyOpenAreaInfoDAO.filterLeafNode(param.getOpenAreaMappingIds());
if(CollectionUtils.isEmpty(openAreaMappingIds)){
throw new ServiceException(ErrorCodeEnum.OPEN_AREA_NULL);
}
HyInspectionSettingDO inspectionSetting = new HyInspectionSettingDO();
inspectionSetting.setId(param.getInspectionSettingId());
inspectionSetting.setInspectionUserId(param.getInspectionUserId());
@@ -104,7 +113,6 @@ public class InspectionSettingServiceImpl implements InspectionSettingService {
inspectionSetting.setUpdateUserId(userId);
inspectionSetting.setUpdateTime(new Date());
hyInspectionSettingDAO.updateInspectionSetting(inspectionSetting);
List<Long> openAreaMappingIds = param.getOpenAreaMappingIds();
return hyInspectionSettingMappingDAO.updateInspectionSettingMapping(param.getInspectionSettingId(), openAreaMappingIds);
}

View File

@@ -9,6 +9,8 @@ import com.cool.store.entity.HyInspection;
import com.cool.store.entity.HyInterviewInspectionLog;
import com.cool.store.entity.MDMAreaDO;
import com.cool.store.entity.SysMenuDO;
import com.cool.store.entity.HyInspectionDO;
import com.cool.store.entity.HyInterviewInspectionLogDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.InspectionOperationTypeEnum;
import com.cool.store.enums.InspectionStatusEnum;
@@ -53,39 +55,39 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic
@Override
public void submit(InspectionSubmissionDTO dto) throws ApiException {
HyInspection rawInspection = inspectionMapper.selectByPrimaryKey(dto.getInspectionId());
HyInspectionDO rawInspection = inspectionMapper.selectByPrimaryKey(dto.getInspectionId());
if (Objects.isNull(rawInspection)) {
throw new ApiException(ErrorCodeEnum.INSPECTION_INFO_NOT_EXIST);
}
HyInspection hyInspection = new HyInspection();
HyInspectionDO hyInspectionDO = new HyInspectionDO();
//稽核结果和说明及文件等
hyInspection.setId(dto.getInspectionId());
hyInspectionDO.setId(dto.getInspectionId());
if (dto.getWhetherPass().equals(0)) {
hyInspection.setStatus(InspectionStatusEnum.NOT_PASS.getCode());
hyInspectionDO.setStatus(InspectionStatusEnum.NOT_PASS.getCode());
} else if (dto.getWhetherPass().equals(1)) {
hyInspection.setStatus(InspectionStatusEnum.PASS.getCode());
hyInspectionDO.setStatus(InspectionStatusEnum.PASS.getCode());
}
hyInspection.setDescription(dto.getDescription());
hyInspectionDO.setDescription(dto.getDescription());
String filesStr = spliceFiles(dto.getFiles());
hyInspection.setFiles(filesStr);
hyInspectionDO.setFiles(filesStr);
//稽核人,稽核时间,创建人
hyInspection.setOperatorUserId(CurrentUserHolder.getUserId());
hyInspection.setUpdator(CurrentUserHolder.getUserId());
hyInspection.setInspectionTime(DateUtil.now());
hyInspection.setCreator(rawInspection.getCreator() == null ? CurrentUserHolder.getUserId() : rawInspection.getCreator());
inspectionMapper.updateByPrimaryKeySelective(hyInspection);
hyInspectionDO.setOperatorUserId(CurrentUserHolder.getUserId());
hyInspectionDO.setUpdator(CurrentUserHolder.getUserId());
hyInspectionDO.setInspectionTime(DateUtil.now());
hyInspectionDO.setCreator(rawInspection.getCreator() == null ? CurrentUserHolder.getUserId() : rawInspection.getCreator());
inspectionMapper.updateByPrimaryKeySelective(hyInspectionDO);
}
@Override
@Transactional
public void revoke(InspectionRevocationDTO dto) throws ApiException {
//2.1 查询之前的一次操作
HyInspection hyInspection = inspectionMapper.selectByPrimaryKey(dto.getInspectionId());
if (Objects.isNull(hyInspection)) {
HyInspectionDO hyInspectionDO = inspectionMapper.selectByPrimaryKey(dto.getInspectionId());
if (Objects.isNull(hyInspectionDO)) {
throw new ApiException(ErrorCodeEnum.INSPECTION_INFO_NOT_EXIST);
}
//1. 撤销操作记录写入数据库面试稽核操作记录表
HyInterviewInspectionLog inspectionLog = new HyInterviewInspectionLog();
HyInterviewInspectionLogDO inspectionLog = new HyInterviewInspectionLogDO();
inspectionLog.setOperatorUserId(CurrentUserHolder.getUserId());
inspectionLog.setInspectionId(dto.getInspectionId());
inspectionLog.setOperationType(InspectionOperationTypeEnum.REVOCATION.getCode());
@@ -95,25 +97,25 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic
inspectionLog.setFiles(filesStr);
interviewInspectionLogMapper.insertSelective(inspectionLog);
//2. 撤销操作之前的一次操作写入面试稽核操作记录表
inspectionLog.setOperatorUserId(hyInspection.getOperatorUserId());
inspectionLog.setInspectionId(hyInspection.getId());
if (hyInspection.getStatus().equals(1)) {
inspectionLog.setOperatorUserId(hyInspectionDO.getOperatorUserId());
inspectionLog.setInspectionId(hyInspectionDO.getId());
if (hyInspectionDO.getStatus().equals(1)) {
inspectionLog.setOperationType(InspectionOperationTypeEnum.PASS.getCode());
} else if (hyInspection.getStatus().equals(2)) {
} else if (hyInspectionDO.getStatus().equals(2)) {
inspectionLog.setOperationType(InspectionOperationTypeEnum.NOT_PASS.getCode());
}
inspectionLog.setDescription(hyInspection.getDescription());
inspectionLog.setFiles(hyInspection.getFiles());
inspectionLog.setOperationTime(hyInspection.getInspectionTime());
inspectionLog.setDescription(hyInspectionDO.getDescription());
inspectionLog.setFiles(hyInspectionDO.getFiles());
inspectionLog.setOperationTime(hyInspectionDO.getInspectionTime());
interviewInspectionLogMapper.insertSelective(inspectionLog);
//3. 撤销操作之前的一次操作稽核信息状态修改为未稽核,并且将数据状态(其他字段)也恢复到未稽核时的状态
hyInspection.setOperatorUserId(null);
hyInspection.setStatus(InspectionStatusEnum.NOT_INSPECT.getCode());
hyInspection.setFiles(null);
hyInspection.setDescription(null);
hyInspection.setInspectionTime(null);
hyInspection.setUpdator(null);
inspectionMapper.updateByPrimaryKey(hyInspection);
hyInspectionDO.setOperatorUserId(null);
hyInspectionDO.setStatus(InspectionStatusEnum.NOT_INSPECT.getCode());
hyInspectionDO.setFiles(null);
hyInspectionDO.setDescription(null);
hyInspectionDO.setInspectionTime(null);
hyInspectionDO.setUpdator(null);
inspectionMapper.updateByPrimaryKey(hyInspectionDO);
}
@Override

View File

@@ -123,7 +123,7 @@ public class InterviewServiceImpl implements InterviewService {
//将 processInfo 解析为 List
if (!StringUtils.isEmpty(vo.getProcessInfo())) {
List<String> split = Arrays.asList(vo.getProcessInfo().split(","));
vo.setVedioList(split);
vo.setVideoList(split);
vo.setProcessInfo("");
}
//查询面试官和记录人信息(面试官必须有)

View File

@@ -0,0 +1,40 @@
package com.cool.store.service.impl;
import com.cool.store.dto.message.SendCardMessageDTO;
import com.cool.store.enums.FeiShuNoticeMsgEnum;
import com.cool.store.enums.MessageTypeEnum;
import com.cool.store.http.ISVHttpRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.text.MessageFormat;
import java.util.List;
/**
* @Author: young.yu
* @Date: 2023-07-19 17:06
* @Description:
*/
@Slf4j
@Service
public class NoticeService {
@Value("${feishu.notice.link.url:null}")
private String linkUrl;
@Autowired
private ISVHttpRequest isvHttpRequest;
public void sendFeiShuNotice(FeiShuNoticeMsgEnum feiShuNoticeMsgEnum, List<String> userIds,Object... objects) {
try{
SendCardMessageDTO sendCardMessageDTO = new SendCardMessageDTO();
sendCardMessageDTO.setUserIds(userIds);
sendCardMessageDTO.setMessageType(MessageTypeEnum.SCHEDULE_REMINDER);
sendCardMessageDTO.setMessageUrl(linkUrl);
sendCardMessageDTO.setTitle(feiShuNoticeMsgEnum.getTitle());
sendCardMessageDTO.setContent(MessageFormat.format(feiShuNoticeMsgEnum.getContent(),objects));
isvHttpRequest.sendFeiShuCardMessage(sendCardMessageDTO);
}catch (Exception e){
log.info("发送飞书通知失败");
}
}
}

View File

@@ -48,6 +48,8 @@ public class ZoneServiceImpl implements ZoneService {
EnterpriseUserDAO enterpriseUserDAO;
@Resource
RegionDAO regionDAO;
@Resource
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
@@ -67,8 +69,9 @@ public class ZoneServiceImpl implements ZoneService {
//添加战区映射的意向区域
hyIntendDevMappingDAO.deleteByOpenAreaIds(intentAreaSettingRequest.getOpenAreaIdList(),hyIntendDevZoneInfoDO.getType());
List<Long> openAreaIdList = intentAreaSettingRequest.getOpenAreaIdList();
List<Long> openAreaIdFilterList = hyOpenAreaInfoDAO.filterLeafNode(openAreaIdList);
List<HyIntendDevelopementMappingDO> list = new ArrayList<>();
openAreaIdList.stream().forEach(x->{
openAreaIdFilterList.stream().forEach(x->{
HyIntendDevelopementMappingDO hyIntendDevelopementMappingDO = new HyIntendDevelopementMappingDO();
hyIntendDevelopementMappingDO.setType(intentAreaSettingRequest.getType());
hyIntendDevelopementMappingDO.setOpenAreaMappingId(String.valueOf(x));
@@ -95,8 +98,9 @@ public class ZoneServiceImpl implements ZoneService {
hyIntendDevMappingDAO.deleteByMappingIds(Arrays.asList(intentAreaSettingRequest.getId())
,intentAreaSettingRequest.getType());
List<Long> openAreaIdList = intentAreaSettingRequest.getOpenAreaIdList();
List<Long> openAreaIdFilterList = hyOpenAreaInfoDAO.filterLeafNode(openAreaIdList);
List<HyIntendDevelopementMappingDO> list = new ArrayList<>();
openAreaIdList.stream().forEach(x->{
openAreaIdFilterList.stream().forEach(x->{
HyIntendDevelopementMappingDO hyIntendDevelopementMappingDO = new HyIntendDevelopementMappingDO();
hyIntendDevelopementMappingDO.setType(intentAreaSettingRequest.getType());
hyIntendDevelopementMappingDO.setOpenAreaMappingId(String.valueOf(x));
@@ -206,7 +210,8 @@ public class ZoneServiceImpl implements ZoneService {
//查询已经绑定战区的 意向区域
List<ZoneCheckDTO> list = hyIntendDevMappingDAO.selectByOpenAreaMappingIdList(intentAreaSettingRequest.getOpenAreaIdList(),intentAreaSettingRequest.getType(),intentAreaSettingRequest.getId());
List<Long> openAreaIdList = list.stream().map(ZoneCheckDTO::getOpenAreaMappingId).collect(Collectors.toList());
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = openAreaInfoDAO.selectByIds(openAreaIdList);
List<Long> openAreaIdFilterList = hyOpenAreaInfoDAO.filterLeafNode(openAreaIdList);
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = openAreaInfoDAO.selectByIds(openAreaIdFilterList);
Map<Long, String> areaNameMap = hyOpenAreaInfoDOList.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, HyOpenAreaInfoDO::getAreaName));
List<ZoneCheckVO> result = new ArrayList<>();
list.forEach(x->{