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

This commit is contained in:
xiaodong.hu
2023-07-20 11:35:12 +08:00
11 changed files with 41 additions and 30 deletions

View File

@@ -30,7 +30,7 @@ public interface InterviewInspectionService {
/**
* 提交稽核结果
*/
void submit(InspectionSubmissionDTO dto);
void submit(InspectionSubmissionDTO dto) throws ApiException;
/**
* 撤销稽核结果

View File

@@ -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();

View File

@@ -23,6 +23,7 @@ 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;
import java.util.List;
import java.util.Objects;
@@ -43,7 +44,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());
@@ -55,14 +60,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());
@@ -78,7 +85,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());
@@ -89,7 +96,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());

View File

@@ -52,7 +52,6 @@ public class LoginServiceImpl implements LoginService {
throw new ServiceException(ErrorCodeEnum.USER_NOT_EXIST);
}
LoginUserInfo currentUser = new LoginUserInfo();
RefreshUser refreshUser = new RefreshUser();
// 查企业用户
EnterpriseUserDO enterpriseUser = enterpriseUserDAO.getUserInfoById(userId);
if(enterpriseUser == null){