Merge remote-tracking branch 'hs/dev/feat/partner1.1_20230727' into dev/feat/partner1.1_20230727
# Conflicts: # coolstore-partner-webb/src/main/java/com/cool/store/config/swagger/Swagger2Config.java
This commit is contained in:
@@ -6,17 +6,17 @@
|
||||
<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.Byte" jdbcType="TINYINT" />
|
||||
<arg column="status" javaType="java.lang.Byte" jdbcType="TINYINT" />
|
||||
<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.time.LocalDateTime" jdbcType="TIMESTAMP" />
|
||||
<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.time.LocalDateTime" jdbcType="TIMESTAMP" />
|
||||
<arg column="update_time" javaType="java.lang.String" jdbcType="TIMESTAMP" />
|
||||
</constructor>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
<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.time.LocalDateTime" jdbcType="TIMESTAMP" />
|
||||
<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.time.LocalDateTime" jdbcType="TIMESTAMP" />
|
||||
<arg column="update_time" javaType="java.lang.String" jdbcType="TIMESTAMP" />
|
||||
</constructor>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class HyInspection {
|
||||
private Long id;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public interface InterviewInspectionService {
|
||||
/**
|
||||
* 提交稽核结果
|
||||
*/
|
||||
void submit(InspectionSubmissionDTO dto);
|
||||
void submit(InspectionSubmissionDTO dto) throws ApiException;
|
||||
|
||||
/**
|
||||
* 撤销稽核结果
|
||||
|
||||
@@ -19,10 +19,7 @@ import com.cool.store.enums.OperateTypeEnum;
|
||||
import com.cool.store.enums.WorkflowStatusEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.DingdingUserMapper;
|
||||
import com.cool.store.mapper.HyPartnerCertificationInfoMapper;
|
||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
||||
import com.cool.store.mapper.*;
|
||||
import com.cool.store.oss.OSSServer;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.request.data.flow.KeyText;
|
||||
@@ -94,6 +91,10 @@ public class FlowServiceImpl implements FlowService {
|
||||
|
||||
@Autowired
|
||||
private HyPartnerLineInfoService hyPartnerLineInfoService;
|
||||
|
||||
@Autowired
|
||||
private HyInspectionMapper inspectionMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException, IOException {
|
||||
@@ -260,6 +261,10 @@ public class FlowServiceImpl implements FlowService {
|
||||
//3. 生成通过函并修改数据库相关信息
|
||||
//TODO 问题:如果因为 pdf 生成失败或者其他原因导致异常,但是由于 MDM 只是做回调,不对回调是否成功负责,会导致流程信息缺失
|
||||
genPassLetterAndUpdateDB(partnerName, verifyCity, passDate, interviewId);
|
||||
//4. 向面试稽核表中新增一条信息
|
||||
HyInspection hyInspection = new HyInspection();
|
||||
hyInspection.setInterviewPlanId(Long.parseLong(interviewPlanId));
|
||||
inspectionMapper.insertSelective(hyInspection);
|
||||
//记录日志
|
||||
LogBasicDTO log = LogBasicDTO.builder().operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
|
||||
.build();
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.cool.store.service.InterviewInspectionService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -37,7 +38,11 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic
|
||||
private HyInterviewInspectionLogMapper interviewInspectionLogMapper;
|
||||
|
||||
@Override
|
||||
public void submit(InspectionSubmissionDTO dto) {
|
||||
public void submit(InspectionSubmissionDTO dto) throws ApiException {
|
||||
HyInspection rawInspection = inspectionMapper.selectByPrimaryKey(dto.getInspectionId());
|
||||
if (Objects.isNull(rawInspection)) {
|
||||
throw new ApiException(ErrorCodeEnum.INSPECTION_INFO_NOT_EXIST);
|
||||
}
|
||||
HyInspection hyInspection = new HyInspection();
|
||||
//稽核结果和说明及文件等
|
||||
hyInspection.setId(dto.getInspectionId());
|
||||
@@ -49,14 +54,16 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic
|
||||
hyInspection.setDescription(dto.getDescription());
|
||||
String filesStr = spliceFiles(dto.getFiles());
|
||||
hyInspection.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);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void revoke(InspectionRevocationDTO dto) throws ApiException {
|
||||
//2.1 查询之前的一次操作
|
||||
HyInspection hyInspection = inspectionMapper.selectByPrimaryKey(dto.getInspectionId());
|
||||
@@ -72,7 +79,7 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic
|
||||
String filesStr = spliceFiles(dto.getFiles());
|
||||
inspectionLog.setOperationTime(DateUtil.now());
|
||||
inspectionLog.setFiles(filesStr);
|
||||
interviewInspectionLogMapper.updateByPrimaryKeySelective(inspectionLog);
|
||||
interviewInspectionLogMapper.insertSelective(inspectionLog);
|
||||
//2. 撤销操作之前的一次操作写入面试稽核操作记录表
|
||||
inspectionLog.setOperatorUserId(hyInspection.getOperatorUserId());
|
||||
inspectionLog.setInspectionId(hyInspection.getId());
|
||||
@@ -83,7 +90,8 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic
|
||||
}
|
||||
inspectionLog.setDescription(hyInspection.getDescription());
|
||||
inspectionLog.setFiles(hyInspection.getFiles());
|
||||
inspectionLog.setOperationTime(DateUtil.now());
|
||||
inspectionLog.setOperationTime(hyInspection.getInspectionTime());
|
||||
interviewInspectionLogMapper.insertSelective(inspectionLog);
|
||||
//3. 撤销操作之前的一次操作稽核信息状态修改为未稽核,并且将数据状态(其他字段)也恢复到未稽核时的状态
|
||||
hyInspection.setOperatorUserId(null);
|
||||
hyInspection.setStatus(InspectionStatusEnum.NOT_INSPECT.getCode());
|
||||
|
||||
@@ -28,7 +28,7 @@ public class InterviewInspectionController {
|
||||
|
||||
@PostMapping("/submission")
|
||||
@ApiOperation("提交稽核结果")
|
||||
public ResponseResult interviewInspectionSubmit(@RequestBody InspectionSubmissionDTO dto) {
|
||||
public ResponseResult interviewInspectionSubmit(@RequestBody InspectionSubmissionDTO dto) throws ApiException {
|
||||
interviewInspectionService.submit(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user