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:
@@ -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();
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
//记录日志
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("");
|
||||
}
|
||||
//查询面试官和记录人信息(面试官必须有)
|
||||
|
||||
@@ -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("发送飞书通知失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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->{
|
||||
|
||||
Reference in New Issue
Block a user