| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.dto.InsPlaceOrderDto; |
| | | import com.ruoyi.process.dto.InspectionOrderDto; |
| | | import com.ruoyi.process.pojo.InspectionOrder; |
| | | import com.ruoyi.process.service.InspectionOrderService; |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | return Result.success(inspectionOrderService.addInspectionOrder(InspectionOrder)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询未绑定检验委托单") |
| | | @GetMapping("/pageUnboundInspectionOrder") |
| | | public Result<IPage<InspectionOrder>> pageUnboundInspectionOrder(InspectionOrder inspectionOrder, Page page) { |
| | | return Result.success(inspectionOrderService.pageUnboundInspectionOrder(page, inspectionOrder)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取成品下单关联的委托单信息") |
| | | @GetMapping("/getInspectionOrderForPlaceOrder") |
| | | public Result<InspectionOrderDto> getInspectionOrderForPlaceOrder(Integer inspectionOrderId) { |
| | | return Result.success(inspectionOrderService.getInspectionOrderForPlaceOrder(inspectionOrderId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增成品下单并绑定检验委托单") |
| | | @PreAuthorize("@ss.hasPermi('add:insOrder')") |
| | | @PostMapping("/addInsOrderWithInspectionOrder") |
| | | public Result<Integer> addInsOrderWithInspectionOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | return Result.success(inspectionOrderService.addInsOrderWithInspectionOrder(insPlaceOrderDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "变更检验委托单关联") |
| | | @PreAuthorize("@ss.hasPermi('add:insOrder')") |
| | | @PostMapping("/changeBinding") |
| | | public Result changeBinding(Integer insOrderId, Integer inspectionOrderId, String reason) { |
| | | return Result.success(inspectionOrderService.changeBinding(insOrderId, inspectionOrderId, reason)); |
| | | } |
| | | |
| | | /** |
| | | * 委托单检验修改 |
| | | * @return |
| | |
| | | @GetMapping("/getInspectionOrderOne") |
| | | public Result<InspectionOrderDto> getInspectionOrderOne(Integer inspectionOrderId){ |
| | | return Result.success(inspectionOrderService.getInspectionOrderOne(inspectionOrderId)); |
| | | } |
| | | |
| | | /** |
| | | * 委托单检验查看详情 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据成品订单查询委托单详情") |
| | | @GetMapping("/getInspectionOrderByInsOderId") |
| | | public Result<InspectionOrderDto> getInspectionOrderByInsOderId(Integer insOrderId){ |
| | | return Result.success(inspectionOrderService.getInspectionOrderByInsOderId(insOrderId)); |
| | | } |
| | | |
| | | /** |
| | | * 委托单查询成品订单 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "委托单查询成品订单") |
| | | @PostMapping("/getInsOrderOnInspection") |
| | | public Result<IPage<InsOrder>> getInsOrderOnInspection(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InsOrder insOrder = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InsOrder.class); |
| | | return Result.success(inspectionOrderService.getInsOrderOnInspection(page, insOrder)); |
| | | } |
| | | |
| | | /** |