|
@@ -2121,9 +2121,9 @@ public class TsaGoodsService {
|
|
|
goodsPriceRes.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
goodsPriceRes.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
goodsPriceRes.setRegNo(TsaSession.getInfo().getUserNo());
|
|
goodsPriceRes.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
|
|
|
- //예약일시 시분 설정
|
|
|
|
|
- goodsPriceRes.setApplyStdt(goodsPriceRes.getApplyStdt() + "0000");
|
|
|
|
|
- goodsPriceRes.setApplyEddt(goodsPriceRes.getApplyEddt() + "5959");
|
|
|
|
|
|
|
+// //예약일시 시분 설정
|
|
|
|
|
+// goodsPriceRes.setApplyStdt(goodsPriceRes.getApplyStdt() + "0000");
|
|
|
|
|
+// goodsPriceRes.setApplyEddt(goodsPriceRes.getApplyEddt() + "5959");
|
|
|
|
|
|
|
|
// 엑셀조회를 위한 SEARCH 테이블 생성
|
|
// 엑셀조회를 위한 SEARCH 테이블 생성
|
|
|
SearchData searchData = new SearchData();
|
|
SearchData searchData = new SearchData();
|
|
@@ -2160,7 +2160,7 @@ public class TsaGoodsService {
|
|
|
return (cnt + 2) + "행의 예약가격을 확인해주세요.";
|
|
return (cnt + 2) + "행의 예약가격을 확인해주세요.";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- String nowDate = GagaDateUtil.getToday(); //yyyyMMddHH
|
|
|
|
|
|
|
+ String nowDate = GagaDateUtil.getToday("yyyyMMddHH"); //yyyyMMddHH
|
|
|
SimpleDateFormat dateFormatParser = new SimpleDateFormat("yyyyMMddHH");
|
|
SimpleDateFormat dateFormatParser = new SimpleDateFormat("yyyyMMddHH");
|
|
|
dateFormatParser.setLenient(false);
|
|
dateFormatParser.setLenient(false);
|
|
|
try {
|
|
try {
|
|
@@ -2179,7 +2179,7 @@ public class TsaGoodsService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (Integer.parseInt(goodsPriceRes.getApplyStdt()) <= Integer.parseInt(nowDate)) {
|
|
if (Integer.parseInt(goodsPriceRes.getApplyStdt()) <= Integer.parseInt(nowDate)) {
|
|
|
- return (cnt + 2) + "행의 예약 시작일자는 현재일자 보다 작거나 같을 수 없습니다.";
|
|
|
|
|
|
|
+ return (cnt + 2) + "행의 예약 시작일시는 현재일시 보다 작거나 같을 수 없습니다.";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//정상가와 비교
|
|
//정상가와 비교
|
|
@@ -2192,14 +2192,19 @@ public class TsaGoodsService {
|
|
|
if (goods.getListPrice() < goodsPriceRes.getResGoodsPrice()) {
|
|
if (goods.getListPrice() < goodsPriceRes.getResGoodsPrice()) {
|
|
|
return (cnt + 2) + "행의 상품 정상가보다 예약판매가가 더 큽니다.";
|
|
return (cnt + 2) + "행의 상품 정상가보다 예약판매가가 더 큽니다.";
|
|
|
}
|
|
}
|
|
|
- if (!"Y".equals(goods.getSelfGoodsYn())) {
|
|
|
|
|
- return (cnt + 2) + "행의 상품은 자사상품이 아닙니다.";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (!"Y".equals(goods.getSelfGoodsYn())) {
|
|
|
|
|
+// return (cnt + 2) + "행의 상품은 자사상품이 아닙니다.";
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
+ goodsPriceRes.setApplyStdt(goodsPriceRes.getApplyStdt() + "0000");
|
|
|
|
|
+ goodsPriceRes.setApplyEddt(goodsPriceRes.getApplyEddt() + "5959");
|
|
|
|
|
|
|
|
if (goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0) {
|
|
if (goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0) {
|
|
|
- return (cnt + 2) + "행은 이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsPriceRes.getGoodsCd() + ")";
|
|
|
|
|
|
|
+ return (cnt + 2) + "행의 상품 " + goodsPriceRes.getGoodsCd() + "은 이미 등록된 상품 가격예약이 존재합니다.";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ goodsPriceRes.setEndGoodsPrice(goods.getCurrPrice());
|
|
|
|
|
+
|
|
|
cnt++;
|
|
cnt++;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2391,7 +2396,6 @@ public class TsaGoodsService {
|
|
|
return goodsDao.getGoodsNaverPriceList(goodsSearch);
|
|
return goodsDao.getGoodsNaverPriceList(goodsSearch);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 상품 네이버 최저가 엑셀다운로드
|
|
* 상품 네이버 최저가 엑셀다운로드
|
|
|
*
|
|
*
|
|
@@ -2402,13 +2406,13 @@ public class TsaGoodsService {
|
|
|
* @since 2021. 07. 09
|
|
* @since 2021. 07. 09
|
|
|
*/
|
|
*/
|
|
|
public void getGoodsNaverExcelList(GoodsSearch goodsSearch, String excelFilenameWithPath) {
|
|
public void getGoodsNaverExcelList(GoodsSearch goodsSearch, String excelFilenameWithPath) {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 헤더 title 설정
|
|
// 헤더 title 설정
|
|
|
String[] listTitles = {"상품코드", "브랜드명", "상품명", "정상가", "판매가", "자사즉시할인가", "네이버최저가", "차액",
|
|
String[] listTitles = {"상품코드", "브랜드명", "상품명", "정상가", "판매가", "자사즉시할인가", "네이버최저가", "차액",
|
|
|
"최저가몰명", "최저가몰링크"};
|
|
"최저가몰명", "최저가몰링크"};
|
|
|
|
|
|
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정
|
|
|
- String[] cellNames = {"GOODS_CD", "BRAND_ENM", "GOODS_NM", "LIST_PRICE", "CURR_PRICE", "BENEFIT_PRICE", "LOWEST_PRICE", "PRICE" ,
|
|
|
|
|
|
|
+ String[] cellNames = {"GOODS_CD", "BRAND_ENM", "GOODS_NM", "LIST_PRICE", "CURR_PRICE", "BENEFIT_PRICE", "LOWEST_PRICE", "PRICE",
|
|
|
"MALL_NM", "MALL_LINK"};
|
|
"MALL_NM", "MALL_LINK"};
|
|
|
|
|
|
|
|
String[] cellTypes = {
|
|
String[] cellTypes = {
|
|
@@ -2418,16 +2422,16 @@ public class TsaGoodsService {
|
|
|
GagaExcelConstants.CellType.CHAR_RIGHT.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
|
|
GagaExcelConstants.CellType.CHAR_RIGHT.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
|
|
|
GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name()};
|
|
GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name()};
|
|
|
|
|
|
|
|
- Collection<GagaMap> dataList = goodsDao.getGoodsNaverExcelList(goodsSearch);
|
|
|
|
|
|
|
+ Collection<GagaMap> dataList = goodsDao.getGoodsNaverExcelList(goodsSearch);
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
GagaExcelUtil.createExcel(excelFilenameWithPath, dataList, "상품 네이버 가격", listTitles, cellNames, cellTypes, TsaConstants.EXCEL_FOOTER_TITLE);
|
|
GagaExcelUtil.createExcel(excelFilenameWithPath, dataList, "상품 네이버 가격", listTitles, cellNames, cellTypes, TsaConstants.EXCEL_FOOTER_TITLE);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
throw new IllegalStateException(e);
|
|
throw new IllegalStateException(e);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 상품 네이버 최저가 목록
|
|
* 상품 네이버 최저가 목록
|
|
|
*
|
|
*
|
|
@@ -3885,11 +3889,11 @@ public class TsaGoodsService {
|
|
|
goods.setGoodsNum(goods.getGoodsCd());
|
|
goods.setGoodsNum(goods.getGoodsCd());
|
|
|
// 입점상품코드
|
|
// 입점상품코드
|
|
|
goods.setSupplyGoodsCd(goods.getGoodsCd());
|
|
goods.setSupplyGoodsCd(goods.getGoodsCd());
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (goods.getListPrice() < goods.getCurrPrice()) {
|
|
if (goods.getListPrice() < goods.getCurrPrice()) {
|
|
|
throw new IllegalStateException("판매가를 올바르게 입력해주세요.");
|
|
throw new IllegalStateException("판매가를 올바르게 입력해주세요.");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 판매수수료율
|
|
// 판매수수료율
|
|
|
SupplyCompany supplyCompany = new SupplyCompany();
|
|
SupplyCompany supplyCompany = new SupplyCompany();
|
|
|
supplyCompany.setSupplyCompCd(goods.getSupplyCompCd());
|
|
supplyCompany.setSupplyCompCd(goods.getSupplyCompCd());
|
|
@@ -3996,7 +4000,7 @@ public class TsaGoodsService {
|
|
|
index++;
|
|
index++;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 상품 색상 , 사이즈 옵션 정보 조회
|
|
// 상품 색상 , 사이즈 옵션 정보 조회
|
|
|
Goods goodsColorSize = goodsDao.getGoodsColorSize(goods);
|
|
Goods goodsColorSize = goodsDao.getGoodsColorSize(goods);
|
|
|
if (goodsColorSize != null && !StringUtils.isBlank(goodsColorSize.getMainColorCd())) {
|
|
if (goodsColorSize != null && !StringUtils.isBlank(goodsColorSize.getMainColorCd())) {
|
|
@@ -4012,7 +4016,7 @@ public class TsaGoodsService {
|
|
|
|
|
|
|
|
// 전시카테고리 작업
|
|
// 전시카테고리 작업
|
|
|
goodsDao.createCategoryGoods(goods);
|
|
goodsDao.createCategoryGoods(goods);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
log.info("goods = {}", goods);
|
|
log.info("goods = {}", goods);
|
|
|
// 안전안증작업
|
|
// 안전안증작업
|
|
|
if (!StringUtils.isEmpty(goods.getCertTargetGb())) {
|
|
if (!StringUtils.isEmpty(goods.getCertTargetGb())) {
|
|
@@ -4023,9 +4027,9 @@ public class TsaGoodsService {
|
|
|
goodsSafeNo.setCertType(goods.getCertType());
|
|
goodsSafeNo.setCertType(goods.getCertType());
|
|
|
goodsSafeNo.setCertNum(goods.getCertNum());
|
|
goodsSafeNo.setCertNum(goods.getCertNum());
|
|
|
saveGoodsDetailCertNum(goodsSafeNo);
|
|
saveGoodsDetailCertNum(goodsSafeNo);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|