| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | |
| | | |
| | | //查询工单 |
| | | @ApiOperation("查询工单接口") |
| | | @SaCheckPermission("SelectWorkOrder.search") |
| | | @PostMapping ("/orderGlassDetail/{selectTime1}/{selectTime2}/{state}") |
| | | public Result dateWork( |
| | | @PathVariable Date selectTime1, |
| | |
| | | |
| | | //添加工单 |
| | | @ApiOperation("添加工单接口") |
| | | @SaCheckPermission("addWorkOrder.add") |
| | | @PostMapping("/addOrderWork") |
| | | public Result addOrderWork( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(workOrderService.addOrderWorkSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | // if(workOrderService.addOrderWorkSv(object)){ |
| | | // return Result.seccess(); |
| | | // }else { |
| | | // throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | // |
| | | // } |
| | | |
| | | } |
| | | return Result.seccess(workOrderService.addOrderWorkSv(object)); |
| | | } |
| | | |
| | | //删除工单 |
| | | @ApiOperation("删除工单接口") |
| | | @SaCheckPermission("SelectWorkOrder.delete") |
| | | @PostMapping("/deleteOrderWork/{orderId}/{productionId}") |
| | | public Result deleteOrderWork( |
| | | @PathVariable String orderId, |
| | | @PathVariable String productionId |
| | | ){ |
| | | if(workOrderService.deleteOrderWorkSv(orderId,productionId)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | // if(workOrderService.deleteOrderWorkSv(orderId,productionId)){ |
| | | // return Result.seccess(); |
| | | // }else { |
| | | // throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | // |
| | | // } |
| | | return Result.seccess(workOrderService.deleteOrderWorkSv(orderId,productionId)); |
| | | } |
| | | } |