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

@@ -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">

View File

@@ -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">

View File

@@ -8,9 +8,9 @@
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="deleted" jdbcType="BIT" property="deleted"/>
<result column="create_id" jdbcType="VARCHAR" property="createId"/>
<result column="create_time" jdbcType="BIGINT" property="createTime"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_id" jdbcType="VARCHAR" property="updateId"/>
<result column="update_time" jdbcType="BIGINT" property="updateTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, region_id, user_id, type, deleted, create_id, create_time, update_id, update_time

View File

@@ -1,7 +1,5 @@
package com.cool.store.entity;
import java.time.LocalDateTime;
public class HyInspection {
private Long id;

View File

@@ -8,6 +8,7 @@ import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@@ -47,13 +48,13 @@ public class UserRegionMappingDO implements Serializable {
private String createId;
@ApiModelProperty("创建时间")
private Long createTime;
private Date createTime;
@ApiModelProperty("更新人")
private String updateId;
@ApiModelProperty("更新时间")
private Long updateTime;
private Date updateTime;
public static List<UserRegionMappingDO> convertSyncDO(String regionId, List<EnterpriseUserDTO> departmentUsers){
if(CollectionUtils.isEmpty(departmentUsers)){
@@ -65,8 +66,8 @@ public class UserRegionMappingDO implements Serializable {
userRegion.setRegionId(regionId);
userRegion.setUserId(departmentUser.getUserId());
userRegion.setType(DataSourceEnum.SYNC.getCode());
userRegion.setCreateTime(System.currentTimeMillis());
userRegion.setUpdateTime(System.currentTimeMillis());
userRegion.setCreateTime(new Date());
userRegion.setUpdateTime(new Date());
userRegion.setDeleted(Boolean.FALSE);
resultList.add(userRegion);
}
@@ -83,8 +84,8 @@ public class UserRegionMappingDO implements Serializable {
userRegion.setRegionId(regionId);
userRegion.setUserId(userId);
userRegion.setType(DataSourceEnum.SYNC.getCode());
userRegion.setCreateTime(System.currentTimeMillis());
userRegion.setUpdateTime(System.currentTimeMillis());
userRegion.setCreateTime(new Date());
userRegion.setUpdateTime(new Date());
userRegion.setDeleted(Boolean.FALSE);
resultList.add(userRegion);
}
@@ -111,8 +112,8 @@ public class UserRegionMappingDO implements Serializable {
userRegion.setRegionId(split[split.length-1]);
userRegion.setUserId(user.getUserId());
userRegion.setType(DataSourceEnum.SYNC.getCode());
userRegion.setCreateTime(System.currentTimeMillis());
userRegion.setUpdateTime(System.currentTimeMillis());
userRegion.setCreateTime(new Date());
userRegion.setUpdateTime(new Date());
userRegion.setDeleted(Boolean.FALSE);
resultList.add(userRegion);
}

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){

View File

@@ -52,7 +52,7 @@ public class Swagger2Config {
.groupName(groupName)
.select()
.apis(this.scanBasePackage(packages))
.paths(PathSelectors.regex(".*/inspection/setting/.*|.*getRegionUserAndSubRegion"))
//.paths(PathSelectors.regex(".*/inspection/setting/.*|.*getRegionUserAndSubRegion"))
.build()
.globalOperationParameters(pars);
}

View File

@@ -33,7 +33,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();
}