Commit 49a5dab016cac9691ec6a8b98edb9f15465b7cce

Authored by 颜惠青
1 parent d6a815aa

工单暴露接口 限制,快速工单和其他工单

urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/api/workorder/WorkOrderApiImpl.java
@@ -77,6 +77,10 @@ public class WorkOrderApiImpl implements WorkOrderApi { @@ -77,6 +77,10 @@ public class WorkOrderApiImpl implements WorkOrderApi {
77 77
78 @Override 78 @Override
79 public AppGardenWorkOrderRespVO createWorkOrder(AppGardenWorkOrderReqVO createRequestVo) { 79 public AppGardenWorkOrderRespVO createWorkOrder(AppGardenWorkOrderReqVO createRequestVo) {
  80 + if(createRequestVo.getOrderType().equals(BpmCommonConstant.ORDER_TYPE_Q)){
  81 + BpmGardenWorkOrderDO targetVO = gardenService.getWorkOrder(gardenService.createWorkOrderQuick(createRequestVo));
  82 + return BeanUtils.toBean(targetVO,AppGardenWorkOrderRespVO.class);
  83 + }
80 BpmGardenWorkOrderDO targetVO = gardenService.getWorkOrder(gardenService.createWorkOrder(createRequestVo)); 84 BpmGardenWorkOrderDO targetVO = gardenService.getWorkOrder(gardenService.createWorkOrder(createRequestVo));
81 return BeanUtils.toBean(targetVO,AppGardenWorkOrderRespVO.class); 85 return BeanUtils.toBean(targetVO,AppGardenWorkOrderRespVO.class);
82 } 86 }
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/enums/ErrorCodeConstants.java
@@ -29,5 +29,7 @@ public interface ErrorCodeConstants { @@ -29,5 +29,7 @@ public interface ErrorCodeConstants {
29 29
30 ErrorCode APP_WORKER_LEVEL_ID_NOT_EXISTS = new ErrorCode(1-900-002-000, "养护级别编码错误,不存在!"); 30 ErrorCode APP_WORKER_LEVEL_ID_NOT_EXISTS = new ErrorCode(1-900-002-000, "养护级别编码错误,不存在!");
31 31
32 - ErrorCode APP_USER_ROLE_NOT_EXISTS= new ErrorCode(1-900-002-001, "该人员未分配角色 !"); 32 + ErrorCode APP_USER_ROLE_NOT_EXISTS = new ErrorCode(1-900-002-001, "该人员未分配角色 !");
  33 +
  34 + ErrorCode APP_WORK_ORADER_ERROR = new ErrorCode(1-900-002-002, "工单类型错误,快速工单无法走此流程 !");
33 } 35 }
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
@@ -554,8 +554,11 @@ public class BpmGardenServiceImpl implements BpmGardenService{ @@ -554,8 +554,11 @@ public class BpmGardenServiceImpl implements BpmGardenService{
554 workOrder.setStreetName(roadStreetRespDTO.getStreetName()); 554 workOrder.setStreetName(roadStreetRespDTO.getStreetName());
555 workOrder.setBuzStatus(ORDER_STATUS_INIT);//工单业务初始化状态 后续操作状态 见 OperateTypeEnum 555 workOrder.setBuzStatus(ORDER_STATUS_INIT);//工单业务初始化状态 后续操作状态 见 OperateTypeEnum
556 if(StringUtil.isEmpty(createRequestVo.getOrderType())){ 556 if(StringUtil.isEmpty(createRequestVo.getOrderType())){
557 - workOrder.setOrderType(BpmCommonConstant.ORDER_TYPE_Q); 557 + workOrder.setOrderType(BpmCommonConstant.ORDER_TYPE_C);
558 }else{ 558 }else{
  559 + if(createRequestVo.getOrderType().equals(BpmCommonConstant.ORDER_TYPE_Q)){
  560 + throw exception(APP_WORK_ORADER_ERROR);
  561 + }
559 workOrder.setOrderType(createRequestVo.getOrderType()); 562 workOrder.setOrderType(createRequestVo.getOrderType());
560 } 563 }
561 DictDataRespDTO dictData = dictDataCommonApi.getDictData(CONSERVE_LEVEL, roadStreetRespDTO.getLevelId().toString()); 564 DictDataRespDTO dictData = dictDataCommonApi.getDictData(CONSERVE_LEVEL, roadStreetRespDTO.getLevelId().toString());