Browse Source

细节优化,发货工单流程和售前退货流程加审批记录

wufeng 2 years ago
parent
commit
05a15845e6

+ 2 - 2
app/abutment/controller/Order.php

@@ -663,9 +663,9 @@ class Order extends HomeBaseController
                         if (in_array($cgdinfo[$cgdNo]['send_status'], [1, 2]) && $cgdinfo[$cgdNo]['order_type'] != 1) {
                             $send = Db::name("order_send")->where(["cgdNo" => $cgdNo, "status" => 1])->column("outCode");
                             if (!empty($send)) {
-                                $out = Db::name("order_out")->where(["outCode" => $send, "status" => 0])->select()->toArray();
+                                $out = Db::name("order_out")->where(["outCode" => $send, "status" => 0,'is_del'=>0])->select()->toArray();
                                 if (!empty($out)) {
-                                    $up = Db::name("order_out")->where(["outCode" => $send, "status" => 0])->update(["status" => 1, 'wsm_code' => $cgdinfo[$cgdNo]['wsm_code'], "updatetime" => date('Y-m-d H:i:s')]);
+                                    $up = Db::name("order_out")->where(["outCode" => $send, "status" => 0,'is_del'=>0])->update(["status" => 1, 'wsm_code' => $cgdinfo[$cgdNo]['wsm_code'], "updatetime" => date('Y-m-d H:i:s')]);
                                     if ($up == false) throw new Exception('出库单出库失败');
                                     else {
 

+ 106 - 8
app/admin/controller/OrderOutChild.php

@@ -3,8 +3,10 @@
 namespace app\admin\controller;
 
 //发货工单(从属于发货单)
+use app\admin\model\ActionLog;
 use app\admin\model\DataGroup as DataGroupModel;
 use app\admin\model\GoodStockInfo;
+use app\admin\model\ProcessOrder;
 use think\Exception;
 use think\facade\Db;
 use think\facade\Validate;
@@ -166,6 +168,7 @@ class OrderOutChild extends Base
             'apply_id' => '',
             'apply_name' => '',
             'order_type' => '',
+            'relaComNo' => '',
         ], 'post', 'trim');
 
         $where = [['a.is_del', '=', 0]];
@@ -185,12 +188,42 @@ class OrderOutChild extends Base
         if ($param['apply_id'] !== '') $where[] = ['a.apply_id', '=', $param['apply_id']];
         if ($param['apply_name'] != '') $where[] = ['a.apply_name', 'like', '%' . $param['apply_name'] . '%'];
         if ($param['order_type'] != '') $where[] = ['a.order_type', '=', $param['order_type']];
+        if ($param['relaComNo'] != '') $where[] = ['a.companyNo', '=', $param['relaComNo']];
+
+        $condition = '';
+        //只有level2的账号过滤数据权限
+        if ($this->level == 2) {
+
+            //库管只能看到库存品订单,供应商负责人只能看到非库存品订单
+
+            //是否是仓库管理员
+            $tmp = Db::name('warehouse_info')->field('id')->where(['is_del' => 0, 'contactor' => $this->uid])->findOrEmpty();
+
+            //库管看到所有的库存品发货申请单
+            if (!empty($tmp)) $condition .= " a.order_type=1 AND c.contactor=" . $this->uid;
+            else {
+                $role = $this->checkDataShare();
+                if (!empty($role[DataGroupModel::$type_全部])) {
+                    if ($condition != '') $condition .= " or ";
+                    $condition .= " a.apply_id in (" . implode(',', $role[DataGroupModel::$type_全部]) . ")";
+                }
+            }
+            $person_supplier = Db::connect('mysql_sys')
+                ->name('supplier')
+                ->where(['is_del' => 0, 'personid' => $this->uid])
+                ->column('code');
+            if ($person_supplier) {
+                if ($condition != '') $condition .= " or ";
+                $condition .= "(a.order_type<>1 and a.supplierNo in ('" . implode('\',\'', $person_supplier) . "'))";
+            }
+        }
 
         $list = Db::name('order_out_child')
             ->alias('a')
             ->field('a.outChildCode 发货工单号,a.orderCode 确认单编号,a.outCode 发货申请单号,a.companyNo 业务公司编号,a.companyName 业务公司名称,a.customer_code 客户编号,a.customer_name 客户名称,a.supplierNo 供应商编号,a.supplierName 供应商名称,a.spuCode 商品成本编号,a.skuCode 商品上线编号,a.good_name 商品名称,case a.order_source when 1 then "直接下单" when 2 then "咨询" when 3 then "项目" when 4 then "平台" when 5 then "有赞" when 6 then "售后补换货" when 7 then "报备转单" when 8 then "支付渠道" end "订单来源",case order_type when 1 then "备库" when 2 then "非库存" when 3 then "咨询商品" when 4 then "报备商品" end "商品类型",a.num 数量,case a.status when 1 then "待发货" when 2 then "发货完成" when 3 then "已收货" when 4 then "已全部退货" end "分单状态",a.addtime 下单时间,a.apply_name 申请人名称,a.post_name 物流公司,a.post_code 物流单号,a.post_fee 物流费用')
             ->order(['a.addtime' => 'desc', 'a.id' => 'desc'])
             ->where($where)
+            ->where($condition)
             ->select()
             ->toArray();
 
@@ -349,7 +382,7 @@ class OrderOutChild extends Base
 
         $child = Db::name('order_out_child')
             ->where(['is_del' => 0, 'status' => 1, 'outChildCode' => array_column($param, 'outChildCode')])
-            ->column('id,orderCode,outCode,num,wsm_code,supplierNo', 'outChildCode');
+            ->column('id,orderCode,outCode,num,wsm_code,supplierNo,apply_id', 'outChildCode');
 
         //检查所有的发货单是否有正在进行的售后单
         $temp = Db::name('order_return')
@@ -361,11 +394,11 @@ class OrderOutChild extends Base
 
         $order_out = Db::name('order_out')
             ->where(['is_del' => 0, 'outCode' => array_unique(array_column($child, 'outCode'))])
-            ->column('id,send_num,send_status,0 already_send_num', 'outCode');
+            ->column('id,send_num,send_status,0 already_send_num,status,apply_id', 'outCode');
 
         $sale = Db::name('sale')
             ->where(['is_del' => 0, 'orderCode' => array_unique(array_column($child, 'orderCode'))])
-            ->column('id,good_num,send_num,wsend_num,good_code,supNo,is_stock,order_source', 'orderCode');
+            ->column('id,good_num,send_num,wsend_num,good_code,supNo,is_stock,order_source,cgderid,status', 'orderCode');
 
         $is_reurn = Db::name("sale_return")
             ->field('id,orderCode')
@@ -435,6 +468,28 @@ class OrderOutChild extends Base
                         'updatetime' => $date,
                     ]);
 
+                //修改状态,添加待办
+                ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_code" => $value['outChildCode'],//单号
+                    "status" => 1,//这里的status是之前的值
+                    "action_remark" => '',//备注
+                    "action_type" => "status"//新建create,编辑edit,更改状态status
+                ], "FHGD", 2, ['post_name' => $value['post_name'],
+                    'post_code' => $value['post_code'],
+                    'post_fee' => $value['post_fee'],
+                    'status' => 2,
+                    'sendtime' => $date,
+                    'updatetime' => $date]);
+
+                ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_type" => 'FHGD',
+                    "order_code" => $value['outChildCode'],//单号
+                    "order_id" => $child[$value['outChildCode']]['id'],
+                    "order_status" => 2,
+                    "before_status" => 1,
+                    'holder_id' => $child[$value['outChildCode']]['apply_id']
+                ]);
+
                 $order_out[$child[$value['outChildCode']]['outCode']]['already_send_num'] += $child[$value['outChildCode']]['num'];
 
                 //发货单
@@ -446,15 +501,41 @@ class OrderOutChild extends Base
                 $sale[$child[$value['outChildCode']]['orderCode']]['send_num'] += $child[$value['outChildCode']]['num'];
                 $sale[$child[$value['outChildCode']]['orderCode']]['wsend_num'] -= $child[$value['outChildCode']]['num'];
 
+                //修改状态,添加待办
+                ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_code" => $child[$value['outChildCode']]['outCode'],//单号
+                    "status" => $order_out[$child[$value['outChildCode']]['outCode']]['status'],//这里的status是之前的值
+                    "action_remark" => '',//备注
+                    "action_type" => "status"//新建create,编辑edit,更改状态status
+                ], "CKD", 2, ['send_status' => $order_out[$child[$value['outChildCode']]['outCode']]['already_send_num'] >= $order_out[$child[$value['outChildCode']]['outCode']]['send_num'] ? 4 : 3, 'status' => 2, 'updatetime' => $date]);
+
+                ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_type" => 'CKD',
+                    "order_code" => $child[$value['outChildCode']]['outCode'],//单号
+                    "order_id" => $order_out[$child[$value['outChildCode']]['outCode']]['id'],
+                    "order_status" => 2,
+                    "before_status" => $order_out[$child[$value['outChildCode']]['outCode']]['status'],
+                    'holder_id' => $order_out[$child[$value['outChildCode']]['outCode']]['apply_id']
+                ]);
+
+
                 //销售单
                 $send_status = $sale[$child[$value['outChildCode']]['orderCode']]['send_num'] >= $sale[$child[$value['outChildCode']]['orderCode']]['good_num'] ? 4 : 3;
+
+                $sale_update_data = [
+                    'send_num' => $sale[$child[$value['outChildCode']]['orderCode']]['send_num'],
+                    'wsend_num' => $sale[$child[$value['outChildCode']]['orderCode']]['wsend_num'],
+                    'send_status' => $send_status,
+                    'updatetime' => $date
+                ];
+
+                if ($sale_update_data['wsend_num'] == 0) $sale_update_data['status'] = 2;
+                elseif ($sale_update_data['send_num'] == 0) $sale_update_data['status'] = 0;
+                else $sale_update_data['status'] = 1;
+
                 Db::name('sale')
                     ->where(['is_del' => 0, 'id' => $sale[$child[$value['outChildCode']]['orderCode']]['id']])
-                    ->update([
-                        'send_num' => $sale[$child[$value['outChildCode']]['orderCode']]['send_num'],
-                        'wsend_num' => $sale[$child[$value['outChildCode']]['orderCode']]['wsend_num'],
-                        'send_status' => $send_status,
-                    ]);
+                    ->update($sale_update_data);
 
                 if ($sale[$child[$value['outChildCode']]['orderCode']]['order_source'] == 5 && $send_status == 4) {
                     $yz_tmp[] = [
@@ -465,6 +546,23 @@ class OrderOutChild extends Base
                     ];
                 }
 
+                //修改状态,添加待办
+                ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_code" => $child[$value['outChildCode']]['orderCode'],//单号
+                    "status" => $sale[$child[$value['outChildCode']]['orderCode']]['status'],//这里的status是之前的值
+                    "action_remark" => '',//备注
+                    "action_type" => "status"//新建create,编辑edit,更改状态status
+                ], "XSQRD", $sale_update_data['status'], $sale_update_data);
+
+                ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_type" => 'XSQRD',
+                    "order_code" => $child[$value['outChildCode']]['orderCode'],//单号
+                    "order_id" => $sale[$child[$value['outChildCode']]['orderCode']]['id'],
+                    "order_status" => $sale_update_data['status'],
+                    "before_status" => $sale[$child[$value['outChildCode']]['orderCode']]['status'],
+                    'holder_id' => $sale[$child[$value['outChildCode']]['orderCode']]['cgderid']
+                ]);
+
                 //库存
                 Db::name('good_stock')
                     ->where(['is_del' => 0, 'spuCode' => $sale[$child[$value['outChildCode']]['orderCode']]['good_code'], 'wsm_code' => $child[$value['outChildCode']]['wsm_code']])

+ 2 - 2
app/admin/controller/Purchin.php

@@ -716,9 +716,9 @@ class Purchin extends Base
                         if (in_array($cgdinfo[$cgdNo]['send_status'], [1, 2]) && $cgdinfo[$cgdNo]['order_type'] != 1) {
                             $send = Db::name("order_send")->where(["cgdNo" => $cgdNo, "status" => 1])->column("outCode");
                             if (!empty($send)) {
-                                $out = Db::name("order_out")->where(["outCode" => $send, "status" => 0])->select()->toArray();
+                                $out = Db::name("order_out")->where(["outCode" => $send, "status" => 0,'is_del'=>0])->select()->toArray();
                                 if (!empty($out)) {
-                                    $up = Db::name("order_out")->where(["outCode" => $send, "status" => 0])->update(["status" => 1, 'wsm_code' => $cgdinfo[$cgdNo]['wsm_code'], "updatetime" => date('Y-m-d H:i:s')]);
+                                    $up = Db::name("order_out")->where(["outCode" => $send, "status" => 0,'is_del'=>0])->update(["status" => 1, 'wsm_code' => $cgdinfo[$cgdNo]['wsm_code'], "updatetime" => date('Y-m-d H:i:s')]);
                                     if ($up == false) throw new Exception('出库单出库失败');
                                     else {
 

+ 61 - 14
app/admin/controller/ReorderChild.php

@@ -161,7 +161,7 @@ class ReorderChild extends Base
 
         $info = Db::name('sale_return_child')
             ->alias('a')
-            ->field('a.id,a.num,a.status,a.returnCode,a.outChildCode,a.return_num,a.return_wsm_code,a.orderCode,a.outCode,b.good_code spuCode,c.status order_out_status,b.id saleid,d.num thnum')
+            ->field('a.id,a.num,a.status,a.returnCode,a.outChildCode,a.return_num,a.return_wsm_code,a.orderCode,a.outCode,a.saleReturnChildCode,a.apply_id,b.good_code spuCode,c.status order_out_status,b.id saleid,d.num thnum,d.id sr_id,d.apply_id sr_apply_id')
             ->leftJoin('sale b', 'b.orderCode=a.orderCode')
             ->leftJoin('order_out_child c', 'c.outChildCode=a.outChildCode AND c.is_del=0')
             ->leftJoin('sale_return d', 'd.returnCode=a.returnCode')
@@ -188,6 +188,30 @@ class ReorderChild extends Base
                     'remark' => $param['remark'],
                 ]);
 
+
+            //修改状态,添加待办
+            ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                "order_code" => $info['saleReturnChildCode'],//单号
+                "status" => $info['status'],//这里的status是之前的值
+                "action_remark" => '',//备注
+                "action_type" => "status"//新建create,编辑edit,更改状态status
+            ], "THGD", 2, [
+                'status' => 2,
+                'updatetime' => $date,
+                'good_receive_type' => $param['good_receive_type'],
+                'loss_num' => $param['loss_num'],
+                'remark' => $param['remark'],
+            ]);
+
+            ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                "order_type" => 'THGD',
+                "order_code" => $info['saleReturnChildCode'],//单号
+                "order_id" => $info['id'],
+                "order_status" => 2,
+                "before_status" => $info['status'],
+                'holder_id' => $info['apply_id']
+            ]);
+
             //检查所属销售单的退货工单是否全部完成退货
             $temp = Db::name('sale_return_child')
                 ->field('id')
@@ -198,6 +222,24 @@ class ReorderChild extends Base
                     ->where(['is_del' => 0, 'returnCode' => $info['returnCode'], 'status' => 12])
                     ->update(['status' => 4, 'updatetime' => $date]);
 
+                //修改状态,添加待办
+                ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_code" => $info['returnCode'],//单号
+                    "status" => 12,//这里的status是之前的值
+                    "action_remark" => '',//备注
+                    "action_type" => "status"//新建create,编辑edit,更改状态status
+                ], "XSTHD", 4, ['status' => 4, 'updatetime' => $date]);
+
+                ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_type" => 'XSTHD',
+                    "order_code" => $info['returnCode'],//单号
+                    "order_id" => $info['sr_id'],
+                    "order_status" => 2,
+                    "before_status" => 12,
+                    'holder_id' => $info['sr_apply_id']
+                ]);
+
+
                 //维护销售单
                 $order = Db::name('sale')->where(['is_del' => 0, 'id' => $info['saleid']])->findOrEmpty();
                 //未发货数量要减去发货单上的发货数量
@@ -207,6 +249,8 @@ class ReorderChild extends Base
 
 //                $order['wsend_num'] -= $out_send_num;
 
+                $old_status = $order['status'];
+
                 $thnum = $info['thnum'];//退货总数量
 //                if ($order['wsend_num'] < $thnum) throw new Exception("销售单未发货数量不足退货");
 
@@ -231,19 +275,22 @@ class ReorderChild extends Base
                 $uap = Db::name("sale")->save($order);
                 if ($uap == false) throw new Exception('销售单订单更新失败');
 
-//                ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
-//                    "order_code" => $order["orderCode"],//出库单号
-//                    "status" => $lor,//这里的status是之前的值
-//                    "action_remark" => '',//备注
-//                    "action_type" => "status"//新建create,编辑edit,更改状态status
-//                ], "XSQRD", $order['status'], $order);
-//
-//                ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
-//                    "order_type" => 'XSQRD',
-//                    "order_code" => $order["orderCode"],//出库单号
-//                    "order_id" => $order["id"],
-//                    "order_status" => $order['status'], "before_status" => $lor
-//                ]);
+                if ($old_status != $order['status']) {
+                    ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                        "order_code" => $order["orderCode"],//出库单号
+                        "status" => $old_status,//这里的status是之前的值
+                        "action_remark" => '',//备注
+                        "action_type" => "status"//新建create,编辑edit,更改状态status
+                    ], "XSQRD", $order['status'], $order);
+
+                    ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                        "order_type" => 'XSQRD',
+                        "order_code" => $order["orderCode"],//出库单号
+                        "order_id" => $order["id"],
+                        "order_status" => $order['status'],
+                        "before_status" => $old_status
+                    ]);
+                }
             }
 
             //发货工单数量减少

+ 85 - 20
app/admin/controller/Sale.php

@@ -5126,7 +5126,7 @@ class Sale extends Base
 
         $list = Db::name('sale')
             ->alias('a')
-            ->field('a.id sale_id,a.order_type,a.status sale_status,a.orderCode,a.cat_id,a.good_createrid,c.id cgd_id,c.status cgd_status')
+            ->field('a.id sale_id,a.order_type,a.status sale_status,a.orderCode,a.cat_id,a.good_createrid,c.id cgd_id,c.status cgd_status,c.cgdNo,c.cgder_id')
             ->leftJoin('order_num b', 'b.orderCode=a.orderCode')
             ->leftJoin('purchease_order c', 'c.cgdNo=b.cgdNo')
             ->where(['a.is_del' => 0, 'a.orderCode' => $orderCode])
@@ -5161,21 +5161,37 @@ class Sale extends Base
 //                }
 
                 //修改状态,添加待办
-//                ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
-//                    "order_code" => $sale['orderCode'],//销售单号
-//                    "status" => $sale['sale_status'],//这里的status是之前的值
-//                    "action_remark" => '',//备注
-//                    "action_type" => "edit"//新建create,编辑edit,更改状态status
-//                ], "XSQRD", 3, ['orderCode' => $orderCode]);
-//
-//                ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
-//                    "order_type" => 'XSQRD',
-//                    "order_code" => $sale['orderCode'],
-//                    "order_id" => $sale['sale_id'],
-//                    "order_status" => 3,
-//                    "before_status" => $sale['sale_status'],
-//                    'holder_id' => $sale['good_createrid'],
-//                ]);
+                ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_code" => $sale['orderCode'],//销售单号
+                    "status" => $sale['sale_status'],//这里的status是之前的值
+                    "action_remark" => '',//备注
+                    "action_type" => "status"//新建create,编辑edit,更改状态status
+                ], "XSQRD", 3, ['orderCode' => $orderCode]);
+
+                ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_type" => 'XSQRD',
+                    "order_code" => $sale['orderCode'],
+                    "order_id" => $sale['sale_id'],
+                    "order_status" => 3,
+                    "before_status" => $sale['sale_status'],
+                    'holder_id' => $sale['good_createrid'],
+                ]);
+
+                ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_code" => $sale['cgdNo'],//销售单号
+                    "status" => $sale['cgd_status'],//这里的status是之前的值
+                    "action_remark" => '',//备注
+                    "action_type" => "status"//新建create,编辑edit,更改状态status
+                ], "CGD", 4, ['orderCode' => $sale['cgdNo']]);
+
+                ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                    "order_type" => 'CGD',
+                    "order_code" => $sale['cgdNo'],
+                    "order_id" => $sale['cgd_id'],
+                    "order_status" => 4,
+                    "before_status" => $sale['cgd_status'],
+                    'holder_id' => $sale['cgder_id'],
+                ]);
             }
             Db::name('sale')
                 ->where(['is_del' => 0, 'id' => array_column($list, 'sale_id')])
@@ -5185,13 +5201,62 @@ class Sale extends Base
                 ->where(['is_del' => 0, 'id' => array_column($list, 'cgd_id')])
                 ->update(['status' => 4, 'updatetime' => $date]);
 
-            Db::name('order_out')
+            $out_list = Db::name('order_out')
                 ->where(['is_del' => 0, 'orderCode' => $orderCode])
-                ->update(['status' => 5, 'updatetime' => $date]);
+                ->select()
+                ->toArray();
+            if (!empty($out_list)) {
+                Db::name('order_out')
+                    ->field('id,outCode,status')
+                    ->where(['is_del' => 0, 'orderCode' => $orderCode])
+                    ->update(['status' => 5, 'updatetime' => $date]);
+                foreach ($out_list as $out) {
+                    ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                        "order_code" => $out['outCode'],//销售单号
+                        "status" => $out['status'],//这里的status是之前的值
+                        "action_remark" => '',//备注
+                        "action_type" => "status"//新建create,编辑edit,更改状态status
+                    ], "CKD", 5, $out);
 
-            Db::name('order_out_child')
+                    ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                        "order_type" => 'CKD',
+                        "order_code" => $out['outCode'],
+                        "order_id" => $out['id'],
+                        "order_status" => 5,
+                        "before_status" => $out['status'],
+                        'holder_id' => $out['apply_id'],
+                    ]);
+                }
+            }
+
+
+            $ooc_list = Db::name('order_out_child')
                 ->where(['is_del' => 0, 'orderCode' => $orderCode])
-                ->update(['status' => 5, 'updatetime' => $date]);
+                ->select()
+                ->toArray();
+            if (!empty($ooc_list)) {
+                Db::name('order_out_child')
+                    ->where(['is_del' => 0, 'orderCode' => $orderCode])
+                    ->update(['status' => 5, 'updatetime' => $date]);
+                foreach ($ooc_list as $ooc) {
+                    ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
+                        "order_code" => $ooc['outChildCode'],//销售单号
+                        "status" => $ooc['status'],//这里的status是之前的值
+                        "action_remark" => '',//备注
+                        "action_type" => "status"//新建create,编辑edit,更改状态status
+                    ], "FHGD", 5, $ooc);
+
+                    ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
+                        "order_type" => 'FHGD',
+                        "order_code" => $ooc['outChildCode'],
+                        "order_id" => $ooc['id'],
+                        "order_status" => 5,
+                        "before_status" => $ooc['status'],
+                        'holder_id' => $ooc['apply_id'],
+                    ]);
+                }
+            }
+
 
             Db::commit();
             return json_show(0, '操作成功');