|
|
@@ -1123,7 +1123,7 @@ public class Order extends Controller {
|
|
|
String sonum = row.getString("sonum");
|
|
|
String type = row.getString("type");
|
|
|
if (type.equals("促销订单")) {
|
|
|
- Rows orderdetails = dbConnect.runSqlQuery("select * from sa_orderitems where siteid='" + siteid + "' and sa_orderid=" + sa_orderid);
|
|
|
+ Rows orderdetails = dbConnect.runSqlQuery("select sa_promotion_itemsid,itemno,sum(qty) qty from sa_orderitems where siteid='" + siteid + "' and sa_orderid=" + sa_orderid +" group by sa_promotion_itemsid,itemno");
|
|
|
Rows promotionitems = dbConnect.runSqlQuery("select * from sa_promotion_items where siteid='" + siteid + "' and sa_promotionid=" + row.getLong("sa_promotionid"));
|
|
|
RowsMap promotionitemsRowsMap = promotionitems.toRowsMap("sa_promotion_itemsid");
|
|
|
for (Row orderdetail : orderdetails) {
|
|
|
@@ -1599,7 +1599,7 @@ public class Order extends Controller {
|
|
|
|
|
|
String type = row.getString("type");
|
|
|
if (type.equals("促销订单")) {
|
|
|
- Rows orderdetails = dbConnect.runSqlQuery("select * from sa_orderitems where siteid='" + siteid + "' and sa_orderid=" + sa_orderid);
|
|
|
+ Rows orderdetails = dbConnect.runSqlQuery("select sa_promotion_itemsid,itemno,sum(qty) qty from sa_orderitems where siteid='" + siteid + "' and sa_orderid=" + sa_orderid +" group by sa_promotion_itemsid,itemno");
|
|
|
Rows promotionitems = dbConnect.runSqlQuery("select * from sa_promotion_items where siteid='" + siteid + "' and sa_promotionid=" + row.getLong("sa_promotionid"));
|
|
|
RowsMap promotionitemsRowsMap = promotionitems.toRowsMap("sa_promotion_itemsid");
|
|
|
for (Row orderdetail : orderdetails) {
|
|
|
@@ -1675,7 +1675,7 @@ public class Order extends Controller {
|
|
|
|
|
|
String type = row.getString("type");
|
|
|
if (type.equals("促销订单")) {
|
|
|
- Rows orderdetails = dbConnect.runSqlQuery("select * from sa_orderitems where siteid='" + siteid + "' and sa_orderid=" + sa_orderid);
|
|
|
+ Rows orderdetails = dbConnect.runSqlQuery("select sa_promotion_itemsid,itemno,sum(qty) qty from sa_orderitems where siteid='" + siteid + "' and sa_orderid=" + sa_orderid +" group by sa_promotion_itemsid,itemno");
|
|
|
Rows promotionitems = dbConnect.runSqlQuery("select * from sa_promotion_items where siteid='" + siteid + "' and sa_promotionid=" + row.getLong("sa_promotionid"));
|
|
|
RowsMap promotionitemsRowsMap = promotionitems.toRowsMap("sa_promotion_itemsid");
|
|
|
for (Row orderdetail : orderdetails) {
|