|
@@ -202,6 +202,32 @@ public class OrderItems extends Controller {
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
+ @API(title = "查询订单重复商品", apiversion = R.ID2024020201095102.v1.class)
|
|
|
+ public String get() throws YosException {
|
|
|
+ Long sa_orderid = content.getLongValue("sa_orderid");
|
|
|
+ JSONArray items = content.getJSONArray("items");
|
|
|
+
|
|
|
+ OrderItemsHelper orderItemsHelper = new OrderItemsHelper(this);
|
|
|
+ Rows rows = new Rows();
|
|
|
+ for (Object obj : items) {
|
|
|
+ JSONObject item = (JSONObject) obj;
|
|
|
+ Long itemid = item.getLongValue("itemid");
|
|
|
+ String customproperties = orderItemsHelper.getcustomproperties(item);
|
|
|
+ Rows temprows = dbConnect.runSqlQuery("SELECT itemname from sa_orderitems WHERE sa_orderid=" + sa_orderid + " and siteid='" + siteid + "' and itemid=" + itemid + " and ifnull(customproperties,'')='" + customproperties + "'");
|
|
|
+ rows.addAll(temprows);
|
|
|
+ }
|
|
|
+ Rows orderRows = beans.order.Order.getOrderRows(this, sa_orderid);
|
|
|
+ String type = orderRows.get(0).getString("type");
|
|
|
+ Row resRow = new Row();
|
|
|
+ resRow.put("items", rows);
|
|
|
+
|
|
|
+ resRow.put("isrepeat", beans.order.Order.getDefaultIsRepeatValue(siteid, type));
|
|
|
+
|
|
|
+
|
|
|
+ return getSucReturnObject().setData(resRow).toString();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 更新订单扣款信息
|
|
@@ -608,7 +634,7 @@ public class OrderItems extends Controller {
|
|
|
RowsMap itempriceRowsMap = itempriceRows.toRowsMap("itemno");
|
|
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
- if(siteid.equalsIgnoreCase("lsa")){
|
|
|
+ if (siteid.equalsIgnoreCase("lsa")) {
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.put("classname", "getIcinvbal");
|
|
|
object.put("method", "getMsg");
|
|
@@ -631,7 +657,7 @@ public class OrderItems extends Controller {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
ERPDocking erpDocking = new ERPDocking(siteid);
|
|
|
if (rows.toJsonArray("itemno").size() != 0) {
|
|
|
if (Parameter.get("system.ccerp_dockswitch").equalsIgnoreCase("true")) {
|
|
@@ -654,9 +680,6 @@ public class OrderItems extends Controller {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
//查询附件
|
|
|
RowsMap attinfoRowsMap = getAttachmentUrl("plm_item", ids);
|
|
|
for (Row row : rows) {
|
|
@@ -1118,7 +1141,7 @@ public class OrderItems extends Controller {
|
|
|
sqlFactory.addParameter_SQL("where2", where2);
|
|
|
break;
|
|
|
}
|
|
|
- if(iswuliao){
|
|
|
+ if (iswuliao) {
|
|
|
where.append(" and t1.iswuliao ='1' ");
|
|
|
}
|
|
|
sqlFactory.addParameter("siteid", siteid);
|