diff --git a/src/main/java/com/no1/wms/excel/ExcelDownlodeUtils.java b/src/main/java/com/no1/wms/excel/ExcelDownlodeUtils.java index 1bc8a64..daa6dd8 100644 --- a/src/main/java/com/no1/wms/excel/ExcelDownlodeUtils.java +++ b/src/main/java/com/no1/wms/excel/ExcelDownlodeUtils.java @@ -231,9 +231,10 @@ public class ExcelDownlodeUtils { // for (int i = 0; i < listdto.size(); i++) { row = sheet.createRow(rowNum++); - Map dto = listdto.get(i); + Map dto = listdto.get(i); // 이 부분을 수정함 + cell = row.createCell(0); - cell.setCellValue((String) dto.get("productName")); + cell.setCellValue((String) dto.get("productName")); // 키 값을 사용하여 값을 가져옴 cell = row.createCell(1); cell.setCellValue((String) dto.get("cls_nm_4")); cell = row.createCell(2); diff --git a/src/main/resources/mappers/StockMapper.xml b/src/main/resources/mappers/StockMapper.xml index fc5c071..d41cf96 100644 --- a/src/main/resources/mappers/StockMapper.xml +++ b/src/main/resources/mappers/StockMapper.xml @@ -131,9 +131,9 @@ - (s.product_id is null or s.product_id <> #{product_id}) and w.activation = 1 and w.name like concat('%',#{search},'%') - (s.product_id is null or s.product_id <> #{product_id}) and w.activation = 1 and address like concat('%',#{search},'%') - (s.product_id is null or s.product_id <> #{product_id}) and w.activation = 1 and capacity like concat('%',#{search},'%') + (s.product_id <> #{product_id} or s.product_id is null) and w.activation = 1 and w.name like concat('%',#{search},'%') + (s.product_id <> #{product_id} or s.product_id is null) and w.activation = 1 and address like concat('%',#{search},'%') + (s.product_id <> #{product_id} or s.product_id is null) and w.activation = 1 and capacity like concat('%',#{search},'%') order by w.name desc limit #{start}, #{perPage} @@ -146,9 +146,9 @@ - (s.product_id is null or s.product_id <> #{product_id}) and w.activation = 1 and w.name like concat('%',#{search},'%') - (s.product_id is null or s.product_id <> #{product_id}) and w.activation = 1 and address like concat('%',#{search},'%') - (s.product_id is null or s.product_id <> #{product_id}) and w.activation = 1 and capacity like concat('%',#{search},'%') + (s.product_id <> #{product_id} or s.product_id is null) and w.activation = 1 and w.name like concat('%',#{search},'%') + (s.product_id <> #{product_id} or s.product_id is null) and w.activation = 1 and address like concat('%',#{search},'%') + (s.product_id <> #{product_id} or s.product_id is null) and w.activation = 1 and capacity like concat('%',#{search},'%') diff --git a/src/main/resources/mappers/VendorMapper.xml b/src/main/resources/mappers/VendorMapper.xml index a748e39..60c58be 100644 --- a/src/main/resources/mappers/VendorMapper.xml +++ b/src/main/resources/mappers/VendorMapper.xml @@ -14,7 +14,7 @@ president_telephone, vendor_manager, vendor_manager_telephone, - main_product, + main_products from vendor; diff --git a/src/main/resources/mappers/WarehouseMapper.xml b/src/main/resources/mappers/WarehouseMapper.xml index 5d997a5..060e266 100644 --- a/src/main/resources/mappers/WarehouseMapper.xml +++ b/src/main/resources/mappers/WarehouseMapper.xml @@ -92,7 +92,7 @@ insert into warehouse (id, name, capacity, current_capacity, manager_id, address, activation) - values (UUID(), #{name}, #{capacity}, #{currentCapacity}, #{managerId}, #{address}, #{activation}) + values (UUID(), #{name}, #{capacity}, 0, #{managerId}, #{address}, #{activation}) diff --git a/src/main/webapp/WEB-INF/views/out/create.jsp b/src/main/webapp/WEB-INF/views/out/create.jsp index 9fbdeb3..2c82c22 100644 --- a/src/main/webapp/WEB-INF/views/out/create.jsp +++ b/src/main/webapp/WEB-INF/views/out/create.jsp @@ -135,9 +135,9 @@ return false; } - if (quantity < shipment_quantity) { + if (shipment_quantity > quantity) { alert("출고수가 재고량보다 많을 수 없습니다."); - $("#quantity").focus(); + $("#shipment_quantity").focus(); return false; } diff --git a/src/main/webapp/WEB-INF/views/stock/create.jsp b/src/main/webapp/WEB-INF/views/stock/create.jsp index dda9e15..a014b1d 100644 --- a/src/main/webapp/WEB-INF/views/stock/create.jsp +++ b/src/main/webapp/WEB-INF/views/stock/create.jsp @@ -111,7 +111,7 @@ type : 'post', // 타입 (get, post, put 등등) url : '/stock/show_modal', // 요청할 서버url dataType : 'html', // 데이터 타입 (html, xml, json, text 등등) - data : product_id,data, + data : {"product_id" : product_id},data, success : function(result) { // 결과 성공 콜백함수 $("#search_modal_body").html(result); searchModalBootStrap.show(); diff --git a/src/main/webapp/WEB-INF/views/warehouse/create.jsp b/src/main/webapp/WEB-INF/views/warehouse/create.jsp index fab60dd..25e918f 100644 --- a/src/main/webapp/WEB-INF/views/warehouse/create.jsp +++ b/src/main/webapp/WEB-INF/views/warehouse/create.jsp @@ -82,7 +82,7 @@ $("#submitBtn").on("click", function () { - var managerId = $("#managerId").val(); + var managerId = $("#manager_id").val(); var name = $("#name").val(); var capacity = $("#capacity").val(); var address = $("#address").val(); diff --git a/src/main/webapp/WEB-INF/views/warehouse/list.jsp b/src/main/webapp/WEB-INF/views/warehouse/list.jsp index 6c05c2d..b153df8 100644 --- a/src/main/webapp/WEB-INF/views/warehouse/list.jsp +++ b/src/main/webapp/WEB-INF/views/warehouse/list.jsp @@ -37,7 +37,7 @@ - +