stock/create.jsp
stock/list.jsp
stock/read.jsp
stock/update.jsp
WarehouseController.java
WarehouseMapper.xml
This commit is contained in:
sungsu
2024-01-19 16:29:47 +09:00
parent 9178ad0cb2
commit c09b676be6
4 changed files with 51 additions and 20 deletions

View File

@@ -6,7 +6,7 @@
<!-- select -->
<select id="selectAll" parameterType="Map" resultType="Map">
select s.id as id, s.warehouse_id as warehouseId, s.product_id as productId, s.quantity, p.name as productName, p.kan_code, c.cls_nm_4, w.name as warehouseName
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
@@ -102,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}
@@ -117,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>
@@ -131,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}
@@ -146,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>