|
@@ -0,0 +1,72 @@
|
|
1
|
+package com.oqpo.api.web.controller.stockmng;
|
|
2
|
+
|
|
3
|
+import com.oqpo.api.enums.SystemMessageCode;
|
|
4
|
+import com.oqpo.api.service.stockmng.StockBaseMngService;
|
|
5
|
+import com.oqpo.api.service.stockmng.StockMngService;
|
|
6
|
+import com.oqpo.api.web.dto.request.stockmng.SaveStockBaseInfoRequest;
|
|
7
|
+import com.oqpo.api.web.dto.request.stockmng.StockBaseMngGridRequest;
|
|
8
|
+import com.oqpo.api.web.dto.response.GridResponse;
|
|
9
|
+import com.oqpo.api.web.dto.response.SaveResponse;
|
|
10
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
11
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
12
|
+import io.swagger.annotations.ApiOperation;
|
|
13
|
+import lombok.extern.slf4j.Slf4j;
|
|
14
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
15
|
+import org.springframework.http.ResponseEntity;
|
|
16
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
17
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
18
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
19
|
+import org.springframework.web.bind.annotation.RestController;
|
|
20
|
+import springfox.documentation.annotations.ApiIgnore;
|
|
21
|
+
|
|
22
|
+import javax.validation.Valid;
|
|
23
|
+
|
|
24
|
+@Slf4j
|
|
25
|
+@RestController
|
|
26
|
+@RequestMapping("/api/stock/base/mng")
|
|
27
|
+public class StockBaseMngController {
|
|
28
|
+
|
|
29
|
+ @Autowired
|
|
30
|
+ private StockMngService stockMngService;
|
|
31
|
+
|
|
32
|
+ @Autowired
|
|
33
|
+ private StockBaseMngService stockBaseMngService;
|
|
34
|
+
|
|
35
|
+ /**
|
|
36
|
+ * 설명 : 재고기준정보관리 그리드 리스트
|
|
37
|
+ *
|
|
38
|
+ * @param stockBaseMngGridRequest
|
|
39
|
+ * @return
|
|
40
|
+ * @throws Exception
|
|
41
|
+ */
|
|
42
|
+ @ApiImplicitParams({
|
|
43
|
+ @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
|
|
44
|
+ })
|
|
45
|
+ @ApiOperation(value = "재고기준정보관리 그리드 리스트")
|
|
46
|
+ @PostMapping("/detail-grid-list")
|
|
47
|
+ public ResponseEntity<GridResponse> detailGridList(@RequestBody @Valid StockBaseMngGridRequest stockBaseMngGridRequest) throws Exception {
|
|
48
|
+ return ResponseEntity.ok(stockMngService.selectStockMngGridList(stockBaseMngGridRequest.getSBrandId(), stockBaseMngGridRequest.getSStoreId(),
|
|
49
|
+ stockBaseMngGridRequest.getSWhsId(), stockBaseMngGridRequest.getSLocation(),
|
|
50
|
+ stockBaseMngGridRequest.getSItemClass1(), stockBaseMngGridRequest.getSItemClass2(), stockBaseMngGridRequest.getSItemClass3(), stockBaseMngGridRequest.getSItemClass4(),
|
|
51
|
+ stockBaseMngGridRequest.getSItemId(), stockBaseMngGridRequest.getSItemNm(), stockBaseMngGridRequest.toDTO(stockBaseMngGridRequest)));
|
|
52
|
+ }
|
|
53
|
+
|
|
54
|
+ /**
|
|
55
|
+ * 설명 : 재고기준정보 저장
|
|
56
|
+ *
|
|
57
|
+ * @param userId
|
|
58
|
+ * @param saveStockBaseInfoRequest
|
|
59
|
+ * @return SaveResponse
|
|
60
|
+ * @throws Exception
|
|
61
|
+ */
|
|
62
|
+ @ApiImplicitParams({
|
|
63
|
+ @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
|
|
64
|
+ })
|
|
65
|
+ @ApiOperation(value = "재고기준정보 저장")
|
|
66
|
+ @PostMapping("/save")
|
|
67
|
+ public ResponseEntity<SaveResponse> save(@ApiIgnore String userId, @RequestBody @Valid SaveStockBaseInfoRequest saveStockBaseInfoRequest) throws Exception {
|
|
68
|
+ stockBaseMngService.saveStockBaseInfo(userId, saveStockBaseInfoRequest);
|
|
69
|
+ return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
|
|
70
|
+ }
|
|
71
|
+
|
|
72
|
+}
|