diff --git a/src/main/java/com/no1/wms/planin/PlanInController.java b/src/main/java/com/no1/wms/planin/PlanInController.java index 1cbd0de..5f348b7 100644 --- a/src/main/java/com/no1/wms/planin/PlanInController.java +++ b/src/main/java/com/no1/wms/planin/PlanInController.java @@ -5,11 +5,15 @@ import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; +import com.no1.wms.product.ProductDto; +import com.no1.wms.product.ProductService; + @Controller @@ -17,6 +21,8 @@ import org.springframework.web.servlet.ModelAndView; public class PlanInController { @Autowired PlanInService planinservice; + @Autowired + ProductService productservice; @GetMapping("/list") public ModelAndView list(ModelAndView mav,@RequestParam(defaultValue = "0") int searchn, @RequestParam(defaultValue = "") String search, @RequestParam(defaultValue = "1") int page){ @@ -58,9 +64,45 @@ public class PlanInController { List list = planinservice.selectById(dto); System.out.println(list.get(0).toString()); mav.addObject("list", list); + mav.addObject("groupNum", dto.getGroupNumber()); mav.setViewName("planin/read"); + return mav; } + + @PostMapping("/update") + public ModelAndView update(PlanInDto dto, ModelAndView mav){ + List list = planinservice.selectById(dto); + mav.addObject("list", list); + + mav.setViewName("/planin/update"); + + return mav; + } + + // 엑셀 다운로드 + @GetMapping("/qr/{id}") + public String qr(@PathVariable("id")String id) + { + + + return ""; + } + + // 입고예정추가 + @PostMapping("/planin_add") + public ModelAndView insert(ModelAndView mav, ProductDto dto) + { + List list = productservice.productList(0, "", 0, 10000); + //list + //ProductDto (0) + //ProductDto (1) + //ProductDto (2) + mav.addObject("list", list); + + mav.setViewName("planin_add"); + return mav; + } -} \ No newline at end of file +} diff --git a/src/main/java/com/no1/wms/planin/PlanInDto.java b/src/main/java/com/no1/wms/planin/PlanInDto.java index 26ee921..d19244a 100644 --- a/src/main/java/com/no1/wms/planin/PlanInDto.java +++ b/src/main/java/com/no1/wms/planin/PlanInDto.java @@ -39,7 +39,7 @@ public class PlanInDto { private Boolean activation; private Integer viewGroupNumber; private String oldProductId; - private String cName; + private String caName; private ProductDto productDto; private VendorDto vendorDto; diff --git a/src/main/resources/mappers/PlainInMapper.xml b/src/main/resources/mappers/PlainInMapper.xml index 4f5d4b0..28af62b 100644 --- a/src/main/resources/mappers/PlainInMapper.xml +++ b/src/main/resources/mappers/PlainInMapper.xml @@ -17,7 +17,7 @@ - + @@ -40,7 +40,7 @@ plan.group_number, plan.product_id, plan.quantity, plan.date, plan.vendor_id, plan.manager_id, plan.warehouse_id, plan.qr_hash, plan.url, plan.clear, plan.vendor_date, plan.other, plan.activation, plan.view_group_number, product.id p_id, product.name p_name, acc.id acc_id, acc.name acc_name, vendor.id v_id, vendor.name v_name, - warehouse.id w_id, warehouse.name w_name, product_category.kan_code p_kan, product_category.cls_Nm_4 c_name + warehouse.id w_id, warehouse.name w_name, product_category.kan_code p_kan, product_category.cls_Nm_4 ca_name from plan_In plan join account acc join vendor join warehouse join product join product_category on plan.product_id = product.id and plan.vendor_id = vendor.id and plan.manager_id = acc.id and plan.warehouse_id = warehouse.id and product.kan_code = product_category.kan_code @@ -51,7 +51,7 @@ plan.group_number, plan.product_id, plan.quantity, plan.date, plan.vendor_id, plan.manager_id, plan.warehouse_id, plan.qr_hash, plan.url, plan.clear, plan.vendor_date, plan.other, plan.activation, plan.view_group_number, product.id p_id, product.name p_name, acc.id acc_id, acc.name acc_name, vendor.id v_id, vendor.name v_name, - warehouse.id w_id, warehouse.name w_name, product_category.kan_code p_kan, product_category.cls_Nm_4 c_name + warehouse.id w_id, warehouse.name w_name, product_category.kan_code p_kan, product_category.cls_Nm_4 ca_name from plan_In plan join account acc join vendor join warehouse join product join product_category on plan.product_id = product.id and plan.vendor_id = vendor.id and plan.manager_id = acc.id and plan.warehouse_id = warehouse.id and product.kan_code = product_category.kan_code diff --git a/src/main/webapp/WEB-INF/views/modal/planin_add.jsp b/src/main/webapp/WEB-INF/views/modal/planin_add.jsp new file mode 100644 index 0000000..a00f335 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/modal/planin_add.jsp @@ -0,0 +1,120 @@ +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
제품명회사명분류거래처등록날짜선택
${dto.name }${dto.company_name }${dto.categoryDto.cls_nm_4 }${dto.vendorDto.name }
+
+
+
+
+
+
+
+
+
+
+
+ 제품카테고리 + +
+ +
+ 제품명 + +
+ +
+ 수량 + +
+ +
+ 공급업체 + +
+ +
+ 날짜 + +
+ +
+
+
+ +
+
+
+ + +
+
+
+
+
+
+
+
+
+ + +
diff --git a/src/main/webapp/WEB-INF/views/planin/list.jsp b/src/main/webapp/WEB-INF/views/planin/list.jsp index 51df92c..348328f 100644 --- a/src/main/webapp/WEB-INF/views/planin/list.jsp +++ b/src/main/webapp/WEB-INF/views/planin/list.jsp @@ -39,53 +39,25 @@
-
- - - - -
-
-
- - - - - - - - - - - - - - - -
그룹번호제품명수량입고 예정 날짜비고
${dto.viewGroupNumber}${dto.productDto.name}${dto.quantity}${dto.other}
-
-
-
-
-
- -
-
+
+ + + + + + + + + + + + + + + +
그룹번호제품명수량입고 예정 날짜비고
${dto.viewGroupNumber}${dto.productDto.name}${dto.quantity}${dto.other}
diff --git a/src/main/webapp/WEB-INF/views/planin/read.jsp b/src/main/webapp/WEB-INF/views/planin/read.jsp index 3a1a691..e55b402 100644 --- a/src/main/webapp/WEB-INF/views/planin/read.jsp +++ b/src/main/webapp/WEB-INF/views/planin/read.jsp @@ -6,6 +6,24 @@ ${dto.productDto.name}
+ + function showSearchModal(title, val){ + $("#searchModalLabel").text(title); + const data = { name : val}; + $.ajax({ + type : 'post', // 타입 (get, post, put 등등) + url : '/plan_in/show_modal', // 요청할 서버url + dataType : 'html', // 데이터 타입 (html, xml, json, text 등등) + data : data, + success : function(result) { // 결과 성공 콜백함수 + $("#search_modal_body").html(result); + searchModalBootStrap.show(); + }, + error : function(request, status, error) { + alert(error) + } + }); + }
@@ -21,55 +39,36 @@
-
- - - - -
- + qr : link +
-
-
- - - - - - - - - - - - - - - -
제품 카테고리제품명수량공급업체날짜수정/삭제
${dto.cName}${dto.productDto.name}${dto.quantity}${dto.vendorDto.name} -
+
+ + + + + + + + + + + + + + + +
제품 카테고리제품명수량공급업체날짜수정/삭제
${dto.caName}${dto.productDto.name}${dto.quantity}${dto.vendorDto.name}
+
+
+
+ +
+
+ + +
-
-
-
-
- -
-
-
diff --git a/src/main/webapp/WEB-INF/views/planin/update.jsp b/src/main/webapp/WEB-INF/views/planin/update.jsp new file mode 100644 index 0000000..edb21e4 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/planin/update.jsp @@ -0,0 +1,73 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + + + +
+
+
+
+

입고 예정 관리 생성

+
+
+
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
제품 카테고리제품명수량공급업체날짜수정/삭제
${dto.caName}${dto.productDto.name}${dto.quantity}${dto.vendorDto.name} +
+
+
+
+ + + +
\ No newline at end of file