|
|
@@ -49,16 +49,17 @@ public class OrderItems extends Controller {
|
|
|
public String insertOrUpdate() throws YosException {
|
|
|
Long sa_orderid = content.getLong("sa_orderid");
|
|
|
Long sys_enterpriseid = content.getLong("sys_enterpriseid");
|
|
|
- Long sa_contractid = content.getLongValue("sa_contractid");
|
|
|
+// Long sa_contractid = content.getLongValue("sa_contractid");
|
|
|
Rows orderRows = getOrderRows(this, sa_orderid);
|
|
|
if (orderRows.isEmpty()) {
|
|
|
return getErrReturnObject().setErrMsg("数据不存在,无法添加").toString();
|
|
|
}
|
|
|
|
|
|
- sa_contractid = orderRows.get(0).getLong("sa_contractid");
|
|
|
+// sa_contractid = orderRows.get(0).getLong("sa_contractid");
|
|
|
|
|
|
String type = orderRows.get(0).getString("type");
|
|
|
JSONArray items = content.getJSONArray("items");
|
|
|
+ Long sa_promotionid=orderRows.get(0).getLong("sa_promotionid");
|
|
|
|
|
|
|
|
|
ArrayList<String> sqlList = new ArrayList<>();
|
|
|
@@ -130,11 +131,14 @@ public class OrderItems extends Controller {
|
|
|
ItemPrice itemPrice = ItemPrice.getItemPrice(this, sys_enterpriseid, itemid);
|
|
|
if (!item.containsKey("defaultprice")) {
|
|
|
switch (type) {
|
|
|
- case "项目订单":
|
|
|
- defaultprice = itemPrice.getContractprice(sa_contractid);
|
|
|
- break;
|
|
|
- case "工具订单":
|
|
|
- defaultprice = itemPrice.getMarketprice();
|
|
|
+// case "项目订单":
|
|
|
+// defaultprice = itemPrice.getContractprice(sa_contractid);
|
|
|
+// break;
|
|
|
+// case "工具订单":
|
|
|
+// defaultprice = itemPrice.getMarketprice();
|
|
|
+// break;
|
|
|
+ case "促销订单":
|
|
|
+ defaultprice = itemPrice.getPromotionPrice(sa_promotionid);
|
|
|
break;
|
|
|
default:
|
|
|
defaultprice = itemPrice.getContractprice();
|