Merge remote-tracking branch 'origin/master'

This commit is contained in:
Suh
2024-01-19 18:16:08 +09:00
20 changed files with 505 additions and 82 deletions

View File

@@ -69,40 +69,7 @@
</choose>
</where>
</select>
<select id="inList2" parameterType="map" resultMap="inResultMap">
SELECT
proin.id, proin.group_number, proin.product_id, proin.in_date, proin.quantity, proin.warehouse_id, proin.manager_id, proin.note, proin.activation,
pro.name as product_name,
w.name as warehouse_name,
a.name as account_name
FROM
product_in as proin
left join plan_In as planin on proin.group_number = planin.group_number and proin.product_id = planin.product_id
left join product as pro on proin.product_id = pro.id
left join warehouse as w on proin.warehouse_id = w.id
left join account as a on proin.manager_id = a.id
<where>
<choose>
<when test="searchn == 0">
proin.activation = 1 and proin.product_id IN (SELECT id FROM product WHERE name LIKE CONCAT('%',#{search},'%'))
</when>
<when test="searchn == 1">
proin.activation = 1 AND proin.in_date LIKE CONCAT('%',#{search},'%')
</when>
<when test="searchn == 2">
proin.activation = 1 AND proin.manager_id IN (SELECT id FROM account WHERE name LIKE CONCAT('%',#{search},'%'))
</when>
<when test="searchn == 3">
proin.activation = 1 AND proin.group_number LIKE CONCAT('%',#{search},'%')
</when>
</choose>
</where>
ORDER BY proin.in_date LIMIT #{start} , #{perPage}
</select>
<select id="inList" parameterType="map" resultMap="inResultMap">
SELECT
proin.id, proin.group_number, proin.product_id, proin.in_date, proin.quantity, proin.warehouse_id, proin.manager_id, proin.note, proin.activation,
@@ -133,7 +100,7 @@
</when>
</choose>
</where>
ORDER BY proin.in_date LIMIT #{start} , #{perPage}
ORDER BY proin.in_date desc LIMIT #{start} , #{perPage}
</select>

View File

@@ -5,6 +5,15 @@
<mapper namespace="com.no1.wms.stock.StockMapper">
<!-- select -->
<select id="selectAll" parameterType="Map" resultType="Map">
select s.quantity as quantity, p.name as productName, c.cls_nm_4 as cls_nm_4, w.name as warehouseName
from stock s
left join warehouse w on s.warehouse_id = w.id
left join product p on s.product_id = p.id
left join product_category c on p.kan_code = c.kan_code;
</select>
<select id="count" parameterType="Map" resultType="java.lang.Integer">
select count(s.id)
@@ -93,9 +102,9 @@
left join product_category c on p.kan_code = c.kan_code
<where>
<choose>
<when test="searchn == 0"> s.id IS NULL and p.activation = 1 and name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> s.id IS NULL and p.activation = 1 and cls_Nm_4 like concat('%',#{search},'%')</when>
<when test="searchn == 2"> s.id IS NULL and p.activation = 1 and company_name like concat('%',#{search},'%')</when>
<when test="searchn == 0"> p.activation = 1 and name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> p.activation = 1 and cls_Nm_4 like concat('%',#{search},'%')</when>
<when test="searchn == 2"> p.activation = 1 and company_name like concat('%',#{search},'%')</when>
</choose>
</where>
order by name desc limit #{start}, #{perPage}
@@ -108,9 +117,9 @@
left join product_category c on p.kan_code = c.kan_code
<where>
<choose>
<when test="searchn == 0"> s.id IS NULL and p.activation = 1 and name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> s.id IS NULL and p.activation = 1 and cls_Nm_4 like concat('%',#{search},'%')</when>
<when test="searchn == 2"> s.id IS NULL and p.activation = 1 and company_name like concat('%',#{search},'%')</when>
<when test="searchn == 0"> p.activation = 1 and name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> p.activation = 1 and cls_Nm_4 like concat('%',#{search},'%')</when>
<when test="searchn == 2"> p.activation = 1 and company_name like concat('%',#{search},'%')</when>
</choose>
</where>
</select>
@@ -122,9 +131,9 @@
<where>
<choose>
<when test="searchn == 0"> s.id IS NULL and w.activation = 1 and w.name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> s.id IS NULL and w.activation = 1 and address like concat('%',#{search},'%')</when>
<when test="searchn == 2"> s.id IS NULL and w.activation = 1 and capacity like concat('%',#{search},'%')</when>
<when test="searchn == 0"> (s.product_id is null or s.product_id &lt;&gt; #{product_id}) and w.activation = 1 and w.name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> (s.product_id is null or s.product_id &lt;&gt; #{product_id}) and w.activation = 1 and address like concat('%',#{search},'%')</when>
<when test="searchn == 2"> (s.product_id is null or s.product_id &lt;&gt; #{product_id}) and w.activation = 1 and capacity like concat('%',#{search},'%')</when>
</choose>
</where>
order by w.name desc limit #{start}, #{perPage}
@@ -137,9 +146,9 @@
<where>
<choose>
<when test="searchn == 0"> s.id IS NULL and w.activation = 1 and w.name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> s.id IS NULL and w.activation = 1 and address like concat('%',#{search},'%')</when>
<when test="searchn == 2"> s.id IS NULL and w.activation = 1 and capacity like concat('%',#{search},'%')</when>
<when test="searchn == 0"> (s.product_id is null or s.product_id &lt;&gt; #{product_id}) and w.activation = 1 and w.name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> (s.product_id is null or s.product_id &lt;&gt; #{product_id}) and w.activation = 1 and address like concat('%',#{search},'%')</when>
<when test="searchn == 2"> (s.product_id is null or s.product_id &lt;&gt; #{product_id}) and w.activation = 1 and capacity like concat('%',#{search},'%')</when>
</choose>
</where>
</select>