mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
Merge branch 'master' of https://github.com/suhf/No1WMS
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
|
||||
<insert id="createProcess" parameterType="CategoryDto">
|
||||
INSERT INTO product_category (kan_code, cls_nm_1, cls_nm_2, cls_nm_3, cls_nm_4, activation)
|
||||
VALUES (#{dto.kan_code}, #{dto.cls_nm_1},#{dto.cls_nm_2},#{dto.cls_nm_3},#{dto.cls_nm_4},1)
|
||||
VALUES (#{kan_code}, #{cls_nm_1},#{cls_nm_2},#{cls_nm_3},#{cls_nm_4},1)
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- update -->
|
||||
|
||||
<update id="updateByKanCode" parameterType="CategoryDto">
|
||||
@@ -51,7 +51,9 @@
|
||||
select * from product_category
|
||||
</select>
|
||||
|
||||
|
||||
<select id="kanCheck" parameterType="String" resultType="String">
|
||||
select kan_code from product_category where kan_code = #{kan_code}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,32 +2,32 @@
|
||||
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTO Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.no1.wms.stock.StockMapper">
|
||||
<mapper namespace="com.no1.wms.authority.StockMapper">
|
||||
|
||||
<!-- select -->
|
||||
<select id="count" parameterType="map" resultType="com.no1.wms.stock.StockDto">
|
||||
select count(*) from wms.stock left join wms.warehouse on wms.stock.warehouse_id = wms.warehouse.id left join wms.product on wms.stock.product_id = wms.product.id
|
||||
<where>
|
||||
<choose>
|
||||
<when test="searchn == 0"> activation = 1 and warehouse.name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 1"> activation = 1 and product.name like concat('%',#{search},'%') </when>
|
||||
<when test="searchn == 0"> wms.stock.activation = 1 and wms.warehouse.name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 1"> wms.stock.activation = 1 and wms.product.name like concat('%',#{search},'%') </when>
|
||||
</choose>
|
||||
</where>
|
||||
order by id desc limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<select id="stockList" parameterType="map" resultType="com.no1.wms.stock.StockDto">
|
||||
<select id="list" parameterType="map" resultType="com.no1.wms.stock.StockDto">
|
||||
select * from wms.stock left join wms.warehouse on wms.stock.warehouse_id = wms.warehouse.id left join wms.product on wms.stock.product_id = wms.product.id
|
||||
<where>
|
||||
<choose>
|
||||
<when test="searchn == 0"> activation = 1 and warehouse.name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 1"> activation = 1 and product.name like concat('%',#{search},'%') </when>
|
||||
<when test="searchn == 0"> wms.stock.activation = 1 and wms.warehouse.name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 1"> wms.stock.activation = 1 and wms.product.name like concat('%',#{search},'%') </when>
|
||||
</choose>
|
||||
</where>
|
||||
order by id desc limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<select id="stockOne" parameterType="java.util.UUID" resultType="com.no1.wms.stock.StockDto">
|
||||
<select id="stockOne" parameterType="String" resultType="com.no1.wms.stock.StockDto">
|
||||
selct * from stock where id = #{id}
|
||||
</select>
|
||||
<!-- select -->
|
||||
@@ -44,8 +44,14 @@
|
||||
|
||||
<!-- insert -->
|
||||
<insert id="createStock" parameterType="com.no1.wms.stock.StockDto">
|
||||
insert into stock (id, quantity, activation)
|
||||
values (#{dto.id}, #{dto.quantity}, 1)
|
||||
insert into stock (id, warehouse_id, product_id, quantity, activation)
|
||||
values (#{dto.id}, #{dto.warehouse_id}, #{dto.product_id}, #{dto.quantity}, 1)
|
||||
</insert>
|
||||
<!-- insert -->
|
||||
|
||||
<!-- delete -->
|
||||
<delete id="deleteStock" parameterType="String">
|
||||
delete from stock where no = #{id}
|
||||
</delete>
|
||||
<!-- delete -->
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user