18482106067 2 лет назад
Родитель
Сommit
d4b69a4272

+ 4 - 3
sckw-modules/sckw-contract/src/main/resources/mapper/KwcContractLogisticsMapper.xml

@@ -76,11 +76,12 @@
           left join kwc_contract_logistics_track d on a.id = d.contract_id and d.del_flag = 0 and d.type = 0
           left join kwc_contract_logistics_unit e on a.id = e.contract_id and e.unit_type != #{entType} and e.del_flag = 0
         where a.del_flag = 0
-          and case when a.status = 3 then a.ent_id = #{entId}
-              else (b.ent_id in
+          and case when a.status = 3 then a.ent_id = #{entId} and #{entType} = 1
+                else (b.ent_id in
                     <foreach collection="allEnt" separator="," open="(" close=")" item="item">
                         #{item}
-                    </foreach> and b.id is not null)
+                    </foreach>
+                     and b.id is not null)
                 end
           <if test="startTime != null">
               and a.create_time >= #{startTime}

+ 1 - 1
sckw-modules/sckw-contract/src/main/resources/mapper/KwcContractTradeMapper.xml

@@ -74,7 +74,7 @@
           left join kwc_contract_trade_track d on a.id = d.contract_id and d.del_flag = 0 and d.type = 0
           left join kwc_contract_trade_unit e on a.id = e.contract_id and e.unit_type != #{entType} and e.del_flag = 0
          where a.del_flag = 0
-           and case when a.status = 3 then a.ent_id = #{entId}
+           and case when a.status = 3 then a.ent_id = #{entId} and #{entType} = 1
                 else (b.ent_id in
                         <foreach collection="allEnt" separator="," open="(" close=")" item="item">
                             #{item}