| | |
| | | import com.ycl.platform.domain.query.WorkOrderQuery; |
| | | import com.ycl.platform.domain.vo.DistributeWorkOrderVO; |
| | | import com.ycl.platform.domain.vo.WorkOrderVO; |
| | | import com.ycl.platform.domain.vo.WorkOrderYwConditionRecordVO; |
| | | import com.ycl.platform.mapper.*; |
| | | import com.ycl.platform.service.NotifyService; |
| | | import com.ycl.platform.service.WorkOrderAuditingRecordService; |
| | |
| | | entity.setWorkOrderNo(DateUtils.dateTimeNow()); |
| | | entity.setCreateTime(DateUtils.getNowDate()); |
| | | entity.setStatus(WorkOrderStatusEnum.WAIT_DISTRIBUTE); |
| | | entity.setDeleted("0"); |
| | | if(baseMapper.insert(entity) > 0) { |
| | | return Result.ok("添加成功"); |
| | | } |
| | |
| | | // 根据故障类型获取列表 |
| | | List<WorkOrder> list = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .in(WorkOrder::getStatus, WorkOrderStatusEnum.YW_HANDLE.getValue()) |
| | | .eq(WorkOrder::getErrorType, form.getErrorType()) |
| | | .in(WorkOrder::getErrorType, form.getErrorTypes()) |
| | | .select(WorkOrder::getId, WorkOrder::getUnitId, WorkOrder::getWorkOrderNo) |
| | | .list(); |
| | | if (list.isEmpty()) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Result selectYwConditionByYwId(String id) { |
| | | return Result.ok().data( |
| | | new LambdaQueryChainWrapper<>(workOrderYwConditionRecordMapper) |
| | | .eq(WorkOrderYwConditionRecord::getWorkOrderId, id) |
| | | .orderByAsc(WorkOrderYwConditionRecord::getCreateTime) |
| | | .list()); |
| | | } |
| | | |
| | | @Override |
| | | public Result selectYwConditionListByYwId(String id) { |
| | | return Result.ok().data( |
| | | new LambdaQueryChainWrapper<>(workOrderYwConditionRecordMapper) |
| | | .eq(WorkOrderYwConditionRecord::getWorkOrderId, id) |
| | | .orderByAsc(WorkOrderYwConditionRecord::getCreateTime) |
| | | .list()); |
| | | public Result selectYwConditionByYwId(Integer id) { |
| | | List<WorkOrderYwConditionRecordVO> ywConditionList = workOrderYwConditionRecordMapper.selectYwConditionByYwId(id); |
| | | return Result.ok().data(ywConditionList); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public Result distributePage(DistributeWorkOrderQuery query) { |
| | | IPage<WorkOrderVO> page = PageUtil.getPage(query, WorkOrderVO.class); |
| | | // todo 关键词搜索 |
| | | baseMapper.distributePage(page, query); |
| | | return Result.ok().data(page).total(page.getTotal()); |
| | | } |