|
@@ -27,6 +27,7 @@ import com.huaxu.task.service.PlanManageService;
|
|
import com.huaxu.util.DatesUtil;
|
|
import com.huaxu.util.DatesUtil;
|
|
import com.huaxu.util.MessageSendUtil;
|
|
import com.huaxu.util.MessageSendUtil;
|
|
import com.huaxu.util.UserUtil;
|
|
import com.huaxu.util.UserUtil;
|
|
|
|
+import com.sun.corba.se.spi.orbutil.threadpool.Work;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -487,4 +488,31 @@ public class WorkOrderManageController {
|
|
|
|
|
|
return workOrderManageService.batchInsertByAlarms(workOrderManages);
|
|
return workOrderManageService.batchInsertByAlarms(workOrderManages);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @GetMapping("/selectOrderPower")
|
|
|
|
+ @ApiOperation(value = "获取工单派单权限")
|
|
|
|
+ public AjaxMessage<Map<String,Object>> selectOrderPower(
|
|
|
|
+ @ApiParam(value = "工单ID", required = true) @RequestParam(required = true) Integer id){
|
|
|
|
+ Map<String,Object> result = new HashMap<String,Object>();
|
|
|
|
+ WorkOrderManage workOrderManage = workOrderManageService.selectByPrimaryKey(id);
|
|
|
|
+ //抢修工单,可以派漏点定位和停水工单
|
|
|
|
+ if(workOrderManage.getOrderTypeId() == 3 && workOrderManage.getOrderStatus() == 1){
|
|
|
|
+ result.put("2","true");
|
|
|
|
+ result.put("4","true");
|
|
|
|
+ Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
+ map.put("orderPid",workOrderManage.getId());
|
|
|
|
+ List<WorkOrderManage> workOrderManageList = workOrderManageService.selectByPId(map);
|
|
|
|
+ for(WorkOrderManage wom: workOrderManageList){
|
|
|
|
+ if (wom.getOrderStatus() == 0 || wom.getOrderStatus() == 1){
|
|
|
|
+ if(wom.getOrderTypeId()==2 ){
|
|
|
|
+ result.put("2","false");
|
|
|
|
+ }
|
|
|
|
+ else if(wom.getOrderTypeId()==4){
|
|
|
|
+ result.put("4","false");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return new AjaxMessage<>(ResultStatus.OK,result);
|
|
|
|
+ }
|
|
}
|
|
}
|