|
@@ -282,8 +282,10 @@ public class promotionItems extends Controller {
|
|
|
|
|
|
//查询发货单列表
|
|
|
public QuerySQL queryPromotionItemList(String where,long sa_promotionid,long sa_promotion_itemgroupid) throws YosException {
|
|
|
- QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_promotion_items");
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_promotion_items","sa_promotion_itemsid", "siteid","sa_promotionid","itemid","itemid","orderminqty","orderaddqty","saledqty","islimit","isonsale","sa_promotion_itemgroupid","groupqty","signaturecode");
|
|
|
querySQL.setTableAlias("t1");
|
|
|
+
|
|
|
+
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "plm_item", "t2", "t1.itemid = t2.itemid and t1.siteid = t2.siteid",
|
|
|
"itemno", "itemname","spec","model");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "plm_unit", "t3", "t2.unitid = t3.unitid and t2.siteid = t3.siteid", "unitname");
|
|
@@ -313,6 +315,7 @@ public class promotionItems extends Controller {
|
|
|
querySQL.addQueryFields("price5", "ifnull(t8.price, 0)");
|
|
|
querySQL.addQueryFields("sa_promotion_itempriceid5", "ifnull(t8.sa_promotion_itempriceid, 0)");
|
|
|
|
|
|
+
|
|
|
querySQL.setWhere("t1.siteid", siteid);
|
|
|
querySQL.setWhere("t1.sa_promotionid",sa_promotionid);
|
|
|
querySQL.setWhere("t1.sa_promotion_itemgroupid",sa_promotion_itemgroupid);
|