ezhizao_zx 11 months ago
parent
commit
ef836e1834

+ 4 - 2
src/main/java/cn/ezhizao/project/business/product/controller/SortDayworkController.java

@@ -101,14 +101,16 @@ public class SortDayworkController extends BaseController {
         if (bizDayworkItem.getKeywords() != null ) {
             // 如果 keywords 不为空或空字符串,则添加 LIKE 条件
             list = bizProductInspectionInstructionService.query()
-                    .eq("technological_process_id", bizDayworkItem.getTechnologicalProcessId())
+                    .eq("product_id", bizLot.getProductId())
+                    .eq("technology_version", bizLot.getTechnologyVersion())
                     .eq("process_id", bizDayworkItem.getProcessId())
                     .like("standard", bizDayworkItem.getKeywords()) // 添加 LIKE 条件
                     .list();
         } else {
             // 如果 keywords 为空,则不添加 LIKE 条件
             list = bizProductInspectionInstructionService.query()
-                    .eq("technological_process_id", bizDayworkItem.getTechnologicalProcessId())
+                    .eq("product_id", bizLot.getProductId())
+                    .eq("technology_version", bizLot.getTechnologyVersion())
                     .eq("process_id", bizDayworkItem.getProcessId())
                     .list();
         }

+ 3 - 1
src/main/resources/mybatis/business/inspection/BizProductInspectionInstructionMapper.xml

@@ -15,9 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             deleted = 0
             <if test="type != null "> AND type = #{type}</if>
             <if test="technologyVersion != null  and technologyVersion != ''"> AND technology_version = #{technologyVersion}</if>
+            <if test="productId != null "> AND product_id = #{productId}</if>
+            <if test="processId != null "> AND process_id = #{processId}</if>
             <if test="standard != null  and standard != ''"> AND standard = #{standard}</if>
             <if test="equipment != null  and equipment != ''"> AND equipment = #{equipment}</if>
-            <if test="technologicalProcessDetailId != null"> AND technological_process_detail_id = #{technologicalProcessDetailId}</if>
+<!--            <if test="technologicalProcessDetailId != null"> AND technological_process_detail_id = #{technologicalProcessDetailId}</if>-->
         </trim>
     </select>