فهرست منبع

订单变更新增变更备注字段

沈静伟 4 سال پیش
والد
کامیت
b6456b7341
1فایلهای تغییر یافته به همراه16 افزوده شده و 0 حذف شده
  1. 16 0
      src/apps/saorder/saorder.java

+ 16 - 0
src/apps/saorder/saorder.java

@@ -2402,7 +2402,23 @@ public class saorder extends BaseSaorder {
         return true;
     }
 
+    public void changesaorder_validate(PaoSetRemote paoSetRemote) throws P2Exception {
+        int i = 0;
+        PaoRemote orderdetail = null;
+        while ((orderdetail = paoSetRemote.getPao(i)) != null) {
+            double fqty = orderdetail.getDouble("fqty");
+            double fchangeqty = orderdetail.getDouble("fchangeqty");
+            String fchangenotes = orderdetail.getString("fchangenotes");
+            if (fqty != fchangeqty && !orderdetail.getString("fchangeqty").equals("")) {
+                if (fchangenotes.equals("")) {
+                    throw new P2AppException("", "Ð޸ı¸×¢²»¿ÉΪ¿Õ");
+                }
+            }
+        }
+    }
+
     public PaoRemote changesaorder(PaoSetRemote paoSetRemote) throws P2Exception {
+        changesaorder_validate(paoSetRemote);
         HashMap<Long, saorderdetail> saorderdetailmap = new HashMap<>();
         HashMap<Long, Double> saorderdetailchangeamount = new HashMap<>();