|
@@ -181,23 +181,12 @@ public class OrderItems extends Controller {
|
|
|
}
|
|
|
//价格
|
|
|
ItemPrice itemPrice = ItemPrice.getItemPrice(this, sys_enterpriseid, itemid);
|
|
|
- if (!item.containsKey("defaultprice")) {
|
|
|
- defaultprice = orderItemsHelper.getDefaultprice(itemPrice);
|
|
|
- price = orderItemsHelper.getPrice(orderRows.get(0), itemPrice, item, itemRowsMap);
|
|
|
- saleprice = orderItemsHelper.getSalePrice(orderRows.get(0), itemPrice, item, itemRowsMap);
|
|
|
- } else {
|
|
|
- defaultprice = item.getBigDecimal("defaultprice");
|
|
|
- price = item.getBigDecimal("price");
|
|
|
- saleprice = orderItemsHelper.getSalePrice(orderRows.get(0), itemPrice, item, itemRowsMap);
|
|
|
- if (price.compareTo(price1) != 0) {
|
|
|
- sqlList.add(DataContrlLog.createLog(this, "sa_order", sa_orderid, "订单商品【" + itemRow.getString("itemname") + "】由单价:" + price1 + "修改为单价:" + price, "订单修改单价").getSQL());
|
|
|
- }
|
|
|
- }
|
|
|
+ price = orderItemsHelper.getPrice(orderRows.get(0), itemPrice, item);
|
|
|
+ saleprice = orderItemsHelper.getSalePrice(orderRows.get(0), itemPrice, item, itemRowsMap);
|
|
|
if (price.compareTo(BigDecimal.ZERO) < 0) {
|
|
|
return getErrReturnObject().setErrMsg("价格不可小于0").toString();
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ defaultprice= price.multiply(rwpricerate);
|
|
|
if (isInsert) {
|
|
|
price = price.multiply(rwpricerate).add(custamount);
|
|
|
sqlList.add(orderItemsHelper.getInsertSQL(customproperties, sa_orderitemsid, item, itemRow, type, defaultprice, price, saleprice, itemPrice.getMarketprice(), spec, promotionitems, width, length, custamount, rwpricerate, pricerate).getSQL());
|