Sfoglia il codice sorgente

매장창고 정보 관련 수정

marseyes 2 anni fa
parent
commit
893957d1f5

+ 1 - 1
src/main/java/com/oqpo/api/mapper/stockmng/WhsMngMapper.java

@@ -18,7 +18,7 @@ public interface WhsMngMapper {
18 18
     int selectWhsMngGridCnt(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId, @Param("sWhsDvsn") String sWhsDvsn, @Param("sWhsStCd") String sWhsStCd,
19 19
                             @Param("sWhsNm") String sWhsNm) throws Exception;
20 20
 
21
-    WhsMgntBaseInfoEntity selectWhsMgntBaseInfo(@Param("brandId") String brandId, @Param("whsId") String whsId) throws Exception;
21
+    WhsMgntBaseInfoEntity selectWhsMgntBaseInfo(@Param("brandId") String brandId, @Param("storeId") String storeId, @Param("whsId") String whsId) throws Exception;
22 22
 
23 23
     List<WhsMgntBaseLocEntity> selectWhsLocGridList(@Param("brandId") String brandId, @Param("whsId") String whsId, GridRequest gridRequest) throws Exception;
24 24
 

+ 4 - 4
src/main/java/com/oqpo/api/service/stockmng/WhsMngService.java

@@ -60,8 +60,8 @@ public class WhsMngService extends CommonService {
60 60
     }
61 61
 
62 62
     /* 창고관리 정보 조회 */
63
-    public WhsMngInfoResponse selectWhsMngInfo(String brandId, String whsId) throws Exception {
64
-        WhsMgntBaseInfoEntity entity = whsMngMapper.selectWhsMgntBaseInfo(brandId, whsId);
63
+    public WhsMngInfoResponse selectWhsMngInfo(String brandId, String storeId, String whsId) throws Exception {
64
+        WhsMgntBaseInfoEntity entity = whsMngMapper.selectWhsMgntBaseInfo(brandId, storeId, whsId);
65 65
         return WhsMngInfoResponse.toDTO(entity);
66 66
     }
67 67
 
@@ -248,11 +248,11 @@ public class WhsMngService extends CommonService {
248 248
 
249 249
         //창고구분(브랜드 W01/매장 W02)
250 250
         String sWhsDvsn = "W01";
251
-        if (!"".equals(sStoreId)  && sStoreId !=  null) {
251
+        if (!"".equals(sStoreId) && sStoreId != null) {
252 252
             sWhsDvsn = "W02";
253 253
         }
254 254
 
255
-        List<WhsMgntBaseInfoEntity> entities = whsMngMapper.selectPopWhsLocList(sBrandId,sWhsDvsn,sStoreId, sWhsNm);
255
+        List<WhsMgntBaseInfoEntity> entities = whsMngMapper.selectPopWhsLocList(sBrandId, sWhsDvsn, sStoreId, sWhsNm);
256 256
         return WhsLocationPopListResponse.toDTO(entities);
257 257
     }
258 258
 

+ 5 - 3
src/main/java/com/oqpo/api/web/controller/stockmng/WhsMngController.java

@@ -58,12 +58,14 @@ public class WhsMngController {
58 58
     @ApiImplicitParams({
59 59
             @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header"),
60 60
             @ApiImplicitParam(name = "brandId", value = "브랜드아이디", required = true, dataType = "String", paramType = "query"),
61
-            @ApiImplicitParam(name = "whsId", value = "창고아이디", required = true, dataType = "String", paramType = "query")
61
+            @ApiImplicitParam(name = "storeId", value = "매장아이디", required = false, dataType = "String", paramType = "query"),
62
+            @ApiImplicitParam(name = "whsId", value = "창고아이디", required = false, dataType = "String", paramType = "query")
62 63
     })
63 64
     @ApiOperation(value = "창고 정보")
64 65
     @GetMapping("/info-whs")
65
-    public ResponseEntity<WhsMngInfoResponse> infoWhs(@RequestParam(value = "brandId") String brandId, @RequestParam(value = "whsId") String whsId) throws Exception {
66
-        return ResponseEntity.ok(whsMngService.selectWhsMngInfo(brandId, whsId));
66
+    public ResponseEntity<WhsMngInfoResponse> infoWhs(@RequestParam(value = "brandId") String brandId,
67
+                                                      @RequestParam(value = "storeId") String storeId, @RequestParam(value = "whsId") String whsId) throws Exception {
68
+        return ResponseEntity.ok(whsMngService.selectWhsMngInfo(brandId, storeId, whsId));
67 69
     }
68 70
 
69 71
     /**

+ 5 - 0
src/main/resources/mybatis/sqlmaps/stockmng/WhsMng.xml

@@ -72,7 +72,12 @@
72 72
             DATE_FORMAT(A.sys_reg_dttm,'%Y.%m.%d %H:%i:%s') AS sys_reg_dttm, A.sys_reg_id, DATE_FORMAT(A.sys_chg_dttm,'%Y.%m.%d %H:%i:%s') AS sys_chg_dttm, A.sys_chg_id
73 73
         FROM whs_mgnt_base_info A
74 74
         WHERE A.brand_id = #{brandId}
75
+        <if test="whsId != null and whsId != ''">
75 76
         AND A.whs_id = #{whsId}
77
+        </if>
78
+        <if test="storeId != null and storeId != ''">
79
+        AND A.store_id = #{storeId}
80
+        </if>
76 81
     </select>
77 82
 
78 83
     <select id="selectWhsLocGridList" resultType="com.oqpo.api.entity.stockmng.WhsMgntBaseLocEntity">