新增委托记录

This commit is contained in:
zhangchenbiao
2024-04-10 11:23:13 +08:00
parent c20956541f
commit 11ed7b4573

View File

@@ -9,10 +9,7 @@ import com.cool.store.entity.*;
import com.cool.store.enums.*; import com.cool.store.enums.*;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.request.*; import com.cool.store.request.*;
import com.cool.store.service.LabelService; import com.cool.store.service.*;
import com.cool.store.service.LineInterviewService;
import com.cool.store.service.SysRoleService;
import com.cool.store.service.UserAuthMappingService;
import com.cool.store.utils.TRTCUtils; import com.cool.store.utils.TRTCUtils;
import com.cool.store.utils.UUIDUtils; import com.cool.store.utils.UUIDUtils;
import com.cool.store.utils.poi.DateUtils; import com.cool.store.utils.poi.DateUtils;
@@ -70,6 +67,8 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
private UserAuthMappingService userAuthMappingService; private UserAuthMappingService userAuthMappingService;
@Resource @Resource
private SysRoleService sysRoleService; private SysRoleService sysRoleService;
@Resource
private TransferLogService transferLogService;
@Override @Override
public List<AppointmentTimeVO> getAppointmentTime(Long lineId, Integer interviewType, LocalDate appointmentDate) { public List<AppointmentTimeVO> getAppointmentTime(Long lineId, Integer interviewType, LocalDate appointmentDate) {
@@ -202,6 +201,10 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
@Override @Override
public Boolean modifyInterviewer(ModifyInterviewerRequest request) { public Boolean modifyInterviewer(ModifyInterviewerRequest request) {
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
if(Objects.isNull(lineInfo)){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
InterviewTypeEnum interviewType = InterviewTypeEnum.match(request.getInterviewType()); InterviewTypeEnum interviewType = InterviewTypeEnum.match(request.getInterviewType());
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(request.getLineId(), interviewType); LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(request.getLineId(), interviewType);
if(Objects.isNull(interviewInfo)){ if(Objects.isNull(interviewInfo)){
@@ -213,15 +216,16 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
update.setId(interviewInfo.getCalendarsEventId()); update.setId(interviewInfo.getCalendarsEventId());
update.setInterviewerUserId(request.getInterviewerUserId()); update.setInterviewerUserId(request.getInterviewerUserId());
lineCalendarsEventDAO.updateCalendarsEvent(update); lineCalendarsEventDAO.updateCalendarsEvent(update);
LineInfoDO lineInfo = new LineInfoDO(); LineInfoDO updateLineInfo = new LineInfoDO();
lineInfo.setId(request.getLineId()); updateLineInfo.setId(request.getLineId());
if(InterviewTypeEnum.INTERVIEW.equals(interviewType)){ if(InterviewTypeEnum.INTERVIEW.equals(interviewType)){
lineInfo.setFirstInterviewer(request.getInterviewerUserId()); updateLineInfo.setFirstInterviewer(request.getInterviewerUserId());
} }
if(InterviewTypeEnum.SECOND_INTERVIEW.equals(interviewType)){ if(InterviewTypeEnum.SECOND_INTERVIEW.equals(interviewType)){
lineInfo.setSecondInterviewer(request.getInterviewerUserId()); updateLineInfo.setSecondInterviewer(request.getInterviewerUserId());
} }
lineInfoDAO.updateLineInfo(lineInfo); lineInfoDAO.updateLineInfo(updateLineInfo);
transferLogService.addLog(lineInfo, interviewInfo.getInterviewerUserId(), request.getInterviewerUserId(), OperationLogTypeEnum.ENTRUST_INTERVIEW);
return true; return true;
} }