mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -26,7 +26,7 @@ public class StockController {
|
||||
int startRow = (page - 1) * perPage;
|
||||
|
||||
//스톡서비스로 재고 리스트 출력 메서트 작성
|
||||
List<StockDto> dto = service.list(searchn, search, perPage);
|
||||
List<Object> dto = service.list(searchn, search, perPage);
|
||||
m.addAttribute("list", dto);
|
||||
|
||||
int pageNum = 4;//보여질 페이지 번호 수
|
||||
|
||||
@@ -11,7 +11,8 @@ public interface StockMapper {
|
||||
|
||||
int count(Map<String, Object> m);//검색 글 갯수
|
||||
|
||||
List<StockDto> list(Map<String, Object> m);
|
||||
List<Object> list(Map<String, Object> m);
|
||||
// List<StockDto> list(Map<String, Object> m);
|
||||
|
||||
int updateStock(StockDto dto);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class StockService {
|
||||
}
|
||||
|
||||
|
||||
public List<StockDto> list(int searchn, String search, int start){
|
||||
public List<Object> list(int searchn, String search, int start){
|
||||
|
||||
System.out.println(searchn+search);
|
||||
|
||||
@@ -34,6 +34,7 @@ public class StockService {
|
||||
m.put("search", search);
|
||||
m.put("start", start);
|
||||
m.put("perPage", 10);
|
||||
|
||||
return mapper.list(m);
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<!-- select -->
|
||||
<select id="count" parameterType="map" resultType="java.lang.Integer">
|
||||
select count(*) from stock left join warehouse on stock.warehouse_id = warehouse.id left join product on stock.product_id = product.id
|
||||
select count(*) from stock left join warehouse on stock.warehouse_id = warehouse.id left join product on stock.product_id = product.id left join product_category on product.kan_code = product_category.kan_code
|
||||
<where>
|
||||
<choose>
|
||||
<when test="searchn == 0"> stock.activation = 1 and warehouse.name like concat('%',#{search},'%')</when>
|
||||
@@ -17,11 +17,11 @@
|
||||
</select>
|
||||
|
||||
<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
|
||||
select * from stock left join warehouse on stock.warehouse_id = warehouse.id left join product on stock.product_id = product.id left join product_category on product.kan_code = product_category.kan_code
|
||||
<where>
|
||||
<choose>
|
||||
<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>
|
||||
<when test="searchn == 0"> stock.activation = 1 and warehouse.name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 1"> stock.activation = 1 and product.name like concat('%',#{search},'%') </when>
|
||||
</choose>
|
||||
</where>
|
||||
order by stock.id desc limit #{start}, #{perPage}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<h1>재고 리스트</h1>
|
||||
</div>
|
||||
<hr>
|
||||
<<script src="../../utils.js" type="text/javascript"></script>
|
||||
<script>
|
||||
/*
|
||||
yes no 모달의 확인 버튼을 누를때 재정의할 function
|
||||
@@ -36,6 +37,23 @@
|
||||
return false;
|
||||
}).filter(':eq(0)').click();
|
||||
});
|
||||
|
||||
|
||||
/*엑셀 다운로드 클릭 펑션 */
|
||||
$("#excelButton").click(function(){
|
||||
const columns = [
|
||||
{name: '번호', key: 'id'},
|
||||
{name: '제품명', key: 'product_name'},
|
||||
{name: '창고명', key: 'warehouse_name'},
|
||||
{name: '재고수', key: 'quantity'},
|
||||
{name: '카테고리', key: 'cls_Nm_4'}
|
||||
|
||||
];
|
||||
|
||||
exportExcel(e, 'sheet', columns, list, 'stock');
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
여기다가 화면 만들기
|
||||
<!--탭키명 -->
|
||||
@@ -63,7 +81,7 @@
|
||||
|
||||
<!--재고 리스트 -->
|
||||
<c:if test="${count != 0 }">
|
||||
<table>
|
||||
<table align="center">
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>제품명</th>
|
||||
@@ -71,25 +89,31 @@
|
||||
</tr>
|
||||
<c:forEach items="${list}" var="stock">
|
||||
<tr>
|
||||
<td><a href ="read/${stock.id}">${stock.stock.id}</a></td>
|
||||
<td>${stock.product.name }</td>
|
||||
<td>${stock.warehouse.name }</td>
|
||||
<td><a href ="read/${stock.id}">${stock.id}</a></td>
|
||||
<td>${stock.product_name }</td>
|
||||
<td>${stock.warehouse_name }</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
|
||||
<!-- 엑셀 다운로드-->
|
||||
<div class="excelButton">
|
||||
<button id="excelButton" value="생성">생성</button>
|
||||
</div>
|
||||
<div id="page">
|
||||
<c:if test="${begin > pageNum }">
|
||||
<a href="list?p=${begin-1 }">[이전]</a>
|
||||
<a href="list?p=${begin-1 }">[<]</a>
|
||||
</c:if>
|
||||
<c:forEach begin="${begin }" end="${end}" var="i">
|
||||
<a href="list?p=${i}">${i}</a>
|
||||
</c:forEach>
|
||||
<c:if test="${end < totalPages }">
|
||||
<a href="list?p=${end+1}">[다음]</a>
|
||||
<a href="list?p=${end+1}">[>]</a>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
</c:if>
|
||||
|
||||
</div>
|
||||
|
||||
<!--부족한재고 탭 내용-->
|
||||
|
||||
Reference in New Issue
Block a user