|
@@ -355,4 +355,80 @@
|
|
|
f_no = #{fNo} and del_flag = '0' limit 1
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="queryGoodsAccountByPageV1" resultType="map">
|
|
|
+ SELECT
|
|
|
+ TW.f_no AS warehouseCode,
|
|
|
+ TW.f_name AS warehouseName,
|
|
|
+ TC.f_no AS ownerCode,
|
|
|
+ TC.f_name AS ownerName,
|
|
|
+ TG.f_name AS goodsName,
|
|
|
+ TG.f_packagespecs AS specifications,
|
|
|
+ '' AS producing,
|
|
|
+ '' AS materialQuality,
|
|
|
+ '' AS level,
|
|
|
+ '' AS totalQuantity,
|
|
|
+ '' AS availableQuantity,
|
|
|
+ '' AS quantityUnit,
|
|
|
+ '' AS totalNetWeight,
|
|
|
+ '' AS availableWeight,
|
|
|
+ '' AS weightUnit,
|
|
|
+ '' AS spu
|
|
|
+ FROM t_warehouse TW
|
|
|
+ LEFT JOIN t_whgenleg TWG ON TWG.f_warehouseid = TW.f_id
|
|
|
+ LEFT JOIN t_corps TC ON TC.f_id = TWG.f_corpid
|
|
|
+ LEFT JOIN t_goods TG ON TG.f_id = TWG.f_goodsid
|
|
|
+ <where>
|
|
|
+ del_flag = '0'
|
|
|
+ <if test="ownerName != null and ownerName != ''"> and TC.f_name like concat('%', #{ownerName}, '%')</if>
|
|
|
+ <if test="goodsName != null and goodsName != ''"> and TG.f_name like concat('%', #{goodsName}, '%')</if>
|
|
|
+ <if test="specifications != null and specifications != ''"> and TG.f_packagespecs like concat('%', #{specifications}, '%')</if>
|
|
|
+ <if test="producing != null and producing != ''"> and '' like concat('%', #{producing}, '%')</if>
|
|
|
+ <if test="materialQuality != null and materialQuality != ''"> and '' like concat('%', #{materialQuality}, '%')</if>
|
|
|
+ <if test="level != null and level != ''"> and '' like concat('%', #{level}, '%')</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="queryGoodsAccountDetailByPageV1" resultType="map">
|
|
|
+ SELECT
|
|
|
+ '' AS id,
|
|
|
+ TW.f_no AS warehouseCode,
|
|
|
+ TW.f_name AS warehouseName,
|
|
|
+ '' AS areaName,
|
|
|
+ '' AS areaCode,
|
|
|
+ '' AS slotName,
|
|
|
+ '' AS slotCode,
|
|
|
+ '' AS receiptDoc,
|
|
|
+ '' AS billOfLading,
|
|
|
+ TC.f_no AS ownerCode,
|
|
|
+ TC.f_name AS ownerName,
|
|
|
+ TG.f_name AS goodsName,
|
|
|
+ TG.f_packagespecs AS specifications,
|
|
|
+ '' AS producing,
|
|
|
+ '' AS materialQuality,
|
|
|
+ '' AS level,
|
|
|
+ '' AS totalQuantity,
|
|
|
+ '' AS availableQuantity,
|
|
|
+ '' AS quantityUnit,
|
|
|
+ '' AS totalNetWeight,
|
|
|
+ '' AS availableWeight,
|
|
|
+ '' AS weightUnit,
|
|
|
+ '' AS storesTime,
|
|
|
+ '' AS productionTime,
|
|
|
+ '' AS plateNumber,
|
|
|
+ '' AS batchNo,
|
|
|
+ '' AS warehouseReceiptNo
|
|
|
+ FROM t_warehouse TW
|
|
|
+ LEFT JOIN t_whgenleg TWG ON TWG.f_warehouseid = TW.f_id
|
|
|
+ LEFT JOIN t_corps TC ON TC.f_id = TWG.f_corpid
|
|
|
+ LEFT JOIN t_goods TG ON TG.f_id = TWG.f_goodsid
|
|
|
+ <where>
|
|
|
+ TW.f_no = #{warehouseCode}
|
|
|
+ AND del_flag = '0'
|
|
|
+ <if test="areaName != null and areaName != ''"> and '' like concat('%', #{areaName}, '%')</if>
|
|
|
+ <if test="areaCode != null and areaCode != ''"> and '' = #{areaCode}</if>
|
|
|
+ <if test="slotName != null and slotName != ''"> and '' like concat('%', #{slotName}, '%')</if>
|
|
|
+ <if test="slotCode != null and slotCode != ''"> and '' = #{slotCode}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|