|
|
@@ -2577,36 +2577,6 @@
|
|
|
and ptwp.flg_valid
|
|
|
</select>
|
|
|
|
|
|
- <!--获取仓库-->
|
|
|
- <select id="getWarehouseByPage" resultType="java.util.Map">
|
|
|
- SELECT mtw.wh_id as "whId",sys.f_code_name(mtw.wh_code,mtw.wh_name) AS "whCodeName"
|
|
|
- FROM mst.t_warehouse mtw left join core.t_user ctu on ctu.user_id = mtw.op_create_user_id
|
|
|
- WHERE mtw.fty_id = #{ftyId}
|
|
|
- and mtw.flg_valid
|
|
|
- <if test="whCode!=null and whCode!=''">
|
|
|
- and position(#{whCode} in mtw.wh_code) > 0
|
|
|
- </if>
|
|
|
- <if test="whName!=null and whName!=''">
|
|
|
- and position(#{warehouseName} in mtw.wh_name) > 0
|
|
|
- </if>
|
|
|
- <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
- limit #{end} offset #{start}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <!--获取仓库个数-->
|
|
|
- <select id="countWarehouseByPage" resultType="Long">
|
|
|
- select count(1)
|
|
|
- from mst.t_warehouse mtw
|
|
|
- WHERE mtw.fty_id = #{ftyId}
|
|
|
- and mtw.flg_valid
|
|
|
- <if test="whCode!=null and whCode!=''">
|
|
|
- and position(#{whCode} in mtw.wh_code) > 0
|
|
|
- </if>
|
|
|
- <if test="whName!=null and whName!=''">
|
|
|
- and position(#{warehouseName} in mtw.wh_name) > 0
|
|
|
- </if>
|
|
|
- </select>
|
|
|
|
|
|
<!--获取仓位-->
|
|
|
<select id="getWarehousePlaceByPage" resultType="java.util.Map">
|
|
|
@@ -2974,6 +2944,9 @@
|
|
|
<if test="searchText !=null">
|
|
|
AND ( tmgb.brand_name LIKE concat('%', #{searchText}, '%')
|
|
|
</if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
order by display_no asc
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
@@ -2989,9 +2962,156 @@
|
|
|
count(1)
|
|
|
FROM dkic_b.t_mst_goods_brand tmgb
|
|
|
<where>
|
|
|
- <if test="brandName != null and brandName != ''">
|
|
|
- AND tmgb.brand_name = #{brandName}
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND ( tmgb.brand_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="getGoodsCategory" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ cat_code AS "catCode",
|
|
|
+ cat_name AS "catName",
|
|
|
+ flg_valid AS "flgValid"
|
|
|
+ FROM dkic_b.t_mst_goods_category
|
|
|
+ <where>
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND ( cat_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY display_no
|
|
|
+ <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
+ limit #{end} offset #{start}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </select>
|
|
|
+ <select id="countGoodsCategory" resultType="java.lang.Long">
|
|
|
+ SELECT
|
|
|
+ count(1)
|
|
|
+ FROM dkic_b.t_mst_goods_category
|
|
|
+ <where>
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND ( cat_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="getGoodsSeries" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ series_code AS "catCode",
|
|
|
+ series_name AS "catName",
|
|
|
+ flg_valid AS "flgValid"
|
|
|
+ FROM dkic_b.t_mst_goods_series
|
|
|
+ <where>
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND ( series_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
</if>
|
|
|
</where>
|
|
|
+ order by display_no asc
|
|
|
+ <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
+ limit #{end} offset #{start}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
+ <select id="countGoodsSeries" resultType="java.lang.Long">
|
|
|
+ SELECT
|
|
|
+ count(1)
|
|
|
+ FROM dkic_b.t_mst_goods_series
|
|
|
+ <where>
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND ( series_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="getUnit" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ unit_code AS "unitCode",
|
|
|
+ unit_name AS "unitName",
|
|
|
+ flg_valid AS "flgValid"
|
|
|
+ FROM dkic_b.t_mst_unit
|
|
|
+ <where>
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND ( unit_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by display_no asc
|
|
|
+ <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
+ limit #{end} offset #{start}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="countUnit" resultType="java.lang.Long">
|
|
|
+ SELECT
|
|
|
+ count(1)
|
|
|
+ FROM dkic_b.t_mst_unit
|
|
|
+ <where>
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND ( unit_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--获取仓库档案-->
|
|
|
+ <select id="getWarehouseByPage" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ wh_code AS "whCode",
|
|
|
+ wh_name AS "whName",
|
|
|
+ supervisor AS "supervisor",
|
|
|
+ contact_phone AS "contactPhone",
|
|
|
+ flg_valid AS "flgValid"
|
|
|
+ FROM dkic_b.t_mst_warehouse
|
|
|
+ <where>
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND ( wh_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by display_no asc
|
|
|
+ <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
+ limit #{end} offset #{start}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--获取仓库档案个数-->
|
|
|
+ <select id="countWarehouseByPage" resultType="Long">
|
|
|
+ SELECT
|
|
|
+ count(1)
|
|
|
+ FROM dkic_b.t_mst_warehouse
|
|
|
+ <where>
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND ( wh_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|