|
@@ -584,6 +584,14 @@ public class OrderItems extends Controller {
|
|
|
Rows sumUnQtyRows = dbConnect.runSqlQuery(sqlFactory2);
|
|
|
RowsMap sumUnQtyRowsMap = sumUnQtyRows.toRowsMap("itemno");
|
|
|
|
|
|
+
|
|
|
+ SQLFactory sqlFactory3 = new SQLFactory(this, "商品原价汇总");
|
|
|
+ sqlFactory3.addParameter("siteid", siteid);
|
|
|
+ sqlFactory3.addParameter("sys_enterpriseid", sys_enterpriseid);
|
|
|
+ sqlFactory3.addParameter_in("itemnos", itemnos);
|
|
|
+ Rows itempriceRows = dbConnect.runSqlQuery(sqlFactory3);
|
|
|
+ RowsMap itempriceRowsMap = itempriceRows.toRowsMap("itemno");
|
|
|
+
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
|
|
JSONObject object = new JSONObject();
|
|
@@ -611,6 +619,11 @@ public class OrderItems extends Controller {
|
|
|
//查询附件
|
|
|
RowsMap attinfoRowsMap = getAttachmentUrl("plm_item", ids);
|
|
|
for (Row row : rows) {
|
|
|
+ if (itempriceRowsMap.get(row.getString("itemno")).isNotEmpty()) {
|
|
|
+ row.put("originalprice", itempriceRowsMap.get(row.getString("itemno")).get(0).getBigDecimal("price"));
|
|
|
+ } else {
|
|
|
+ row.put("originalprice", BigDecimal.ZERO);
|
|
|
+ }
|
|
|
if (sumQtyRowsMap.get(row.getString("itemno")).isNotEmpty()) {
|
|
|
row.put("unsoldqty", sumQtyRowsMap.get(row.getString("itemno")).get(0).getBigDecimal("qty"));
|
|
|
} else {
|