left join base_basket_info bbi on lib.basket_id = bbi.obj_id
left join base_basket_info bbi on lib.basket_id = bbi.obj_id
<where>
<iftest="baseBasketInfo != null and baseBasketInfo.steelGrade != null and baseBasketInfo.steelGrade != ''"> and bbi.steel_grade = #{baseBasketInfo.steelGrade}</if>
<iftest="baseBasketInfo != null and baseBasketInfo.selfCode != null and baseBasketInfo.selfCode != ''"> and bbi.self_code = #{baseBasketInfo.selfCode}</if>
<iftest="createBy != null and createBy != ''"> and lib.create_by = #{createBy}</if>
<iftest="baseBasketInfo != null and baseBasketInfo.steelGrade != null and baseBasketInfo.steelGrade != ''">
and bbi.steel_grade = #{baseBasketInfo.steelGrade}
</if>
<iftest="baseBasketInfo != null and baseBasketInfo.selfCode != null and baseBasketInfo.selfCode != ''">
and bbi.self_code = #{baseBasketInfo.selfCode}
</if>
<iftest="createBy != null and createBy != ''">and lib.create_by = #{createBy}</if>
right join ledger_instant_binding t2 on t1.basket_epc = t2.cargo_frame_epc
left join base_location_info t3 on t1.basket_epc = t3.remark
<where>
<iftest="cargoFrameEpc != null and cargoFrameEpc != ''"> and t1.basket_code = #{cargoFrameEpc}</if>
<iftest="waybillNumber != null and waybillNumber != ''"> and t2.waybill_number = #{waybillNumber}</if>
<iftest="params.beginCrateTime != null and params.beginCrateTime != '' and params.endCrateTime != null and params.endCrateTime != ''"> and t2.crate_time between #{params.beginCrateTime} and #{params.endCrateTime}</if>
<iftest="cargoFrameEpc != null and cargoFrameEpc != ''">and t1.basket_code = #{cargoFrameEpc}</if>
<iftest="waybillNumber != null and waybillNumber != ''">and t2.waybill_number = #{waybillNumber}</if>
<iftest="params.beginCrateTime != null and params.beginCrateTime != '' and params.endCrateTime != null and params.endCrateTime != ''">
and t2.crate_time between #{params.beginCrateTime} and #{params.endCrateTime}
</if>
</where>
</select>
@ -57,18 +70,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"