mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
#update
stock/create.jsp stock/list.jsp WarehouseController.java WarehouseMapper.xml WarehouseService.java #insert warehouse/create.jsp warehouse/list.jsp
This commit is contained in:
@@ -6,27 +6,26 @@
|
||||
|
||||
<!-- select -->
|
||||
<select id="count" parameterType="map" resultType="java.lang.Integer">
|
||||
select count(*) from warehouse left join account on warehouse.manager_id = account.id
|
||||
select count(*) from warehouse
|
||||
<where>
|
||||
<choose>
|
||||
<when test="searchn == 0"> warehouse.activation = 1 and warehouse.name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 1"> warehouse.activation = 1 and warehouse.capacity like concat('%',#{search},'%') </when>
|
||||
<when test="searchn == 3"> warehouse.activation = 1 and warehouse.current_capacity like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 2"> warehouse.activation = 1 and warehouse.current_capacity like concat('%',#{search},'%')</when>
|
||||
</choose>
|
||||
</where>
|
||||
order by stock.id desc limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<select id="list" parameterType="map" resultType="com.no1.wms.warehouse.WarehouseDto">
|
||||
select * from warehouse left join account on warehouse.manager_id = account.id
|
||||
<select id="list" parameterType="map" resultType="Object">
|
||||
select * from warehouse
|
||||
<where>
|
||||
<choose>
|
||||
<when test="searchn == 0"> warehouse.activation = 1 and warehouse.name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 1"> warehouse.activation = 1 and warehouse.capacity like concat('%',#{search},'%') </when>
|
||||
<when test="searchn == 3"> warehouse.activation = 1 and warehouse.current_capacity like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 2"> warehouse.activation = 1 and warehouse.current_capacity like concat('%',#{search},'%')</when>
|
||||
</choose>
|
||||
</where>
|
||||
order by stock.id desc limit #{start}, #{perPage}
|
||||
order by warehouse.id desc limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<select id="warehouseOne" parameterType="String" resultType="com.no1.wms.warehouse.WarehouseDto">
|
||||
@@ -46,8 +45,8 @@
|
||||
|
||||
<!-- insert -->
|
||||
<insert id="createWarehouse" parameterType="com.no1.wms.warehouse.WarehouseDto">
|
||||
insert into warehouse (id, warehouse_id, product_id, quantity, activation)
|
||||
values ((UUID), #{dto.warehouse_id}, #{dto.product_id}, #{dto.quantity}, 1)
|
||||
insert into warehouse (id, name, capacity, current_capacity, address, activation)
|
||||
values (UUID(), #{dto.name}, #{dto.capacity}, 0, #{dto.address}, 1)
|
||||
</insert>
|
||||
<!-- insert -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user