|
|
@@ -2983,9 +2983,9 @@ public class TsaGoodsService {
|
|
|
// if (StringUtils.isBlank(goodsMass.getCostPrice())) {
|
|
|
// goodsMass.setCostPrice("0");
|
|
|
// }
|
|
|
-// if ("10".equals(goods.getGoodsStat())) {
|
|
|
-// goodsMass.setRegSuccYn("N");
|
|
|
-// }
|
|
|
+ if ("10".equals(goods.getGoodsStat())) {
|
|
|
+ goodsMass.setRegSuccYn("N");
|
|
|
+ }
|
|
|
goodsMass.setProcGb("C");
|
|
|
if ("updateGoods".equals(procJob)) {
|
|
|
goodsMass.setProcGb("U");
|
|
|
@@ -3122,10 +3122,13 @@ public class TsaGoodsService {
|
|
|
goods.setGoodsStat("10");
|
|
|
return goods;
|
|
|
}
|
|
|
+
|
|
|
+ int chkCurrPrice = 0;
|
|
|
+ int chkListPrice = 0;
|
|
|
if (UPDATE_NO_PATTERN.equals(goodsMass.getCurrPrice().trim())) {
|
|
|
goods.setCurrPrice(goodsOrigin.getCurrPrice());
|
|
|
- } else {
|
|
|
-
|
|
|
+ chkCurrPrice = goodsOrigin.getCurrPrice();
|
|
|
+ }else {
|
|
|
if (!GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", "").matches(NUMBER_PATTERN)) {
|
|
|
goods.setGoodsRegMsg("판매가 오류");
|
|
|
goods.setGoodsStat("10");
|
|
|
@@ -3136,17 +3139,37 @@ public class TsaGoodsService {
|
|
|
goods.setGoodsStat("10");
|
|
|
return goods;
|
|
|
}
|
|
|
-
|
|
|
- if (Integer.parseInt(goodsMass.getCurrPrice().trim()) > goodsOrigin.getListPrice()) {
|
|
|
+ chkCurrPrice = Integer.parseInt(GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", ""));
|
|
|
+ }
|
|
|
+ if (UPDATE_NO_PATTERN.equals(goodsMass.getListPrice().trim())) {
|
|
|
+ goods.setListPrice(goodsOrigin.getListPrice());
|
|
|
+ chkListPrice = goodsOrigin.getListPrice();
|
|
|
+ }else {
|
|
|
+ if (!GagaStringUtil.replace(goodsMass.getListPrice().trim(), ",", "").matches(NUMBER_PATTERN)) {
|
|
|
+ goods.setGoodsRegMsg("정상가 오류");
|
|
|
+ goods.setGoodsStat("10");
|
|
|
+ return goods;
|
|
|
+ }
|
|
|
+ if (Integer.parseInt(goodsMass.getListPrice().trim()) == 0) {
|
|
|
+ goods.setGoodsRegMsg("정상가 오류");
|
|
|
+ goods.setGoodsStat("10");
|
|
|
+ return goods;
|
|
|
+ }
|
|
|
+ chkListPrice = Integer.parseInt(GagaStringUtil.replace(goodsMass.getListPrice().trim(), ",", ""));
|
|
|
+ }
|
|
|
+
|
|
|
+ if( !UPDATE_NO_PATTERN.equals(goodsMass.getListPrice().trim()) || !UPDATE_NO_PATTERN.equals(goodsMass.getCurrPrice().trim()) ) {
|
|
|
+ if (chkCurrPrice > chkListPrice) {
|
|
|
goods.setGoodsRegMsg("판매가 오류(정상가보다 높음)");
|
|
|
goods.setGoodsStat("10");
|
|
|
return goods;
|
|
|
}
|
|
|
|
|
|
- //판매가 변경시
|
|
|
- goods.setCurrPrice(Integer.parseInt(GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", ""))); // 판매가
|
|
|
+ //금액 변경시
|
|
|
+ goods.setListPrice(chkListPrice); // 정상가
|
|
|
+ goods.setCurrPrice(chkCurrPrice); // 판매가
|
|
|
goods.setCurrBprice(goodsOrigin.getCurrPrice());
|
|
|
- goods.setDcRate((int)(this.getDcRate(goodsOrigin.getListPrice(), goods.getCurrPrice())));
|
|
|
+ goods.setDcRate((int)(this.getDcRate(goods.getListPrice(), goods.getCurrPrice())));
|
|
|
goods.setChDataYn("Y");
|
|
|
}
|
|
|
//판매수수료율
|