shish пре 4 година
родитељ
комит
d035112692

+ 45 - 3
biz-ghs/order/classes/OrderClass.php

@@ -9,10 +9,12 @@ use biz\shop\classes\ShopExtClass;
 use biz\shop\models\Shop;
 use biz\sj\classes\SjClass;
 use biz\stat\classes\StatItemClass;
+use biz\stat\classes\StatKdClass;
 use biz\stat\classes\StatKhCgClass;
 use biz\stat\classes\StatOrderCountClass;
 use biz\stat\classes\StatOutClass;
 use biz\stat\classes\StatRefundClass;
+use biz\stat\classes\StatSaleClass;
 use biz\stock\classes\StockClass;
 use bizGhs\custom\models\Custom;
 use bizGhs\express\services\DadaExpressServices;
@@ -260,14 +262,13 @@ class OrderClass extends BaseClass
                     'event' => $event,
                 ];
                 ShopCapitalClass::addCapital($capitalData);
-                //出统计
+                //出统计
                 StatOutClass::updateOrInsert($shop, $refundPrice);
                 //退款统计
                 $payWay = $order->payWay ?? 0;
                 StatRefundClass::replace($shop, $payWay, $refundPrice);
-                //客户采购减少统计
+                //客户采购统计减少
                 StatKhCgClass::refundReplace($refund);
-
             } else {
                 //欠款
                 $currentDebt = bcsub($currentPrice, $bookPrice, 2);
@@ -275,6 +276,47 @@ class OrderClass extends BaseClass
                 $order->remainDebtPrice = $currentDebt;
                 $order->debt = OrderClass::DEBT_YES;
                 $order->save();
+
+                $currentTotalIncome = bcadd($shop->totalIncome, $currentDebt, 2);
+                $shop->totalIncome = $currentTotalIncome;
+                $shop->save();
+
+                $payWay = dict::getDict('payWay', 'debtPay');
+
+                //收入增加
+                StatIncomeClass::updateOrInsert($shop, $currentDebt);
+                //收入流水增加
+                $orderId = $order->id;
+                $capitalType = dict::getDict('capitalType', 'ghsBookOrderGetBack', 'id');
+                $shopAdminId = $order->shopAdminId ?? 0;
+                $shopAdminName = $order->shopAdminName ?? '';
+                $event = "预订单 {$orderSn} 差价补款";
+                $mainId = $shop->mainId ?? 0;
+                $sjId = $order->sjId ?? 0;
+                $shopId = $order->shopId ?? 0;
+                $capital = [
+                    'capitalType' => $capitalType,
+                    'relateId' => $orderId,
+                    'io' => 1,
+                    'amount' => $currentDebt,
+                    'totalIncome' => $currentTotalIncome,
+                    'payWay' => $payWay,
+                    'event' => $event,
+                    'mainId' => $mainId,
+                    'sjId' => $sjId,
+                    'shopId' => $shopId,
+                    'shopAdminId' => $shopAdminId,
+                    'shopAdminName' => $shopAdminName,
+                ];
+                ShopCapitalClass::addCapital($capital);
+
+                //各渠道收入金额统计
+                StatKdClass::replace($shop, $currentDebt, $payWay);
+                //每天销售收入统计
+                StatSaleClass::replace($shop, $currentDebt);
+                //客户采购统计
+                StatKhCgClass::replace($order, $currentDebt);
+
             }
         }
         return ['kiloFee' => $kiloFee, 'refund' => $refund, 'miniKilo' => $miniKilo];

+ 2 - 2
biz-ghs/order/classes/PurchaseOrderClass.php

@@ -285,8 +285,6 @@ class PurchaseOrderClass extends BaseClass
             StatCgClass::replace($shop, $currentPrice, $cgNum);
             //采购按供货商统计
             StatCgGhsClass::ghsReplace($order);
-            //当天和当月支出统计
-            StatOutClass::updateOrInsert($shop, $currentPrice);
 
             //门店应收客户款增加
             $ghsShopId = $ghs->shopId;
@@ -311,6 +309,8 @@ class PurchaseOrderClass extends BaseClass
             $custom->buyAmount = bcadd($custom->buyAmount, $currentPrice, 2);
             $custom->save();
 
+            //当天和当月支出统计
+            StatOutClass::updateOrInsert($shop, $currentPrice);
             //支出流水
             $payWay = dict::getDict('payWay', 'unknown');
             $capitalType = dict::getDict('capitalType', 'ghsPurchase', 'id');

+ 2 - 2
biz-ghs/order/services/OrderService.php

@@ -737,7 +737,7 @@ class OrderService extends BaseService
         $order->payTime = date("Y-m-d H:i:s");
         $order->save();
 
-        //新订单进入队列,用于花材统计
+        //新订单进入队列,用于花材的销量统计
         OrderClass::newOrderAddQueue($order);
 
         //员工业绩、总业绩增加
@@ -760,7 +760,7 @@ class OrderService extends BaseService
 
         //收入统计
         StatIncomeClass::updateOrInsert($shop, $amount);
-        //开单收入统计
+        //各渠道收入金额统计
         StatKdClass::replace($shop, $amount, $payWay);
         //今日订单+1
         StatOrderClass::updateOrInsert($shop);

+ 40 - 5
biz-hd/purchase/classes/PurchaseClass.php

@@ -8,6 +8,9 @@ use biz\shop\classes\ShopCapitalClass;
 use biz\shop\classes\ShopClass;
 use biz\shop\classes\ShopCouponClass;
 use biz\sj\classes\SjClass;
+use biz\stat\classes\StatCgClass;
+use biz\stat\classes\StatCgGhsClass;
+use biz\stat\classes\StatOutClass;
 use biz\stock\classes\StockClass;
 use biz\wx\classes\WxMessageClass;
 use bizGhs\admin\classes\AdminClass;
@@ -151,12 +154,12 @@ class PurchaseClass extends BaseClass
             $refundPrice = bcsub($bookPrice, $currentPrice, 2);
 
             $book = 1;
-            $orderSn = orderSn::getCgRefundSn();
+            $refundOrderSn = orderSn::getCgRefundSn();
             $refundType = CgRefundClass::REFUND_TYPE_MONEY;
             $refundData = [
                 'book' => $book,
                 'mainId' => $mainId,
-                'orderSn' => $orderSn,
+                'orderSn' => $refundOrderSn,
                 'cgId' => $cgId,
                 'status' => CgRefundClass::STATUS_UN_COMPLETE,
                 'shopAdminId' => 0,
@@ -177,7 +180,7 @@ class PurchaseClass extends BaseClass
             $currentType = dict::getDict('capitalType', 'hdBookRefund', 'id');
             $sjId = $cg->sjId ?? 0;
             $shopId = $cg->shopId ?? 0;
-            $event = "预订单多退少补({$ghsName})";
+            $event = "预订单{$orderSn}多退少补({$ghsName})";
             $capitalData = [
                 'capitalType' => $currentType,
                 'io' => 1,
@@ -189,7 +192,7 @@ class PurchaseClass extends BaseClass
                 'event' => $event,
             ];
             ShopCapitalClass::addCapital($capitalData);
-            //每天每月收入
+            //收入统计
             StatIncomeClass::updateOrInsert($shop, $refundPrice);
 
             //微信收款的原路退回
@@ -218,7 +221,7 @@ class PurchaseClass extends BaseClass
             $config->SetMerchantId($mid);
             $config->SetKey($key);
 
-            $input->SetOut_refund_no($orderSn);
+            $input->SetOut_refund_no($refundOrderSn);
             $input->SetOp_user_id($mid);
             $return = \WxPayApi::refund($config, $input);
 
@@ -243,6 +246,38 @@ class PurchaseClass extends BaseClass
             $cg->remainDebtPrice = $currentDebt;
             $cg->debt = PurchaseClass::DEBT_YES;
             $cg->save();
+
+            $payWay = dict::getDict('payWay', 'debtPay');
+
+            //支出统计
+            StatOutClass::updateOrInsert($shop, $currentDebt);
+            //支出流水
+            $capitalType = dict::getDict('capitalType', 'hdBookFinalPay', 'id');
+            $sjId = $info->sjId ?? 0;
+            $shopId = $info->shopId ?? 0;
+
+            $currentExpend = bcadd($shop->totalExpend, $currentDebt, 2);
+            $shop->totalExpend = $currentExpend;
+            $shop->save();
+
+            $event = "预订单{$orderSn}补尾款欠款";
+            $capitalData = [
+                'capitalType' => $capitalType,
+                'io' => 0,
+                'totalExpend' => $currentExpend,
+                'payWay' => $payWay,
+                'amount' => $currentDebt,
+                'sjId' => $sjId,
+                'shopId' => $shopId,
+                'event' => $event,
+            ];
+            ShopCapitalClass::addCapital($capitalData);
+            //采购总金额统计
+            StatCgClass::replace($shop, $currentDebt, 0);
+            //按供货商分别统计采购量
+            $num = 0;
+            StatCgGhsClass::hdCgGhsReplace($cg, $currentDebt, $num);
+
         }
         return ['refund' => $cgRefund];
     }

+ 8 - 7
biz-hd/purchase/services/PurchaseService.php

@@ -352,7 +352,7 @@ class PurchaseService extends BaseService
         } else {
             $shop->cgFinish += 1;
 
-            //加库存 linqh 2021-05-10
+            //加库存 lqh 2021-05-10
             $orderSn = $info->orderSn;
             $purchaseItem = PurchaseItemClass::getAllByCondition(['orderSn' => $orderSn], null, "*");
             foreach ($purchaseItem as $v) {
@@ -382,6 +382,8 @@ class PurchaseService extends BaseService
         }
         $shop->save();
 
+        //支出统计
+        StatOutClass::updateOrInsert($shop, $info->orderPrice);
         //支出流水
         $capitalType = dict::getDict('capitalType', 'xhPurchase', 'id');
         $sjId = $info->sjId ?? 0;
@@ -399,14 +401,13 @@ class PurchaseService extends BaseService
         ];
         ShopCapitalClass::addCapital($capitalData);
 
-        //采购统计
+        //采购总量统计
         $cgNum = $info->bigNum ?? 0;
         StatCgClass::replace($shop, $info->orderPrice, $cgNum);
-        //采购按供货商统计
-        StatCgGhsClass::hdCgGhsReplace($info);
-        //支出统计
-        StatOutClass::updateOrInsert($shop, $info->orderPrice);
-
+        //按供货商分别统计采购量
+        $num = $info->bigNum ?? 0;
+        $amount = $info->orderPrice ?? 0;
+        StatCgGhsClass::hdCgGhsReplace($info, $amount, $num);
 
         //供应商资产变化
         $ghsId = $info->ghsId ?? 0;

+ 4 - 5
biz/stat/classes/StatCgGhsClass.php

@@ -10,7 +10,7 @@ class StatCgGhsClass extends BaseClass
     public static $baseFile = '\biz\stat\models\StatCgGhs';
 
     //花店采购统计 ssh 20220402
-    public static function hdCgGhsReplace($cgInfo, $date = null)
+    public static function hdCgGhsReplace($cgInfo, $amount, $num, $date = null)
     {
         $sjId = $cgInfo->sjId ?? 0;
         $mainId = $cgInfo->mainId ?? 0;
@@ -21,15 +21,14 @@ class StatCgGhsClass extends BaseClass
             $stat = self::add(['mainId' => $mainId, 'sjId' => $sjId, 'ghsId' => $ghsId, 'time' => $time], true);
         }
         $id = $stat->id;
-        $amount = $cgInfo->orderPrice ?? 0;
+
         $unique = self::getLockById($id);
         $currentAmount = bcadd($unique->amount, $amount, 2);
         $unique->amount = $currentAmount;
-        //只统计大单位数量
-        $num = $cgInfo->bigNum ?? 0;
+
         $unique->num = bcadd($unique->num, $num);
         $unique->save();
-        StatCgGhsMonthClass::hdCgGhsReplace($cgInfo, $time);
+        StatCgGhsMonthClass::hdCgGhsReplace($cgInfo, $amount, $num, $time);
     }
 
     //城市批发商采购统计 ssh 2021012

+ 1 - 4
biz/stat/classes/StatCgGhsMonthClass.php

@@ -9,7 +9,7 @@ class StatCgGhsMonthClass extends BaseClass
 
     public static $baseFile = '\biz\stat\models\StatCgGhsMonth';
 
-    public static function hdCgGhsReplace($order, $date = null)
+    public static function hdCgGhsReplace($order, $amount, $num, $date = null)
     {
         if ($date == null) {
             $time = date('Ym');
@@ -30,11 +30,8 @@ class StatCgGhsMonthClass extends BaseClass
         }
         $id = $stat->id;
         $unique = self::getLockById($id);
-        $amount = $cgInfo->orderPrice ?? 0;
         $currentAmount = bcadd($unique->amount, $amount, 2);
         $unique->amount = $currentAmount;
-        //只统计大单位数量
-        $num = $order->bigNum ?? 0;
         $unique->num = bcadd($unique->num, $num);
         $unique->save();
     }

+ 7 - 1
common/components/dict.php

@@ -211,10 +211,14 @@ class dict
             'brokerage' => ['id' => 46, 'name' => 'brokerage'],
             //供应商销售单对账
             'ghsXsClear' => ['id' => 20, 'name' => 'ghsXsClear'],
-            //供应商预订单多付退款
+            //城市供应商预订单多付退款
             'ghsBookRefund' => ['id' => 48, 'name' => 'ghsBookRefund'],
             //花店预订退款
             'hdBookRefund' => ['id' => 50, 'name' => 'hdBookRefund'],
+            //城市供应商的预订单少付补款
+            'ghsBookOrderGetBack' => ['id' => 51, 'name' => 'ghsBookOrderGetBack'],
+            //花店预订补尾款
+            'hdBookFinalPay' => ['id' => 52, 'name' => 'hdBookFinalPay'],
         ],
         "capitalTypeList" => [//流水类型的对应链接,后台收支明细查看时跳转的链接
             0 => ['link' => '/capital/order-detail', 'name' => '网店', 'orderLink' => '/order/detail', 'id' => 0,],
@@ -238,6 +242,8 @@ class dict
             46 => ['link' => '', 'name' => '佣金', 'orderLink' => '', 'id' => 46,],
             48 => ['link' => '', 'name' => '预订单多退少补', 'orderLink' => '', 'id' => 48,],
             50 => ['link' => '', 'name' => '预订单多退少补', 'orderLink' => '', 'id' => 50,],
+            51 => ['link' => '', 'name' => '预订单补款', 'orderLink' => '', 'id' => 51,],
+            52 => ['link' => '', 'name' => '花店预订补尾款', 'orderLink' => '', 'id' => 52,],
         ],
 
         //用户来源

+ 2 - 33
console/controllers/GlobalController.php

@@ -33,8 +33,8 @@ class GlobalController extends Controller
             ProductClass::allShopStockWarningFromQueue();
         }
 
-        //每2分钟进行已完成支付订单处理,花材销量统计、推荐新客发红包
-        if ((int)date('i') % 2 == 0) {
+        //每3分钟进行已完成支付订单处理:花材销量统计
+        if ((int)date('i') % 3 == 0) {
 
             $ghs = dict::getDict('ptStyle', 'ghs');
             $shopList = ShopClass::getAllByCondition(['ptStyle' => $ghs], null, '*', null, true);
@@ -69,37 +69,6 @@ class GlobalController extends Controller
                         foreach ($itemList as $itemKey => $itemVal) {
                             StatItemClass::replace($itemVal);
                         }
-
-                        //推荐新客下单,发推荐新客奖励
-                        $tjFl = $shop->tjFl ?? 0;
-                        if ($tjFl == 1) {
-                            $customId = $order->customId ?? 0;
-                            $hostShopId = $order->shopId ?? 0;
-                            $custom = CustomClass::getById($customId, true);
-                            if (!empty($custom)) {
-                                $ghsId = $custom->ghsId ?? 0;
-                                $ghs = GhsClass::getById($ghsId, true);
-                                $hasOrder = $custom->hasOrder ?? 0;
-                                $hasCg = $ghs->hasCg ?? 0;
-                                if ($hasOrder == 0 && $hasCg == 0) {
-                                    $custom->hasOrder = 1;
-                                    $custom->save();
-
-                                    $ghs->hasCg = 1;
-                                    $ghs->save();
-
-                                    $customSjId = $custom->sjId ?? 0;
-                                    $sj = SjClass::getById($customSjId, true);
-                                    //下单客户的介绍人如果是自己客户则发福利
-                                    $parentShopId = $sj->parentShopId ?? 0;
-                                    $tjCustom = CustomClass::getByCondition(['shopId' => $parentShopId, 'ownShopId' => $hostShopId], true);
-                                    $tjGhsId = $tjCustom->ghsId ?? 0;
-                                    $tjGhs = GhsClass::getById($tjGhsId, true);
-                                    TjFlClass::giveGift($tjGhs, $tjCustom, $custom);
-                                }
-                            }
-                        }
-
                     }
                 }
             }

+ 0 - 150
console/controllers/OrderController.php

@@ -2,159 +2,9 @@
 
 namespace console\controllers;
 
-use bizGhs\order\classes\OrderClass;
-use bizGhs\order\models\Order;
-use bizGhs\order\services\OrderService;
-use common\components\dict;
-use common\components\noticeUtil;
-use common\components\util;
-use Yii;
 use yii\console\Controller;
-use bizHd\purchase\classes\PurchaseClass;
-use bizHd\purchase\services\PurchaseService;
 
-/**
- * 订单相关
- */
 class OrderController extends Controller
 {
 
-    //待配送订单,超过24小时自动完成 ./yii order/auto-finish
-    public function actionAutoFinish()
-    {
-        //好像没有用了
-        //util::stop();
-
-        $remain = time() - 86400;
-        $date = date("Y-m-d H:i:s", $remain);
-
-        $query = new \yii\db\Query();
-        $query->from(Order::tableName());
-
-        $query->where(['status' => OrderClass::ORDER_STATUS_UN_SEND])->andWhere(['<=', 'addTime', $date]);
-        $query->orderBy('deadline ASC');
-
-        //注意哪个平台的行为,低层很多方法会使用到
-        Yii::$app->params['ptStyle'] = dict::getDict('ptStyle', 'ghs');
-
-        //如果有报错,抛出异常
-        Yii::$app->params['errorReport'] = 1;
-
-        //24小时后的自动确认,不需要微信通知
-        Yii::$app->params['noNeedWxNotice'] = 1;
-
-        foreach ($query->batch() as $orderInfoList) {
-
-            foreach ($orderInfoList as $orderInfo) {
-                $connection = Yii::$app->db;//事务处理
-                $transaction = $connection->beginTransaction();
-                $id = $orderInfo['id'] ?? 0;
-                $orderSn = $orderInfo['orderSn'] ?? '';
-                $status = $orderInfo['status'] ?? OrderClass::ORDER_STATUS_UN_PAY;
-                $addTime = $orderInfo['addTime'] ?? '';
-
-                $prefix = "订单{$orderSn},ID{$id},创建于{$addTime},状态是{$status}";
-                if ($status != OrderClass::ORDER_STATUS_UN_SEND) {
-                    noticeUtil::push($prefix . " 自动完成操作时,状态不对", '15280215347');
-                    continue;
-                }
-                if (empty($addTime) && $addTime > $date) {
-                    noticeUtil::push($prefix . " 自动完成操作时,时间不对", '15280215347');
-                    continue;
-                }
-                try {
-                    $unSendOrder = OrderClass::getById($id, true);
-                    OrderClass::selfSend($unSendOrder);
-                    $hasSendOrder = OrderClass::getById($id, true);
-                    OrderService::reach($hasSendOrder);
-                    $transaction->commit();
-                    noticeUtil::push($prefix . " 【已自动完成】 SUCCESS", '15280215347');
-                } catch (\Exception $e) {
-                    $transaction->rollBack();
-                    $msg = $e->getMessage();
-                    noticeUtil::push("销售单自动完成报错了!订单号:{$orderSn},错误信息:{$msg}", '15280215347');
-                }
-            }
-        }
-
-    }
-
-    //商家自己开的订单,3小时后没确认自动确认为欠款 ./yii order/auto-confirm
-    public function actionAutoConfirm()
-    {
-        //好像没有用了
-        util::stop();
-
-        $remain = time() - 10800;
-        $date = date("Y-m-d H:i:s", $remain);
-
-        $query = new \yii\db\Query();
-        $query->from(Order::tableName());
-
-        $query->where(['status' => OrderClass::ORDER_STATUS_UN_PAY])->andWhere(['<=', 'addTime', $date]);
-        $query->orderBy('addTime ASC');
-
-        //注意哪个平台的行为,低层很多方法会使用到
-        Yii::$app->params['ptStyle'] = dict::getDict('ptStyle', 'ghs');
-
-        //如果有报错,抛出异常
-        Yii::$app->params['errorReport'] = 1;
-
-        //24小时后的自动确认,不需要微信通知
-        Yii::$app->params['noNeedWxNotice'] = 1;
-
-        foreach ($query->batch() as $orderInfoList) {
-
-            foreach ($orderInfoList as $orderInfo) {
-                $connection = Yii::$app->db;//事务处理
-                $transaction = $connection->beginTransaction();
-                $id = $orderInfo['id'] ?? 0;
-                try {
-
-                    $order = OrderClass::getLockById($id);
-                    $orderId = $order->id ?? '';
-                    $shopAdminId = $order->shopAdminId ?? 0;
-                    if(empty($shopAdminId)){
-                        noticeUtil::push($prefix . " 自动确认失败,不是员工开单 orderId:{$orderId}", '15280215347');
-                        continue;
-                    }
-
-                    $purchaseId = $order->purchaseId ?? 0;
-
-                    $purchase = PurchaseClass::getById($purchaseId, true);
-                    if (empty($purchase)) {
-                        noticeUtil::push($prefix . " 自动确认失败,没有找到采购单 orderId:{$orderId}", '15280215347');
-                        continue;
-                    }
-
-                    $payWay = dict::getDict('payWay', 'debtPay');
-
-                    //不需要打印
-                    $order->needPrint = dict::getDict('needPrint', 'noNeed');
-                    $order->save();
-
-                    //支付
-                    PurchaseService::payAfter($purchase, $payWay);
-                    OrderService::payAfter($order, $payWay);
-
-                    //自己送
-                    $info = OrderClass::getById($id, true);
-                    OrderClass::selfSend($info);
-
-                    //确认送达,并且不需要微信通知
-                    Yii::$app->params['noNeedWxNotice'] = 1;
-                    $info = OrderClass::getById($id, true);
-                    OrderService::reach($info);
-
-                    $transaction->commit();
-                    noticeUtil::push($prefix . " 【已自动确认】 SUCCESS", '15280215347');
-                } catch (\Exception $e) {
-                    $transaction->rollBack();
-                    $msg = $e->getMessage();
-                    noticeUtil::push("自动确认订单报错!订单号:{$orderSn},错误信息:{$msg}", '15280215347');
-                }
-            }
-        }
-    }
-
 }

+ 1 - 0
console/controllers/StatKdController.php

@@ -45,6 +45,7 @@ class StatKdController extends Controller
                     continue;
                 }
                 $date = date('Ymd', strtotime($order['addTime']));
+                //各渠道收入金额统计
                 StatKdClass::replace($shop, $amount, $payWay, $date);
             }
         }

+ 13 - 1
sql.txt

@@ -717,4 +717,16 @@ ALTER TABLE xhStatStockInMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央
 ALTER TABLE xhStatRefund ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `id`;
 ALTER TABLE xhStatRefundMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `id`;
 
-ALTER TABLE xhGhsCgOrder ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `id`;
+ALTER TABLE xhGhsCgOrder ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `id`;
+
+ALTER TABLE xhStatCg MODIFY `num` INT(11) NOT NULL DEFAULT '0' COMMENT '扎数,数量';
+ALTER TABLE xhStatCgGhs MODIFY `num` INT(11) NOT NULL DEFAULT '0' COMMENT '扎数,数量';
+ALTER TABLE xhStatCgGhsMonth MODIFY `num` INT(11) NOT NULL DEFAULT '0' COMMENT '扎数,数量';
+ALTER TABLE xhStatCgMonth MODIFY `num` INT(11) NOT NULL DEFAULT '0' COMMENT '扎数,数量';
+
+ALTER TABLE xhStatCg ADD `refundNum` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '退货数' AFTER `num`;
+ALTER TABLE xhStatCg ADD `refundAmount` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '退款金额' AFTER `refundNum`;
+ALTER TABLE xhStatCgMonth ADD `refundNum` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '退货数' AFTER `num`;
+ALTER TABLE xhStatCgMonth ADD `refundAmount` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '退款金额' AFTER `refundNum`;
+
+====预订单 ssh 20220402