| | |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.common.annotation.PersonalScope; |
| | | import com.ruoyi.inspect.dto.InsPlaceOrderDto; |
| | | import com.ruoyi.inspect.dto.OrderSplitDTO; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.RawMaterialOrderTemplate; |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.util.List; |
| | |
| | | @ApiOperation(value = "报检批量") |
| | | @PostMapping("/inspectionReport") |
| | | public Result<?> inspectionReport(@RequestBody Map<String, Object> param) { |
| | | List<Integer> ids = (List<Integer>) param.get("ids"); |
| | | List<Long> ids = (List<Long>) param.get("ids"); |
| | | return Result.success(rawMaterialOrderService.inspectionReport(ids)); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "撤销报检") |
| | | @PostMapping("/revokeInspectionReport") |
| | | public Result<?> revokeInspectionReport(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | Long id = (Long) param.get("id"); |
| | | return Result.success(rawMaterialOrderService.revokeInspectionReport(id)); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "原材料撤销下单") |
| | | @GetMapping("/repealRawOrder") |
| | | public Result<?> repealRawOrder(@RequestBody Map<String, Object> param){ |
| | | Integer ifsInventoryId = (Integer) param.get("ifsInventoryId"); |
| | | Long ifsInventoryId = (Long) param.get("ifsInventoryId"); |
| | | return Result.success(rawMaterialOrderService.repealRawOrder(ifsInventoryId)); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "原材料下单放行免检") |
| | | @PostMapping("/rawOrderRelease") |
| | | public Result<?> rawOrderRelease(@RequestBody Map<String, Object> param){ |
| | | Integer ifsInventoryId = (Integer) param.get("ifsInventoryId"); |
| | | Long ifsInventoryId = (Long) param.get("ifsInventoryId"); |
| | | String partDetail = (String) param.get("partDetail"); |
| | | return Result.success(rawMaterialOrderService.rawOrderRelease(ifsInventoryId, partDetail)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = "原材料下单通知免检或者多次检验") |
| | | @GetMapping("/notificationRawOrder") |
| | | public Result<?> notificationRawOrder(Integer ifsInventoryId){ |
| | | public Result<?> notificationRawOrder(Long ifsInventoryId){ |
| | | return Result.success(rawMaterialOrderService.notificationRawOrder(ifsInventoryId)); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "让步放行") |
| | | @PostMapping("/concessionRelease") |
| | | public Result<?> concessionRelease(@RequestBody Map<String, Object> param){ |
| | | Integer ifsInventoryId = (Integer) param.get("ifsInventoryId"); |
| | | Long ifsInventoryId = (Long) param.get("ifsInventoryId"); |
| | | return Result.success(rawMaterialOrderService.concessionRelease(ifsInventoryId)); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "提前入库") |
| | | @PostMapping("/advancedGodown") |
| | | public Result<?> advancedGodown(@RequestBody Map<String, Object> param){ |
| | | Integer ifsInventoryId = (Integer) param.get("ifsInventoryId"); |
| | | Long ifsInventoryId = (Long) param.get("ifsInventoryId"); |
| | | return Result.success(rawMaterialOrderService.advancedGodown(ifsInventoryId)); |
| | | } |
| | | |
| | | /** |
| | | * 下载订单拆分导入模板 |
| | | */ |
| | | @ApiOperation(value = "下载订单拆分导入模板") |
| | | @GetMapping("/downloadTemplate") |
| | | public void downloadTemplate(HttpServletResponse response){ |
| | | rawMaterialOrderService.downloadTemplate(response); |
| | | } |
| | | |
| | | /** |
| | | * 下载订单拆分导入模板 |
| | | */ |
| | | @ApiOperation(value = "导入订单拆分数据") |
| | | @PostMapping("/importSplitOrderData") |
| | | public Result importSplitOrderData(@RequestParam(value = "file") MultipartFile file, @RequestParam("ifsId") Long ifsId, HttpServletRequest request){ |
| | | return rawMaterialOrderService.importSplitOrderData(file,ifsId,request); |
| | | } |
| | | |
| | | /** |
| | | * 确认拆分订单 |
| | | */ |
| | | @ApiOperation(value = "确认拆分订单") |
| | | @PostMapping("/confirmSplitOrder") |
| | | public Result confirmSplitOrder(@RequestBody OrderSplitDTO orderSplitDTO){ |
| | | return Result.success(rawMaterialOrderService.confirmSplitOrder(orderSplitDTO)); |
| | | } |
| | | |
| | | } |