|
@@ -0,0 +1,101 @@
|
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
+<!DOCTYPE mapper
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
+<mapper namespace="com.emato.biz.mapper.warehouse.WbMerchShopInveMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="com.emato.biz.domain.warehouse.OWbMerchShopInve" id="OWbMerchShopInveResult">
|
|
|
|
+ <result property="shopName" column="shop_name" />
|
|
|
|
+ <result property="shopInveSn" column="shop_inve_sn" />
|
|
|
|
+ <result property="shopSn" column="shop_sn" />
|
|
|
|
+ <result property="merchSn" column="merch_sn" />
|
|
|
|
+ <result property="merchName" column="merch_name" />
|
|
|
|
+ <result property="thirdPartyMerchCode" column="third_party_merch_code" />
|
|
|
|
+ <result property="thirdPartyMerchName" column="third_party_merch_name" />
|
|
|
|
+ <result property="sku" column="sku" />
|
|
|
|
+ <result property="cusCode" column="cus_code" />
|
|
|
|
+ <result property="bondedCode" column="bonded_code" />
|
|
|
|
+ <result property="wareSn" column="ware_sn" />
|
|
|
|
+ <result property="goodsBizType" column="goods_biz_type" />
|
|
|
|
+ <result property="shopInve" column="shop_inve" />
|
|
|
|
+ <result property="shopValid" column="shop_valid" />
|
|
|
|
+ <result property="shopFreezeNum" column="shop_freeze_num" />
|
|
|
|
+ <result property="shopDamageNum" column="shop_damage_num" />
|
|
|
|
+ <result property="shopDestroyLostNum" column="shop_destroy_lost_num" />
|
|
|
|
+ <result property="shopExpireNum" column="shop_expire_num" />
|
|
|
|
+ <result property="shopSampleFreezeNum" column="shop_sample_freeze_num" />
|
|
|
|
+ <result property="shopMinus" column="shop_minus" />
|
|
|
|
+ <result property="shopSupp" column="shop_supp" />
|
|
|
|
+ <result property="inQty" column="in_qty" />
|
|
|
|
+ <result property="outQty" column="out_qty" />
|
|
|
|
+ <result property="returnQty" column="return_qty" />
|
|
|
|
+ <result property="saleQty" column="sale_qty" />
|
|
|
|
+ <result property="locInQty" column="loc_in_qty" />
|
|
|
|
+ <result property="locOutQty" column="loc_out_qty" />
|
|
|
|
+ <result property="isValid" column="is_valid" />
|
|
|
|
+ <result property="createrSn" column="creater_sn" />
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
+ <result property="moderSn" column="moder_sn" />
|
|
|
|
+ <result property="modTime" column="mod_time" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectWbMerchShopInveColumn">
|
|
|
|
+ t.shop_inve_sn,
|
|
|
|
+ t.shop_sn,
|
|
|
|
+ t.merch_sn,
|
|
|
|
+ t.merch_name,
|
|
|
|
+ t.third_party_merch_code,
|
|
|
|
+ t.third_party_merch_name,
|
|
|
|
+ t.sku,
|
|
|
|
+ t.cus_code,
|
|
|
|
+ t.bonded_code,
|
|
|
|
+ t.ware_sn,
|
|
|
|
+ t.goods_biz_type,
|
|
|
|
+ t.shop_inve,
|
|
|
|
+ t.shop_valid,
|
|
|
|
+ t.shop_freeze_num,
|
|
|
|
+ t.shop_damage_num,
|
|
|
|
+ t.shop_destroy_lost_num,
|
|
|
|
+ t.shop_expire_num,
|
|
|
|
+ t.shop_sample_freeze_num,
|
|
|
|
+ t.shop_minus,
|
|
|
|
+ t.shop_supp,
|
|
|
|
+ t.in_qty,
|
|
|
|
+ t.out_qty,
|
|
|
|
+ t.return_qty,
|
|
|
|
+ t.sale_qty,
|
|
|
|
+ t.loc_in_qty,
|
|
|
|
+ t.loc_out_qty,
|
|
|
|
+ t.is_valid,
|
|
|
|
+ t.creater_sn,
|
|
|
|
+ t.create_time,
|
|
|
|
+ t.moder_sn,
|
|
|
|
+ t.mod_time
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <!-- 查询门店库存 -->
|
|
|
|
+ <select id="selectWbMerchShopInveList" resultType="com.emato.biz.domain.warehouse.OWbMerchShopInve">
|
|
|
|
+ SELECT
|
|
|
|
+ <include refid="selectWbMerchShopInveColumn"/>,
|
|
|
|
+ t1.shop_name
|
|
|
|
+ FROM
|
|
|
|
+ wb_merch_shop_inve t
|
|
|
|
+ LEFT JOIN o_wb_shop_base t1 ON t1.shop_sn = t.shop_sn
|
|
|
|
+ <where>
|
|
|
|
+ <if test="shopSn != null and shopSn != ''"> and t.shop_sn = #{shopSn}</if>
|
|
|
|
+ <if test="merchSn != null and merchSn != ''"> and t.merch_sn = #{merchSn}</if>
|
|
|
|
+ <if test="merchName != null and merchName != ''"> and t.merch_name like concat('%', #{merchName}, '%')</if>
|
|
|
|
+ <if test="thirdPartyMerchCode != null and thirdPartyMerchCode != ''"> and t.third_party_merch_code = #{thirdPartyMerchCode}</if>
|
|
|
|
+ <if test="thirdPartyMerchName != null and thirdPartyMerchName != ''"> and t.third_party_merch_name like concat('%', #{thirdPartyMerchName}, '%')</if>
|
|
|
|
+ <if test="sku != null and sku != ''"> and t.sku = #{sku}</if>
|
|
|
|
+ <if test="cusCode != null and cusCode != ''"> and t.cus_code = #{cusCode}</if>
|
|
|
|
+ <if test="bondedCode != null and bondedCode != ''"> and t.bonded_code = #{bondedCode}</if>
|
|
|
|
+ <if test="wareSn != null and wareSn != ''"> and t.ware_sn = #{wareSn}</if>
|
|
|
|
+ <if test="goodsBizType != null and goodsBizType != ''"> and t.goods_biz_type = #{goodsBizType}</if>
|
|
|
|
+ <if test="isValid != null and isValid != ''"> and t.is_valid = #{isValid}</if>
|
|
|
|
+ <if test="shopName != null and shopName != ''"> and t1.shop_name like concat('%', #{shopName}, '%') </if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+</mapper>
|