mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 12:13:24 +09:00
#수정
This commit is contained in:
@@ -235,6 +235,17 @@ public class StockController {
|
||||
|
||||
};
|
||||
|
||||
@GetMapping("/downloadExcelList2")
|
||||
public void downlodeExcelList2(HttpServletResponse response) {
|
||||
List<Map<String, Object>> dto = service.selectAll2();
|
||||
System.out.println("엑셀 출력 확인 : : " + dto);
|
||||
String excelFileName = "부족한 재고 파일";
|
||||
String sheetName = "부족한 재고";
|
||||
String[] columnName = {"제품명","카테고리","창고","재고수"};
|
||||
excelDownlodeUtils.downloadStockExcelFile(excelFileName, response, sheetName, columnName, dto);
|
||||
|
||||
};
|
||||
|
||||
//서식 다운로드
|
||||
@GetMapping("/downloadStockForm")
|
||||
public void downlodeStockForm (HttpServletResponse response) throws IOException {
|
||||
|
||||
@@ -11,6 +11,8 @@ import java.util.Map;
|
||||
public interface StockMapper {
|
||||
List<Map<String, Object>> selectAll();
|
||||
|
||||
List<Map<String, Object>> selectAll2();
|
||||
|
||||
int count(Map<String, Object> m);//검색 글 갯수
|
||||
|
||||
List<Map<String, Object>> list(Map<String, Object> m);
|
||||
|
||||
@@ -146,6 +146,10 @@ public class StockService {
|
||||
return mapper.selectAll();
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> selectAll2() {
|
||||
return mapper.selectAll2();
|
||||
}
|
||||
|
||||
|
||||
//createProcess
|
||||
public int checkandUpdateOrCreateProcess(StockDto dto){
|
||||
|
||||
@@ -14,6 +14,16 @@
|
||||
left join product_category c on p.kan_code = c.kan_code;
|
||||
</select>
|
||||
|
||||
<select id="selectAll2" parameterType="Map" resultType="Map">
|
||||
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
|
||||
left join product p on s.product_id = p.id
|
||||
left join product_category c on p.kan_code = c.kan_code
|
||||
where quantity <= 200;
|
||||
</select>
|
||||
|
||||
<select id="count" parameterType="Map" resultType="java.lang.Integer">
|
||||
select count(s.id)
|
||||
|
||||
|
||||
@@ -247,17 +247,20 @@
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#downlodeStockForm,downlodeStockForm2").on("click",function(){
|
||||
|
||||
|
||||
$("#downlodeExcelList").on("click",function(){
|
||||
var form = document.createElement("form");
|
||||
form.action = "/stock/downloadStockForm";
|
||||
form.action = "/stock/downloadExcelList";
|
||||
form.method = "GET";
|
||||
document.body.appendChild(form);
|
||||
form.submit();
|
||||
});
|
||||
|
||||
$("#downlodeExcelList,downlodeExcelList2").on("click",function(){
|
||||
|
||||
$("#downlodeExcelList2").on("click",function(){
|
||||
var form = document.createElement("form");
|
||||
form.action = "/stock/downloadExcelList";
|
||||
form.action = "/stock/downloadExcelList2";
|
||||
form.method = "GET";
|
||||
document.body.appendChild(form);
|
||||
form.submit();
|
||||
|
||||
Reference in New Issue
Block a user