Merge remote-tracking branch 'hs/dev/feat/partner1.1_20230727' into dev/feat/partner1.1_20230727

This commit is contained in:
zhangchenbiao
2023-07-20 16:16:55 +08:00
10 changed files with 157 additions and 342 deletions

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

@@ -1,19 +1,19 @@
package com.cool.store.mapper;
import com.cool.store.entity.HyInterviewInspectionLog;
import com.cool.store.entity.HyInterviewInspectionLogDO;
import org.apache.ibatis.annotations.Mapper;
@Mapper
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);
int updateByPrimaryKey(HyInterviewInspectionLogDO record);
}

View File

@@ -1,7 +1,7 @@
<?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" />
@@ -45,7 +45,7 @@
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,
@@ -57,7 +57,7 @@
#{updator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</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">
@@ -148,7 +148,7 @@
</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">
@@ -193,7 +193,7 @@
</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},

View File

@@ -1,7 +1,7 @@
<?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" />
@@ -29,7 +29,7 @@
delete from hy_interview_inspection_log
where id = #{id,jdbcType=BIGINT}
</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,
@@ -39,7 +39,7 @@
#{operationTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</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">
@@ -106,7 +106,7 @@
</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">
@@ -139,7 +139,7 @@
</set>
where id = #{id,jdbcType=BIGINT}
</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},

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

@@ -262,9 +262,9 @@ 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));
inspectionMapper.insertSelective(hyInspectionDO);
//记录日志
LogBasicDTO log = LogBasicDTO.builder().operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.build();

View File

@@ -4,8 +4,8 @@ import cn.hutool.core.date.DateUtil;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dto.inspection.interview.InspectionRevocationDTO;
import com.cool.store.dto.inspection.interview.InspectionSubmissionDTO;
import com.cool.store.entity.HyInspection;
import com.cool.store.entity.HyInterviewInspectionLog;
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;
@@ -13,14 +13,12 @@ import com.cool.store.exception.ApiException;
import com.cool.store.mapper.HyInspectionMapper;
import com.cool.store.request.GetInterviewInspectionListReq;
import com.cool.store.request.GetInterviewInspectionResultListReq;
import com.cool.store.response.ResponseResult;
import com.cool.store.mapper.HyInterviewInspectionLogMapper;
import com.cool.store.service.InterviewInspectionService;
import com.cool.store.vo.interview.InterviewInspectionHistoryInfo;
import com.cool.store.vo.interview.InterviewInspectionInfo;
import com.cool.store.vo.interview.InterviewInspectionResultVO;
import com.cool.store.vo.interview.InterviewInspectionVO;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -45,39 +43,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());
@@ -87,25 +85,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