Browse Source

促销方案业务端可以看到非上架的商品

hu 2 years ago
parent
commit
c19db9ee04

+ 1 - 1
src/custom/restcontroller/sale/promotion/SQL/促销方案商品查询.sql

@@ -24,4 +24,4 @@ FROM
 	left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid
 	left join plm_unit t3 on t2.unitid=t3.unitid and t2.siteid=t3.siteid
 	 LEFT JOIN sa_promotion_itemprice t5 ON t5.itemid = t1.itemid and t5.siteid = t1.siteid and  t1.sa_promotionid=t5.sa_promotionid
-	where t2.isonsale=1 and t1.siteid=$siteid$ and t1.sa_promotionid=$sa_promotionid$  and $where$  and t5.pricegrade = (SELECT grade FROM sys_enterprise WHERE sys_enterpriseid = $sys_enterpriseid$ and siteid = $siteid$ )
+	where  t1.siteid=$siteid$ and t1.sa_promotionid=$sa_promotionid$  and $where$  and t5.pricegrade = (SELECT grade FROM sys_enterprise WHERE sys_enterpriseid = $sys_enterpriseid$ and siteid = $siteid$ )

+ 4 - 0
src/custom/restcontroller/webmanage/sale/promotion/promotion.java

@@ -244,6 +244,10 @@ public class promotion extends Controller {
                 return getErrReturnObject().setErrMsg("单号为:【" + rows.get(0).getString("promnum") + "】的促销方案为非审核状态,无法反审核")
                         .toString();
             }
+//            if(!dbConnect.runSqlQuery("select * from sa_order where sa_promotionid="+sa_promotionid+" and siteid='"+siteid+"'").isEmpty()){
+//                return getErrReturnObject().setErrMsg("存在已使用方案的订单,无法反审核")
+//                        .toString();
+//            }
         }
 
         ArrayList<String> sqlList = new ArrayList<>();