Browse Source

Merge remote-tracking branch 'origin/develop' into develop

沈静伟 2 years ago
parent
commit
67d378db08

+ 2 - 1
src/custom/restcontroller/sale/promotion/SQL/促销方案列表查询.sql

@@ -55,7 +55,7 @@ from (SELECT t1.promnum,
               OR NOT EXISTS(SELECT *
                             FROM sa_promotion_auth
                             WHERE sa_promotionid = t1.sa_promotionid AND siteid = t1.siteid))
-        AND exists(select 1 from sys_enterprise_tradefield where sys_enterpriseid=$sys_enterpriseid$ and sa_saleareaid in(
+        AND (exists(select 1 from sys_enterprise_tradefield where sys_enterpriseid=$sys_enterpriseid$ and sa_saleareaid in(
 with recursive salearea as (
     select sa_saleareaid
     from sa_salearea
@@ -68,6 +68,7 @@ with recursive salearea as (
 )
 select sa_saleareaid
 from salearea))
+OR NOT EXISTS ( SELECT * FROM sa_promotion_salearea WHERE sa_promotionid = t1.sa_promotionid AND siteid = t1.siteid ) )
 
       union all
       SELECT t1.promnum,

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

@@ -61,6 +61,10 @@ public class OrderItems extends Controller {
         Rows orderRows = getOrderRows(this, sa_orderid);
         if (orderRows.isEmpty()) {
             return getErrReturnObject().setErrMsg("数据不存在,无法添加").toString();
+        }else{
+            if(!orderRows.get(0).getString("status").equals("新建") &&  !orderRows.get(0).getString("status").equals("预提交") ){
+                return getErrReturnObject().setErrMsg("非新建或预提交状态无法操作").toString();
+            }
         }
 
 //        sa_contractid = orderRows.get(0).getLong("sa_contractid");