| | |
| | | return CommonResult.success(rent_id); |
| | | } |
| | | |
| | | /** |
| | | * 领用完成 操作 |
| | | * @param createReqVO 创建信息 |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public CommonResult<Long> readyOperation(DevRentSaveReqVO createReqVO) { |
| | | Long userId = SecurityFrameworkUtils.getLoginUserId(); |
| | | String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); |
| | | Long rent_id = createReqVO.getId(); |
| | | Long rent_id = createReqVO.getId(); // dev_rent 表的ID |
| | | |
| | | // 标注设备 已领取 |
| | | Integer ret = markDevRecieved(createReqVO.getDevId(), rent_id); |
| | |
| | | |
| | | // 检查项目.亲和性 处理逻辑 |
| | | if (checkTypeDO.getAffinityCheckTypes().length > 0) { |
| | | List<QueueDO> affinityReadyItems = queueMapper.getCurPatGivenCheckTypesAndStatus(firstOnStageQueueItem.getPatId(), checkTypeDO.getAffinityCheckTypes(), QueueStatusEnum.READY.getStatus()); |
| | | if (!affinityReadyItems.isEmpty()) { |
| | | QueueDO tmpQueueDO = affinityReadyItems.get(0); |
| | | List<QueueDO> affinityAffinityWaitingItems = queueMapper.getCurPatGivenCheckTypesAndStatus(firstOnStageQueueItem.getPatId(), checkTypeDO.getAffinityCheckTypes(), QueueStatusEnum.AFFINITY_WAITING.getStatus()); |
| | | if (!affinityAffinityWaitingItems.isEmpty()) { |
| | | QueueDO tmpQueueDO = affinityAffinityWaitingItems.get(0); |
| | | tmpQueueDO.setStatus(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueMapper.updateById(tmpQueueDO); |
| | | } else { |
| | | List<QueueDO> affinityAffinityWaitingItems = queueMapper.getCurPatGivenCheckTypesAndStatus(firstOnStageQueueItem.getPatId(), checkTypeDO.getAffinityCheckTypes(), QueueStatusEnum.AFFINITY_WAITING.getStatus()); |
| | | if (!affinityAffinityWaitingItems.isEmpty()) { |
| | | QueueDO tmpQueueDO = affinityAffinityWaitingItems.get(0); |
| | | tmpQueueDO.setStatus(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueMapper.updateById(tmpQueueDO); |
| | | } |
| | | } |
| | | } |
| | | |