|
|
@@ -958,28 +958,28 @@ public class Order extends Controller {
|
|
|
@CACHEING_CLEAN(apiClass = {Order.class, OrderItems.class, restcontroller.sale.order.Order.class})
|
|
|
public String close() throws YosException {
|
|
|
long sa_orderid = content.getLong("sa_orderid");
|
|
|
- String str = closeordervalidate(sa_orderid);
|
|
|
- if (!str.equals("true")) {
|
|
|
- return getReturnObject().setCode("0706", str).toString();
|
|
|
- }
|
|
|
- Rows RowsDetails = dbConnect.runSqlQuery(
|
|
|
- "select * from sa_orderitems where sa_orderid=" + sa_orderid + " and siteid='" + siteid + "' order by rowno asc");
|
|
|
- content.put("type", "数量");
|
|
|
- content.put("remarks", "订单结案变更");
|
|
|
- JSONArray itemifnos = new JSONArray();
|
|
|
- for (Row row : RowsDetails) {
|
|
|
- if (row.getBigDecimal("qty").compareTo(row.getBigDecimal("erpdeliedqty")) > 0) {
|
|
|
- JSONObject jsonObject = new JSONObject();
|
|
|
- jsonObject.put("itemid", row.getLong("itemid"));
|
|
|
- jsonObject.put("sa_orderitemsid", row.getLong("sa_orderitemsid"));
|
|
|
- jsonObject.put("newvalue", row.getString("erpdeliedqty"));
|
|
|
- itemifnos.add(jsonObject);
|
|
|
- }
|
|
|
- }
|
|
|
- content.put("itemifnos", itemifnos);
|
|
|
- content.put("isjiean", true);
|
|
|
- OrderItems orderItems = new OrderItems(content);
|
|
|
- orderItems.changeItem();
|
|
|
+// String str = closeordervalidate(sa_orderid);
|
|
|
+// if (!str.equals("true")) {
|
|
|
+// return getReturnObject().setCode("0706", str).toString();
|
|
|
+// }
|
|
|
+// Rows RowsDetails = dbConnect.runSqlQuery(
|
|
|
+// "select * from sa_orderitems where sa_orderid=" + sa_orderid + " and siteid='" + siteid + "' order by rowno asc");
|
|
|
+// content.put("type", "数量");
|
|
|
+// content.put("remarks", "订单结案变更");
|
|
|
+// JSONArray itemifnos = new JSONArray();
|
|
|
+// for (Row row : RowsDetails) {
|
|
|
+// if (row.getBigDecimal("qty").compareTo(row.getBigDecimal("erpdeliedqty")) > 0) {
|
|
|
+// JSONObject jsonObject = new JSONObject();
|
|
|
+// jsonObject.put("itemid", row.getLong("itemid"));
|
|
|
+// jsonObject.put("sa_orderitemsid", row.getLong("sa_orderitemsid"));
|
|
|
+// jsonObject.put("newvalue", row.getString("erpdeliedqty"));
|
|
|
+// itemifnos.add(jsonObject);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// content.put("itemifnos", itemifnos);
|
|
|
+// content.put("isjiean", true);
|
|
|
+// OrderItems orderItems = new OrderItems(content);
|
|
|
+// orderItems.changeItem();
|
|
|
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "订单_关闭");
|
|
|
sqlFactory.addParameter("siteid", siteid);
|