From 6f507a2a6ff037346b052b2b7ce96ab2910c9735 Mon Sep 17 00:00:00 2001
From: deslrey <deslre0381@gmail.com>
Date: 星期一, 12 一月 2026 11:53:35 +0800
Subject: [PATCH] 外购订单的标签打印功能查询接口及查询

---
 inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java |   55 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 28 insertions(+), 27 deletions(-)

diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java b/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java
index 37fb641..2fdf20a 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java
@@ -1,15 +1,12 @@
 package com.ruoyi.inspect.controller;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.basic.dto.InventoryDetailDTO;
 import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
 import com.ruoyi.basic.pojo.IfsInventoryQuantity;
 import com.ruoyi.basic.pojo.StandardProductList;
 import com.ruoyi.common.core.domain.Result;
-import com.ruoyi.common.utils.JackSonUtil;
 import com.ruoyi.framework.exception.ErrorException;
 import com.ruoyi.inspect.dto.*;
 import com.ruoyi.inspect.pojo.InsOrder;
@@ -26,13 +23,10 @@
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.HashMap;
@@ -43,7 +37,7 @@
 @RestController
 @AllArgsConstructor
 @RequestMapping("/insOrder")
-@Api(tags="妫�楠屽崟妯″潡")
+@Api(tags = "妫�楠屽崟妯″潡")
 public class InsOrderController {
 
     private InsOrderService insOrderService;
@@ -73,8 +67,8 @@
 
     @ApiOperation(value = "妫�楠屽垎閰�")
     @PostMapping("/upInsOrder")
-    public Result<?> upInsOrder(Integer orderId, Integer sampleId, String appointed, Integer userId,String sonLaboratory) {
-        return Result.success(insOrderService.upInsOrder(orderId, sampleId, appointed, userId,sonLaboratory));
+    public Result<?> upInsOrder(Integer orderId, Integer sampleId, String appointed, Integer userId, String sonLaboratory) {
+        return Result.success(insOrderService.upInsOrder(orderId, sampleId, appointed, userId, sonLaboratory));
     }
 
     @ApiOperation(value = "娣诲姞妫�楠屼笅鍗曟暟鎹�")
@@ -133,7 +127,7 @@
 
     @ApiOperation(value = "閫氳繃妫�楠屽崟鏌ヨ妫�楠屾暟鎹紙鏁版嵁鏌ョ湅锛�")
     @GetMapping("/selectSampleAndProductByOrderId")
-    public Result<?> selectSampleAndProductByOrderId(Page page, SampleProductDto2 sampleProductDto){
+    public Result<?> selectSampleAndProductByOrderId(Page page, SampleProductDto2 sampleProductDto) {
         return Result.success(insOrderService.selectSampleAndProductByOrderId(page, sampleProductDto));
     }
 
@@ -148,34 +142,34 @@
 
     //寰呮鐨勬挙閿�鐨勬煡璇㈠緟妫�椤圭洰
     @GetMapping("/selectNoProducts")
-    public Result<?> selectNoProducts(Page page, InsProduct insProduct,Integer orderId ,String ids){
-        return Result.success(insProductService.selectNoProducts(page, insProduct,orderId,ids));
+    public Result<?> selectNoProducts(Page page, InsProduct insProduct, Integer orderId, String ids) {
+        return Result.success(insProductService.selectNoProducts(page, insProduct, orderId, ids));
     }
 
 
     @ApiOperation(value = "寰呮鐨勬挙閿�")
     @PostMapping("/updateInspected")
-    public Result<?> updateInspected(@RequestBody Map<String, Object> param){
+    public Result<?> updateInspected(@RequestBody Map<String, Object> param) {
         Integer orderId = (Integer) param.get("orderId");
         String ids = (String) param.get("ids");
         Integer typeSource = (Integer) param.get("typeSource");
         Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString());
-        if(Objects.nonNull(typeSource) && typeSource == 1){
-            ifsInventoryQuantityMapper.update(null,new LambdaUpdateWrapper<IfsInventoryQuantity>()
-                    .set(IfsInventoryQuantity::getState,0)
-                    .eq(IfsInventoryQuantity::getId,ifsInventoryId));
-            insOrderService.update(null,new LambdaUpdateWrapper<InsOrder>().set(InsOrder::getState,-1).eq(InsOrder::getId,orderId)); // 鎾ら攢
+        if (Objects.nonNull(typeSource) && typeSource == 1) {
+            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+                    .set(IfsInventoryQuantity::getState, 0)
+                    .eq(IfsInventoryQuantity::getId, ifsInventoryId));
+            insOrderService.update(null, new LambdaUpdateWrapper<InsOrder>().set(InsOrder::getState, -1).eq(InsOrder::getId, orderId)); // 鎾ら攢
         }
-        insProductService.updateInspected(orderId,ids);
+        insProductService.updateInspected(orderId, ids);
         return Result.success();
     }
 
     @ApiOperation(value = "瀹℃牳寰呮鎾ら攢")
     @PostMapping("/checkUpdate")
-    public Result<?> checkUpdate(@RequestBody Map<String, Object> param){
+    public Result<?> checkUpdate(@RequestBody Map<String, Object> param) {
         Integer orderId = (Integer) param.get("orderId");
         Integer state = (Integer) param.get("state");
-        insProductService.checkUpdate(orderId,state);
+        insProductService.checkUpdate(orderId, state);
         return Result.success();
     }
 
@@ -184,9 +178,9 @@
     @GetMapping("/getIfsOrder")
     public Result<?> getIfsOrder() {
         HashMap<String, Object> map = new HashMap<>();
-        map.put("LOCATION_NO","1302;WG-04-001");
-        map.put("STATE_DB","To be Inspected");
-        insOrderService.getIfsOrder(map,false);
+        map.put("LOCATION_NO", "1302;WG-04-001");
+        map.put("STATE_DB", "To be Inspected");
+        insOrderService.getIfsOrder(map, false);
         return Result.success();
     }
 
@@ -236,6 +230,13 @@
         return Result.success(insOrderService.labelOrderPrinting(ids));
     }
 
+    @ApiOperation(value = "澶栬喘涓嬪崟鎴愬搧鏍囩鎵撳嵃")
+    @PostMapping("/labelOutsideOrderPrinting")
+    public Result<List<InventoryDetailDTO>> labelOutsideOrderPrinting(@RequestBody Map<String, Object> param) {
+        List<Integer> ids = (List<Integer>) param.get("ids");
+        return Result.success(insOrderService.labelOutsideOrderPrinting(ids));
+    }
+
     @ApiOperation(value = "鏍规嵁璁㈠崟id鏌ヨ鏍峰搧")
     @GetMapping("/getSampleByOrderId")
     public Result<List<InsSample>> getSampleByOrderId(Integer insOrderId) {
@@ -257,8 +258,8 @@
 
     @ApiOperation(value = "鎴愬搧妫�楠屽崟鍏ㄩ儴淇℃伅瀵煎嚭")
     @GetMapping("/rawAllInsOrderExport")
-    public void rawAllInsOrderExport(SampleOrderDto sampleOrderDto, HttpServletResponse response){
-        insOrderService.rawAllInsOrderExport(sampleOrderDto,response);
+    public void rawAllInsOrderExport(SampleOrderDto sampleOrderDto, HttpServletResponse response) {
+        insOrderService.rawAllInsOrderExport(sampleOrderDto, response);
     }
 
 

--
Gitblit v1.9.3