fix:getTrainingExperience
This commit is contained in:
@@ -63,16 +63,16 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
LeaseBaseInfoDO leaseBaseInfoDO = request.toLeaseBaseInfoDO();
|
||||
Date currentDate = new Date();
|
||||
LineInfoDO lineInfoDO = new LineInfoDO();
|
||||
if (request.getExperienceStartTime().compareTo(request.getExperienceEndTime()) >= 0){
|
||||
if (request.getExperienceStartTime().compareTo(request.getExperienceEndTime()) >= 0) {
|
||||
throw new ServiceException(ErrorCodeEnum.TIME_FALSE);
|
||||
}
|
||||
if (currentDate.before(request.getExperienceStartTime())){
|
||||
if (currentDate.before(request.getExperienceStartTime())) {
|
||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||
}else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())){
|
||||
} else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())) {
|
||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||
}else {
|
||||
} else {
|
||||
throw new ServiceException("时间");
|
||||
}
|
||||
trainingExperienceMapper.insert(leaseBaseInfoDO);
|
||||
@@ -85,16 +85,16 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void experienceStatusChange(Long lineId, Integer status, String abandonCause) {
|
||||
trainingExperienceMapper.updateStatus(lineId,status,abandonCause);
|
||||
trainingExperienceMapper.updateStatus(lineId, status, abandonCause);
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(lineId);
|
||||
if (ExperienceStatusEnum.DONE.getExperienceStatus().equals(status)){
|
||||
if (Objects.isNull(lineInfoDO)){
|
||||
if (ExperienceStatusEnum.DONE.getExperienceStatus().equals(status)) {
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
||||
}
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
}else {
|
||||
} else {
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_95.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
@@ -105,11 +105,19 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
@Override
|
||||
public LeaseBaseInfoDO getTrainingExperience(Long lineId) {
|
||||
List<String> roleNames = new ArrayList<>();
|
||||
//todo 写死了,记得改
|
||||
roleNames.add("加盟店店长");
|
||||
roleNames.add("加盟店储备店长");
|
||||
|
||||
LeaseBaseInfoDO leaseBaseInfoDO = trainingExperienceMapper.selectByLineId(lineId);
|
||||
if (leaseBaseInfoDO==null){
|
||||
if (Objects.isNull(leaseBaseInfoDO)) {
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(lineId);
|
||||
if (Objects.nonNull(lineInfoDO)
|
||||
&& lineInfoDO.getWorkflowSubStage().equals(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode())
|
||||
&& lineInfoDO.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode())) {
|
||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||
return leaseBaseInfoDO;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
List<SysRoleDO> xfStoreManager = sysRoleMapper.getXFStoreManager(roleNames);
|
||||
@@ -122,16 +130,16 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo,String userId) {
|
||||
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user