|
|
@@ -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}
|