|
@@ -11,6 +11,7 @@ import com.oqpo.api.web.dto.request.GridRequest;
|
11
|
11
|
import com.oqpo.api.web.dto.request.stockmng.SaveWhsInfoRequest;
|
12
|
12
|
import com.oqpo.api.web.dto.response.GridResponse;
|
13
|
13
|
import com.oqpo.api.web.dto.response.code.CodeSearchListResponse;
|
|
14
|
+import com.oqpo.api.web.dto.response.stinfo.item.ItemPopSearchResponse;
|
14
|
15
|
import com.oqpo.api.web.dto.response.stockmng.*;
|
15
|
16
|
import lombok.extern.slf4j.Slf4j;
|
16
|
17
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -244,7 +245,13 @@ public class WhsMngService extends CommonService {
|
244
|
245
|
/*
|
245
|
246
|
창고 팝업 검색
|
246
|
247
|
*/
|
247
|
|
- public WhsLocationPopListResponse searchPopWhsLocationList(String sBrandId, String sStoreId, String sWhsNm) throws Exception {
|
|
248
|
+ public GridResponse searchPopWhsLocationList(String sBrandId, String sStoreId, String sWhsNm, GridRequest gridRequest) throws Exception {
|
|
249
|
+
|
|
250
|
+ int gridPage = gridRequest.getGridPage();
|
|
251
|
+ int gridSize = gridRequest.getGridSize();
|
|
252
|
+
|
|
253
|
+ int gridRecords = 0 ;
|
|
254
|
+ int gridTotal = 0;
|
248
|
255
|
|
249
|
256
|
//창고구분(브랜드 W01/매장 W02)
|
250
|
257
|
String sWhsDvsn = "W01";
|
|
@@ -253,7 +260,20 @@ public class WhsMngService extends CommonService {
|
253
|
260
|
}
|
254
|
261
|
|
255
|
262
|
List<WhsMgntBaseInfoEntity> entities = whsMngMapper.selectPopWhsLocList(sBrandId, sWhsDvsn, sStoreId, sWhsNm);
|
256
|
|
- return WhsLocationPopListResponse.toDTO(entities);
|
|
263
|
+
|
|
264
|
+ List<Object> gridRows = entities.stream()
|
|
265
|
+ .map(m -> WhsLocationPopListResponse.builder()
|
|
266
|
+ .brandId(m.getBrandId())
|
|
267
|
+ .brandNm(m.getBrandNm())
|
|
268
|
+ .whsId(m.getWhsId())
|
|
269
|
+ .whsNm(m.getWhsNm())
|
|
270
|
+ .location(m.getLocationInfo() == null ? "" : m.getLocationInfo().getLocation() == null ? "" : m.getLocationInfo().getLocation() )
|
|
271
|
+ .locationNm(m.getLocationInfo() == null ? "" : m.getLocationInfo().getLocationNm() == null ? "" : m.getLocationInfo().getLocationNm() )
|
|
272
|
+ .stckDvsn(m.getLocationInfo() == null ? "" : m.getLocationInfo().getStckDvsn() == null ? "" : m.getLocationInfo().getStckDvsn() )
|
|
273
|
+ .stckDvsnNm(m.getLocationInfo() == null ? "" : m.getLocationInfo().getStckDvsnNm() == null ? "" : m.getLocationInfo().getStckDvsnNm() )
|
|
274
|
+ .build())
|
|
275
|
+ .collect(Collectors.toList());
|
|
276
|
+ return GridResponse.toDTO(gridPage, gridTotal, gridRecords, gridRows);
|
257
|
277
|
}
|
258
|
278
|
|
259
|
279
|
}
|