mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 12:13:24 +09:00
stock 쪽 해결
This commit is contained in:
@@ -11,7 +11,7 @@ public interface StockMapper {
|
|||||||
|
|
||||||
int count(Map<String, Object> m);//검색 글 갯수
|
int count(Map<String, Object> m);//검색 글 갯수
|
||||||
|
|
||||||
List<StockDto> stockList(Map<String, Object> m);
|
List<StockDto> list(Map<String, Object> m);
|
||||||
|
|
||||||
int updateStock(StockDto dto);
|
int updateStock(StockDto dto);
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ public class StockService {
|
|||||||
Map<String,Object> m = new HashMap<String, Object>();
|
Map<String,Object> m = new HashMap<String, Object>();
|
||||||
m.put("searchn",searchn);
|
m.put("searchn",searchn);
|
||||||
m.put("search", search);
|
m.put("search", search);
|
||||||
|
m.put("start", 0);
|
||||||
|
m.put("perPage", 10000);
|
||||||
return mapper.count(m);
|
return mapper.count(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,9 +33,8 @@ public class StockService {
|
|||||||
m.put("searchn",searchn);
|
m.put("searchn",searchn);
|
||||||
m.put("search", search);
|
m.put("search", search);
|
||||||
m.put("start", start);
|
m.put("start", start);
|
||||||
m.put("count", 10);
|
m.put("perPage", 10);
|
||||||
|
return mapper.list(m);
|
||||||
return mapper.stockList(m);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTO Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTO Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.no1.wms.authority.StockMapper">
|
<mapper namespace="com.no1.wms.stock.StockMapper">
|
||||||
|
|
||||||
<!-- select -->
|
<!-- select -->
|
||||||
<select id="count" parameterType="map" resultType="com.no1.wms.stock.StockDto">
|
<select id="count" parameterType="map" resultType="java.lang.Integer">
|
||||||
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
|
select count(*) from stock left join warehouse on stock.warehouse_id = warehouse.id left join product on stock.product_id = product.id
|
||||||
<where>
|
<where>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="searchn == 0"> wms.stock.activation = 1 and wms.warehouse.name like concat('%',#{search},'%')</when>
|
<when test="searchn == 0"> stock.activation = 1 and warehouse.name like concat('%',#{search},'%')</when>
|
||||||
<when test="searchn == 1"> wms.stock.activation = 1 and wms.product.name like concat('%',#{search},'%') </when>
|
<when test="searchn == 1"> stock.activation = 1 and product.name like concat('%',#{search},'%') </when>
|
||||||
</choose>
|
</choose>
|
||||||
</where>
|
</where>
|
||||||
order by id desc limit #{start}, #{perPage}
|
order by stock.id desc limit #{start}, #{perPage}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="list" parameterType="map" resultType="com.no1.wms.stock.StockDto">
|
<select id="list" parameterType="map" resultType="com.no1.wms.stock.StockDto">
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<when test="searchn == 1"> wms.stock.activation = 1 and wms.product.name like concat('%',#{search},'%') </when>
|
<when test="searchn == 1"> wms.stock.activation = 1 and wms.product.name like concat('%',#{search},'%') </when>
|
||||||
</choose>
|
</choose>
|
||||||
</where>
|
</where>
|
||||||
order by id desc limit #{start}, #{perPage}
|
order by stock.id desc limit #{start}, #{perPage}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="stockOne" parameterType="String" resultType="com.no1.wms.stock.StockDto">
|
<select id="stockOne" parameterType="String" resultType="com.no1.wms.stock.StockDto">
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<!-- update -->
|
<!-- update -->
|
||||||
<update id="updateStock" parameterType="com.no1.wms.stock.StockDto">
|
<update id="updateStock" parameterType="com.no1.wms.stock.StockDto">
|
||||||
update stock
|
update stock
|
||||||
set quantity = #{dto.quantity}
|
set quantity = #{dto.quantity}
|
||||||
where id = #{dto.id}
|
where id = #{dto.id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -60,3 +60,7 @@
|
|||||||
.w-65{
|
.w-65{
|
||||||
width : 65%!important;
|
width : 65%!important;
|
||||||
}
|
}
|
||||||
|
.col-centered{
|
||||||
|
margin: 0 auto;
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
@@ -60,3 +60,7 @@
|
|||||||
.w-65{
|
.w-65{
|
||||||
width : 65%!important;
|
width : 65%!important;
|
||||||
}
|
}
|
||||||
|
.col-centered{
|
||||||
|
margin: 0 auto;
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
@@ -12,9 +12,9 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>No1 WMS</title>
|
<title>No1 WMS</title>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row flex-nowrap">
|
<div class="row flex-nowrap">
|
||||||
<!-- 네비게이션 쪽 -->
|
<!-- 네비게이션 쪽 -->
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<!-- 설명란 있는 입력 -->
|
<!-- 설명란 있는 입력 -->
|
||||||
<div class="input-group mb-3">
|
<div class="input-group w-55 mb-3 col-centered">
|
||||||
<span class="input-group-text" id="basic-addon1">설명란 있는 입력</span>
|
<span class="input-group-text" id="basic-addon1">설명란 있는 입력</span>
|
||||||
<input type="text" class="form-control" placeholder="기본으로 보이는 값" aria-label="Username" aria-describedby="basic-addon1">
|
<input type="text" class="form-control" placeholder="기본으로 보이는 값" aria-label="Username" aria-describedby="basic-addon1">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user