Просмотр исходного кода

订单提交时价格是否更新判断增加销售价格是否变更判断

沈静伟 3 лет назад
Родитель
Сommit
a04d6de8f6

+ 6 - 4
src/apps/saorder/saorder.java

@@ -584,10 +584,12 @@ public class saorder extends BaseSaorder {
                 PaoSetRemote titemset = saorderdetail.getPao(i).getPaoSet("titem");
                 if (!titemset.isEmpty()) {
                     titem titem = (titem) titemset.getPao(0);
-
-                    double fsaleprice = titem.getAgentSalePrice(getString("fagentnum"));
-                    if (order_fsaleprice != fsaleprice) {
-                        map.put(titem.getString("fitemno"), new Double[]{order_fsaleprice, fsaleprice});
+                    if (!saorderdetail.getPao(i).getBoolean("fpricechanged")) {
+                        //如果价格没有更改过,则进行价格判断
+                        double fsaleprice = titem.getAgentSalePrice(getString("fagentnum"));
+                        if (order_fsaleprice != fsaleprice) {
+                            map.put(titem.getString("fitemno"), new Double[]{order_fsaleprice, fsaleprice});
+                        }
                     }
                     if (!map.containsKey(titem.getString("fitemno"))) {
                         /**

+ 3 - 0
src/rest/openapi/restcontroller/wechatapp/saorder/tools/SaorderTool.java

@@ -488,6 +488,9 @@ public class SaorderTool extends BaseClass {
                             double fprice = titem.getAgentSalePrice(fagentnum);
                             if (fchangeprice >= fprice) {
                                 detailPao.setValue("fprice", fchangeprice, 2L);
+                                detailPao.setValue("fpricechanged", true, 11L);
+                            } else {
+                                detailPao.setValue("fpricechanged", false, 11L);
                             }
                         }
                     }