|  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoOp.OpeApproveResult; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoOp.OpeProcessingResult; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoOp.OpeWorkOrder; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voBa.VoRoleSimple; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voOp.VoProcessingResult; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voOp.VoTaskType; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voOp.VoWorkOrder; | 
|---|
|  |  |  | import jakarta.validation.Valid; | 
|---|
|  |  |  | import lombok.RequiredArgsConstructor; | 
|---|
|  |  |  | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<VoWorkOrder> getOneWorkOrder(@RequestParam("workOrderId") Long workOrderId) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(workOrderSv.getWorkOrderById(workOrderId)); | 
|---|
|  |  |  | VoWorkOrder workOrder = workOrderSv.getWorkOrderById(workOrderId); | 
|---|
|  |  |  | if(workOrder == null) { | 
|---|
|  |  |  | return BaseResponseUtils.buildNonExist(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(workOrder); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("获取工单详情异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()); | 
|---|
|  |  |  | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<VoProcessingResult> getProResult(@RequestParam("proResultId") Long proResultId) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | String  aa = JSON.toJSONString(workOrderSv.getProResultById(proResultId)); | 
|---|
|  |  |  | System.out.println(aa); | 
|---|
|  |  |  | //String  aa = JSON.toJSONString(workOrderSv.getProResultById(proResultId)); | 
|---|
|  |  |  | //System.out.println(aa); | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(workOrderSv.getProResultById(proResultId)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("获取处理结果详情异常", e); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取任务类型列表 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/getTaskTypes") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<List<VoTaskType>> getTaskTypes() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(workOrderSv.getTaskTypes()); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("获取任务类型异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取巡检员列表 | 
|---|
|  |  |  | * @param inspector | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "/getInspectors") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<List<VoRoleSimple>> getInspectors(@RequestParam("inspector") String inspector) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(workOrderSv.getInspectors(inspector)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("获取任务类型异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|