|
@@ -940,4 +940,50 @@
|
|
|
ORDER BY IFNULL( ROUND( SUM(TW.f_grossweightblc) / 1000, 2 ), 0 ) DESC
|
|
|
LIMIT #{topCnt}
|
|
|
</select>
|
|
|
+ <select id="nominateTreeselect" resultMap="TWarehouseResult">
|
|
|
+ <include refid="selectTWarehouseVo"/>
|
|
|
+ <where>
|
|
|
+ parent_id = 100 and
|
|
|
+ <if test="warehouseIdList != null and warehouseIdList != ''">
|
|
|
+ f_id in
|
|
|
+ <foreach item="number" collection="warehouseIdList" open="(" separator="," close=")">
|
|
|
+ #{number}
|
|
|
+ </foreach>
|
|
|
+ or
|
|
|
+ <foreach collection="warehouseIdList" item="item" index="index" separator="OR">
|
|
|
+ ancestors LIKE CONCAT('%',#{item},'%')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="tWarehouse.parentId != null and tWarehouse.parentId != ''">and parent_id = #{tWarehouse.parentId}</if>
|
|
|
+ <if test="tWarehouse.fIsBonded != null and tWarehouse.fIsBonded != ''">and f_is_bonded = #{tWarehouse.fIsBonded}</if>
|
|
|
+ <if test="tWarehouse.ancestors != null and tWarehouse.ancestors != ''">and ancestors like concat('%', #{tWarehouse.ancestors}, '%')</if>
|
|
|
+ <if test="tWarehouse.fNo != null and tWarehouse.fNo != ''">and f_no like concat('%', #{tWarehouse.fNo}, '%')</if>
|
|
|
+ <if test="tWarehouse.fName != null and tWarehouse.fName != ''">and f_name like concat('%', #{tWarehouse.fName}, '%')</if>
|
|
|
+ <if test="tWarehouse.fCname != null and tWarehouse.fCname != ''">and f_cname like concat('%', #{tWarehouse.fCname}, '%')</if>
|
|
|
+ <if test="tWarehouse.fAddr != null and tWarehouse.fAddr != ''">and f_addr like concat('%', #{tWarehouse.fAddr}, '%')</if>
|
|
|
+ <if test="tWarehouse.fTotalgross != null ">and f_totalgross like concat('%', #{tWarehouse.fTotalgross}, '%')</if>
|
|
|
+ <if test="tWarehouse.fContacts != null and tWarehouse.fContacts != ''">and f_contacts = #{tWarehouse.fContacts}</if>
|
|
|
+ <if test="tWarehouse.fTel != null and tWarehouse.fTel != ''">and f_tel = #{tWarehouse.fTel}</if>
|
|
|
+ <if test="tWarehouse.fCharg != null ">and f_charg = #{tWarehouse.fCharg}</if>
|
|
|
+ <if test="tWarehouse.fStatus != null and tWarehouse.fStatus != ''">and f_status = #{tWarehouse.fStatus}</if>
|
|
|
+ <if test="tWarehouse.supervise != null and tWarehouse.supervise != ''">and supervise = #{tWarehouse.supervise}</if>
|
|
|
+ <if test="tWarehouse.fProperties != null and tWarehouse.fProperties != ''">and f_properties like concat('%', #{tWarehouse.fProperties}, '%')</if>
|
|
|
+ <if test="tWarehouse.fType != null and tWarehouse.fType != ''">and f_type like concat('%', #{tWarehouse.fType}, '%')</if>
|
|
|
+ <if test="tWarehouse.fGoodsType != null and tWarehouse.fGoodsType != ''">and f_goods_type like concat('%', #{tWarehouse.fGoodsType}, '%')</if>
|
|
|
+ <if test="tWarehouse.fCoverArea != null and tWarehouse.fCoverArea != ''">and f_cover_area like concat('%', #{tWarehouse.fCoverArea}, '%')</if>
|
|
|
+ </where>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ order by parent_id, order_num, convert(f_name using gbk)
|
|
|
+ </select>
|
|
|
+ <select id="getByFIdList" resultMap="TWarehouseResult">
|
|
|
+ <include refid="selectTWarehouseVo"/>
|
|
|
+ <where>
|
|
|
+ parent_id = 100 and f_id in
|
|
|
+ <foreach collection="warehouseIdList" item="fid" index="index" open="(" close=")"
|
|
|
+ separator=",">
|
|
|
+ #{fid}
|
|
|
+ </foreach>
|
|
|
+
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|