|
|
@@ -1258,6 +1258,23 @@ public class TssGoodsService {
|
|
|
return goods.getGoodsStat();
|
|
|
}
|
|
|
|
|
|
+ int index = 0;
|
|
|
+ // 상품 등록시 고시정보 처리
|
|
|
+ for (GoodsNotiInfo goodsNotiInfo : goodsNotiList) {
|
|
|
+ if (!StringUtils.isBlank(gagaMap.getString("niContent" + (index + 1)))) {
|
|
|
+ goodsNotiInfo.setNiContent(gagaMap.getString("niContent" + (index + 1)));
|
|
|
+ }
|
|
|
+
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+
|
|
|
+ //고시항목 필수값 확인
|
|
|
+ goods = this.getGoodsNotiCheck(goods, goodsNotiList, gagaMap, procJob);
|
|
|
+ if ("10".equals(goods.getGoodsStat())) { // 정보 오류
|
|
|
+ this.setGoodsRegResult(goods, goodsMass, procJob);
|
|
|
+ return goods.getGoodsStat(); //continue
|
|
|
+ }
|
|
|
+
|
|
|
// 할인율
|
|
|
goods.setDcRate((int)(this.getDcRate(goods.getListPrice(), goods.getCurrPrice())));
|
|
|
|
|
|
@@ -1284,7 +1301,7 @@ public class TssGoodsService {
|
|
|
if (goodsWmsSizeList == null || goodsWmsSizeList.isEmpty()) {
|
|
|
throw new IllegalStateException("WMS의 TB_IF_PRODUCTSKU 에 " + goods.getGoodsCd() + " 상품이 존재하지 않습니다.");
|
|
|
} else {
|
|
|
- int index = 1;
|
|
|
+ index = 1;
|
|
|
for (IfProductSku ifProductSku : goodsWmsSizeList) {
|
|
|
|
|
|
Option wmsOption = goodsDao.getWmsColorStock(ifProductSku);
|
|
|
@@ -1321,53 +1338,11 @@ public class TssGoodsService {
|
|
|
goodsColorSize.setUpdNo(TssSession.getInfo().getUserNo());
|
|
|
goodsDao.updateGoodsMainColorCd(goodsColorSize); // 대표색상 설정
|
|
|
}
|
|
|
- int index = 0;
|
|
|
- // 자사 상품 등록시 고시정보 처리
|
|
|
- for (GoodsNotiInfo goodsNotiInfo : goodsNotiList) {
|
|
|
-
|
|
|
- if (!StringUtils.isBlank(gagaMap.getString("niContent" + (index + 1)))) {
|
|
|
- goodsNotiInfo.setNiContent(gagaMap.getString("niContent" + (index + 1)).trim());
|
|
|
- }
|
|
|
-
|
|
|
-// if ("G005_003".equals(goodsNotiInfo.getNiItemCd())) { // 색상
|
|
|
-//
|
|
|
-// if (!StringUtils.isBlank(goodsColorSize.getOpt1Str())) {
|
|
|
-// goodsNotiInfo.setNiContent(goodsColorSize.getOpt1Str());
|
|
|
-// }
|
|
|
-// } else if ("G005_004".equals(goodsNotiInfo.getNiItemCd())) { //치수
|
|
|
-// if (!StringUtils.isBlank(goodsColorSize.getOpt2Str())) {
|
|
|
-// goodsNotiInfo.setNiContent(goodsColorSize.getOpt2Str());
|
|
|
-// }
|
|
|
-// } else if ("G005_006".equals(goodsNotiInfo.getNiItemCd())) { //제조국
|
|
|
-// if (!StringUtils.isBlank(goods.getOriginNm())) {
|
|
|
-// goodsNotiInfo.setNiContent(goods.getOriginNm());
|
|
|
-// }
|
|
|
-// } else if ("G005_009".equals(goodsNotiInfo.getNiItemCd())) { //제조년월
|
|
|
-// if (!StringUtils.isBlank(goods.getMakeYmd())) {
|
|
|
-// goodsNotiInfo.setNiContent(goods.getMakeYmd());
|
|
|
-// }
|
|
|
-// } else if ("G005_097".equals(goodsNotiInfo.getNiItemCd())) { //수입여부
|
|
|
-// if (!StringUtils.isBlank(goods.getOriginNm()) &&
|
|
|
-// (goods.getOriginNm().indexOf("대한민국") >= 0 || goods.getOriginNm().indexOf("한국") >= 0 || goods.getOriginNm().toUpperCase().indexOf("KOREA") >= 0)) {
|
|
|
-// goodsNotiInfo.setNiContent("N");
|
|
|
-// } else {
|
|
|
-// goodsNotiInfo.setNiContent("Y");
|
|
|
-// }
|
|
|
-// } else if ("G005_099".equals(goodsNotiInfo.getNiItemCd())) { //종류
|
|
|
-// if (!StringUtils.isBlank(goods.getItemkindNm())) {
|
|
|
-// goodsNotiInfo.setNiContent(goods.getItemkindNm());
|
|
|
-// }
|
|
|
-// }
|
|
|
- index++;
|
|
|
- }
|
|
|
-
|
|
|
- //고시항목 필수값 확인
|
|
|
- goods = this.getGoodsNotiCheck(goods, goodsNotiList, gagaMap, procJob);
|
|
|
|
|
|
- //고시 필수 항목 미입력으로 상품 상태 변경
|
|
|
- if ("G008_20".equals(goods.getGoodsStat())) {
|
|
|
- goodsDao.updateGoodsStatOnly(goods);
|
|
|
- }
|
|
|
+// //고시 필수 항목 미입력으로 상품 상태 변경
|
|
|
+// if ("G008_20".equals(goods.getGoodsStat())) {
|
|
|
+// goodsDao.updateGoodsStatOnly(goods);
|
|
|
+// }
|
|
|
|
|
|
this.createGoodsNoti(gagaMap, goodsNotiList); // 상품고시정보 저장
|
|
|
|
|
|
@@ -1465,14 +1440,6 @@ public class TssGoodsService {
|
|
|
return goods;
|
|
|
}
|
|
|
|
|
|
- // wms 상품 정보 확인
|
|
|
- WmsGoods wmsGoodsInfo = goodsDao.getWmsGoodsInfo(goods);
|
|
|
- if (wmsGoodsInfo == null) {
|
|
|
- goods.setGoodsRegMsg("미입고 상품코드");
|
|
|
- goods.setGoodsStat("10");
|
|
|
- return goods;
|
|
|
- }
|
|
|
-
|
|
|
// 품번코드
|
|
|
goods.setGoodsNum(goodsMass.getGoodsNum().trim().toUpperCase());
|
|
|
// 입점상품코드
|
|
|
@@ -1485,12 +1452,18 @@ public class TssGoodsService {
|
|
|
return goods;
|
|
|
}
|
|
|
goods.setBrandCd(goodsMass.getBrandCd().trim().toUpperCase()); // 브랜드 코드
|
|
|
+
|
|
|
+ // wms 상품 정보 확인
|
|
|
+ WmsGoods wmsGoodsInfo = goodsDao.getWmsGoodsInfo(goods);
|
|
|
+ if (wmsGoodsInfo == null) {
|
|
|
+ goods.setGoodsRegMsg("미입고 상품코드");
|
|
|
+ goods.setGoodsStat("10");
|
|
|
+ return goods;
|
|
|
+ }
|
|
|
|
|
|
// 상품명
|
|
|
if (StringUtils.isBlank(goodsMass.getGoodsNm())) {
|
|
|
goods.setGoodsRegMsg("상품명 오류");
|
|
|
- goods.setGoodsStat("10");
|
|
|
- return goods;
|
|
|
}
|
|
|
|
|
|
if (StringUtils.length(goodsMass.getGoodsNm()) > 66) {
|
|
|
@@ -1721,6 +1694,25 @@ public class TssGoodsService {
|
|
|
return goods;
|
|
|
}
|
|
|
goods.setOriginNm(originCdList.iterator().next().getCdNm()); //고시정보 적용용
|
|
|
+
|
|
|
+ //고시분류
|
|
|
+ if (StringUtils.isBlank(goodsMass.getNiClsfCd())) {
|
|
|
+ goods.setGoodsRegMsg("고시분류 오류");
|
|
|
+ goods.setGoodsStat("10");
|
|
|
+ return goods;
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(goodsMass.getNiClsfCd())) {
|
|
|
+ goods.setNiClsfCd(goodsMass.getNiClsfCd().trim().toUpperCase());
|
|
|
+
|
|
|
+ commonCode.setCdGb("G004"); // 고시분류
|
|
|
+ commonCode.setCd(goods.getNiClsfCd());
|
|
|
+ Collection<CommonCode> niClsfCdList = rendererService.getCommonCodeList(commonCode);
|
|
|
+ if (niClsfCdList == null || niClsfCdList.isEmpty()) {
|
|
|
+ goods.setGoodsRegMsg("고시분류 오류");
|
|
|
+ goods.setGoodsStat("10");
|
|
|
+ return goods;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// 제조년월
|
|
|
if (StringUtils.isBlank(goodsMass.getMakeYmd())) {
|
|
|
@@ -1831,26 +1823,15 @@ public class TssGoodsService {
|
|
|
// 고시항목 필수값 입력 확인
|
|
|
int index = 0;
|
|
|
|
|
|
- if ("createSelfGoods".equals(procJob)) {
|
|
|
- for (GoodsNotiInfo goodsNotiInfo : goodsNotiList) {
|
|
|
- if (StringUtils.isBlank(goodsNotiInfo.getNiContent())) {
|
|
|
- goods.setGoodsRegMsg("고시항목 정보 오류");
|
|
|
- goods.setGoodsStat("G008_20");
|
|
|
- return goods;
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- for (GoodsNotiInfo goodsNotiInfo : goodsNotiList) {
|
|
|
- if (StringUtils.isBlank(excelMap.getString("niContent" + (index + 1)))) {
|
|
|
- goods.setGoodsRegMsg("고시정보 없음 (" + (index + 1) + "번째 항목) - " + goodsNotiInfo.getNiItemCd() + "(" + goodsNotiInfo.getNiItemNm() + ")");
|
|
|
- goods.setGoodsStat("10");
|
|
|
- return goods;
|
|
|
- }
|
|
|
+ for (GoodsNotiInfo goodsNotiInfo : goodsNotiList) {
|
|
|
+ if (StringUtils.isBlank(excelMap.getString("niContent" + (index + 1)))) {
|
|
|
+ goods.setGoodsRegMsg("고시정보 없음 (" + (index + 1) + "번째 항목) - " + goodsNotiInfo.getNiItemCd() + "(" + goodsNotiInfo.getNiItemNm() + ")");
|
|
|
+ goods.setGoodsStat("10");
|
|
|
+ return goods;
|
|
|
}
|
|
|
index++;
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return goods;
|
|
|
}
|
|
|
|
|
|
@@ -1908,7 +1889,7 @@ public class TssGoodsService {
|
|
|
|
|
|
//배송비 정책 코드
|
|
|
goods.setDelvFeeCd(delvFeeCd);
|
|
|
-
|
|
|
+
|
|
|
// 상품고시정보 - 항목및 기본값
|
|
|
Collection<GoodsNotiInfo> goodsNotiList = goodsDao.getItemkindNotiInfoList(goods);
|
|
|
if (goodsNotiList == null || goodsNotiList.isEmpty()) {
|
|
|
@@ -1917,6 +1898,23 @@ public class TssGoodsService {
|
|
|
this.setGoodsRegResult(goods, goodsMass, procJob);
|
|
|
return goods.getGoodsStat();
|
|
|
}
|
|
|
+
|
|
|
+ int index = 0;
|
|
|
+ // 상품 등록시 고시정보 처리
|
|
|
+ for (GoodsNotiInfo goodsNotiInfo : goodsNotiList) {
|
|
|
+ if (!StringUtils.isBlank(gagaMap.getString("niContent" + (index + 1)))) {
|
|
|
+ goodsNotiInfo.setNiContent(gagaMap.getString("niContent" + (index + 1)));
|
|
|
+ }
|
|
|
+
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+
|
|
|
+ //고시항목 필수값 확인
|
|
|
+ goods = this.getGoodsNotiCheck(goods, goodsNotiList, gagaMap, procJob);
|
|
|
+ if ("10".equals(goods.getGoodsStat())) { // 정보 오류
|
|
|
+ this.setGoodsRegResult(goods, goodsMass, procJob);
|
|
|
+ return goods.getGoodsStat(); //continue
|
|
|
+ }
|
|
|
|
|
|
// 할인율
|
|
|
goods.setDcRate((int)(this.getDcRate(goods.getListPrice(), goods.getCurrPrice())));
|
|
|
@@ -2040,43 +2038,11 @@ public class TssGoodsService {
|
|
|
|
|
|
goodsMass.setGoodsCd(goods.getGoodsCd());
|
|
|
|
|
|
- int index = 0;
|
|
|
- // 상품 등록시 고시정보 처리
|
|
|
- for (GoodsNotiInfo goodsNotiInfo : goodsNotiList) {
|
|
|
- if (!StringUtils.isBlank(gagaMap.getString("niContent" + (index + 1)))) {
|
|
|
- goodsNotiInfo.setNiContent(gagaMap.getString("niContent" + (index + 1)));
|
|
|
- }
|
|
|
-
|
|
|
-// if ("G005_006".equals(goodsNotiInfo.getNiItemCd())) { //제조국
|
|
|
-// if (!StringUtils.isBlank(goods.getOriginNm())) {
|
|
|
-// goodsNotiInfo.setNiContent(goods.getOriginNm());
|
|
|
-// }
|
|
|
-// } else if ("G005_009".equals(goodsNotiInfo.getNiItemCd())) { //제조년월
|
|
|
-// if (!StringUtils.isBlank(goods.getMakeYmd())) {
|
|
|
-// goodsNotiInfo.setNiContent(goods.getMakeYmd());
|
|
|
-// }
|
|
|
-// } else if ("G005_097".equals(goodsNotiInfo.getNiItemCd())) { //수입여부
|
|
|
-// if (!StringUtils.isBlank(goods.getOriginNm()) &&
|
|
|
-// (goods.getOriginNm().indexOf("대한민국") >= 0 || goods.getOriginNm().indexOf("한국") >= 0 || goods.getOriginNm().toUpperCase().indexOf("KOREA") >= 0)) {
|
|
|
-// goodsNotiInfo.setNiContent("N");
|
|
|
-// } else {
|
|
|
-// goodsNotiInfo.setNiContent("Y");
|
|
|
-// }
|
|
|
-// } else if ("G005_099".equals(goodsNotiInfo.getNiItemCd())) { //종류
|
|
|
-// if (!StringUtils.isBlank(goods.getItemkindNm())) {
|
|
|
-// goodsNotiInfo.setNiContent(goods.getItemkindNm());
|
|
|
-// }
|
|
|
-// }
|
|
|
- index++;
|
|
|
- }
|
|
|
-
|
|
|
- //고시항목 필수값 확인
|
|
|
- goods = this.getGoodsNotiCheck(goods, goodsNotiList, gagaMap, procJob);
|
|
|
|
|
|
- //고시 필수 항목 미입력으로 상품 상태 변경
|
|
|
- if ("G008_20".equals(goods.getGoodsStat())) {
|
|
|
- goodsDao.updateGoodsStatOnly(goods);
|
|
|
- }
|
|
|
+// //고시 필수 항목 미입력으로 상품 상태 변경
|
|
|
+// if ("G008_20".equals(goods.getGoodsStat())) {
|
|
|
+// goodsDao.updateGoodsStatOnly(goods);
|
|
|
+// }
|
|
|
|
|
|
this.createGoodsNoti(gagaMap, goodsNotiList); // 상품고시정보 저장
|
|
|
|
|
|
@@ -2244,7 +2210,7 @@ public class TssGoodsService {
|
|
|
return goods;
|
|
|
}
|
|
|
goods.setItemkindNm(getItemkindList.iterator().next().getItemkindLeafNm()); //LEAF품목명
|
|
|
- String safeNiClsfCd = getItemkindList.iterator().next().getNiClsfCd(); // 안전인증확인용 고시분류- 유아용품 G004_23
|
|
|
+// String safeNiClsfCd = getItemkindList.iterator().next().getNiClsfCd(); // 안전인증확인용 고시분류- 유아용품 G004_23
|
|
|
|
|
|
// 성별
|
|
|
if (StringUtils.isBlank(goodsMass.getSexGb())) {
|
|
|
@@ -2482,6 +2448,26 @@ public class TssGoodsService {
|
|
|
return goods;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //고시분류
|
|
|
+ if (StringUtils.isBlank(goodsMass.getNiClsfCd())) {
|
|
|
+ goods.setGoodsRegMsg("고시분류 오류");
|
|
|
+ goods.setGoodsStat("10");
|
|
|
+ return goods;
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(goodsMass.getNiClsfCd())) {
|
|
|
+ goods.setNiClsfCd(goodsMass.getNiClsfCd().trim().toUpperCase());
|
|
|
+
|
|
|
+ commonCode.setCdGb("G004"); // 고시분류
|
|
|
+ commonCode.setCd(goods.getNiClsfCd());
|
|
|
+ Collection<CommonCode> niClsfCdList = rendererService.getCommonCodeList(commonCode);
|
|
|
+ if (niClsfCdList == null || niClsfCdList.isEmpty()) {
|
|
|
+ goods.setGoodsRegMsg("고시분류 오류");
|
|
|
+ goods.setGoodsStat("10");
|
|
|
+ return goods;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//성인용품여부
|
|
|
if (StringUtils.isBlank(goodsMass.getAdultYn())) {
|