|
|
@@ -353,8 +353,8 @@ public class OrderItems extends Controller {
|
|
|
}
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
BigDecimal orderSumamount = BigDecimal.ZERO;
|
|
|
- Rows classamountrows = dbConnect.runSqlQuery("select t2.marketingcategory topitemclassid,t1.siteid,sum(ifnull(t1.amount,0)) sumamount from sa_orderitems t1 inner join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid where t1.sa_orderid='"+sa_orderid+"' group by t2.marketingcategory,t1.siteid");
|
|
|
- for (Row classamountrow : classamountrows) {
|
|
|
+ Rows classamountrows = dbConnect.runSqlQuery("select t2.marketingcategory topitemclassid,t1.siteid,sum(ifnull(t1.amount,0)) sumamount from sa_orderitems t1 inner join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid where t1.sa_orderid='" + sa_orderid + "' group by t2.marketingcategory,t1.siteid");
|
|
|
+ for (Row classamountrow : classamountrows) {
|
|
|
orderSumamount = orderSumamount.add(classamountrow.getBigDecimal("sumamount"));
|
|
|
}
|
|
|
if (orderSumamount.compareTo(getAmount(this, sa_orderid)) != 0) {
|
|
|
@@ -665,17 +665,18 @@ public class OrderItems extends Controller {
|
|
|
sqlFactory.addParameter_SQL("where", where);
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
ArrayList<Long> ids = rows.toArrayList("itemid", new ArrayList<>());
|
|
|
+ ArrayList<Long> itemnos = rows.toArrayList("itemno", new ArrayList<>());
|
|
|
RowsMap rowsMap = rows.toRowsMap("itemno");
|
|
|
|
|
|
SQLFactory sqlFactory1 = new SQLFactory(this, "商品发货数量汇总");
|
|
|
sqlFactory1.addParameter("siteid", siteid);
|
|
|
- sqlFactory1.addParameter_in("itemid", ids);
|
|
|
+ sqlFactory1.addParameter_in("itemnos", itemnos);
|
|
|
Rows sumQtyRows = dbConnect.runSqlQuery(sqlFactory1);
|
|
|
RowsMap sumQtyRowsMap = sumQtyRows.toRowsMap("itemno");
|
|
|
|
|
|
SQLFactory sqlFactory2 = new SQLFactory(this, "商品未发货数量汇总");
|
|
|
sqlFactory2.addParameter("siteid", siteid);
|
|
|
- sqlFactory2.addParameter_in("itemid", ids);
|
|
|
+ sqlFactory2.addParameter_in("itemnos", itemnos);
|
|
|
Rows sumUnQtyRows = dbConnect.runSqlQuery(sqlFactory2);
|
|
|
RowsMap sumUnQtyRowsMap = sumUnQtyRows.toRowsMap("itemno");
|
|
|
|
|
|
@@ -783,7 +784,7 @@ public class OrderItems extends Controller {
|
|
|
if (whereObject.containsKey("isuncheckout") && !"".equals(whereObject.getString("isuncheckout"))) {
|
|
|
String begindate = "";
|
|
|
String enddate = "";
|
|
|
- if(whereObject.containsKey("datetype") && !"".equals(whereObject.getString("datetype"))) {
|
|
|
+ if (whereObject.containsKey("datetype") && !"".equals(whereObject.getString("datetype"))) {
|
|
|
String datetype = whereObject.getStringValue("datetype");
|
|
|
switch (datetype) {
|
|
|
case "7":
|