|
@@ -98,11 +98,11 @@ public class TssGoodsService {
|
|
|
if ("Y".equals(goodsSearch.getImageViewYn())) {
|
|
if ("Y".equals(goodsSearch.getImageViewYn())) {
|
|
|
// 헤더 title 설정
|
|
// 헤더 title 설정
|
|
|
String[] listTitles = {"이미지", "상품코드", "업체명", "브랜드명", "상품명", "품목", "재고", "상품상태", "스타일년도", "시즌",
|
|
String[] listTitles = {"이미지", "상품코드", "업체명", "브랜드명", "상품명", "품목", "재고", "상품상태", "스타일년도", "시즌",
|
|
|
- "정상가", "판매가", "할인율", "가격변경일", "ERP재고연동여부", "정상이월구분", "반품가능 여부","승인일시"};
|
|
|
|
|
|
|
+ "정상가", "판매가", "할인율", "가격변경일", "ERP재고연동여부", "정상이월구분", "반품가능 여부", "승인일시"};
|
|
|
|
|
|
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정
|
|
|
String[] cellNames = {"IMG_PATH1", "GOODS_CD", "SUPPLY_COMP_CD", "BRAND_GRP_NM", "GOODS_NM", "ITEMKIND_NM",
|
|
String[] cellNames = {"IMG_PATH1", "GOODS_CD", "SUPPLY_COMP_CD", "BRAND_GRP_NM", "GOODS_NM", "ITEMKIND_NM",
|
|
|
- "STOCK_QTY_SUM", "GOODS_STAT", "STYLE_YEAR", "SEASON_CD", "LIST_PRICE", "CURR_PRICE",
|
|
|
|
|
|
|
+ "STOCK_QTY_SUM", "GOODS_STAT", "STYLE_YEAR", "SEASON_CD", "LIST_PRICE", "CURR_PRICE",
|
|
|
"DC_RATE", "PRICE_UPD_DT", "ERP_STOCK_LINK_YN", "FORMAL_GB", "RETURNABLE_YN", "FRST_CFRM_DT"};
|
|
"DC_RATE", "PRICE_UPD_DT", "ERP_STOCK_LINK_YN", "FORMAL_GB", "RETURNABLE_YN", "FRST_CFRM_DT"};
|
|
|
|
|
|
|
|
String[] cellTypes = {GagaExcelConstants.CellType.IMAGE.name(),
|
|
String[] cellTypes = {GagaExcelConstants.CellType.IMAGE.name(),
|
|
@@ -143,22 +143,22 @@ public class TssGoodsService {
|
|
|
} else {
|
|
} else {
|
|
|
// 헤더 title 설정
|
|
// 헤더 title 설정
|
|
|
String[] listTitles = {"상품코드", "업체명", "브랜드명", "상품명", "품목", "재고", "상품상태", "스타일년도",
|
|
String[] listTitles = {"상품코드", "업체명", "브랜드명", "상품명", "품목", "재고", "상품상태", "스타일년도",
|
|
|
- "시즌", "정상가", "판매가", "할인율", "가격변경일", "ERP재고연동여부", "정상이월구분", "반품가능 여부", "승인일시"};
|
|
|
|
|
|
|
+ "시즌", "정상가", "판매가", "할인율", "가격변경일", "ERP재고연동여부", "정상이월구분", "반품가능 여부", "승인일시"};
|
|
|
|
|
|
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정
|
|
|
String[] cellNames = {"GOODS_CD", "SUPPLY_COMP_CD", "BRAND_GRP_NM", "GOODS_NM", "ITEMKIND_NM", "STOCK_QTY_SUM", "GOODS_STAT", "STYLE_YEAR",
|
|
String[] cellNames = {"GOODS_CD", "SUPPLY_COMP_CD", "BRAND_GRP_NM", "GOODS_NM", "ITEMKIND_NM", "STOCK_QTY_SUM", "GOODS_STAT", "STYLE_YEAR",
|
|
|
- "SEASON_CD", "LIST_PRICE", "CURR_PRICE", "DC_RATE", "PRICE_UPD_DT", "ERP_STOCK_LINK_YN", "FORMAL_GB", "RETURNABLE_YN", "FRST_CFRM_DT"};
|
|
|
|
|
|
|
+ "SEASON_CD", "LIST_PRICE", "CURR_PRICE", "DC_RATE", "PRICE_UPD_DT", "ERP_STOCK_LINK_YN", "FORMAL_GB", "RETURNABLE_YN", "FRST_CFRM_DT"};
|
|
|
|
|
|
|
|
String[] cellTypes = {
|
|
String[] cellTypes = {
|
|
|
- GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
|
|
|
|
|
- GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
|
|
|
|
|
- GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
|
|
|
|
|
- GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
|
|
|
|
|
- GagaExcelConstants.CellType.CHAR_CENTER.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(),
|
|
|
|
|
- GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name()};
|
|
|
|
|
|
|
+ GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
|
|
|
|
|
+ GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
|
|
|
|
|
+ GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
|
|
|
|
|
+ GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
|
|
|
|
|
+ GagaExcelConstants.CellType.CHAR_CENTER.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(),
|
|
|
|
|
+ GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name()};
|
|
|
|
|
|
|
|
Collection<GagaMap> dataList = goodsDao.getGoodsInfoExcelList(goodsSearch);
|
|
Collection<GagaMap> dataList = goodsDao.getGoodsInfoExcelList(goodsSearch);
|
|
|
|
|
|
|
@@ -496,33 +496,42 @@ public class TssGoodsService {
|
|
|
goods.setGoodsTnm(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsTnm(), "<", "<"), ">", ">"));
|
|
goods.setGoodsTnm(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsTnm(), "<", "<"), ">", ">"));
|
|
|
goods.setGoodsSnm1(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsSnm1(), "<", "<"), ">", ">"));
|
|
goods.setGoodsSnm1(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsSnm1(), "<", "<"), ">", ">"));
|
|
|
|
|
|
|
|
- // 세트일 경우 상품 가격 확인
|
|
|
|
|
-// if ("G056_S".equals(goods.getGoodsType())) {
|
|
|
|
|
-//
|
|
|
|
|
-// Collection<GoodsCompose> goodsExtendList = goods.getGoodsComposeListNew();
|
|
|
|
|
-// int currPriceSum = 0;
|
|
|
|
|
-// for (GoodsCompose regGoodsExtend : goodsExtendList) {
|
|
|
|
|
-// currPriceSum = currPriceSum + regGoodsExtend.getCompsCurrPrice();
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+ // 가격, 수수료 승인처리시
|
|
|
|
|
+// // 가격변경일
|
|
|
|
|
+// if (goods.getCurrPrice() != goods.getCurrPriceOrg()) {
|
|
|
|
|
+// goods.setCurrBprice(goods.getCurrPriceOrg());
|
|
|
|
|
+// } else {
|
|
|
|
|
+// goods.setCurrPrice(goods.getCurrPriceOrg());
|
|
|
|
|
+// }
|
|
|
//
|
|
//
|
|
|
-// if (currPriceSum != goods.getCurrPriceOrg()) {
|
|
|
|
|
-// goods.setCurrBprice(goods.getCurrPriceOrg());
|
|
|
|
|
-// goods.setCurrPrice(currPriceSum);
|
|
|
|
|
-// goods.setDcRate((int)(this.getDcRate(goods.getListPrice() , currPriceSum)));
|
|
|
|
|
-// }
|
|
|
|
|
-// }else {
|
|
|
|
|
- // 가격변경일
|
|
|
|
|
|
|
+// // 승인일
|
|
|
|
|
+// if (!goods.getGoodsStat().equals(goods.getGoodsStatOrg())) {
|
|
|
|
|
+// goods.setChGoodsStatYn("Y");
|
|
|
|
|
+// }
|
|
|
|
|
+ if ("Y".equals(goods.getChCfrmYn())) {
|
|
|
|
|
+ GoodsPriceRes goodsPriceRes = new GoodsPriceRes();
|
|
|
|
|
+ goodsPriceRes.setGoodsCd(goods.getGoodsCd());
|
|
|
if (goods.getCurrPrice() != goods.getCurrPriceOrg()) {
|
|
if (goods.getCurrPrice() != goods.getCurrPriceOrg()) {
|
|
|
- goods.setCurrBprice(goods.getCurrPriceOrg());
|
|
|
|
|
- } else {
|
|
|
|
|
- goods.setCurrPrice(goods.getCurrPriceOrg());
|
|
|
|
|
|
|
+ goodsPriceRes.setResGoodsPrice(goods.getCurrPrice());
|
|
|
|
|
+ goodsPriceRes.setEndGoodsPrice(goods.getCurrPrice());
|
|
|
}
|
|
}
|
|
|
-// }
|
|
|
|
|
|
|
+ if (goods.getSellFeeRate() != goods.getSellFeeRateOrg()) {
|
|
|
|
|
+ goodsPriceRes.setSellFeeRate(goods.getSellFeeRate());
|
|
|
|
|
+ }
|
|
|
|
|
+ goodsPriceRes.setApplyStdt(GagaDateUtil.getTodayDateTime()); //yyyymmddhhmiss
|
|
|
|
|
+ goodsPriceRes.setApplyEddt(GagaDateUtil.getTodayDateTime()); //yyyymmddhhmiss // 수정햬야함
|
|
|
|
|
+ goodsPriceRes.setCfrmYn("N");
|
|
|
|
|
+ goodsPriceRes.setApplyYn("N");
|
|
|
|
|
+ goodsPriceRes.setRegNo(goods.getRegNo());
|
|
|
|
|
+ goodsPriceRes.setUpdNo(goods.getUpdNo());
|
|
|
|
|
+ goodsDao.createGoodPriceRes(goodsPriceRes);
|
|
|
|
|
|
|
|
- // 승인일
|
|
|
|
|
- if (!goods.getGoodsStat().equals(goods.getGoodsStatOrg()) && "G008_90".equals(goods.getGoodsStat())) {
|
|
|
|
|
- goods.setChGoodsStatYn("Y");
|
|
|
|
|
|
|
+ goods.setCurrPrice(goods.getCurrPriceOrg());
|
|
|
|
|
+ goods.setSellFeeRate(goods.getSellFeeRateOrg());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 선물 주문여부 N 설정
|
|
|
|
|
+ goods.setGiftPackYn("N");
|
|
|
// 사용자 검색어를 검색어에 적용
|
|
// 사용자 검색어를 검색어에 적용
|
|
|
String goodsSnm = goodsDao.getGoodsSnm(goods.getGoodsCd());
|
|
String goodsSnm = goodsDao.getGoodsSnm(goods.getGoodsCd());
|
|
|
if (!StringUtils.isEmpty(goods.getGoodsSnm1())) {
|
|
if (!StringUtils.isEmpty(goods.getGoodsSnm1())) {
|
|
@@ -777,7 +786,6 @@ public class TssGoodsService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 상품 사이즈 옵션정보 이력 생성
|
|
* 상품 사이즈 옵션정보 이력 생성
|
|
|
*
|
|
*
|
|
@@ -872,7 +880,7 @@ public class TssGoodsService {
|
|
|
goodsPriceRes.setRegNo(TssSession.getInfo().getUserNo());
|
|
goodsPriceRes.setRegNo(TssSession.getInfo().getUserNo());
|
|
|
goodsPriceRes.setUpdNo(TssSession.getInfo().getUserNo());
|
|
goodsPriceRes.setUpdNo(TssSession.getInfo().getUserNo());
|
|
|
|
|
|
|
|
- if(goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0 ) {
|
|
|
|
|
|
|
+ if (goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0) {
|
|
|
throw new IllegalStateException("이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsCd + ")");
|
|
throw new IllegalStateException("이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsCd + ")");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -954,12 +962,12 @@ public class TssGoodsService {
|
|
|
SimpleDateFormat dateFormatParser = new SimpleDateFormat("yyyyMMdd");
|
|
SimpleDateFormat dateFormatParser = new SimpleDateFormat("yyyyMMdd");
|
|
|
dateFormatParser.setLenient(false);
|
|
dateFormatParser.setLenient(false);
|
|
|
try {
|
|
try {
|
|
|
- dateFormatParser.parse(goodsPriceRes.getApplyStdt() );
|
|
|
|
|
|
|
+ dateFormatParser.parse(goodsPriceRes.getApplyStdt());
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
return (cnt + 2) + "행의 예약시작일을 확인해주세요.";
|
|
return (cnt + 2) + "행의 예약시작일을 확인해주세요.";
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
- dateFormatParser.parse(goodsPriceRes.getApplyEddt() );
|
|
|
|
|
|
|
+ dateFormatParser.parse(goodsPriceRes.getApplyEddt());
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
return (cnt + 2) + "행의 예약종료일을 확인해주세요.";
|
|
return (cnt + 2) + "행의 예약종료일을 확인해주세요.";
|
|
|
}
|
|
}
|
|
@@ -986,11 +994,10 @@ public class TssGoodsService {
|
|
|
return (cnt + 2) + "행의 상품은 자사상품이 아닙니다.";
|
|
return (cnt + 2) + "행의 상품은 자사상품이 아닙니다.";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0 ) {
|
|
|
|
|
|
|
+ if (goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0) {
|
|
|
return (cnt + 2) + "행은 이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsPriceRes.getGoodsCd() + ")";
|
|
return (cnt + 2) + "행은 이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsPriceRes.getGoodsCd() + ")";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
cnt++;
|
|
cnt++;
|
|
|
}
|
|
}
|
|
|
|
|
|