ezhizao_zx 11 tháng trước cách đây
mục cha
commit
a7be03a60e
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/main/resources/mybatis/business/BizCarrierMapper.xml

+ 2 - 2
src/main/resources/mybatis/business/BizCarrierMapper.xml

@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isAbandoned != null"> AND is_abandoned = #{isAbandoned}</if>
             <!--  未关联任何生产单  -->
             <if test="notInUse == 1">
-                AND not exists (select 1 from biz_daywork_carrier t where t.is_changed = 0 and t.carrier_id = t1.id)
+                AND not exists (select 1 from biz_daywork_carrier t where t.is_changed = 0 and t.carrier_id = t1.id and t.deleted = 0)
             </if>
 
         </trim>
@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select t1.id,t1.category_id,t1.code,t1.qc_code,t1.remark,t1.tenant_id,t1.is_allow_more,COALESCE((SELECT t2.is_abandoned FROM biz_carrier_reject t2 WHERE t1.id = t2.carrier_id ORDER BY t2.create_time DESC LIMIT 1), 0) AS is_abandoned
         FROM biz_carrier t1
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
-            deleted = 0
+            deleted = 0 and is_allow_more = 0 and is_inspection = 0
             <if test="categoryId != null  and categoryId != 0"> AND t1.category_id = #{categoryId}</if>
             <if test="code != null  and code != ''"> AND  t1.code=#{code}</if>
             <!--  未关联任何生产单  -->