|
|
@@ -2577,6 +2577,55 @@
|
|
|
and ptwp.flg_valid
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 获取仓库 -->
|
|
|
+ <select id="getWarehouse" resultType="java.util.Map">
|
|
|
+ SELECT tmw.wh_id as "whId"
|
|
|
+ ,tmw.wh_name as "whName"
|
|
|
+ ,tmw.wh_code as "whCode"
|
|
|
+ FROM dkic_b.t_mst_warehouse tmw
|
|
|
+ WHERE tmw.cp_id = #{cpId}
|
|
|
+ and tmw.flg_valid
|
|
|
+ <if test="whCode!=null and whCode!=''">
|
|
|
+ and position(#{whCode} in tmw.wh_code) > 0
|
|
|
+ </if>
|
|
|
+ <if test="whName!=null and whName!=''">
|
|
|
+ and position(#{whName} in tmw.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="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">
|
|
|
@@ -2942,7 +2991,7 @@
|
|
|
FROM dkic_b.t_mst_goods_brand tmgb
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND ( tmgb.brand_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ AND tmgb.brand_name LIKE concat('%', #{searchText}, '%')
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -2963,7 +3012,7 @@
|
|
|
FROM dkic_b.t_mst_goods_brand tmgb
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
- AND ( tmgb.brand_name LIKE concat('%', #{searchText}, '%')
|
|
|
+ AND tmgb.brand_name LIKE concat('%', #{searchText}, '%')
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -2972,14 +3021,16 @@
|
|
|
</select>
|
|
|
<select id="getGoodsCategory" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
+ cat_id AS "catId",
|
|
|
cat_code AS "catCode",
|
|
|
cat_name AS "catName",
|
|
|
+ parent_id AS "parentId",
|
|
|
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}, '%')
|
|
|
+ or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -2998,7 +3049,7 @@
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
AND ( cat_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -3007,14 +3058,15 @@
|
|
|
</select>
|
|
|
<select id="getGoodsSeries" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
- series_code AS "catCode",
|
|
|
- series_name AS "catName",
|
|
|
+ series_id AS "seriesId",
|
|
|
+ series_code AS "seriesCode",
|
|
|
+ series_name AS "serieName",
|
|
|
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}, '%')
|
|
|
+ or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -3032,7 +3084,7 @@
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
AND ( series_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -3041,14 +3093,16 @@
|
|
|
</select>
|
|
|
<select id="getUnit" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
+ unit_id AS "unitId",
|
|
|
unit_code AS "unitCode",
|
|
|
unit_name AS "unitName",
|
|
|
+ decimal_places AS "decimalPlaces",
|
|
|
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}, '%')
|
|
|
+ or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -3066,7 +3120,7 @@
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
AND ( unit_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -3077,6 +3131,7 @@
|
|
|
<!--获取仓库档案-->
|
|
|
<select id="getWarehouseByPage" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
+ wh_id AS "whId",
|
|
|
wh_code AS "whCode",
|
|
|
wh_name AS "whName",
|
|
|
supervisor AS "supervisor",
|
|
|
@@ -3086,7 +3141,7 @@
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
AND ( wh_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|
|
|
@@ -3106,7 +3161,7 @@
|
|
|
<where>
|
|
|
<if test="searchText !=null">
|
|
|
AND ( wh_name LIKE concat('%', #{searchText}, '%')
|
|
|
- or ( remarks LIKE concat('%', #{searchText}, '%')
|
|
|
+ or remarks LIKE concat('%', #{searchText}, '%'))
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
AND cp_id = #{cpId}
|