Selaa lähdekoodia

件订单自动审核机制增加判断

hu 4 kuukautta sitten
vanhempi
commit
b7fe4da397
1 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. 9 1
      src/custom/restcontroller/webmanage/sale/order/Order.java

+ 9 - 1
src/custom/restcontroller/webmanage/sale/order/Order.java

@@ -2657,9 +2657,17 @@ public class Order extends Controller {
             Accountbalance.remindSend(this, pay_enterpriseid, sa_cashbillid);
             Accountbalance.remindSend(this, pay_enterpriseid, sa_cashbillid);
         }
         }
         Rows agentrows = dbConnect.runSqlQuery("select submitautocheck from sa_agents where sys_enterpriseid=" + sys_enterpriseid);
         Rows agentrows = dbConnect.runSqlQuery("select submitautocheck from sa_agents where sys_enterpriseid=" + sys_enterpriseid);
+
         if (agentrows.isNotEmpty()) {
         if (agentrows.isNotEmpty()) {
             if (agentrows.get(0).getBoolean("submitautocheck")) {
             if (agentrows.get(0).getBoolean("submitautocheck")) {
-                check();
+                Rows orderRows = dbConnect.runSqlQuery("select * from sa_order where sa_orderid="+sa_orderid+" where ifnull(remarks,'')!=''");
+                Rows orderdetailsRows = dbConnect.runSqlQuery("select * from sa_orderitems where sa_orderid="+sa_orderid+" where ifnull(remarks,'')!=''");
+                if(amount.compareTo(BigDecimal.ZERO)>0){
+                    if(orderRows.isEmpty() && orderdetailsRows.isEmpty()){
+                        check();
+                    }
+                }
+
             }
             }
         }
         }