|
@@ -30,7 +30,7 @@ public class Itempriceadjust extends Controller {
|
|
|
super(content);
|
|
|
}
|
|
|
|
|
|
- @API(title = "商品价格调整单新增或更新", apiversion = R.ID20221024163804.v1.class,intervaltime = 200)
|
|
|
+ @API(title = "商品价格调整单新增或更新", apiversion = R.ID20221024163804.v1.class, intervaltime = 200)
|
|
|
@CACHEING_CLEAN(apiversions = {R.ID20221024163504.v1.class})
|
|
|
public String insert_update() throws YosException {
|
|
|
ArrayList<String> sqlList = new ArrayList<>();
|
|
@@ -151,7 +151,8 @@ public class Itempriceadjust extends Controller {
|
|
|
if (marketprice.compareTo(BigDecimal.ZERO) < 0) {
|
|
|
return getErrReturnObject().setErrMsg("商品牌价必须大于0").toString();
|
|
|
} else if (itemRowsMap.get(itemid).get(0).getBigDecimal("marketprice").compareTo(itemrows.get(0).getBigDecimal("oldmarketprice")) != 0) {
|
|
|
- return getErrReturnObject().setErrMsg("部分商品牌价发生修改,请点击【价格刷新】后再试").toString();
|
|
|
+ String itemno = getItemRow(itemid).getString("itemno");
|
|
|
+ return getErrReturnObject().setErrMsg("编号为【" + itemno + "】商品牌价发生修改,请点击【价格刷新】后再试").toString();
|
|
|
}
|
|
|
sqlList.add("update plm_item set marketprice=" + itemrows.get(0).getBigDecimal("marketprice") + " where siteid='" + siteid + "' and itemid=" + itemid);
|
|
|
}
|
|
@@ -168,7 +169,8 @@ public class Itempriceadjust extends Controller {
|
|
|
if (gradePriceRowsMap.containsKey("pricegrade")) {
|
|
|
Rows priceRows = gradePriceRowsMap.get(pricegrade);
|
|
|
if (priceRows.get(0).getBigDecimal("price").compareTo(row.getBigDecimal("oldprice")) != 0) {
|
|
|
- return getErrReturnObject().setErrMsg("部分商品原价发生修改,请点击【价格刷新】后再试").toString();
|
|
|
+ String itemno = getItemRow(itemid).getString("itemno");
|
|
|
+ return getErrReturnObject().setErrMsg("编号为【" + itemno + "】商品原价发生修改,请点击【价格刷新】后再试").toString();
|
|
|
}
|
|
|
}
|
|
|
if (!itemPriceRowsMap.containsKey(itemid) || !itemPriceRowsMap.get(itemid).toArrayList("pricegrade").contains(pricegrade)) {
|
|
@@ -195,6 +197,12 @@ public class Itempriceadjust extends Controller {
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
+ public Row getItemRow(String itemid) throws YosException {
|
|
|
+
|
|
|
+ return dbConnect.runSqlQuery(0, "SELECT * from plm_item WHERE itemid='" + itemid + "' and siteid='" + siteid + "'");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@API(title = "商品价格调整单详情查询", apiversion = R.ID20221025093404.v1.class)
|
|
|
public String queryById() throws YosException {
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "商品价格调整单详情查询");
|