|
@@ -53,8 +53,7 @@ public class itemgroup extends Controller {
|
|
|
@API(title = "查询", apiversion = R.ID20220926142203.v1.class)
|
|
|
@CACHEING
|
|
|
public String queryItemgroup() throws YosException {
|
|
|
- Long istool = content.getLongValue("istool");
|
|
|
- //Rows itemclassRows = Enterprise.getItemSaleClasses(this, sys_enterpriseid, true, istool);
|
|
|
+ long ismodule = content.getLongValue("ismodule");
|
|
|
if (content.containsKey("sys_enterpriseid")) {
|
|
|
sys_enterpriseid = content.getLongValue("sys_enterpriseid");
|
|
|
}
|
|
@@ -209,6 +208,7 @@ public class itemgroup extends Controller {
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "plm_unit", "t6", "t6.unitid = t2.unitid AND t6.siteid = t2.siteid","unitname");
|
|
|
querySQL.setSiteid(siteid);
|
|
|
querySQL.setWhere("t1.isonsale=1");
|
|
|
+ querySQL.setWhere("t2.ismodule="+ismodule);
|
|
|
querySQL.setWhere("t1.sa_itemgroupid",rowsgroupids.toArrayList("sa_itemgroupid", new ArrayList<Long>()));
|
|
|
querySQL.setWhere("t1.sa_brandid",brandids.toArray());
|
|
|
querySQL.setWhere(where);
|
|
@@ -1417,8 +1417,8 @@ public class itemgroup extends Controller {
|
|
|
QuerySQL querySQL1 = SQLFactory.createQuerySQL(this, "sa_promotion", "sa_promotionid", "promname");
|
|
|
querySQL1.setTableAlias("t1");
|
|
|
querySQL1.addQueryFields("balance", "ifnull(t1.balance,0)");
|
|
|
- querySQL1.addJoinTable(JOINTYPE.inner, "sa_promotion_items", "t2", "t1.sa_promotionid=t2.sa_promotionid and t1.siteid=t2.siteid","accountname");
|
|
|
- querySQL1.addJoinTable(JOINTYPE.inner, "plm_item", "t3", "t2.itemid=t3.itemid and t2.siteid=t3.siteid","accountname");
|
|
|
+ querySQL1.addJoinTable(JOINTYPE.inner, "sa_promotion_items", "t2", "t1.sa_promotionid=t2.sa_promotionid and t1.siteid=t2.siteid");
|
|
|
+ querySQL1.addJoinTable(JOINTYPE.inner, "plm_item", "t3", "t2.itemid=t3.itemid and t2.siteid=t3.siteid");
|
|
|
querySQL1.setSiteid(siteid);
|
|
|
querySQL1.setWhere("t2.isonsale=1");
|
|
|
querySQL1.setWhere("t3.itemno",itemno);
|