|
@@ -1,6 +1,7 @@
|
1
|
1
|
package com.oqpo.api.service.stinfo;
|
2
|
2
|
|
3
|
3
|
|
|
4
|
+import com.oqpo.api.entity.CodeEntity;
|
4
|
5
|
import com.oqpo.api.entity.oper.FileEntity;
|
5
|
6
|
import com.oqpo.api.entity.oper.UserMngEntity;
|
6
|
7
|
import com.oqpo.api.entity.stinfo.*;
|
|
@@ -17,6 +18,8 @@ import com.oqpo.api.web.dto.request.stinfo.item.DelItemInfolRequest;
|
17
|
18
|
import com.oqpo.api.web.dto.request.stinfo.item.SaveItemClassMngInfolRequest;
|
18
|
19
|
import com.oqpo.api.web.dto.request.stinfo.item.SaveItemInfolRequest;
|
19
|
20
|
import com.oqpo.api.web.dto.response.GridResponse;
|
|
21
|
+import com.oqpo.api.web.dto.response.code.CodeDtlResponse;
|
|
22
|
+import com.oqpo.api.web.dto.response.code.CodeSearchListResponse;
|
20
|
23
|
import com.oqpo.api.web.dto.response.stinfo.brand.AfflBrandSearchResponse;
|
21
|
24
|
import com.oqpo.api.web.dto.response.stinfo.brand.BrandInfoResponse;
|
22
|
25
|
import com.oqpo.api.web.dto.response.stinfo.brand.BrandSearchListResponse;
|
|
@@ -233,26 +236,26 @@ public class ItemService extends CommonService {
|
233
|
236
|
entity.setPrnSeq(saveItemClassMngInfolRequest.getPrnSeq());
|
234
|
237
|
|
235
|
238
|
if ("C".equals(saveItemClassMngInfolRequest.getViewCd())) {
|
236
|
|
- String classLevel = "1";
|
|
239
|
+ Integer itemLevel = 1;
|
237
|
240
|
if ("".equals(entity.getItemClass1()))
|
238
|
241
|
{
|
239
|
242
|
// level 1 추가
|
240
|
|
- classLevel = "1";
|
|
243
|
+ itemLevel = 1;
|
241
|
244
|
} else {
|
242
|
245
|
if ("".equals(entity.getItemClass2()))
|
243
|
246
|
{
|
244
|
247
|
// level 2 추가
|
245
|
|
- classLevel = "2";
|
|
248
|
+ itemLevel = 2;
|
246
|
249
|
} else {
|
247
|
250
|
if ("".equals(entity.getItemClass3()))
|
248
|
251
|
{
|
249
|
252
|
// level 3 추가
|
250
|
|
- classLevel = "3";
|
|
253
|
+ itemLevel = 3;
|
251
|
254
|
} else {
|
252
|
255
|
if ("".equals(entity.getItemClass4()))
|
253
|
256
|
{
|
254
|
257
|
// level 4 추가
|
255
|
|
- classLevel = "4";
|
|
258
|
+ itemLevel = 4;
|
256
|
259
|
} else {
|
257
|
260
|
// 오류
|
258
|
261
|
throw new GlobalException(SystemMessageCode.ERR_ITEMCLASS);
|
|
@@ -261,16 +264,16 @@ public class ItemService extends CommonService {
|
261
|
264
|
}
|
262
|
265
|
}
|
263
|
266
|
|
264
|
|
- System.out.println("=classLevel============================>" + classLevel );
|
265
|
|
- entity.setCLevel(classLevel);
|
266
|
|
- int classNum = itemMapper.selectItemClassMaxClass(entity.getBrandId(), entity.getCLevel(), entity.getItemClass1(), entity.getItemClass2(), entity.getItemClass3(), entity.getItemClass4() ) ;
|
267
|
|
- if ("1".equals(classLevel)) {
|
|
267
|
+ System.out.println("=classLevel============================>" + itemLevel );
|
|
268
|
+ entity.setItemLevel(itemLevel);
|
|
269
|
+ int classNum = itemMapper.selectItemClassMaxClass(entity.getBrandId(), entity.getItemLevel(), entity.getItemClass1(), entity.getItemClass2(), entity.getItemClass3(), entity.getItemClass4() ) ;
|
|
270
|
+ if (itemLevel == 1) {
|
268
|
271
|
entity.setItemClass1(Integer.toString(classNum));
|
269
|
|
- } else if ("2".equals(classLevel)) {
|
|
272
|
+ } else if (itemLevel == 2) {
|
270
|
273
|
entity.setItemClass2(Integer.toString(classNum));
|
271
|
|
- } else if ("3".equals(classLevel)) {
|
|
274
|
+ } else if (itemLevel == 3) {
|
272
|
275
|
entity.setItemClass3(Integer.toString(classNum));
|
273
|
|
- } else if ("4".equals(classLevel)) {
|
|
276
|
+ } else if (itemLevel == 4) {
|
274
|
277
|
entity.setItemClass4(Integer.toString(classNum));
|
275
|
278
|
}
|
276
|
279
|
entity.setItemClassMgntNo(fnGetKeyNo(31)); // 품목분류 아이디 부여
|
|
@@ -306,4 +309,11 @@ public class ItemService extends CommonService {
|
306
|
309
|
throw new RuntimeException();
|
307
|
310
|
}
|
308
|
311
|
}
|
|
312
|
+
|
|
313
|
+ /* 품목 분류 level 리스트 */
|
|
314
|
+
|
|
315
|
+ public ItemClassLevelResponse searchItemClassList(String sBrandId, int sItemLevel, String sItemClass1, String sItemClass2, String sItemClass3) throws Exception {
|
|
316
|
+ List<ItemClassMngEntity> entities = itemMapper.selectItemLevelList(sBrandId, sItemLevel, sItemClass1, sItemClass2, sItemClass3 );
|
|
317
|
+ return ItemClassLevelResponse.toDTO(entities);
|
|
318
|
+ }
|
309
|
319
|
}
|