|
|
@@ -3102,7 +3102,7 @@ public class TsaGoodsService {
|
|
|
return goods;
|
|
|
}
|
|
|
if (UPDATE_NO_PATTERN.equals(goodsMass.getCurrPrice().trim())) {
|
|
|
- goods.setCurrPrice(0);
|
|
|
+ goods.setCurrPrice(goodsOrigin.getCurrPrice());
|
|
|
} else {
|
|
|
|
|
|
if (!GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", "").matches(NUMBER_PATTERN)) {
|
|
|
@@ -3115,6 +3115,18 @@ public class TsaGoodsService {
|
|
|
goods.setGoodsStat("10");
|
|
|
return goods;
|
|
|
}
|
|
|
+
|
|
|
+ if (Integer.parseInt(goodsMass.getCurrPrice().trim()) > goodsOrigin.getListPrice()) {
|
|
|
+ goods.setGoodsRegMsg("판매가 오류(정상가보다 높음)");
|
|
|
+ goods.setGoodsStat("10");
|
|
|
+ return goods;
|
|
|
+ }
|
|
|
+
|
|
|
+ //판매가 변경시
|
|
|
+ goods.setCurrPrice(Integer.parseInt(GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", ""))); // 판매가
|
|
|
+ goods.setCurrBprice(goodsOrigin.getCurrPrice());
|
|
|
+ goods.setDcRate((int)(this.getDcRate(goodsOrigin.getListPrice(), goods.getCurrPrice())));
|
|
|
+ goods.setChDataYn("Y");
|
|
|
}
|
|
|
//판매수수료율
|
|
|
if (StringUtils.isBlank(goodsMass.getSellFeeRate())) {
|
|
|
@@ -3124,7 +3136,7 @@ public class TsaGoodsService {
|
|
|
}
|
|
|
float sellFeeRate = 0f;
|
|
|
if (UPDATE_NO_PATTERN.equals(goodsMass.getSellFeeRate().trim())) {
|
|
|
- goods.setSellFeeRate(0);
|
|
|
+ goods.setSellFeeRate(goodsOrigin.getSellFeeRate());
|
|
|
} else {
|
|
|
try {
|
|
|
sellFeeRate = Float.valueOf(goodsMass.getSellFeeRate().trim());
|
|
|
@@ -3147,51 +3159,11 @@ public class TsaGoodsService {
|
|
|
goods.setGoodsStat("10");
|
|
|
return goods;
|
|
|
}
|
|
|
- }
|
|
|
+
|
|
|
+ goods.setSellFeeRate(sellFeeRate); // 판매수수료율
|
|
|
+ goods.setChDataYn("Y");
|
|
|
+
|
|
|
|
|
|
- //판매가나 판매수수료율이 변경되었을 때
|
|
|
- if (!UPDATE_NO_PATTERN.equals(goodsMass.getCurrPrice().trim()) || !UPDATE_NO_PATTERN.equals(goodsMass.getSellFeeRate().trim())) {
|
|
|
- //자사
|
|
|
- if ("Y".equals(goodsOrigin.getSelfGoodsYn())) {
|
|
|
- //판매가 변경시
|
|
|
- if (!UPDATE_NO_PATTERN.equals(goodsMass.getCurrPrice().trim())) {
|
|
|
- goods.setCurrPrice(Integer.parseInt(GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", ""))); // 판매가
|
|
|
- goods.setCurrBprice(goodsOrigin.getCurrPrice());
|
|
|
- goods.setDcRate((int)(this.getDcRate(goodsOrigin.getListPrice(), goods.getCurrPrice())));
|
|
|
- goods.setChDataYn("Y");
|
|
|
- }
|
|
|
- //판매수수료율 변경시
|
|
|
- if (!UPDATE_NO_PATTERN.equals(goodsMass.getSellFeeRate().trim())) {
|
|
|
- goods.setSellFeeRate(sellFeeRate); // 판매수수료율
|
|
|
- goods.setChDataYn("Y");
|
|
|
- }
|
|
|
- } else {
|
|
|
-
|
|
|
- goods.setCurrPrice(Integer.parseInt(GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", ""))); // 판매가
|
|
|
-
|
|
|
- //입점
|
|
|
- GoodsPriceRes goodsPriceRes = new GoodsPriceRes();
|
|
|
- goodsPriceRes.setGoodsCd(goods.getGoodsCd());
|
|
|
- if (goods.getCurrPrice() != goodsOrigin.getCurrPrice()) {
|
|
|
- goodsPriceRes.setResGoodsPrice(goods.getCurrPrice());
|
|
|
- goodsPriceRes.setEndGoodsPrice(goods.getCurrPrice());
|
|
|
- }
|
|
|
- if (goods.getSellFeeRate() != goodsOrigin.getSellFeeRate()) {
|
|
|
- goodsPriceRes.setSellFeeRate(sellFeeRate);
|
|
|
- }
|
|
|
- goodsPriceRes.setApplyStdt(GagaDateUtil.getTodayDateTime()); //yyyymmddhhmiss
|
|
|
- int toYear = Integer.parseInt(GagaDateUtil.getToday("yyyy")) + 4;
|
|
|
- goodsPriceRes.setApplyEddt(Integer.toString(toYear) + "1231235959"); //yyyymmddhhmiss
|
|
|
- goodsPriceRes.setCfrmYn("N");
|
|
|
- goodsPriceRes.setApplyYn("N");
|
|
|
- goodsPriceRes.setRegNo(goods.getRegNo());
|
|
|
- goodsPriceRes.setUpdNo(goods.getUpdNo());
|
|
|
- goodsDao.createGoodPriceRes(goodsPriceRes);
|
|
|
-
|
|
|
- // 상품테이블에 바로 변경하지 않고 입점상품가격관리에서 승인해야함
|
|
|
- goods.setCurrPrice(goodsOrigin.getCurrPrice());
|
|
|
- goods.setSellFeeRate(goodsOrigin.getSellFeeRate());
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
// 상품구분
|