|
|
@@ -62,6 +62,7 @@ public class OrderItems extends Controller {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//通过版本更新订单表头数据
|
|
|
beans.order.Order.updateOrderWithVersion(this);
|
|
|
|
|
|
@@ -82,6 +83,12 @@ public class OrderItems extends Controller {
|
|
|
sumqty = sumqty.add(qty);
|
|
|
|
|
|
Row itemRow = getItemRow(itemid);
|
|
|
+ if (type.equals("标准订单") && itemRow.getString("ismodule").equals("1")) {
|
|
|
+ return getErrReturnObject().setErrMsg("商品编号【"+itemRow.getString("itemno")+"】是配件,无法添加").toString();
|
|
|
+ }
|
|
|
+ if (type.equals("配件订单") && itemRow.getString("ismodule").equals("0")) {
|
|
|
+ return getErrReturnObject().setErrMsg("商品编号【"+itemRow.getString("itemno")+"】不是配件,无法添加").toString();
|
|
|
+ }
|
|
|
|
|
|
Boolean isInsert = true;
|
|
|
JSONArray customproperties = new JSONArray();
|
|
|
@@ -263,10 +270,15 @@ public class OrderItems extends Controller {
|
|
|
Long sa_orderitemsid = item.getLong("sa_orderitemsid");
|
|
|
BigDecimal qty = item.getBigDecimal("qty");
|
|
|
sumqty = sumqty.add(qty);
|
|
|
-
|
|
|
-
|
|
|
//商品信息
|
|
|
Row itemRow = getItemRow(itemid);
|
|
|
+ if (type.equals("标准订单") && itemRow.getString("ismodule").equals("1")) {
|
|
|
+ return getErrReturnObject().setErrMsg("商品编号【"+itemRow.getString("itemno")+"】是配件,无法添加").toString();
|
|
|
+ }
|
|
|
+ if (type.equals("配件订单") && itemRow.getString("ismodule").equals("0")) {
|
|
|
+ return getErrReturnObject().setErrMsg("商品编号【"+itemRow.getString("itemno")+"】不是配件,无法添加").toString();
|
|
|
+ }
|
|
|
+
|
|
|
long width = itemRow.getLong("width");
|
|
|
long length = itemRow.getLong("length");
|
|
|
if (item.containsKey("width")) {
|