cqp 6 kuukautta sitten
vanhempi
sitoutus
9000276bd0
100 muutettua tiedostoa jossa 2 lisäystä ja 7045 poistoa
  1. 0 274
      app/Console/Commands/CustomerFromThreePlatForm.php
  2. 0 38
      app/Console/Commands/CustomerPond.php
  3. 0 140
      app/Console/Commands/CustomerRemain.php
  4. 0 1298
      app/Console/Commands/CustomerWriteReport.php
  5. 0 295
      app/Console/Commands/SalesWriteReport.php
  6. 0 126
      app/Http/Controllers/Api/BasicTypeController.php
  7. 0 86
      app/Http/Controllers/Api/BookingListController.php
  8. 0 295
      app/Http/Controllers/Api/ConstructionController.php
  9. 0 73
      app/Http/Controllers/Api/ContactsController.php
  10. 0 163
      app/Http/Controllers/Api/CustomerController.php
  11. 0 22
      app/Http/Controllers/Api/DaHuangFengController.php
  12. 0 71
      app/Http/Controllers/Api/DeleteController.php
  13. 0 49
      app/Http/Controllers/Api/DouShopController.php
  14. 0 35
      app/Http/Controllers/Api/ExcelController.php
  15. 0 87
      app/Http/Controllers/Api/FollowUpRecordController.php
  16. 0 61
      app/Http/Controllers/Api/HeaderWordController.php
  17. 0 42
      app/Http/Controllers/Api/IOController.php
  18. 0 74
      app/Http/Controllers/Api/InventoryController.php
  19. 0 74
      app/Http/Controllers/Api/InvoiceOrderController.php
  20. 0 372
      app/Http/Controllers/Api/OaController.php
  21. 0 53
      app/Http/Controllers/Api/OperationLogController.php
  22. 0 87
      app/Http/Controllers/Api/OutBoundOrderController.php
  23. 0 85
      app/Http/Controllers/Api/PaymentReceiptController.php
  24. 0 77
      app/Http/Controllers/Api/ProductActivityController.php
  25. 0 74
      app/Http/Controllers/Api/ProductAdjustmentController.php
  26. 0 89
      app/Http/Controllers/Api/ProductInventoryController.php
  27. 0 76
      app/Http/Controllers/Api/PurchaseOrderController.php
  28. 0 87
      app/Http/Controllers/Api/PurchaseOrderSpecialController.php
  29. 0 22
      app/Http/Controllers/Api/RangeController.php
  30. 0 74
      app/Http/Controllers/Api/ReturnExchangeOrderController.php
  31. 0 203
      app/Http/Controllers/Api/SalesOrderController.php
  32. 0 155
      app/Http/Controllers/Api/ScheduleController.php
  33. 0 87
      app/Http/Controllers/Api/SportsBagController.php
  34. 0 213
      app/Http/Controllers/Api/StatisticsController.php
  35. 0 76
      app/Http/Controllers/Api/StorehouseController.php
  36. 0 74
      app/Http/Controllers/Api/SupplierController.php
  37. 0 207
      app/Http/Controllers/Api/TSpaceController.php
  38. 0 74
      app/Http/Controllers/Api/TakeOrderController.php
  39. 0 74
      app/Http/Controllers/Api/TechnologyController.php
  40. 0 1
      app/Http/Kernel.php
  41. 0 50
      app/Http/Middleware/OrderDeal.php
  42. 2 3
      app/Http/Middleware/RequestLog.php
  43. 0 75
      app/Jobs/CustomerReceivingThirdPlatFormJob.php
  44. 0 38
      app/Jobs/OperationLog.php
  45. 0 50
      app/Model/BasicType.php
  46. 0 18
      app/Model/BasicTypeAllUse.php
  47. 0 38
      app/Model/BookingList.php
  48. 0 17
      app/Model/BookingListInfo.php
  49. 0 64
      app/Model/Construction.php
  50. 0 13
      app/Model/ConstructionFile.php
  51. 0 20
      app/Model/ConstructionInfo.php
  52. 0 13
      app/Model/ConstructionProductInfo.php
  53. 0 13
      app/Model/Contacts.php
  54. 0 23
      app/Model/ContactsInfo.php
  55. 0 36
      app/Model/Customer.php
  56. 0 16
      app/Model/CustomerFromThreePlatForm.php
  57. 0 47
      app/Model/CustomerInfo.php
  58. 0 11
      app/Model/CustomerPerFormance.php
  59. 0 11
      app/Model/CustomerRemain.php
  60. 0 11
      app/Model/CustomerRepeat.php
  61. 0 11
      app/Model/CustomerReport.php
  62. 0 23
      app/Model/CustomerReportDepart.php
  63. 0 46
      app/Model/DeliveryNote.php
  64. 0 21
      app/Model/DeliveryNoteDetail.php
  65. 0 13
      app/Model/DepartIndex.php
  66. 0 13
      app/Model/DepartWithDHF.php
  67. 0 28
      app/Model/FollowUpRecord.php
  68. 0 17
      app/Model/FollowUpRecordFile.php
  69. 0 33
      app/Model/Inventory.php
  70. 0 14
      app/Model/InventorySub.php
  71. 0 28
      app/Model/InvoiceOrder.php
  72. 0 13
      app/Model/InvoiceOrderInfo.php
  73. 0 14
      app/Model/LastJc.php
  74. 0 11
      app/Model/MonthlyPerFormance.php
  75. 0 19
      app/Model/OperationLog.php
  76. 0 19
      app/Model/OperationLogDetail.php
  77. 0 19
      app/Model/OrderInventoryStock.php
  78. 0 87
      app/Model/OrderOperation.php
  79. 0 43
      app/Model/OutBoundOrder.php
  80. 0 14
      app/Model/OutBoundOrderInfo.php
  81. 0 52
      app/Model/PaymentReceipt.php
  82. 0 24
      app/Model/PaymentReceiptInfo.php
  83. 0 18
      app/Model/ProductActivity.php
  84. 0 13
      app/Model/ProductActivityPrice.php
  85. 0 33
      app/Model/ProductAdjustment.php
  86. 0 14
      app/Model/ProductAdjustmentSub.php
  87. 0 22
      app/Model/ProductCategory.php
  88. 0 13
      app/Model/ProductCategoryOrderBy.php
  89. 0 13
      app/Model/ProductIntroduction.php
  90. 0 11
      app/Model/ProductInventory.php
  91. 0 11
      app/Model/ProductInventoryOfTop.php
  92. 0 20
      app/Model/ProductInventorySet.php
  93. 0 13
      app/Model/ProductItemCodeMessage.php
  94. 0 13
      app/Model/ProductPriceDetail.php
  95. 0 19
      app/Model/ProductRange.php
  96. 0 20
      app/Model/ProductSnInfo.php
  97. 0 57
      app/Model/PurchaseOrder.php
  98. 0 17
      app/Model/PurchaseOrderFile.php
  99. 0 21
      app/Model/PurchaseOrderInfo.php
  100. 0 25
      app/Model/PurchaseOrderInfoForOutBound.php

+ 0 - 274
app/Console/Commands/CustomerFromThreePlatForm.php

@@ -1,274 +0,0 @@
-<?php
-
-namespace App\Console\Commands;
-
-use App\Model\BasicType;
-use App\Model\Customer;
-use App\Model\CustomerInfo;
-use App\Model\CustomerRemain;
-use App\Model\DepartWithDHF;
-use Illuminate\Console\Command;
-use Illuminate\Support\Facades\DB;
-
-class CustomerFromThreePlatForm extends Command
-{
-    /**
-     * The name and signature of the console command.
-     *
-     * @var string
-     */
-    protected $signature = 'command:customer_from_three_plat_form';
-
-    /**
-     * The console command description.
-     *
-     * @var string
-     */
-    protected $description = 'Command description';
-
-    /**
-     * Create a new command instance.
-     *
-     * @return void
-     */
-    public function __construct()
-    {
-        parent::__construct();
-    }
-
-    /**
-     * Execute the console command.
-     *
-     * @return mixed
-     */
-    public function handle()
-    {
-        echo '任务--------start---------------';
-
-        $basic = BasicType::where('del_time',0)
-            ->where('type',BasicType::type_10)
-            ->select('id','title')
-            ->get()->toArray();
-        $dhf = DepartWithDHF::from('depart_with_dhf as a')
-            ->join('depart as b','b.id','a.top_depart_id')
-            ->where('a.del_time',0)
-            ->where('b.del_time',0)
-            ->select('a.top_depart_id','a.clueSourceId','b.notify_id')
-            ->get()->toArray();
-        $dhf_map = array_column($dhf,null,'clueSourceId');
-
-        \App\Model\CustomerFromThreePlatForm::where("del_time",0)
-            ->where("customerName","<>","")
-            ->orderBy('id')
-            ->select('id','crt_time','city','actionType','acquireTime','clueType','product','wechat','clueId','transformType','clueSource','clueSourceId','customerName','platform','ipLocationCity','phone','isRepeatClue','flowType','fromUserId')
-            ->chunkById(20, function ($data) use($basic,$dhf_map){
-                // 开启事务
-                DB::transaction(function () use ($data,$basic,$dhf_map) {
-                    $dataArray = $data->toArray();
-                    $nowStamp = time();
-                    list($main, $main_detail, $fail, $main_detail2, $main_detail3) = $this->processingData($dataArray, $nowStamp,$basic,$dhf_map);
-                    $c_third_platform_id = array_column($main,'c_third_platform_id');
-
-                    if (! empty($main) ) {
-                        Customer::insert($main);
-
-                        $map = Customer::whereIn('c_third_platform_id',$c_third_platform_id)
-                            ->pluck('id','c_third_platform_id')
-                            ->toArray();
-                        $insert_detail = [];
-                        foreach ($main_detail as $id => $value){
-                            if(isset($map[$id])){
-                                foreach ($value as $v){
-                                    $v['customer_id'] = $map[$id];
-                                    $insert_detail[] = $v;
-                                }
-                            }
-                        }
-                        if(! empty($insert_detail)) CustomerInfo::insert($insert_detail);
-
-                        if(! empty($main_detail2)){
-                            $insert_detail_2 = [];
-                            foreach ($main_detail2 as $id => $value){
-                                if(isset($map[$id])){
-                                    foreach ($value as $v){
-                                        $v['customer_id'] = $map[$id];
-                                        $insert_detail_2[] = $v;
-                                    }
-                                }
-                            }
-                            if(! empty($insert_detail_2)) CustomerInfo::insert($insert_detail_2);
-                        }
-
-                        if(! empty($main_detail3)){
-                            $insert_detail_3 = [];
-                            foreach ($main_detail3 as $id => $value){
-                                if(isset($map[$id])){
-                                    foreach ($value as $v){
-                                        $v['customer_id'] = $map[$id];
-                                        $insert_detail_3[] = $v;
-                                    }
-                                }
-                            }
-                            if(! empty($insert_detail_3)) CustomerRemain::insert($insert_detail_3);
-                        }
-
-                        echo '更新完成' . PHP_EOL;
-                    }
-
-                    if(! empty($fail)) {
-                        foreach ($fail as $update){
-                            $customer_id = $map[$update['id']] ?? 0;
-                            \App\Model\CustomerFromThreePlatForm::where('id', $update['id'])
-                                ->update(['del_time' => $update['result'] , 'customer_id' => $customer_id]);
-                        }
-                    }
-                });
-            });
-
-        echo '任务结束--------end---------------';
-    }
-
-    private function processingData($data, $time,$basic,$dhf_map)
-    {
-        $return = []; // 客户主表
-        $return_detail = []; // 客户联系方式
-        $return_detail2 = []; // 客户负责人
-        $return_detail3 = []; // 客户负责人提醒
-        $fail   = []; // 失败数据(含 result 标记)
-        $basic_map = array_column($basic,'title','id');
-
-        $info_phone = [];
-        $info_wechat = [];
-        $search = [];
-
-        // 第一步:同批次去重(保留最后一次 ID)
-        foreach ($data as $value) {
-            if (!empty($value['phone'])) {
-                $info_phone[$value['phone']] = $value['id'];
-                $search[] = $value['phone'];
-            }
-            if (!empty($value['wechat'])) {
-                $info_wechat[$value['wechat']] = $value['id'];
-                $search[] = $value['wechat'];
-            }
-        }
-
-        // 第二步:数据库中已存在的联系方式
-        $contact = CustomerInfo::from('customer_info as a')
-            ->join('customer as b', 'b.id', 'a.customer_id')
-            ->where('a.del_time', 0)
-            ->where('b.del_time', 0)
-            ->where('b.top_depart_id', 2)
-            ->whereIn('a.contact_info', $search)
-            ->pluck('a.contact_info')
-            ->toArray();
-
-        $contact = array_flip($contact); // 方便 in_array 变成 isset 检查
-
-        // 第三步:逐条判断
-        foreach ($data as $value) {
-            $id = $value['id'];
-            $isFail = false;
-
-            // 检查手机号
-            if (!empty($value['phone'])) {
-                if (isset($contact[$value['phone']])) {
-                    // 数据库已存在
-                    $fail[] = ['id' => $id, 'result' => 1];
-                    $isFail = true;
-                } elseif (($info_phone[$value['phone']] ?? 0) !== $id) {
-                    // 同批重复
-                    $fail[] = ['id' => $id, 'result' => 2];
-                    $isFail = true;
-                }
-            }
-
-            // 检查微信号(如果之前手机号已 fail,这里也可以继续检查,因为两者可能不同)
-            if (!$isFail && !empty($value['wechat'])) {
-                if (isset($contact[$value['wechat']])) {
-                    $fail[] = ['id' => $id, 'result' => 1];
-                    $isFail = true;
-                } elseif (($info_wechat[$value['wechat']] ?? 0) !== $id) {
-                    $fail[] = ['id' => $id, 'result' => 2];
-                    $isFail = true;
-                }
-            }
-
-            // 成功数据
-            if (! $isFail) {
-                $fail[] = ['id' => $id, 'result' => 3];
-
-                $car_type = 0;
-                if(! empty($value['product'])){
-                    $t = explode('/', $value['product']);
-                    foreach ($t as $t_v){
-                        if($car_type) continue;
-                        if(isset($basic_map[$t_v])) $car_type = $basic_map[$t_v];
-                    }
-                }
-                $customer_from = 0;
-                if($value['platform'] == 1){
-                    $customer_from = 17190;//抖音DY
-                }elseif($value['platform'] == 2){
-                    $customer_from = 17202;//快手KS
-                }elseif ($value['platform'] == 5){
-                    $customer_from = 17195;//公众号GZH
-                }
-                $enter_time = $time;
-                if(! empty($value['acquireTime'])) $enter_time = bcdiv($value['acquireTime'],1000);
-                $return[] = [
-                    'c_third_platform_id' => $id,
-                    'title' => $value['customerName'],
-                    'model_type' => Customer::Model_type_one,
-                    'progress_stage' => 9315, //A后台私信
-                    'car_type' => $car_type,
-                    'customer_from' => $customer_from,
-                    'address2' => ! empty($value['city']) ? $value['city'] : $value['ipLocationCity'],
-                    'depart_id' => 2,
-                    'top_depart_id' => 2,
-                    'crt_id' => 1,
-                    'crt_time' => $time,
-                    'upd_time' => $time,
-                    'enter_time' => $enter_time,
-                ];
-
-                if(! empty($value['phone'])){
-                    $return_detail[$id][] = [
-                        'customer_id' => 0,
-                        'contact_type' => 133,
-                        'contact_info' => $value['phone'],
-                        'crt_time' => $time,
-                        'type' => CustomerInfo::type_one
-                    ];
-                }
-                if(! empty($value['wechat'])){
-                    $return_detail[$id][] = [
-                        'customer_id' => 0,
-                        'contact_type' => 135,
-                        'contact_info' => $value['wechat'],
-                        'crt_time' => $time,
-                        'type' => CustomerInfo::type_one
-                    ];
-                }
-                $setting = $dhf_map[$value['clueSourceId']] ?? [];
-                if(! empty($setting['notify_id']) && ! empty($setting['top_depart_id'])){
-                    $return_detail2[$id][] = [
-                        'customer_id' => 0,
-                        'data_id' => $setting['notify_id'],
-                        'crt_time' => $time,
-                        'type' => CustomerInfo::type_two
-                    ];
-                    $return_detail3[$id][] = [
-                        'customer_id' => 0,
-                        'fp' => $setting['top_depart_id'],
-                        'fz' => $setting['notify_id'],
-                        'crt_time' => $time,
-                    ];
-                }
-            }
-        }
-
-        return [$return, $return_detail, $fail, $return_detail2, $return_detail3];
-    }
-
-}

+ 0 - 38
app/Console/Commands/CustomerPond.php

@@ -1,38 +0,0 @@
-<?php
-
-namespace App\Console\Commands;
-
-
-use App\Service\CustomerPondService;
-use Illuminate\Console\Command;
-
-
-class CustomerPond extends Command
-{
-
-
-    /**
-     * The console command description.
-     *
-     * @var string
-     */
-
-    protected $signature = 'customerPond';
-
-    protected $description = '';
-
-    protected $process;
-    protected $key = 'customerPond';
-
-    public function __construct()
-    {
-        parent::__construct();
-
-    }
-
-    public function handle()
-    {
-        $service = new CustomerPondService();
-        $service->updateCustomerPond();
-    }
-}

+ 0 - 140
app/Console/Commands/CustomerRemain.php

@@ -1,140 +0,0 @@
-<?php
-
-namespace App\Console\Commands;
-
-use App\Model\Customer;
-use App\Model\Depart;
-use App\Model\SeeRange;
-use App\Model\WxEmployeeOfficial;
-use App\Model\CustomerRemain as CrModel;
-use App\Service\OaService;
-use Illuminate\Console\Command;
-
-class CustomerRemain extends Command
-{
-    /**
-     * The name and signature of the console command.
-     *
-     * @var string
-     */
-    protected $signature = 'command:customer_remain';
-
-    /**
-     * The console command description.
-     *
-     * @var string
-     */
-    protected $description = 'Command description';
-
-    /**
-     * Create a new command instance.
-     *
-     * @return void
-     */
-    public function __construct()
-    {
-        parent::__construct();
-    }
-
-    /**
-     * Execute the console command.
-     *
-     * @return mixed
-     */
-    public function handle()
-    {
-        echo '发送提醒--------start---------------';
-
-        $time = time();
-        $data = CrModel::where("del_time",0)
-            ->select('id','customer_id','fp','fz')
-            ->get()->toArray();
-        if(! empty($data)){
-//            $fp_id = array_unique(array_column($data,'fp'));
-//            $depart = Depart::where("del_time",0)
-//                ->whereIn("id", $fp_id)
-//                ->select('id','notify_id')
-//                ->get()->toArray();
-//            $depart_map = array_column($depart,'notify_id','id');
-//            $fp_man_id = array_filter(array_unique(array_column($depart,'notify_id')));
-            $fz_id = array_unique(array_column($data,'fz'));
-//            $employee_id = array_unique(array_merge($fp_man_id, $fz_id));
-            $employee_id = array_unique($fz_id);
-            $wx_map = WxEmployeeOfficial::whereIn('employee_id', $employee_id)
-                ->pluck('openid','employee_id')
-                ->toArray();
-            $send_data = $insert = [];
-            $customer_id = [];
-            foreach ($data as $value){
-                if(! empty($value['fp'])) {
-                    $insert[] = [
-                        'data_id' => $value['customer_id'], //客户id
-                        'data_type' => SeeRange::type_one,
-                        'param_id' => $value['fp'], //门店id
-                        'type' => SeeRange::data_three,
-                        'crt_time' => $time,
-                    ];
-                    $customer_id[] = $value['customer_id'];
-                }
-
-                $open_id_fz = $wx_map[$value['fz']] ?? "";
-//                $fp_man_t = $depart_map[$value['fp']] ?? 0;
-//                $open_id_fp = $wx_map[$fp_man_t] ?? "";
-                //负责人 和 门店负责人都为空跳过
-//                if(empty($open_id_fz) && empty($open_id_fp)) continue;
-                if(empty($open_id_fz)) continue;
-                //组织发送
-                $this->makeData($send_data, $open_id_fz, $value);
-//                $this->makeData($send_data, $open_id_fp, $value);
-            }
-            if(! empty($send_data)){
-                echo "发送中\n";
-                $send_data = array_values($send_data);
-                (new OaService())->sendWxOaCheckMessage($send_data, 1);
-            }
-
-            $c_id = array_column($data,'customer_id');
-            //清空分配门店
-            SeeRange::where('del_time',0)
-                ->whereIn('data_id', $c_id)
-                ->where('data_type',SeeRange::type_one)
-                ->where('type',SeeRange::data_three)
-                ->update(['del_time' => $time]);
-            //分配门店
-            if(! empty($insert)) SeeRange::insert($insert);
-            //更新单据
-            CrModel::whereIn('id',array_column($data,'id'))
-                ->update(['del_time' => $time]);
-            if(! empty($customer_id)) Customer::whereIn('id', $customer_id)->update(['fp_time' => $time]);
-        }else{
-            echo "暂无\n";
-        }
-
-        echo '发送提醒--------end---------------';
-    }
-
-    private function makeData(&$send_data, $open_id, $value){
-        if(! empty($open_id)) {
-            if(! isset($send_data[$open_id])){
-                $send_data[$open_id] = [
-                    'employee_id' => 12343215,
-                    'type' => 2,
-                    'state' => 0,
-                    'menu_id' => "16|list",
-                    'openid' => $open_id,
-                    'order_number' => $value['customer_id'],
-                    'tmp_data' => [
-                        time(),
-                        "客资分配提醒",
-                        "已分配",
-                        "T9品牌中心",
-                        date('Y-m-d H:i:s'),
-                    ],
-                ];
-            }else{
-                $tmp = explode(',', $send_data[$open_id]['order_number']);
-                if(! in_array($value['customer_id'], $tmp)) $send_data[$open_id]['order_number'] .= ',' . $value['customer_id'];
-            }
-        }
-    }
-}

+ 0 - 1298
app/Console/Commands/CustomerWriteReport.php

@@ -1,1298 +0,0 @@
-<?php
-
-namespace App\Console\Commands;
-
-use App\Model\AreaMap;
-use App\Model\BasicType;
-use App\Model\BasicTypeAllUse;
-use App\Model\Customer;
-use App\Model\CustomerInfo;
-use App\Model\CustomerReport;
-use App\Model\CustomerReportDepart;
-use App\Model\FollowUpRecord;
-use App\Model\SalesOrder;
-use App\Model\SeeRange;
-use Illuminate\Console\Command;
-use Illuminate\Support\Facades\DB;
-
-class CustomerWriteReport extends Command
-{
-    /**
-     * The name and signature of the console command.
-     *
-     * @var string
-     */
-    protected $signature = 'command:customer_write_report';
-
-    /**
-     * The console command description.
-     *
-     * @var string
-     */
-    protected $description = 'Command description';
-
-    /**
-     * Create a new command instance.
-     *
-     * @return void
-     */
-    public function __construct()
-    {
-        parent::__construct();
-    }
-
-    /**
-     * Execute the console command.
-     *
-     * @return mixed
-     */
-    public function handle()
-    {
-        echo "执行任务--------start---------------\n";
-
-        try {
-            $this->customerWrite();
-        }catch (\Throwable $exception){
-            echo "发生异常:" . $exception->getFile() . "|" . $exception->getMessage() . "|" . $exception->getLine() . "\n";
-        }
-
-        echo "执行任务--------end---------------\n";
-    }
-
-    private function customerWrite(){
-        //今天到上月今天的时间戳
-        $nowStamp = time();
-        $lastMonth = date("Y-m-d 00:00:00", strtotime("-1 month"));
-        $lastMonthStamp = strtotime($lastMonth);
-
-        list($provinceMap, $cityMap, $countyMap) = $this->constructAddress();
-//        dd($provinceMap, $cityMap, $countyMap);
-//        dd(count($provinceMap), count($cityMap), count($countyMap));
-//        $this->forInsertArea($provinceMap, $cityMap, $countyMap);dd(122);
-        Customer::where("del_time",0)
-            ->where('enter_time','>=', $lastMonthStamp)
-            ->where('enter_time','<=', $nowStamp)
-            ->orderBy('id')
-            ->select('id','title','model_type','consulting_product_new','enter_time','address2','top_depart_id','customer_from','car_type')
-            ->chunkById(200, function ($data) use($provinceMap, $cityMap, $countyMap,$nowStamp){
-                // 开启事务
-                DB::transaction(function () use ($data, $provinceMap, $cityMap, $countyMap, $nowStamp) {
-                    $dataArray = $data->toArray();
-                    foreach ($dataArray as $key => $value){
-                        $dataArray[$key]['customer_id'] = $value['id'];
-                        unset($dataArray[$key]['id']);
-                    }
-
-                    list($main, $main_depart) = $this->processingData($dataArray, $provinceMap, $cityMap, $countyMap, $nowStamp);
-                    if (! empty($main)) {
-                        $customer_ids = array_column($dataArray, 'customer_id');
-
-                        // 删除旧数据
-                        CustomerReport::where('del_time', 0)
-                            ->whereIn('customer_id', $customer_ids)
-                            ->update(['del_time' => $nowStamp]);
-                        CustomerReportDepart::where('del_time', 0)
-                            ->whereIn('customer_id', $customer_ids)
-                            ->update(['del_time' => $nowStamp]);
-
-                        // 写入新数据
-                        CustomerReport::insert($main);
-                        CustomerReportDepart::insert($main_depart);
-
-                        echo '200条写入中' . PHP_EOL;
-                    } else {
-                        echo '暂无数据写入' . PHP_EOL;
-                    }
-                });
-            });
-    }
-
-    private function processingData($data,$provinceMap,$cityMap,$countyMap,$time){
-        $customer_id = array_column($data,'customer_id');
-        $range = SeeRange::where('del_time',0)
-            ->whereIn('data_id', $customer_id)
-            ->where('data_type',SeeRange::type_one)
-            ->where('type',SeeRange::data_three)
-            ->select('data_id as customer_id','param_id as top_depart_id')
-            ->get()->toArray();
-        $map = [];
-        foreach ($range as $value){
-            $map[$value['customer_id']][] = $value['top_depart_id'];
-        }
-
-        $isset_map = SalesOrder::where('del_time', 0)
-            ->whereIn('customer_id', $customer_id)
-            ->pluck('customer_id')
-            ->unique()
-            ->flip()
-            ->map(fn() => 1)
-            ->toArray();
-
-        // 最新的跟进记录
-        $latestRecordsArray = $detail_insert = [];
-        $latestRecords = FollowUpRecord::whereIn('data_id', $customer_id)
-            ->where('type', FollowUpRecord::type_one)
-            ->where('del_time',0)
-            ->select('data_id','follow_type','crt_id')
-            ->orderBy('id','desc')
-            ->get()->toArray();
-        foreach ($latestRecords as $value){
-            if(! isset($latestRecordsArray[$value['data_id']])){
-                $latestRecordsArray[$value['data_id']] = [
-                    'follow_type' => $value['follow_type'],
-                    'num' => 1,
-                ];
-            }else{
-                $latestRecordsArray[$value['data_id']]['num'] += 1;
-            }
-
-            $detail_insert[] = [
-                'customer_id' => $value['data_id'],
-                'top_depart_id' => 0,
-                'crt_time' => $time,
-                'type' => CustomerReportDepart::type_three,
-                'man_id' => $value['crt_id'],
-            ];
-        }
-
-        $customer_info = CustomerInfo::where('del_time',0)
-            ->whereIn('customer_id',$customer_id)
-            ->whereIn('type',[CustomerInfo::type_one, CustomerInfo::type_two])
-            ->select('type','contact_type','contact_info','customer_id','data_id')
-            ->get()->toArray();
-        $customer_info_map = $customer_info_map2 = [];
-        foreach ($customer_info as $value){
-            if($value['type'] == CustomerInfo::type_one){
-                if(! $value['contact_info']) continue;
-                if(! empty($customer_info_map[$value['customer_id']])) continue;
-                $customer_info_map[$value['customer_id']] = $value['contact_info'];
-            }else{
-                if(! $value['data_id']) continue;
-                if(! empty($customer_info_map2[$value['customer_id']]) && in_array($value['data_id'], $customer_info_map2[$value['customer_id']])) continue;
-                $customer_info_map2[$value['customer_id']][] = $value['data_id'];
-            }
-        }
-        $array = array_unique(array_merge_recursive(array_column($data,'customer_from'),array_column($data,'car_type')));
-        $basic_map = BasicType::whereIn('id',$array)
-            ->pluck('title','id')
-            ->toArray();
-        $basic_all_map = BasicTypeAllUse::where('type', BasicTypeAllUse::type_one)
-            ->whereIn('id',array_unique(array_column($data,'consulting_product_new')))
-            ->pluck('title','id')
-            ->toArray();
-
-        foreach ($data as $key => $value){
-            $province = $province_code = $city = $city_code = "";
-            $is_success = 0;
-            if(! empty($value['address2'])){
-                $tmp = $this->parseAddress($value['address2'], $provinceMap, $cityMap,$countyMap);
-                if(empty($tmp['province']['label']) || empty($tmp['city']['label'])){
-//                    $tmp['origin'] = $value['address2'];
-//                    $a = [
-//                        "provice" => $tmp['province']['label'],
-//                        "provice_code" => $tmp['province']['value'],
-//                        "city" => $tmp['city']['label'],
-//                        "city_code" => $tmp['city']['value'],
-//                        "origin" => $value['address2']
-//                    ];
-//                    $return[] = $a;
-                }else{
-                    $province = $tmp['province']['label'];
-                    $province_code = $tmp['province']['value'];
-                    $city = $tmp['city']['label'];
-                    $city_code = $tmp['city']['value'];
-                    $is_success = 1;
-                }
-            }
-            $data[$key]['province'] = $province;
-            $data[$key]['province_code'] = $province_code;
-            $data[$key]['city'] = $city;
-            $data[$key]['city_code'] = $city_code;
-            $data[$key]['is_success'] = $is_success;
-            $belong_depart_id = [$value['top_depart_id']];
-            if(isset($map[$value['customer_id']])) $belong_depart_id = array_unique($map[$value['customer_id']]);
-            foreach ($belong_depart_id as $b){
-                $detail_insert[] = [
-                    'customer_id' => $value['customer_id'],
-                    'top_depart_id' => $b,
-                    'crt_time' => $time,
-                    'type' => CustomerReportDepart::type_one,
-                    'man_id' => 0,
-                ];
-            }
-            $customer_info2 = $customer_info_map2[$value['customer_id']] ?? [];
-            if(! empty($customer_info2)){
-                foreach ($customer_info2 as $v_i){
-                    $detail_insert[] = [
-                        'customer_id' => $value['customer_id'],
-                        'top_depart_id' => 0,
-                        'crt_time' => $time,
-                        'type' => CustomerReportDepart::type_two,
-                        'man_id' => $v_i,
-                    ];
-                }
-            }
-
-            $type = -1;
-            $r_array = $latestRecordsArray[$value['customer_id']] ?? [];
-            $num = $r_array['num'] ?? 0;
-            if(isset($isset_map[$value['customer_id']])){
-                $type = 3;
-            }else{
-                if(! empty($r_array)) $type = $r_array['follow_type'];
-            }
-
-            $data[$key]['type'] = $type;
-            $data[$key]['follow_num'] = $num;
-            $data[$key]['contact_info'] = $customer_info_map[$value['customer_id']] ?? "";
-            $data[$key]['customer_from'] = $basic_map[$value['customer_from']] ?? "";
-            $data[$key]['car_type'] = $customer_info_map[$value['car_type']] ?? "";
-            $data[$key]['consulting_product_new_title'] = $basic_all_map[$value['consulting_product_new']] ?? "";
-            $data[$key]['crt_time'] = $time;
-        }
-
-        return [$data, $detail_insert];
-    }
-
-    private function forInsertArea($provinceMap, $cityMap, $countyMap){
-        $insert = [];
-        foreach ($provinceMap as $key => $value){
-            $insert[] = [
-                'key' => $key,
-                'label' => $value['label'],
-                'value' => $value['value'],
-                'province' => "",
-                'type' => 1,
-            ];
-        }
-        foreach ($cityMap as $key => $value){
-            $insert[] = [
-                'key' => $key,
-                'label' => $value['label'],
-                'value' => $value['value'],
-                'province' => $value['province'],
-                'type' => 2,
-            ];
-        }
-        foreach ($countyMap as $key => $value){
-            $insert[] = [
-                'key' => $key,
-                'label' => $value['city_label'],
-                'value' => $value['city_value'],
-                'province' => $value['province_value'],
-                'type' => 3,
-            ];
-        }
-        AreaMap::where('del_time',0)
-            ->where('is_create_by_human',0)
-            ->update(['del_time' => time()]);
-        AreaMap::insert($insert);
-    }
-
-    private function constructAddress($type = 0) {
-        if(! empty($type)){
-            $result = AreaMap::where('del_time',0)
-                ->select('key','label','value','province','type')
-                ->get()->toArray();
-            $provinceMap = [];
-            $cityMap = [];
-            $countyMap = []; // 新增区县映射表
-            foreach ($result as $value){
-                if($value['type'] == 1){
-                    $provinceMap[$value['key']] = [
-                        'label' => $value['label'],
-                        'value' => $value['value'],
-                    ];
-                }elseif($value['type'] == 2){
-                    $cityMap[$value['key']] = [
-                        'label' => $value['label'],
-                        'value' => $value['value'],
-                        'province' => $value['province'],
-                    ];
-                }else{
-                    $countyMap[$value['key']] = [
-                        'city_label' => $value['label'],
-                        'city_value' => $value['value'],
-                        'province_value' => $value['value'],
-                        'type' => 3,
-                    ];
-                }
-            }
-        }else{
-            $addressData = config('address3');
-            if(is_string($addressData)) $addressData = json_decode($addressData, true);
-            $provinceMap = [];
-            $cityMap = [];
-            $countyMap = []; // 新增区县映射表
-
-            // 添加直辖市特殊处理
-            $municipalities = [
-                '110000' => ['北京', '北京市'],
-                '120000' => ['天津', '天津市'],
-                '310000' => ['上海', '上海市'],
-                '500000' => ['重庆', '重庆市']
-            ];
-
-            // 添加省级简称映射
-            $provinceAbbr = [
-                '内蒙古' => '内蒙古自治区',
-                '新疆' => '新疆维吾尔自治区',
-                '广西' => '广西壮族自治区',
-                '宁夏' => '宁夏回族自治区',
-                '西藏' => '西藏自治区',
-            ];
-
-            foreach ($addressData as $province) {
-                $pValue = $province['value'];
-                $pLabel = $province['label'];
-
-                // 添加省份全称和简称
-                $shortProvince = preg_replace('/(省|市|自治区|特别行政区)$/u', '', $pLabel);
-                $provinceMap[$pLabel] = ['label' => $pLabel, 'value' => $pValue];
-                $provinceMap[$shortProvince] = ['label' => $pLabel, 'value' => $pValue];
-                $provinceMap[$pValue] = ['label' => $pLabel, 'value' => $pValue]; // 新增:通过编码直接访问
-
-                // 添加省级简称
-                if (isset($provinceAbbr[$shortProvince])) {
-                    $provinceMap[$shortProvince] = ['label' => $pLabel, 'value' => $pValue];
-                }
-
-                // 处理直辖市
-                if (isset($municipalities[$pValue])) {
-                    $cityLabel = $municipalities[$pValue][1];
-                    $cityMap[$cityLabel] = $cityMap[$municipalities[$pValue][0]] = [
-                        'label' => $cityLabel,
-                        'value' => $pValue,
-                        'province' => $pValue
-                    ];
-
-                    // 添加直辖市区县映射
-                    foreach ($province['children'][0]['children'] as $district) {
-                        $dLabel = $district['label'];
-                        $countyMap[$dLabel] = [
-                            'city_label' => $cityLabel,
-                            'city_value' => $pValue,
-                            'province_value' => $pValue
-                        ];
-
-                        // 添加区县简称(去掉"区"字)
-                        $shortDistrict = preg_replace('/区$/', '', $dLabel);
-                        if ($shortDistrict !== $dLabel) {
-                            $countyMap[$shortDistrict] = $countyMap[$dLabel];
-                        }
-                    }
-                    continue;
-                }
-
-                // 处理普通城市和区县
-                foreach ($province['children'] as $city) {
-                    $cValue = $city['value'];
-                    $cLabel = $city['label'];
-
-                    // 添加城市全称和简称
-                    $shortCity = preg_replace('/(市|地区|盟)$/u', '', $cLabel);
-                    $cityMap[$cLabel] = [
-                        'label' => $cLabel,
-                        'value' => $cValue,
-                        'province' => $pValue
-                    ];
-
-                    $cityMap[$shortCity] = [
-                        'label' => $cLabel,
-                        'value' => $cValue,
-                        'province' => $pValue
-                    ];
-
-                    // 添加自治州特殊处理(如恩施)
-                    $specialMapping = [
-                        '延边朝鲜族自治州' => '延边',
-                        '恩施土家族苗族自治州' => '恩施',
-                        '湘西土家族苗族自治州' => '湘西',
-                        '阿坝藏族羌族自治州' => '阿坝',
-                        '凉山彝族自治州' => '凉山',
-                        '甘孜藏族自治州' => '甘孜',
-                        '黔东南苗族侗族自治州' => '黔东南',
-                        '黔南布依族苗族自治州' => '黔南',
-                        '黔西南布依族苗族自治州' => '黔西南',
-                        '楚雄彝族自治州' => '楚雄',
-                        '红河哈尼族彝族自治州' => '红河',
-                        '文山壮族苗族自治州' => '文山',
-                        '西双版纳傣族自治州' => '西双版纳',
-                        '大理白族自治州' => '大理',
-                        '德宏傣族景颇族自治州' => '德宏',
-                        '怒江傈僳族自治州' => '怒江',
-                        '迪庆藏族自治州' => '迪庆',
-                        '临夏回族自治州' => '临夏',
-                        '甘南藏族自治州' => '甘南',
-                        '海南藏族自治州' => '海南',
-                        '海北藏族自治州' => '海北',
-                        '海西蒙古族藏族自治州' => '海西',
-                        '黄南藏族自治州' => '黄南',
-                        '果洛藏族自治州' => '果洛',
-                        '玉树藏族自治州' => '玉树',
-                        '伊犁哈萨克自治州' => '伊犁',
-                        '博尔塔拉蒙古自治州' => '博尔塔拉',
-                        '昌吉回族自治州' => '昌吉',
-//                        '巴音郭楞蒙古自治州' => '巴州',
-                        '巴音郭楞蒙古自治州' => '巴音郭楞',
-                        '克孜勒苏柯尔克孜自治州' => '克孜勒苏',
-                    ];
-//                    $specialMapping = array_flip($specialMapping);
-
-                    if (isset($specialMapping[$shortCity])) {
-                        $cityMap[$specialMapping[$shortCity]] = [
-                            'label' => $shortCity,
-                            'value' => $cValue,
-                            'province' => $pValue
-                        ];
-                    }
-
-//                    if (strpos($cLabel, '自治州') !== false) {
-////                    dump($province['children']);
-//                        $autonomousShort = str_replace(['自治州', '土家族', '苗族', '壮族'], '', $cLabel);
-//                        $cityMap[$autonomousShort] = [
-//                            'label' => $cLabel,
-//                            'value' => $cValue,
-//                            'province' => $pValue
-//                        ];
-//                    }
-
-                    // 添加城市常见简称(特殊处理)
-                    $specialAbbr = [
-                        '成都' => '成都市',
-                        '杭州' => '杭州市',
-                        '广州' => '广州市',
-                        '深圳' => '深圳市',
-                        '武汉' => '武汉市',
-                        '南京' => '南京市',
-                        '苏州' => '苏州市',
-                        '宁波' => '宁波市',
-                        '青岛' => '青岛市',
-                    ];
-
-                    if (isset($specialAbbr[$shortCity])) {
-                        $cityMap[$shortCity] = [
-                            'label' => $specialAbbr[$shortCity],
-                            'value' => $cValue,
-                            'province' => $pValue
-                        ];
-                    }
-
-                    // 添加区县映射
-                    if (isset($city['children'])) {
-                        foreach ($city['children'] as $county) {
-                            $countyLabel = $county['label'];
-                            $countyMap[$countyLabel] = [
-                                'city_label' => $cLabel,
-                                'city_value' => $cValue,
-                                'province_value' => $pValue
-                            ];
-
-                            // 添加区县简称(去掉"区"/"县"字)
-                            $shortCounty = preg_replace('/(区|县|市|自治县|黎族自治县|黎族苗族自治县)$/u', '', $countyLabel);
-                            if ($shortCounty !== $countyLabel) {
-                                $countyMap[$shortCounty] = $countyMap[$countyLabel];
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-//dd($cityMap);
-        return [$provinceMap, $cityMap, $countyMap]; // 返回三个映射表
-    }
-
-    function parseAddress($str, $provinceMap, $cityMap, $countyMap) {
-        static $cache = [];
-        if (isset($cache[$str])) return $cache[$str];
-
-        $str = str_replace(['·', ' ', '-', '-'], '', trim($str));
-
-        // 0. 处理空字符串
-        if (empty($str)) {
-            $result = [
-                'province' => ['label' => '', 'value' => ''],
-                'city' => ['label' => '', 'value' => '']
-            ];
-            $cache[$str] = $result;
-            return $result;
-        }
-
-        // 1. 处理直辖市简称
-        $municipalityShort = ['京', '沪', '津', '渝'];
-        $municipalityMap = [
-            '京' => '北京市',
-            '沪' => '上海市',
-            '津' => '天津市',
-            '渝' => '重庆市'
-        ];
-
-        if (in_array(mb_substr($str, 0, 1), $municipalityShort)) {
-            $cityName = $municipalityMap[mb_substr($str, 0, 1)];
-            $city = $cityMap[$cityName] ?? null;
-            if ($city) {
-                $provinceInfo = $provinceMap[$city['province']] ?? null;
-                $result = [
-                    'province' => $provinceInfo ?: ['label' => $cityName, 'value' => $city['province']],
-                    'city' => ['label' => $city['label'], 'value' => $city['value']]
-                ];
-                $cache[$str] = $result;
-                return $result;
-            }
-        }
-
-        // 2. 完整字符串匹配城市
-        if (isset($cityMap[$str])) {
-            $city = $cityMap[$str];
-            $provinceInfo = $provinceMap[$city['province']] ?? null;
-            $result = [
-                'province' => $provinceInfo ?: ['label' => '', 'value' => $city['province']],
-                'city' => ['label' => $city['label'], 'value' => $city['value']]
-            ];
-            $cache[$str] = $result;
-            return $result;
-        }
-
-        // 3. 匹配区县(新增)
-        if (isset($countyMap[$str])) {
-            $county = $countyMap[$str];
-            $cityInfo = [
-                'label' => $county['city_label'],
-                'value' => $county['city_value']
-            ];
-            $provinceInfo = $provinceMap[$county['province_value']] ?? null;
-
-            $result = [
-                'province' => $provinceInfo ?: ['label' => '', 'value' => $county['province_value']],
-                'city' => $cityInfo
-            ];
-            $cache[$str] = $result;
-            return $result;
-        }
-
-        // 4. 优先匹配3字省份(如内蒙古)
-        if (mb_strlen($str) >= 3) {
-            $prefix = mb_substr($str, 0, 3);
-            if (isset($provinceMap[$prefix])) {
-                return $this->handleMatchedProvince($prefix, mb_substr($str, 3), $provinceMap, $cityMap, $countyMap, $cache, $str);
-            }
-        }
-
-        // 5. 匹配2字省份
-        if (mb_strlen($str) >= 2) {
-            $prefix = mb_substr($str, 0, 2);
-            if (isset($provinceMap[$prefix])) {
-                return $this->handleMatchedProvince($prefix, mb_substr($str, 2), $provinceMap, $cityMap, $countyMap, $cache, $str);
-            }
-        }
-
-        // 6. 城市关键词扫描(加强版)
-        $cityKeys = array_keys($cityMap);
-        usort($cityKeys, fn($a, $b) => mb_strlen($b) - mb_strlen($a));
-
-        foreach ($cityKeys as $key) {
-            if (mb_strpos($str, $key) !== false) {
-                $city = $cityMap[$key];
-                $provinceInfo = $provinceMap[$city['province']] ?? null;
-
-                $result = [
-                    'province' => $provinceInfo ?: ['label' => '', 'value' => $city['province']],
-                    'city' => ['label' => $city['label'], 'value' => $city['value']]
-                ];
-                $cache[$str] = $result;
-                return $result;
-            }
-        }
-
-        // 7. 区县关键词扫描(新增)
-        $countyKeys = array_keys($countyMap);
-        usort($countyKeys, fn($a, $b) => mb_strlen($b) - mb_strlen($a));
-
-        foreach ($countyKeys as $key) {
-            if (mb_strpos($str, $key) !== false) {
-                $county = $countyMap[$key];
-                $provinceInfo = $provinceMap[$county['province_value']] ?? null;
-
-                $result = [
-                    'province' => $provinceInfo ?: ['label' => '', 'value' => $county['province_value']],
-                    'city' => ['label' => $county['city_label'], 'value' => $county['city_value']]
-                ];
-                $cache[$str] = $result;
-                return $result;
-            }
-        }
-
-        // 8. 最终匹配失败
-        $result = [
-            'province' => ['label' => '', 'value' => ''],
-            'city' => ['label' => '', 'value' => '']
-        ];
-        $cache[$str] = $result;
-        return $result;
-    }
-
-    // 优化省份匹配后的处理
-    function handleMatchedProvince($provinceKey, $remainder, $provinceMap, $cityMap, $countyMap, &$cache, $originalStr) {
-        $province = $provinceMap[$provinceKey];
-
-        // 0. 处理空余部分
-        if (empty($remainder)) {
-            $result = [
-                'province' => ['label' => $province['label'], 'value' => $province['value']],
-                'city' => ['label' => '', 'value' => '']
-            ];
-            $cache[$originalStr] = $result;
-            return $result;
-        }
-
-        // 1. 尝试完整匹配城市
-        if (isset($cityMap[$remainder])) {
-            $city = $cityMap[$remainder];
-            $result = [
-                'province' => ['label' => $province['label'], 'value' => $province['value']],
-                'city' => ['label' => $city['label'], 'value' => $city['value']]
-            ];
-            $cache[$originalStr] = $result;
-            return $result;
-        }
-
-        // 2. 尝试匹配区县(新增)
-        if (isset($countyMap[$remainder])) {
-            $county = $countyMap[$remainder];
-            $result = [
-                'province' => ['label' => $province['label'], 'value' => $province['value']],
-                'city' => ['label' => $county['city_label'], 'value' => $county['city_value']]
-            ];
-            $cache[$originalStr] = $result;
-            return $result;
-        }
-
-        // 3. 城市关键词扫描
-        $cityKeys = array_keys($cityMap);
-        usort($cityKeys, fn($a, $b) => mb_strlen($b) - mb_strlen($a));
-
-        foreach ($cityKeys as $key) {
-            if (mb_strpos($remainder, $key) !== false) {
-                $city = $cityMap[$key];
-                $result = [
-                    'province' => ['label' => $province['label'], 'value' => $province['value']],
-                    'city' => ['label' => $city['label'], 'value' => $city['value']]
-                ];
-                $cache[$originalStr] = $result;
-                return $result;
-            }
-        }
-
-        // 4. 区县关键词扫描(新增)
-        $countyKeys = array_keys($countyMap);
-        usort($countyKeys, fn($a, $b) => mb_strlen($b) - mb_strlen($a));
-
-        foreach ($countyKeys as $key) {
-            if (mb_strpos($remainder, $key) !== false) {
-                $county = $countyMap[$key];
-                $result = [
-                    'province' => ['label' => $province['label'], 'value' => $province['value']],
-                    'city' => ['label' => $county['city_label'], 'value' => $county['city_value']]
-                ];
-                $cache[$originalStr] = $result;
-                return $result;
-            }
-        }
-
-        // 5. 仅返回省份信息
-        $result = [
-            'province' => ['label' => $province['label'], 'value' => $province['value']],
-            'city' => ['label' => '', 'value' => '']
-        ];
-        $cache[$originalStr] = $result;
-        return $result;
-    }
-
-    //带转换数据
-    private function constructAddress3() {
-        $special = ["710000", "810000", "820000"];
-        $address2Data = config("address");
-        $extra_data = [];
-        foreach ($address2Data as $value){
-            if(in_array($value['value'], $special)){
-                $extra_data[] = $value;
-            }
-        }
-
-        // 1. 加载新数据结构
-        $address2Data = config("address2");
-        $address2Data = json_decode($address2Data, true);
-
-        // 2. 转换数据结构为旧格式
-        $addressData = [];
-        foreach ($address2Data as $province) {
-            $provinceEntry = [
-                'value' => $province['code'],
-                'label' => $province['name'],
-                'children' => []
-            ];
-            if(! isset($province['city'])) continue;
-
-            foreach ($province['city'] as $city) {
-                $cityEntry = [
-                    'value' => $city['code'],
-                    'label' => $city['name'],
-                    'children' => []
-                ];
-
-                foreach ($city['area'] as $area) {
-                    $cityEntry['children'][] = [
-                        'value' => $area['code'],
-                        'label' => $area['name']
-                    ];
-                }
-
-                $provinceEntry['children'][] = $cityEntry;
-            }
-
-            $addressData[] = $provinceEntry;
-        }
-
-        $addressData = array_merge_recursive($addressData, $extra_data);
-        echo json_encode($addressData);die;
-
-        $provinceMap = [];
-        $cityMap = [];
-        $countyMap = []; // 新增区县映射表
-
-        // 添加直辖市特殊处理
-        $municipalities = [
-            '110000' => ['北京', '北京市'],
-            '120000' => ['天津', '天津市'],
-            '310000' => ['上海', '上海市'],
-            '500000' => ['重庆', '重庆市']
-        ];
-
-        // 添加省级简称映射
-        $provinceAbbr = [
-            '内蒙古' => '内蒙古自治区',
-            '新疆' => '新疆维吾尔自治区',
-            '广西' => '广西壮族自治区',
-            '宁夏' => '宁夏回族自治区',
-            '西藏' => '西藏自治区'
-        ];
-
-        foreach ($addressData as $province) {
-            $pValue = $province['value'];
-            $pLabel = $province['label'];
-
-            // 添加省份全称和简称
-            $shortProvince = preg_replace('/(省|市|自治区|特别行政区)$/u', '', $pLabel);
-            $provinceMap[$pLabel] = ['label' => $pLabel, 'value' => $pValue];
-            $provinceMap[$shortProvince] = ['label' => $pLabel, 'value' => $pValue];
-            $provinceMap[$pValue] = ['label' => $pLabel, 'value' => $pValue]; // 新增:通过编码直接访问
-
-            // 添加省级简称
-            if (isset($provinceAbbr[$shortProvince])) {
-                $provinceMap[$shortProvince] = ['label' => $pLabel, 'value' => $pValue];
-            }
-
-            // 处理直辖市
-            if (isset($municipalities[$pValue])) {
-                $cityLabel = $municipalities[$pValue][1];
-                $cityMap[$cityLabel] = $cityMap[$municipalities[$pValue][0]] = [
-                    'label' => $cityLabel,
-                    'value' => $pValue,
-                    'province' => $pValue
-                ];
-
-                // 添加直辖市区县映射
-                foreach ($province['children'][0]['children'] as $district) {
-                    $dLabel = $district['label'];
-                    $countyMap[$dLabel] = [
-                        'city_label' => $cityLabel,
-                        'city_value' => $pValue,
-                        'province_value' => $pValue
-                    ];
-
-                    // 添加区县简称(去掉"区"字)
-                    $shortDistrict = preg_replace('/区$/', '', $dLabel);
-                    if ($shortDistrict !== $dLabel) {
-                        $countyMap[$shortDistrict] = $countyMap[$dLabel];
-                    }
-                }
-                continue;
-            }
-
-            // 处理普通城市和区县
-            foreach ($province['children'] as $city) {
-                $cValue = $city['value'];
-                $cLabel = $city['label'];
-
-                // 添加城市全称和简称
-                $shortCity = preg_replace('/市$/', '', $cLabel);
-                $cityMap[$cLabel] = [
-                    'label' => $cLabel,
-                    'value' => $cValue,
-                    'province' => $pValue
-                ];
-
-                $cityMap[$shortCity] = [
-                    'label' => $cLabel,
-                    'value' => $cValue,
-                    'province' => $pValue
-                ];
-
-                // 添加自治州特殊处理(如恩施)
-                if (strpos($cLabel, '自治州') !== false) {
-                    $autonomousShort = str_replace(['自治州', '土家族', '苗族', '壮族'], '', $cLabel);
-                    $cityMap[$autonomousShort] = [
-                        'label' => $cLabel,
-                        'value' => $cValue,
-                        'province' => $pValue
-                    ];
-                }
-
-                // 添加城市常见简称(特殊处理)
-                $specialAbbr = [
-                    '成都' => '成都市',
-                    '杭州' => '杭州市',
-                    '广州' => '广州市',
-                    '深圳' => '深圳市',
-                    '武汉' => '武汉市',
-                    '南京' => '南京市',
-                    '苏州' => '苏州市',
-                    '宁波' => '宁波市',
-                    '青岛' => '青岛市'
-                ];
-
-                if (isset($specialAbbr[$shortCity])) {
-                    $cityMap[$shortCity] = [
-                        'label' => $specialAbbr[$shortCity],
-                        'value' => $cValue,
-                        'province' => $pValue
-                    ];
-                }
-
-                // 添加区县映射
-                if (isset($city['children'])) {
-                    foreach ($city['children'] as $county) {
-                        $countyLabel = $county['label'];
-                        $countyMap[$countyLabel] = [
-                            'city_label' => $cLabel,
-                            'city_value' => $cValue,
-                            'province_value' => $pValue
-                        ];
-
-                        // 添加区县简称(去掉"区"/"县"字)
-                        $shortCounty = preg_replace('/(区|县|市)$/u', '', $countyLabel);
-                        if ($shortCounty !== $countyLabel) {
-                            $countyMap[$shortCounty] = $countyMap[$countyLabel];
-                        }
-                    }
-                }
-            }
-        }
-
-        return [$provinceMap, $cityMap, $countyMap]; // 返回三个映射表
-    }
-
-    private function constructAddress2(){
-        $addressData = config('address');
-        $provinceMap = [];
-        $cityMap = [];
-
-        // 添加直辖市特殊处理
-        $municipalities = [
-            '110000' => ['北京', '北京市'],
-            '120000' => ['天津', '天津市'],
-            '310000' => ['上海', '上海市'],
-            '500000' => ['重庆', '重庆市']
-        ];
-
-        // 添加省级简称映射
-        $provinceAbbr = [
-            '内蒙古' => '内蒙古自治区',
-            '新疆' => '新疆维吾尔自治区',
-            '广西' => '广西壮族自治区',
-            '宁夏' => '宁夏回族自治区',
-            '西藏' => '西藏自治区'
-        ];
-
-        foreach ($addressData as $province) {
-            $pValue = $province['value'];
-            $pLabel = $province['label'];
-
-            // 添加省份全称和简称
-            $shortProvince = preg_replace('/(省|市|自治区|特别行政区)$/u', '', $pLabel);
-            $provinceMap[$pLabel] = ['label' => $pLabel, 'value' => $pValue];
-            $provinceMap[$shortProvince] = ['label' => $pLabel, 'value' => $pValue];
-
-            // 添加省级简称
-            if (isset($provinceAbbr[$shortProvince])) {
-                $provinceMap[$shortProvince] = ['label' => $pLabel, 'value' => $pValue];
-            }
-
-            // 处理直辖市
-            if (isset($municipalities[$pValue])) {
-                $cityLabel = $municipalities[$pValue][1];
-                $cityMap[$cityLabel] = $cityMap[$municipalities[$pValue][0]] = [
-                    'label' => $cityLabel,
-                    'value' => $pValue,
-                    'province' => $pValue
-                ];
-                continue;
-            }
-
-            // 处理普通城市
-            foreach ($province['children'] as $city) {
-                $cValue = $city['value'];
-                $cLabel = $city['label'];
-
-                // 添加城市全称和简称
-                $shortCity = preg_replace('/市$/', '', $cLabel);
-                $cityMap[$cLabel] = [
-                    'label' => $cLabel,
-                    'value' => $cValue,
-                    'province' => $pValue
-                ];
-
-                $cityMap[$shortCity] = [
-                    'label' => $cLabel,
-                    'value' => $cValue,
-                    'province' => $pValue
-                ];
-
-                // 添加城市常见简称(特殊处理)
-                $specialAbbr = [
-                    '成都' => '成都市',
-                    '杭州' => '杭州市',
-                    '广州' => '广州市',
-                    '深圳' => '深圳市',
-                    '武汉' => '武汉市',
-                    '南京' => '南京市'
-                ];
-
-                if (isset($specialAbbr[$shortCity])) {
-                    $cityMap[$shortCity] = [
-                        'label' => $specialAbbr[$shortCity],
-                        'value' => $cValue,
-                        'province' => $pValue
-                    ];
-                }
-            }
-        }
-
-        return [$provinceMap, $cityMap];
-    }
-
-    function parseAddress2($str, $provinceMap, $cityMap) {
-        static $cache = [];
-        if (isset($cache[$str])) return $cache[$str];
-
-        $str = str_replace(['·', ' ', '-'], '', trim($str));
-
-        // 1. 处理直辖市简称
-        $municipalityShort = ['京', '沪', '津', '渝'];
-        $municipalityMap = [
-            '京' => '北京市',
-            '沪' => '上海市',
-            '津' => '天津市',
-            '渝' => '重庆市'
-        ];
-
-        if (in_array(mb_substr($str, 0, 1), $municipalityShort)) {
-            $cityName = $municipalityMap[mb_substr($str, 0, 1)];
-            $city = $cityMap[$cityName] ?? null;
-            if ($city) {
-                $result = [
-                    'province' => ['label' => $city['label'], 'value' => $city['province']],
-                    'city' => ['label' => $city['label'], 'value' => $city['value']]
-                ];
-                $cache[$str] = $result;
-                return $result;
-            }
-        }
-
-        // 2. 完整字符串匹配城市(加强版)
-        if (isset($cityMap[$str])) {
-            $city = $cityMap[$str];
-            $province = $provinceMap[$city['province']] ?? null;
-            $result = [
-                'province' => $province ? ['label' => $province['label'], 'value' => $province['value']] : ['label' => '', 'value' => ''],
-                'city' => ['label' => $city['label'], 'value' => $city['value']]
-            ];
-            $cache[$str] = $result;
-            return $result;
-        }
-
-        // 3. 优先匹配3字省份(如内蒙古)
-        if (mb_strlen($str) >= 3) {
-            $prefix = mb_substr($str, 0, 3);
-            if (isset($provinceMap[$prefix])) {
-                return $this->handleMatchedProvince($prefix, mb_substr($str, 3), $provinceMap, $cityMap, $cache, $str);
-            }
-        }
-
-        // 4. 匹配2字省份
-        if (mb_strlen($str) >= 2) {
-            $prefix = mb_substr($str, 0, 2);
-            if (isset($provinceMap[$prefix])) {
-                return $this->handleMatchedProvince($prefix, mb_substr($str, 2), $provinceMap, $cityMap, $cache, $str);
-            }
-        }
-
-        // 5. 城市关键词扫描(加强版)
-        $cityKeys = array_keys($cityMap);
-        usort($cityKeys, fn($a, $b) => mb_strlen($b) - mb_strlen($a));
-
-        foreach ($cityKeys as $key) {
-            if (mb_strpos($str, $key) !== false) {
-                $city = $cityMap[$key];
-                $province = $provinceMap[$city['province']] ?? null;
-
-                // 特殊处理:当匹配到城市时,尝试找回省份
-                if (!$province) {
-                    $province = $provinceMap[$city['province']] ?? ['label' => '', 'value' => ''];
-                }
-
-                $result = [
-                    'province' => ['label' => $province['label'], 'value' => $province['value']],
-                    'city' => ['label' => $city['label'], 'value' => $city['value']]
-                ];
-                $cache[$str] = $result;
-                return $result;
-            }
-        }
-
-        // 6. 最终匹配失败
-        $result = [
-            'province' => ['label' => '', 'value' => ''],
-            'city' => ['label' => '', 'value' => '']
-        ];
-        $cache[$str] = $result;
-        return $result;
-    }
-
-    // 优化省份匹配后的处理
-    function handleMatchedProvince2($provinceKey, $remainder, $provinceMap, $cityMap, &$cache, $originalStr) {
-        $province = $provinceMap[$provinceKey];
-
-        // 直辖市特殊处理
-        $municipalities = ['110000', '120000', '310000', '500000'];
-        if (in_array($province['value'], $municipalities)) {
-            $city = $cityMap[$province['label']] ?? null;
-            if ($city) {
-                $result = [
-                    'province' => ['label' => $province['label'], 'value' => $province['value']],
-                    'city' => ['label' => $city['label'], 'value' => $city['value']]
-                ];
-                $cache[$originalStr] = $result;
-                return $result;
-            }
-        }
-
-        // 尝试匹配剩余部分
-        if ($remainder !== '') {
-            // 先尝试完整匹配
-            if (isset($cityMap[$remainder])) {
-                $city = $cityMap[$remainder];
-                $result = [
-                    'province' => ['label' => $province['label'], 'value' => $province['value']],
-                    'city' => ['label' => $city['label'], 'value' => $city['value']]
-                ];
-                $cache[$originalStr] = $result;
-                return $result;
-            }
-
-            // 再尝试关键词扫描
-            $cityKeys = array_keys($cityMap);
-            usort($cityKeys, fn($a, $b) => mb_strlen($b) - mb_strlen($a));
-
-            foreach ($cityKeys as $key) {
-                if (mb_strpos($remainder, $key) !== false) {
-                    $city = $cityMap[$key];
-                    $result = [
-                        'province' => ['label' => $province['label'], 'value' => $province['value']],
-                        'city' => ['label' => $city['label'], 'value' => $city['value']]
-                    ];
-                    $cache[$originalStr] = $result;
-                    return $result;
-                }
-            }
-        }
-
-        // 仅返回省份信息
-        $result = [
-            'province' => ['label' => $province['label'], 'value' => $province['value']],
-            'city' => ['label' => '', 'value' => '']
-        ];
-        $cache[$originalStr] = $result;
-        return $result;
-    }
-
-    private function constructAddress1(){
-        $addressData = config('address');
-        // 构建映射表
-        $provinceMap = [];
-        $cityMap = [];
-
-        // 直辖市特殊处理(直接映射到市)
-        $municipalities = [
-            '110000' => ['北京', '北京市'],
-            '120000' => ['天津', '天津市'],
-            '310000' => ['上海', '上海市'],
-            '500000' => ['重庆', '重庆市']
-        ];
-
-        foreach ($addressData as $province) {
-            $pValue = $province['value'];
-            $pLabel = $province['label'];
-
-            // 生成省份简称
-            $shortProvince = preg_replace('/(省|市|自治区|特别行政区)$/u', '', $pLabel);
-            $provinceMap[$pLabel] = ['label' => $pLabel, 'value' => $pValue];
-            $provinceMap[$shortProvince] = ['label' => $pLabel, 'value' => $pValue];
-
-            // 处理直辖市(省市同名)
-            if (isset($municipalities[$pValue])) {
-                $cityLabel = $municipalities[$pValue][1];
-                $cityMap[$cityLabel] = $cityMap[$municipalities[$pValue][0]] = [
-                    'label' => $cityLabel,
-                    'value' => $pValue, // 直辖市使用省级代码
-                    'province' => $pValue
-                ];
-                continue;
-            }
-
-            // 处理普通城市
-            foreach ($province['children'] as $city) {
-                $cValue = $city['value'];
-                $cLabel = $city['label'];
-
-                // 生成城市简称
-                $shortCity = preg_replace('/市$/', '', $cLabel);
-                $cityMap[$cLabel] = [
-                    'label' => $cLabel,
-                    'value' => $cValue,
-                    'province' => $pValue
-                ];
-
-                if ($shortCity !== $cLabel) {
-                    $cityMap[$shortCity] = [
-                        'label' => $cLabel,
-                        'value' => $cValue,
-                        'province' => $pValue
-                    ];
-                }
-            }
-        }
-
-        return [$provinceMap, $cityMap];
-    }
-
-    // 解析函数
-    function parseAddress1($str, $provinceMap, $cityMap) {
-        static $cache = []; // 结果缓存
-        if (isset($cache[$str])) return $cache[$str];
-
-        $str = str_replace(['·', ' '], '', trim($str));
-
-        // 1. 处理带分隔符的格式 (广东-佛山)
-        if (preg_match('/[-\s]/', $str)) {
-            $parts = preg_split('/[-\s]+/', $str);
-            foreach ($parts as $part) {
-                if ($result = $this->parseAddress($part, $provinceMap, $cityMap)) {
-                    $cache[$str] = $result;
-                    return $result;
-                }
-            }
-        }
-
-        // 2. 完整字符串匹配城市
-        if (isset($cityMap[$str])) {
-            $city = $cityMap[$str];
-            $province = $provinceMap[$city['province']] ?? null;
-            $result = [
-                'province' => $province ? ['label' => $province['label'], 'value' => $province['value']] : ['label' => '', 'value' => ''],
-                'city' => ['label' => $city['label'], 'value' => $city['value']]
-            ];
-            $cache[$str] = $result;
-            return $result;
-        }
-
-        // 3. 优先匹配3字省份 (内蒙古)
-        if (mb_strlen($str) >= 3) {
-            $prefix = mb_substr($str, 0, 3);
-            if (isset($provinceMap[$prefix])) {
-                return $this->handleMatchedProvince($prefix, mb_substr($str, 3), $provinceMap, $cityMap, $cache, $str);
-            }
-        }
-
-        // 4. 匹配2字省份 (江苏)
-        if (mb_strlen($str) >= 2) {
-            $prefix = mb_substr($str, 0, 2);
-            if (isset($provinceMap[$prefix])) {
-                return $this->handleMatchedProvince($prefix, mb_substr($str, 2), $provinceMap, $cityMap, $cache, $str);
-            }
-        }
-
-        // 5. 城市关键词扫描 (解决"成都双流"类问题)
-        $cityKeys = array_keys($cityMap);
-        usort($cityKeys, fn($a, $b) => mb_strlen($b) - mb_strlen($a));
-
-        foreach ($cityKeys as $key) {
-            if (mb_strpos($str, $key) !== false) {
-                $city = $cityMap[$key];
-                $province = $provinceMap[$city['province']] ?? null;
-                $result = [
-                    'province' => $province ? ['label' => $province['label'], 'value' => $province['value']] : ['label' => '', 'value' => ''],
-                    'city' => ['label' => $city['label'], 'value' => $city['value']]
-                ];
-                $cache[$str] = $result;
-                return $result;
-            }
-        }
-
-        // 6. 最终匹配失败
-        $result = [
-            'province' => ['label' => '', 'value' => ''],
-            'city' => ['label' => '', 'value' => '']
-        ];
-        $cache[$str] = $result;
-        return $result;
-    }
-
-    // 省份匹配后的处理
-    function handleMatchedProvince1($provinceKey, $remainder, $provinceMap, $cityMap, &$cache, $originalStr) {
-        $province = $provinceMap[$provinceKey];
-
-        // 直辖市特殊处理
-        if (isset($provinceMap[$province['label']])) {
-            $city = $cityMap[$province['label']] ?? null;
-            if ($city) {
-                $result = [
-                    'province' => ['label' => $province['label'], 'value' => $province['value']],
-                    'city' => ['label' => $city['label'], 'value' => $city['value']]
-                ];
-                $cache[$originalStr] = $result;
-                return $result;
-            }
-        }
-
-        // 尝试匹配剩余部分
-        if ($remainder !== '' && isset($cityMap[$remainder])) {
-            $city = $cityMap[$remainder];
-            $result = [
-                'province' => ['label' => $province['label'], 'value' => $province['value']],
-                'city' => ['label' => $city['label'], 'value' => $city['value']]
-            ];
-            $cache[$originalStr] = $result;
-            return $result;
-        }
-
-        // 仅返回省份信息
-        $result = [
-            'province' => ['label' => $province['label'], 'value' => $province['value']],
-            'city' => ['label' => '', 'value' => '']
-        ];
-        $cache[$originalStr] = $result;
-        return $result;
-    }
-}

+ 0 - 295
app/Console/Commands/SalesWriteReport.php

@@ -1,295 +0,0 @@
-<?php
-
-namespace App\Console\Commands;
-
-use App\Model\AreaMap;
-use App\Model\BasicType;
-use App\Model\BasicTypeAllUse;
-use App\Model\Construction;
-use App\Model\Customer;
-use App\Model\CustomerInfo;
-use App\Model\CustomerReport;
-use App\Model\CustomerReportDepart;
-use App\Model\Depart;
-use App\Model\Employee;
-use App\Model\FollowUpRecord;
-use App\Model\PaymentReceipt;
-use App\Model\PaymentReceiptInfo;
-use App\Model\Product;
-use App\Model\PurchaseOrder;
-use App\Model\SalesOrder;
-use App\Model\SalesOrderInfo;
-use App\Model\SalesOrderOtherFee;
-use App\Model\SalesOrderProductInfo;
-use App\Model\SalesOrderReport;
-use App\Model\SeeRange;
-use App\Service\ProductService;
-use Illuminate\Console\Command;
-use Illuminate\Support\Facades\DB;
-
-class SalesWriteReport extends Command
-{
-    /**
-     * The name and signature of the console command.
-     *
-     * @var string
-     */
-    protected $signature = 'command:sales_write_report';
-
-    /**
-     * The console command description.
-     *
-     * @var string
-     */
-    protected $description = 'Command description';
-
-    /**
-     * Create a new command instance.
-     *
-     * @return void
-     */
-    public function __construct()
-    {
-        parent::__construct();
-    }
-
-    /**
-     * Execute the console command.
-     *
-     * @return mixed
-     */
-    public function handle()
-    {
-        echo "执行任务--------start---------------\n";
-
-        try {
-            $this->SalesWrite();
-        }catch (\Throwable $exception){
-            echo "发生异常:" . $exception->getFile() . "|" . $exception->getMessage() . "|" . $exception->getLine() . "\n";
-        }
-
-        echo "执行任务--------end---------------\n";
-    }
-
-    private function SalesWrite(){
-        //今天到上月今天的时间戳
-        $nowStamp = time();
-        $lastMonth = date("Y-m-d 00:00:00", strtotime("-1 month"));
-        $lastMonthStamp = strtotime($lastMonth);
-
-        $area = Depart::where('del_time',0)
-            ->where('parent_id',0)
-            ->pluck('area','id')
-            ->toArray();
-        SalesOrder::where("del_time",0)
-            ->where('crt_time','>=', $lastMonthStamp)
-            ->where('crt_time','<=', $nowStamp)
-            ->orderBy('id')
-            ->chunkById(200, function ($data) use($nowStamp, $area){
-                // 开启事务
-                DB::transaction(function () use ($data, $nowStamp, $area) {
-                    $dataArray = $data->toArray();
-                    $main = $this->processingData($dataArray, $nowStamp,$area);
-                    if (! empty($main)) {
-
-                        SalesOrderReport::whereIn('sale_order_id',array_column($dataArray,'id'))
-                            ->update(['del_time' => $nowStamp]);
-
-                        SalesOrderReport::insert($main);
-                        echo '200条写入中' . PHP_EOL;
-                    } else {
-                        echo '暂无数据写入' . PHP_EOL;
-                    }
-                });
-            });
-    }
-
-    private function processingData($data,$time,$area){
-        $id = array_column($data,'id');
-        $contact_product = $this->getSalesOrderProduct($id);
-        $customer = $this->getCustomer(array_column($data,'customer_id'));
-        $basic = $this->getBasic($data);
-        $zp_money = $this->getOtherMoney($id);
-        $fz_man = $this->getFzMan($id);
-        $construction = $this->getConstruction($id);
-        $payment = $this->getPayment(array_column($data,'order_number'));
-        $purchase = $this->getPurchaseFrom(array_filter(array_column($data,'contact_order_no')));
-
-        $insert = [];
-        foreach ($data as $value){
-            $receipt = $payment[$value['order_number']] ?? 0;
-            $contact_product_tmp = $contact_product[$value['id']] ?? [];
-            $contact_product_tmp_str = implode('、',$contact_product_tmp);
-            $customer_tmp = $customer[$value['customer_id']] ?? "";
-            $basic_tmp = $basic[$value['plat_type']] ?? "";
-            $area_tmp = $area[$value['top_depart_id']] ?? 0;
-            $zp_tmp = $zp_money[$value['id']] ?? 0;
-            $fz_tmp = $fz_man[$value['id']] ?? "";
-            $purchase_tmp = $purchase[$value['contact_order_no']] ?? 0;
-            $state = $this->makeState($value);
-            if(isset($construction[$value['id']])){
-                $c = $construction[$value['id']];
-                if($c <= Construction::STATE_THREE){
-                    $state_tmp = 2;
-                }elseif($c <= Construction::STATE_FIVE){
-                    $state_tmp = 3;
-                }else{
-                    $state_tmp = 4;
-                }
-            }else{
-                $state_tmp = $state;
-            }
-
-            $insert[] = [
-                'sale_order_id' => $value['id'],
-                'sales_order_type' => $value['sales_order_type'],
-                'receipt' => $receipt,
-                'model_type' => $value['model_type'],
-                'order_number' => $value['order_number'],
-                'contact_product' => $contact_product_tmp_str,
-                'fz_man' => $fz_tmp,
-                'plat_type_title' => $basic_tmp,
-                'customer_title' => $customer_tmp,
-                'crt_id' => $value['crt_id'],
-                'crt_time' => $value['crt_time'],
-                'contract_fee' => $value['contract_fee'],
-                'zp_contract_fee' => $zp_tmp,
-                'top_depart_id' => $value['top_depart_id'],
-                'from_top_depart_id' => $purchase_tmp,
-                'area' => $area_tmp,
-                'state' => $state_tmp,
-            ];
-        }
-
-        return $insert;
-    }
-
-    private function getSalesOrderProduct($data_id)
-    {
-        $product = [];
-        $sales_p_info = SalesOrderProductInfo::where('del_time',0)
-            ->whereIn('sales_order_id',$data_id)
-            ->select('product_id','sales_order_id')
-            ->get()->toArray();
-        $map = Product::whereIn('id',array_unique(array_column($sales_p_info,'product_id')))
-            ->pluck('title','id')
-            ->toArray();
-        foreach ($sales_p_info as $value){
-            $tmp = $map[$value['product_id']] ?? "";
-            $product[$value['sales_order_id']][] = $tmp;
-        }
-
-        return $product;
-    }
-
-    private function getCustomer($data_id)
-    {
-        return Customer::whereIn('id',$data_id)
-            ->pluck('title','id')
-            ->toArray();
-    }
-
-    private function getBasic($data)
-    {
-        $array = array_unique(array_column($data,'plat_type'));
-        return BasicType::whereIn('id',$array)
-            ->pluck('title','id')
-            ->toArray();
-    }
-
-    private function getOtherMoney($id){
-        $fee = [];
-        $sales_o_info = SalesOrderOtherFee::where('del_time',0)
-            ->whereIn('sales_order_id',$id)
-            ->get()->toArray();
-        foreach ($sales_o_info as $value){
-            $fee[$value['sales_order_id']] = $value['other_fee_1'];
-        }
-
-        return $fee;
-    }
-
-    private function getFzMan($id){
-        //单据中选择的负责人
-        $sales_order = SalesOrderInfo::where('del_time',0)
-            ->where('type',SalesOrderInfo::type_two)
-            ->whereIn('sales_order_id',$id)
-            ->select('sales_order_id','data_id')
-            ->get()->toArray();
-        $empList = Employee::whereIn('id', array_unique(array_column($sales_order,'data_id')))
-            ->pluck('emp_name','id')
-            ->toArray();
-        $employee_two = [];
-        foreach ($sales_order as $value){
-            $str = $empList[$value['data_id']] ?? "";
-            if(! $str) continue;
-            if(isset($employee_two[$value['sales_order_id']])){
-                $employee_two[$value['sales_order_id']] .= ',' . $str;
-            }else{
-                $employee_two[$value['sales_order_id']] = $str;
-            }
-        }
-
-        return $employee_two;
-    }
-
-    private function makeState($value){
-        if($value['sales_order_type'] == SalesOrder::Order_type_one){
-            //安装件
-            if(in_array($value['state'], [SalesOrder::State_minus_one, SalesOrder::State_zero, SalesOrder::State_one])){
-               return 0;
-            }elseif(in_array($value['state'], [SalesOrder::State_two, SalesOrder::State_three, SalesOrder::State_four])){
-                return 1;
-            }else{
-                return 1;
-            }
-        }else{
-            return 0;
-        }
-
-        return $state;
-    }
-
-    private function getConstruction($id){
-        $construction = Construction::where('del_time',0)
-            ->whereIn('sales_order_id', $id)
-            ->select('sales_order_id','state')
-            ->get()->toArray();
-        $return = [];
-        foreach ($construction as $value){
-            if(isset($return[$value['sales_order_id']])){
-                if($value['state'] > $return[$value['sales_order_id']]) $return[$value['sales_order_id']] = $value['state'];
-            }else{
-                $return[$value['sales_order_id']] = $value['state'];
-            }
-        }
-
-        return $return;
-    }
-
-    private function getPayment($id){
-        $infos = PaymentReceiptInfo::where('del_time',0)
-            ->where('type',PaymentReceiptInfo::type_three)//回款信息
-            ->where('data_order_type', PaymentReceipt::data_type_one)//合同
-            ->where('data_type', PaymentReceipt::type_one)//收款
-            ->whereIn('data_order_no',$id)
-            ->get()->toArray();
-        $infos_map = [];
-        foreach ($infos as $value){
-            if(isset($infos_map[$value['data_order_no']])){
-                $tmp = bcadd($value['amount'], $infos_map[$value['data_order_no']],2);
-                $infos_map[$value['data_order_no']] = $tmp;
-            }else{
-                $infos_map[$value['data_order_no']] = $value['amount'];
-            }
-        }
-
-        return $infos_map;
-    }
-
-    private function getPurchaseFrom($order_no){
-        return PurchaseOrder::whereIn('order_number',$order_no)
-            ->pluck('top_depart_id','order_number')
-            ->toArray();
-    }
-}

+ 0 - 126
app/Http/Controllers/Api/BasicTypeController.php

@@ -1,126 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\BasicTypeService;
-use Illuminate\Http\Request;
-
-class BasicTypeController extends BaseController
-{
-    public function basicTypeAdd(Request $request)
-    {
-        $service = new BasicTypeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->basicTypeAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function basicTypeEdit(Request $request)
-    {
-        $service = new BasicTypeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->basicTypeEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function basicTypeDel(Request $request)
-    {
-        $service = new BasicTypeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->basicTypeDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function basicTypeList(Request $request)
-    {
-        $service = new BasicTypeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->basicTypeList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function basicTypeCustomerList(Request $request)
-    {
-        $service = new BasicTypeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->basicTypeCustomerList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function basicTypeUseAdd(Request $request)
-    {
-        $service = new BasicTypeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->basicTypeAllUseAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function basicTypeUseEdit(Request $request)
-    {
-        $service = new BasicTypeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->basicTypeAllUseEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function basicTypeUseDel(Request $request)
-    {
-        $service = new BasicTypeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->basicTypeAllUseDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function basicTypeUseList(Request $request)
-    {
-        $service = new BasicTypeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->basicTypeAllUseList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 86
app/Http/Controllers/Api/BookingListController.php

@@ -1,86 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\BookingListService;
-use Illuminate\Http\Request;
-
-class BookingListController extends BaseController
-{
-    //金额记账
-    public function customerAdd(Request $request)
-    {
-        $service = new BookingListService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerEdit(Request $request)
-    {
-        $service = new BookingListService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerDel(Request $request)
-    {
-        $service = new BookingListService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerList(Request $request)
-    {
-        $service = new BookingListService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerDetail(Request $request)
-    {
-        $service = new BookingListService();
-        list($status,$data) = $service->customerDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerConfirm(Request $request)
-    {
-        $service = new BookingListService();
-        list($status,$data) = $service->customerConfirm($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 295
app/Http/Controllers/Api/ConstructionController.php

@@ -1,295 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\ConstructionService;
-use Barryvdh\DomPDF\Facade\Pdf;
-use Illuminate\Http\Request;
-
-class ConstructionController extends BaseController
-{
-    public function constructionAdd(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->constructionAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function constructionEdit(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->constructionEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function constructionEditOther(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->constructionEditOther($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function constructionEditSn(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->constructionEditSn($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function constructionDel(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->constructionDel($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function constructionList(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->constructionList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function constructionDetail(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function detailSn(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detailSn($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function constructionGet(Request $request)
-    {
-        $service = new ConstructionService();
-        list($status,$data) = $service->constructionGet($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-    public function deliveryNoteList(Request $request)
-    {
-        $service = new ConstructionService();
-        list($status,$data) = $service->deliveryNoteList($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function deliveryNoteDetail(Request $request)
-    {
-        $service = new ConstructionService();
-        list($status,$data) = $service->deliveryNoteDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-    public function deliveryNoteEdit(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->deliveryNoteEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function deliveryNoteDel(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->deliveryNoteDel($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function constructionPdf(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->constructionPdf($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function constructionOperation(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->constructionOperation($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function snListAccording(Request $request)
-    {
-        $service = new ConstructionService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->snListAccording($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function show(Request $request){
-        $construction = [
-          "id" => 45,
-          "model_type" => 1,
-          "order_number" => "WO0.202404021158317949",
-          "title" => "cs",
-          "customer_id" => 0,
-          "customer_contact_id" => 0,
-          "install_method" => 195,
-          "install_position" => 205,
-          "sales_order_id" => 170,
-          "construction_fee" => "26.82",
-          "service_price" => "0.00",
-          "crt_id" => 91,
-          "del_time" => 0,
-          "crt_time" => "2024-04-02 11:58:52",
-          "upd_time" => "1712913661",
-          "mark" => "",
-          "construction_time" => 0,
-          "handover_time" => "",
-          "urgency" => 0,
-          "state" => 2,
-          "pq_state" => 1,
-          "address1" => "",
-          "address2" => "",
-          "introduction" => "",
-          "depart_id" => 46,
-          "top_depart_id" => 2,
-          "storehouse_id" => 10,
-          "start_time" => 1711987200,
-          "end_time" => 1711987200,
-          "schedule_id" => 19,
-          "day_stamp" => 1713715200,
-          "day_start_stamp" => 1713715200,
-          "day_end_stamp" => 1713715260,
-          "customer_title" => "",
-          "sales_order_number" => "T9XS.202404021129349107",
-          "crt_name" => "苏盈心  三部  13772835000",
-          "xt_name" => "",
-        ];
-        $product = [
-         [
-            "id" => 94,
-            "construction_id" => 45,
-            "product_id" => 4018,
-            "del_time" => 0,
-            "crt_time" => "1712210724",
-            "upd_time" => "0",
-            "number" => "1.00",
-            "mark" => "",
-            "cost" => "0.00",
-            "retail_price" => "889.00",
-            "storehouse_id" => 10,
-            "basic_type_id" => 0,
-            "price" => "889.00",
-            "final_amount" => "893.84",
-            "count" => 1,
-            "title" => "全新智能香氛等离子系统",
-            "code" => "1000004536",
-            "size" => "Model 3/Y",
-            "unit" => "套",
-          ]
-        ];
-        $detail =  [
-            0 => "陈建斌 技术部,技术部 15372086866|高健 技术部,技术部 13388601173"
-        ];
-        $pdf = Pdf::loadView('pdf.construction', ['order' => $construction,'product'=>$product,'detail'=>$detail]);
-
-        return $pdf->stream('11.pdf');
-//        return response($pdf->output())
-//            ->header('Content-Type', 'application/pdf')
-//            ->header('Content-Disposition', 'attachment; filename="report.pdf"');
-//
-        return $pdf->download('report.pdf');
-
-        return view('pdf.construction',['order' => $construction,'product'=>$product]);
-    }
-}

+ 0 - 73
app/Http/Controllers/Api/ContactsController.php

@@ -1,73 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\ContactsService;
-use Illuminate\Http\Request;
-
-class ContactsController extends BaseController
-{
-    public function contactsAdd(Request $request)
-    {
-        $service = new ContactsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->contactsAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function contactsEdit(Request $request)
-    {
-        $service = new ContactsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->contactsEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function contactsDel(Request $request)
-    {
-        $service = new ContactsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->contactsDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function contactsList(Request $request)
-    {
-        $service = new ContactsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->contactsList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function contactsDetail(Request $request)
-    {
-        $service = new ContactsService();
-        list($status,$data) = $service->contactsDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 163
app/Http/Controllers/Api/CustomerController.php

@@ -1,163 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Jobs\CustomerReceivingThirdPlatFormJob;
-use App\Model\CustomerFromThreePlatForm;
-use App\Service\CustomerService;
-use Illuminate\Http\Request;
-
-class CustomerController extends BaseController
-{
-    public function receivingCustomer(Request $request)
-    {
-        $data = $request->all();
-
-        CustomerReceivingThirdPlatFormJob::dispatch($data)->onQueue(CustomerFromThreePlatForm::job);
-
-        return ["code"=> "200", "msg"=> "SUCCESS"];
-    }
-
-    public function customerAdd(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerEdit(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerImportanceEdit(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerImportanceEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerDel(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerList(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerWxList(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerWxList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerRepeatList(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerRepeatList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerList2(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerList2($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerDetail(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerDetail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerGrabbing(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerGrabbing($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerSendWx(Request $request)
-    {
-        $service = new CustomerService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerSendWx($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 22
app/Http/Controllers/Api/DaHuangFengController.php

@@ -1,22 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\DaHuangFengService;
-use Illuminate\Http\Request;
-
-class DaHuangFengController extends BaseController
-{
-    public function getChatDetail(Request $request)
-    {
-        $service = new DaHuangFengService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getOrderDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 71
app/Http/Controllers/Api/DeleteController.php

@@ -1,71 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\DeleteService;
-use Illuminate\Http\Request;
-
-class DeleteController extends BaseController
-{
-    public function getMan(Request $request)
-    {
-        $service = new DeleteService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getMan($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function delete(Request $request)
-    {
-        $service = new DeleteService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->delete($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function fp(Request $request){
-        $service = new DeleteService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->fp($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function yj(Request $request){
-        $service = new DeleteService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->yj($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function pq(Request $request){
-        $service = new DeleteService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->pq($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 49
app/Http/Controllers/Api/DouShopController.php

@@ -1,49 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Model\BasicType;
-use App\Service\DouShopService;
-use Illuminate\Http\Request;
-
-class DouShopController extends BaseController
-{
-    public function douShopOrderList(Request $request)
-    {
-        $service = new DouShopService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getOrderList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function douShopOrderDetail(Request $request)
-    {
-        $service = new DouShopService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getOrderDetail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function insertDouOrder(Request $request)
-    {
-        $service = new DouShopService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->insertDouOrder($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 35
app/Http/Controllers/Api/ExcelController.php

@@ -1,35 +0,0 @@
-<?php
-namespace App\Http\Controllers\Api;
-
-use App\Exports\MyExport;
-use App\Service\Excel\ExcelService;
-use Illuminate\Http\Request;
-
-//导入导出
-class ExcelController extends BaseController
-{
-    /**
-     * 下载
-     * @param Request $request
-     * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
-     */
-    public function excelDownload(Request $request){
-
-        $data = $request->all();
-        $file_name = $data['file_name'];
-        $excel = new MyExport();
-        return  $excel->excelDownload($file_name);
-    }
-
-    public function excelExport(Request $request){
-        $service = new ExcelService();
-        list($status,$data) = $service->excelExport($request);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-}

+ 0 - 87
app/Http/Controllers/Api/FollowUpRecordController.php

@@ -1,87 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\FollowUpRecordService;
-use Illuminate\Http\Request;
-
-class FollowUpRecordController extends BaseController
-{
-    public function followUpRecordEdit(Request $request)
-    {
-        $service = new FollowUpRecordService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->followUpRecordEdit($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-    
-    public function followUpRecordAdd(Request $request)
-    {
-        $service = new FollowUpRecordService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->followUpRecordAdd($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-    
-    public function followUpRecordDel(Request $request)
-    {
-        $service = new FollowUpRecordService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->followUpRecordDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function followUpRecordList(Request $request)
-    {
-        $service = new FollowUpRecordService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->followUpRecordList($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function followUpRecordDetail(Request $request)
-    {
-        $service = new FollowUpRecordService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->followUpRecordDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function followUpRecordBatchAdd(Request $request)
-    {
-        $service = new FollowUpRecordService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->followUpRecordBatchAdd($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 61
app/Http/Controllers/Api/HeaderWordController.php

@@ -1,61 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-
-use App\Service\HeaderWord\HeaderWordHookService;
-use App\Service\ProcessService;
-use Illuminate\Http\Request;
-
-
-class HeaderWordController extends BaseController
-{
-    public function getHeaderWord(Request $request)
-    {
-        $service =  HeaderWordHookService::getInstance();
-        $data = $request->all();
-        list($status,$data) = $service->getHeaderWord($data);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function getHeaderSettings(Request $request){
-        $service =  HeaderWordHookService::getInstance();
-        $data = $request->all();
-        list($status,$data) = $service->getHeaderSettings($data);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function add(Request $request){
-        $service =  HeaderWordHookService::getInstance();
-        $data = $request->all();
-        list($status,$data) = $service->add($data);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function detail(Request $request){
-        $service =  HeaderWordHookService::getInstance();
-        $data = $request->all();
-        list($status,$data) = $service->detail($data);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 42
app/Http/Controllers/Api/IOController.php

@@ -1,42 +0,0 @@
-<?php
-namespace App\Http\Controllers\Api;
-
-use App\Exports\MyExport;
-use App\Service\IOService;
-use Illuminate\Http\Request;
-
-
-//导入导出
-class IOController extends BaseController
-{
-    /**
-     * 下载
-     * @param Request $request
-     * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
-     */
-    public function excelDownload(Request $request){
-
-        $data = $request->all();
-        $file_name = $data['file_name'];
-        $excel = new MyExport();
-        return  $excel->excelDownload($file_name);
-    }
-
-
-    public function apiExport(Request $request){
-
-
-
-//        $data = $request->all();
-
-        $service = new IOService();
-        list($status,$data) = $service->apiExport($request);
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-
-    }
-}

+ 0 - 74
app/Http/Controllers/Api/InventoryController.php

@@ -1,74 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\InventoryService;
-use Illuminate\Http\Request;
-
-class InventoryController extends BaseController
-{
-    public function inventoryAdd(Request $request)
-    {
-        $service = new InventoryService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function inventoryEdit(Request $request)
-    {
-        $service = new InventoryService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function inventoryDetail(Request $request)
-    {
-        $service = new InventoryService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function inventoryDel(Request $request)
-    {
-        $service = new InventoryService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function inventoryList(Request $request)
-    {
-        $service = new InventoryService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 74
app/Http/Controllers/Api/InvoiceOrderController.php

@@ -1,74 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\InvoiceOrderService;
-use Illuminate\Http\Request;
-
-class InvoiceOrderController extends BaseController
-{
-    public function invoiceOrderAdd(Request $request)
-    {
-        $service = new InvoiceOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function invoiceOrderEdit(Request $request)
-    {
-        $service = new InvoiceOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function invoiceOrderDetail(Request $request)
-    {
-        $service = new InvoiceOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function invoiceOrderDel(Request $request)
-    {
-        $service = new InvoiceOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function invoiceOrderList(Request $request)
-    {
-        $service = new InvoiceOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 372
app/Http/Controllers/Api/OaController.php

@@ -1,372 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-
-use App\Service\OaService;
-use Illuminate\Http\Request;
-
-
-class OaController extends BaseController
-{
-
-    public function oaList(Request $request)
-    {
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-
-        list($status,$data) = $service->oaList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function oaDetail(Request $request)
-    {
-
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function oaUserDetail(Request $request){
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaUserDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function oaParam(Request $request){
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaParam($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function oaFormula(Request $request){
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaFormula($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function oaAdd(Request $request)
-    {
-
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaAdd($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function oaEdit(Request $request)
-    {
-
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function oaDel(Request $request)
-    {
-
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-
-    public function createOaOrder(Request $request)
-    {
-
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->createOaOrder($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(400,$data);
-        }
-
-    }
-
-
-
-
-    public function oaOrderDetail(Request $request)
-    {
-
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaOrderDetail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-    public function oaCheck(Request $request)
-    {
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaCheck($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function oaSubType(Request $request)
-    {
-
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaSubType($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function oaGetData(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaGetData($request);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-
-    public function oaOrderState(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaOrderState($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-
-
-    public function oaOrderList(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaOrderList($request);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-    public function checkAllOver(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->checkAllOver($request);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-
-    public function oaCheckMove(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaCheckMove($request,$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-    public function oaSubUserDetail(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaSubUserDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function oaSubRemark(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaSubRemark($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function reportList(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->reportList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-    public function reportCount(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->reportCount($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-    public function reportCheck(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->reportCheck($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-    public function reportTime(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->reportTime($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-    public function oaGetTeamDetail(Request $request){
-
-        $userData = $request->userData->toArray();
-        $service = new OaService($userData);
-        list($status,$data) = $service->oaGetTeamDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function oaParamGet(Request $request){
-        $oa = config('oa');
-        foreach ($oa as $key => $value){
-            if($value['menu_id'] == 16) unset($oa[$key]);
-        }
-
-        return $this->json_return(200,'', array_values($oa));
-    }
-
-
-
-
-
-
-
-}

+ 0 - 53
app/Http/Controllers/Api/OperationLogController.php

@@ -1,53 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-
-use App\Service\OaService;
-use App\Service\OperationLogService;
-use Illuminate\Http\Request;
-
-
-class OperationLogController extends BaseController
-{
-
-
-
-
-
-    public function getOperationList(Request $request)
-    {
-
-
-        $service = new OperationLogService();
-        list($status,$data) = $service->getOperationList($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function setOperationList(Request $request){
-        $service = new OperationLogService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->setOperationList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-
-
-
-
-
-
-
-}

+ 0 - 87
app/Http/Controllers/Api/OutBoundOrderController.php

@@ -1,87 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\OutBoundOrderService;
-use Illuminate\Http\Request;
-
-class OutBoundOrderController extends BaseController
-{
-    public function add(Request $request)
-    {
-        $service = new OutBoundOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function edit(Request $request)
-    {
-        $service = new OutBoundOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function detail(Request $request)
-    {
-        $service = new OutBoundOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function del(Request $request)
-    {
-        $service = new OutBoundOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function orderList(Request $request)
-    {
-        $service = new OutBoundOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function outBoundGetProduct(Request $request)
-    {
-        $service = new OutBoundOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->outBoundGetProduct($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 85
app/Http/Controllers/Api/PaymentReceiptController.php

@@ -1,85 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\PaymentReceiptService;
-use Illuminate\Http\Request;
-
-class PaymentReceiptController extends BaseController
-{
-    public function paymentReceiptGet(Request $request){
-        $service = new PaymentReceiptService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->paymentReceiptGet($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function paymentReceiptAdd(Request $request)
-    {
-        $service = new PaymentReceiptService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function paymentReceiptEdit(Request $request)
-    {
-        $service = new PaymentReceiptService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function paymentReceiptDel(Request $request)
-    {
-        $service = new PaymentReceiptService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function paymentReceiptList(Request $request)
-    {
-        $service = new PaymentReceiptService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function paymentReceiptDetail(Request $request)
-    {
-        $service = new PaymentReceiptService();
-        list($status,$data) = $service->customerDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 77
app/Http/Controllers/Api/ProductActivityController.php

@@ -1,77 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-
-use App\Service\ProductActivityService;
-use Illuminate\Http\Request;
-
-class ProductActivityController extends BaseController
-{
-    public function productEdit(Request $request)
-    {
-        $service = new ProductActivityService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->productEdit($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function productAdd(Request $request)
-    {
-        $service = new ProductActivityService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->productAdd($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function productDel(Request $request)
-    {
-        $service = new ProductActivityService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->productDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function productList(Request $request)
-    {
-        $service = new ProductActivityService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->productList($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function productDetail(Request $request)
-    {
-        $service = new ProductActivityService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->productDetail($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 74
app/Http/Controllers/Api/ProductAdjustmentController.php

@@ -1,74 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\ProductAdjustService;
-use Illuminate\Http\Request;
-
-class ProductAdjustmentController extends BaseController
-{
-    public function productAdjustmentAdd(Request $request)
-    {
-        $service = new ProductAdjustService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function productAdjustmentEdit(Request $request)
-    {
-        $service = new ProductAdjustService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function productAdjustmentDetail(Request $request)
-    {
-        $service = new ProductAdjustService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function productAdjustmentDel(Request $request)
-    {
-        $service = new ProductAdjustService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function productAdjustmentList(Request $request)
-    {
-        $service = new ProductAdjustService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 89
app/Http/Controllers/Api/ProductInventoryController.php

@@ -1,89 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-
-use App\Service\ProductInventoryService;
-use App\Service\ProductService;
-use Illuminate\Http\Request;
-
-class ProductInventoryController extends BaseController
-{
-    public function productInventoryList(Request $request)
-    {
-        $service = new ProductInventoryService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->productInventoryList($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function productInventoryStockList(Request $request)
-    {
-        $service = new ProductInventoryService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->productInventoryStockList($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function productInventorySetList(Request $request)
-    {
-        $service = new ProductInventoryService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->productInventorySetList($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function productInventorySet(Request $request)
-    {
-        $service = new ProductInventoryService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->productInventorySet($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function getMySetting(Request $request)
-    {
-        $service = new ProductInventoryService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->getMySetting($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function manSetting(Request $request)
-    {
-        $service = new ProductInventoryService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->manSetting($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 76
app/Http/Controllers/Api/PurchaseOrderController.php

@@ -1,76 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\ProductService;
-use App\Service\PurchaseOrderService;
-use Illuminate\Http\Request;
-
-class PurchaseOrderController extends BaseController
-{
-    public function purchaseOrderAdd(Request $request)
-    {
-        $service = new PurchaseOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function purchaseOrderEdit(Request $request)
-    {
-        $service = new PurchaseOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function purchaseOrderDetail(Request $request)
-    {
-        $service = new PurchaseOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function purchaseOrderDel(Request $request)
-    {
-        $service = new PurchaseOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function purchaseOrderList(Request $request)
-    {
-        $service = new PurchaseOrderService();
-        if(is_array($request->userData)) $userData = $request->userData;
-        else $userData = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 87
app/Http/Controllers/Api/PurchaseOrderSpecialController.php

@@ -1,87 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\PurchaseOrderSpecialService;
-use Illuminate\Http\Request;
-
-class PurchaseOrderSpecialController extends BaseController
-{
-    public function purchaseOrderAdd(Request $request)
-    {
-        $service = new PurchaseOrderSpecialService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function purchaseOrderEdit(Request $request)
-    {
-        $service = new PurchaseOrderSpecialService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function purchaseOrderDetail(Request $request)
-    {
-        $service = new PurchaseOrderSpecialService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function purchaseOrderDel(Request $request)
-    {
-        $service = new PurchaseOrderSpecialService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function purchaseOrderList(Request $request)
-    {
-        $service = new PurchaseOrderSpecialService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function purchaseOrderSubmit(Request $request)
-    {
-        $service = new PurchaseOrderSpecialService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->purchaseOrderSubmit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 22
app/Http/Controllers/Api/RangeController.php

@@ -1,22 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\RangeService;
-use Illuminate\Http\Request;
-
-class RangeController extends BaseController
-{
-    public function seeRange(Request $request)
-    {
-        $service = new RangeService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->seeRange($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 74
app/Http/Controllers/Api/ReturnExchangeOrderController.php

@@ -1,74 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\ReturnExchangeOrderService;
-use Illuminate\Http\Request;
-
-class ReturnExchangeOrderController extends BaseController
-{
-    public function ReturnExchangeOrderAdd(Request $request)
-    {
-        $service = new ReturnExchangeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function ReturnExchangeOrderEdit(Request $request)
-    {
-        $service = new ReturnExchangeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function ReturnExchangeOrderDetail(Request $request)
-    {
-        $service = new ReturnExchangeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function ReturnExchangeOrderDel(Request $request)
-    {
-        $service = new ReturnExchangeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function ReturnExchangeOrderList(Request $request)
-    {
-        $service = new ReturnExchangeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 203
app/Http/Controllers/Api/SalesOrderController.php

@@ -1,203 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\SalesOrderService;
-use Illuminate\Http\Request;
-
-class SalesOrderController extends BaseController
-{
-    public function refundOption(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->refundOption($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderAdd(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderEdit(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderDel(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderList(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderClose(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderClose($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderDetail(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderGet(Request $request)
-    {
-        $service = new SalesOrderService();
-        list($status,$data) = $service->salesOrderGet($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderDispatchSale(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderDispatchSale($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderDispatchCompany(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderDispatchCompany($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function batchConfirm(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->batchConfirm($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderBatchDispatchCompany(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderBatchDispatchCompany($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderGetBuildFee(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderGetBuildFee($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesClickOut(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesClickOut($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function salesOrderPdf(Request $request)
-    {
-        $service = new SalesOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->salesOrderPdf($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 155
app/Http/Controllers/Api/ScheduleController.php

@@ -1,155 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-
-use App\Service\ScheduleService;
-use Illuminate\Http\Request;
-
-class ScheduleController extends BaseController
-{
-    public function edit(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function add(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function del(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-
-    }
-
-    public function getList(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function detail(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function scheduleGetForConstruction(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->scheduleGetForConstruction($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function getScheduleSetting(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->getScheduleSetting($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function getSettingTotal(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->getSettingTotal($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function getSettingGetDetail(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->getSettingGetDetail($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function getSettingTotal2(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->getSettingTotal2($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function getSettingGetDetail2(Request $request)
-    {
-        $service = new ScheduleService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->getSettingGetDetail2($request->all(),$user);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 87
app/Http/Controllers/Api/SportsBagController.php

@@ -1,87 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\SportsBagService;
-use Illuminate\Http\Request;
-
-class SportsBagController extends BaseController
-{
-    public function add(Request $request)
-    {
-        $service = new SportsBagService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function edit(Request $request)
-    {
-        $service = new SportsBagService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function detail(Request $request)
-    {
-        $service = new SportsBagService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function del(Request $request)
-    {
-        $service = new SportsBagService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function orderList(Request $request)
-    {
-        $service = new SportsBagService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function sportsBagSendWx(Request $request)
-    {
-        $service = new SportsBagService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->sportsBagSendWx($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 213
app/Http/Controllers/Api/StatisticsController.php

@@ -1,213 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\StatisticsService;
-use Illuminate\Http\Request;
-
-class StatisticsController extends BaseController
-{
-    public function statisticsBt(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->statisticsBt($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function statisticsProvince(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->statisticsProvince($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function statisticsArea(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->statisticsArea($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function statisticsAreaDepart(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->statisticsAreaDepart($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function statisticsAreaDepartProduct(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->statisticsAreaDepartProduct($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function statisticsModelTypeOne(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->statisticsModelTypeOne($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function statisticsModelTypeFour(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->statisticsModelTypeFour($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function statisticsJc(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->statisticsJcNew($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function statisticsCustomer(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->statisticsCustomer($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerReportStepOfFirst(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerReportStepOfFirst($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerReportStepOfSecond(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerReportStepOfSecond($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerReportStepOfThird(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerReportStepOfThird($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function saleReportStepOfFirst(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->saleReportStepOfFirst($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function saleReportStepOfSecond(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->saleReportStepOfSecond($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function saleReportStepOfThird(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->saleReportStepOfThird($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function saleReportStepOfFour(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->saleReportStepOfFour($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function saleReportStepOfFive(Request $request){
-        $service = new StatisticsService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->saleReportStepOfFive($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 76
app/Http/Controllers/Api/StorehouseController.php

@@ -1,76 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-
-use App\Service\BoxService;
-use App\Service\StorehouseService;
-use Illuminate\Http\Request;
-
-
-class StorehouseController extends BaseController
-{
-    public function add(Request $request)
-    {
-        $service = new StorehouseService();
-        list($status,$data) = $service->add($request->all(), $userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function edit(Request $request)
-    {
-        $service = new StorehouseService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(), $userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function del(Request $request)
-    {
-        $service = new StorehouseService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-
-    public function storehouseList(Request $request)
-    {
-        $service = new StorehouseService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->storehouseList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function storehouseDetail(Request $request)
-    {
-        $service = new StorehouseService();
-        list($status,$data) = $service->storeDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 74
app/Http/Controllers/Api/SupplierController.php

@@ -1,74 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\SupplierService;
-use Illuminate\Http\Request;
-
-class SupplierController extends BaseController
-{
-    //供应商
-    public function customerAdd(Request $request)
-    {
-        $service = new SupplierService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerEdit(Request $request)
-    {
-        $service = new SupplierService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerEdit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerDel(Request $request)
-    {
-        $service = new SupplierService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerDel($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerList(Request $request)
-    {
-        $service = new SupplierService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->customerList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function customerDetail(Request $request)
-    {
-        $service = new SupplierService();
-        list($status,$data) = $service->customerDetail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 207
app/Http/Controllers/Api/TSpaceController.php

@@ -1,207 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\TSpaceService;
-use Illuminate\Http\Request;
-
-class TSpaceController extends BaseController
-{
-    public function add(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function edit(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function detail(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function tSpaceList(Request $request)
-    {
-        $service = new TSpaceService();
-        list($status,$data) = $service->tSpaceList($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function warrantyGetProduct(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->warrantyGetProduct($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function needSnFix(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->needSnFix($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function warrantyAdd(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->warrantyAdd($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function saveWarrantyByMyself(Request $request)
-    {
-        $service = new TSpaceService();
-        list($status,$data) = $service->saveWarrantyByMyself($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function getWarrantyNotActiveList(Request $request)
-    {
-        $service = new TSpaceService();
-        list($status,$data) = $service->getWarrantyNotActiveList($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function warrantyActivationCustomer(Request $request)
-    {
-        $service = new TSpaceService();
-        list($status,$data) = $service->warrantyActivationCustomer($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function warrantyList(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->warrantyList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function warrantyActivation(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->warrantyActivation($request->all(), $userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function warrantyEditAndActivation(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->warrantyEditAndActivation($request->all(), $userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function warrantyDel(Request $request)
-    {
-        $service = new TSpaceService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->warrantyDel($request->all(), $userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function searchWarranty(Request $request)
-    {
-        $service = new TSpaceService();
-        list($status,$data) = $service->searchWarranty($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function StoreSearch(Request $request)
-    {
-        $service = new TSpaceService();
-        list($status,$data) = $service->StoreSearch($request->all());
-
-        return $data;
-    }
-}

+ 0 - 74
app/Http/Controllers/Api/TakeOrderController.php

@@ -1,74 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\TakeOrderService;
-use Illuminate\Http\Request;
-
-class TakeOrderController extends BaseController
-{
-    public function invoiceOrderAdd(Request $request)
-    {
-        $service = new TakeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->add($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function invoiceOrderEdit(Request $request)
-    {
-        $service = new TakeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->edit($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function invoiceOrderDetail(Request $request)
-    {
-        $service = new TakeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->detail($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function invoiceOrderDel(Request $request)
-    {
-        $service = new TakeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->del($request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function invoiceOrderList(Request $request)
-    {
-        $service = new TakeOrderService();
-        $userData = $request->userData->toArray();
-        list($status,$data) = $service->getList($request->all(),$userData);
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 74
app/Http/Controllers/Api/TechnologyController.php

@@ -1,74 +0,0 @@
-<?php
-
-namespace App\Http\Controllers\Api;
-
-use App\Service\TechnologyService;
-use Illuminate\Http\Request;
-
-class TechnologyController extends BaseController
-{
-    public function technologyList(Request $request)
-    {
-        $service = new TechnologyService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->technologyList($request->all(),$request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function technologyEdit(Request $request)
-    {
-        $service = new TechnologyService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->technologyEdit($request->all(),$request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function technologyAdd(Request $request)
-    {
-        $service = new TechnologyService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->technologyAdd($request->all(),$request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function technologyDel(Request $request)
-    {
-        $service = new TechnologyService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->technologyDel($request->all(),$request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-
-    public function technologyCopy(Request $request)
-    {
-        $service = new TechnologyService();
-        $user = $request->userData->toArray();
-        list($status,$data) = $service->technologyCopy($request->all(),$request->all());
-
-        if($status){
-            return $this->json_return(200,'',$data);
-        }else{
-            return $this->json_return(201,$data);
-        }
-    }
-}

+ 0 - 1
app/Http/Kernel.php

@@ -67,7 +67,6 @@ class Kernel extends HttpKernel
         'checkWx' => \App\Http\Middleware\CheckWx::class,
         'checkWeixin' => \App\Http\Middleware\CheckWeinxin::class,
         'OssFileDeal' => \App\Http\Middleware\OssFileDeal::class,
-        'OrderDeal' => \App\Http\Middleware\OrderDeal::class,
     ];
 
     /**

+ 0 - 50
app/Http/Middleware/OrderDeal.php

@@ -1,50 +0,0 @@
-<?php
-namespace App\Http\Middleware;
-
-use App\Model\OrderInventoryStock;
-use Closure;
-use Illuminate\Http\Request;
-use Symfony\Component\HttpFoundation\Response;
-
-class OrderDeal
-{
-    /**
-     * Handle an incoming request.
-     *
-     * @param  \Illuminate\Http\Request  $request
-     * @param  \Closure  $next
-     * @return mixed
-     */
-    public function handle(Request $request, Closure $next)
-    {
-        // 在这里可以添加请求前的操作,但通常我们只关心请求后的操作。
-        return $next($request);
-    }
-
-    /**
-     * Handle the request termination.
-     *
-     * @param  \Illuminate\Http\Request  $request
-     * @param  \Illuminate\Http\Response  $response
-     * @return void
-     */
-    public function terminate(Request $request, Response $response)
-    {
-        $return = json_decode($response->content(),true);
-
-        if(isset($return['code']) && $return['code'] == 200){
-            if(! empty($return['data'])){
-                $result = $return['data'];
-
-                if(! empty($result['order'])){
-                    $insert = $result['order'];
-                    if(empty($insert['order_number'])) return;
-                    $model = new OrderInventoryStock();
-                    $model->order_number = $insert['order_number'];
-                    $model->is_check_stock = $insert['is_check_stock'];
-                    $model->save();
-                }
-            }
-        }
-    }
-}

+ 2 - 3
app/Http/Middleware/RequestLog.php

@@ -31,9 +31,8 @@ class RequestLog
             $ip = '0.0.0.0';
         }
         $params = $request->all();
-        if($request->path() != 'api/reportCount'){
-            Log::channel('request')->info('request', ['param'=>$params,'ip' => $ip,'uri'=>$request->path()]);
-        }
+        Log::channel('request')->info('request', ['param'=>$params,'ip' => $ip,'uri'=>$request->path()]);
+
         return $next($request);
     }
 }

+ 0 - 75
app/Jobs/CustomerReceivingThirdPlatFormJob.php

@@ -1,75 +0,0 @@
-<?php
-
-namespace App\Jobs;
-
-use App\Model\CustomerFromThreePlatForm;
-use Illuminate\Bus\Queueable;
-use Illuminate\Contracts\Queue\ShouldQueue;
-use Illuminate\Foundation\Bus\Dispatchable;
-use Illuminate\Queue\InteractsWithQueue;
-use Illuminate\Queue\SerializesModels;
-use Illuminate\Support\Facades\Log;
-use Symfony\Component\Console\Output\OutputInterface;
-
-class CustomerReceivingThirdPlatFormJob implements ShouldQueue
-{
-    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
-
-    protected $data;
-
-    public function __construct($data)
-    {
-        $this->data = $data;
-    }
-
-    public function handle()
-    {
-        try {
-            if(empty($this->data) || empty($this->data["data"])) {
-                $this->delete();
-                return;
-            }
-            $data = $this->data["data"];
-            $array = json_decode($data,true);
-            $content = $array["content"];
-            $adv_id = "";
-            if(! empty($content['adInfo'])){
-                $adInfo = json_decode($content['adInfo'],true);
-                $adv_id = $adInfo['advId'] ?? "";
-            }
-
-            $insert = [
-                'crt_time' => time(),
-                'city' => $content['city'] ?? "",
-                'actionType' => $content["actionType"] ?? 0,
-                'acquireTime' => $content["acquireTime"] ?? "",
-                'clueType' => $content["clueType"] ?? 0,
-                'product' => $content["product"] ?? "",
-                'wechat' => $content["wechat"] ?? "",
-                'clueId' => $content["clueId"] ?? "",
-                'transformType' => $content["transformType"] ?? "",
-                'clueSource' => $content["clueSource"] ?? "",
-                'clueSourceId' => $content["clueSourceId"] ?? "",
-                'customerName' => $content["customerName"] ?? "",
-                'platform' => $content["platform"] ?? 0,
-                'ipLocationCity' => $content["ipLocationCity"] ?? "",
-                'phone' => $content["phone"] ?? "",
-                'isRepeatClue' => $content["isRepeatClue"] ?? 0,
-                'flowType' => $content["flowType"] ?? 0,
-                'fromUserId' => $array["fromUserId"] ?? "",
-                'adv_id' => $adv_id,
-            ];
-            CustomerFromThreePlatForm::insert($insert);
-
-        } catch (\Throwable $e) {
-            Log::error('Queue error:', ['exception' => $e->getMessage() . '|' . $e->getLine()]);
-            $this->delete();
-        }
-    }
-
-    protected function echoMessage(OutputInterface $output)
-    {
-        //输出消息
-        $output->writeln(json_encode($this->data));
-    }
-}

+ 0 - 38
app/Jobs/OperationLog.php

@@ -1,38 +0,0 @@
-<?php
-
-namespace App\Jobs;
-
-use App\Service\OperationLogService;
-use Illuminate\Bus\Queueable;
-use Illuminate\Contracts\Queue\ShouldQueue;
-use Illuminate\Foundation\Bus\Dispatchable;
-use Illuminate\Queue\InteractsWithQueue;
-use Illuminate\Queue\SerializesModels;
-
-class OperationLog implements ShouldQueue
-{
-    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
-
-    protected $insert;
-    /**
-     * Create a new job instance.
-     *
-     * @return void
-     */
-    public function __construct($insert)
-    {
-        //
-        $this->insert = $insert;
-    }
-
-    /**
-     * Execute the job.
-     *
-     * @return void
-     */
-    public function handle()
-    {
-        $insert = $this->insert;
-        OperationLogService::getInstance()->insertOperationLog($insert);
-    }
-}

+ 0 - 50
app/Model/BasicType.php

@@ -1,50 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class BasicType extends UseScopeBaseModel
-{
-    protected $table = "basic_type"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-
-    const type_22 = 22;
-    const type_20 = 20;
-    const type_4 = 4;
-    const type_2 = 2;
-    const type_10 = 10;
-    public static $type = [
-        1 => '客户意向类型',
-        2 => '客户来源类型',
-        3 => '客户类型(T9改装)',
-        4 => '客户电话类型',
-        5 => '进展阶段类型',
-        6 => '客户状态类型',
-        7 => '决策关系类型',
-//        8 => '客户分级',
-        9 => '状态类型',
-        10 => '车型',
-        11 => '订单类型',
-//        12 => '成交类型',
-//        13 => '合同状态',
-//        14 => '合同类型',
-        15 => '付款方式',
-//        16 => '发货状态',
-        17 => '物流公司',
-        18 => '安装方式',
-        19 => '紧急程度',
-        20 => '产品单位',
-        21 => '跟进方式',
-        22 => '产品价格',
-        23 => '安装地点',
-        24 => '平台类型',
-//        25 => '业务类型',
-//        26 => '销售类型',
-        27 => '采购类型',
-        28 => '默认账户',
-        29 => '客户简称',
-        30 => '客户类型(T9二手车)',
-        31 => '客户类型(T9分社)',
-    ];
-}

+ 0 - 18
app/Model/BasicTypeAllUse.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class BasicTypeAllUse extends Model
-{
-    protected $table = "basic_type_all_use"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-
-    const type_one = 1;
-    public static $type = [
-        self::type_one => "咨询客户",
-    ];
-}

+ 0 - 38
app/Model/BookingList.php

@@ -1,38 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class BookingList extends Model
-{
-    protected $table = "booking_list"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const STATE_ZERO = 0;//未确认
-    const STATE_ONE = 1;//已确认
-    public static $name = [
-        self::STATE_ZERO => '未确认',
-        self::STATE_ONE => '已确认',
-    ];
-
-    const type_one = 1; // 收款
-    const type_two = 2; // 坏账
-    const type_three = 3; // 退款
-    const type_four = 4; // 补收
-    public static $model_type = [
-        self::type_one => '收款',
-        self::type_two => '坏账',
-        self::type_three => '退款',
-        self::type_four => '补收',
-    ];
-
-    const data_type_one = 1; // 合同
-    const data_type_two = 2; // 采购
-    public static $data_type = [
-        self::data_type_one => '合同',
-        self::data_type_two => '采购',
-    ];
-
-}

+ 0 - 17
app/Model/BookingListInfo.php

@@ -1,17 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class BookingListInfo extends Model
-{
-    protected $table = "booking_list_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1; // 文件
-    public static $type = [
-        self::type_one,
-    ];
-}

+ 0 - 64
app/Model/Construction.php

@@ -1,64 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class Construction extends UseScopeBaseModel
-{
-    protected $table = "construction"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const Model_type_one = 1; // 到店安装
-    const Model_type_two = 2; // 带货安装
-    const Model_type_three = 3; // 带货安装
-    public static $model_type = [
-        self::Model_type_one,
-        self::Model_type_two,
-        self::Model_type_three,
-    ];
-    public static $model_type_title = [
-        self::Model_type_one => '到店安装',
-        self::Model_type_two => '带货安装(包安装)',
-        self::Model_type_three => '带货安装(不包安装)',
-    ];
-
-    public static $prefix = [
-        self::Model_type_one => 'WO0.',
-        self::Model_type_two => 'T9SH.',
-        self::Model_type_three => 'T9SH.',
-    ];
-
-    const State_minus_one = -1;//驳回
-    const STATE_ZERO = 0;//未审核
-    const STATE_ONE = 1;//待审核
-    const STATE_DIFF_TWO = -100;//已预约施工
-    const STATE_TWO = 2;//已审核
-    const STATE_THREE = 3;//待确认
-    const STATE_FOUR = 4;//待验车
-    const STATE_FIVE = 5;//待交车
-    const STATE_SIX = 6;//已交车
-    public static $name = [
-        self::State_minus_one => '驳回',
-        self::STATE_ZERO => '未审核',
-        self::STATE_ONE => '待审核',
-        self::STATE_DIFF_TWO => '已预约施工',
-        self::STATE_TWO => '施工中',
-        self::STATE_THREE => '待确认',
-        self::STATE_FOUR => '验车',
-        self::STATE_FIVE => '交车',
-        self::STATE_SIX => '已交车',
-    ];
-
-    public static $pq_name = [
-        self::STATE_ZERO => '未排期',
-        self::STATE_ONE => '已排期',
-    ];
-    const range_function = 'constructionRange';
-    const is_check_function = 'constructionCheck';
-
-    public static $wait_check = [
-        self::State_minus_one,
-        self::STATE_ZERO,
-        self::STATE_ONE,
-    ];
-}

+ 0 - 13
app/Model/ConstructionFile.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ConstructionFile extends Model
-{
-    protected $table = "construction_file"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 20
app/Model/ConstructionInfo.php

@@ -1,20 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ConstructionInfo extends Model
-{
-    protected $table = "construction_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1; // 联系方式
-    const type_two = 2; // 协同人
-    const type_three = 3; // 负责人
-    public static $type = [
-        self::type_one,
-        self::type_two
-    ];
-}

+ 0 - 13
app/Model/ConstructionProductInfo.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ConstructionProductInfo extends Model
-{
-    protected $table = "construction_product_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 13
app/Model/Contacts.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class Contacts extends Model
-{
-    protected $table = "contacts"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 23
app/Model/ContactsInfo.php

@@ -1,23 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ContactsInfo extends Model
-{
-    protected $table = "contacts_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1; // 联系方式
-    const type_two = 2; // 关联客户
-    const type_three = 3; // 负责人
-    const type_four = 4; // 协同人
-    public static $type = [
-        self::type_one,
-        self::type_two,
-        self::type_three,
-        self::type_four,
-    ];
-}

+ 0 - 36
app/Model/Customer.php

@@ -1,36 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class Customer extends UseScopeBaseModel
-{
-    protected $table = "customer"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const Model_type_one = 1; // T9改装
-    const Model_type_two = 2; // T9二手车客户模板
-    const Model_type_three = 3; // T9分社
-    const special_id = -1;
-    public static $model_type = [
-        self::Model_type_one,
-        self::Model_type_two,
-        self::Model_type_three,
-    ];
-    const dk = [
-        'T9改装' => self::Model_type_one,
-        'T9二手车' => self::Model_type_two,
-        'T9分社' => self::Model_type_three,
-    ];
-    const dk2 = [
-        self::Model_type_one => 'T9改装',
-        self::Model_type_two => 'T9二手车',
-        self::Model_type_three => 'T9分社',
-    ];
-
-    public static $user = [];
-    public static $search = [];
-    public static $limitKey = "customerPondState";
-    const range_function = 'customerRange';
-    public static $order_number = "customerTravelOrderNumber";
-}

+ 0 - 16
app/Model/CustomerFromThreePlatForm.php

@@ -1,16 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-
-class CustomerFromThreePlatForm extends Model
-{
-    protected $table = "customer_from_three_platform"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-
-    const job = 't9_customer_from_online';
-}

+ 0 - 47
app/Model/CustomerInfo.php

@@ -1,47 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class CustomerInfo extends Model
-{
-    protected $table = "customer_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1; // 客户联系方式
-    const type_two = 2; // 负责人
-    const type_three = 3; // 协同人
-    const type_four = 4; // 联系人
-    const type_five = 5; // 图片
-    const type_six = 6; // 文件
-    const type_nine = 9; //前负责人
-    public static $type = [
-        self::type_one,
-        self::type_two,
-        self::type_three,
-        self::type_four,
-        self::type_five,
-        self::type_six,
-    ];
-    public static $see_man = [
-        self::type_two,
-        self::type_three,
-    ];
-    public static $man = [
-        self::type_two,
-        self::type_three,
-        self::type_nine,
-    ];
-    public static $man2 = [
-        self::type_two,
-        self::type_three,
-        self::type_nine,
-    ];
-
-    public static $no_edit = [
-        self::type_two,
-        self::type_nine,
-    ];
-}

+ 0 - 11
app/Model/CustomerPerFormance.php

@@ -1,11 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class CustomerPerFormance extends UseScopeBaseModel
-{
-    protected $table = "customer_performance"; //指定表
-    const CREATED_AT = null;
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-}

+ 0 - 11
app/Model/CustomerRemain.php

@@ -1,11 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class CustomerRemain extends UseScopeBaseModel
-{
-    protected $table = "customer_remain"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 11
app/Model/CustomerRepeat.php

@@ -1,11 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class CustomerRepeat extends UseScopeBaseModel
-{
-    protected $table = "customer_repeat"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 11
app/Model/CustomerReport.php

@@ -1,11 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class CustomerReport extends UseScopeBaseModel
-{
-    protected $table = "customer_report"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 23
app/Model/CustomerReportDepart.php

@@ -1,23 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class CustomerReportDepart extends UseScopeBaseModel
-{
-    protected $table = "customer_report_depart"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-
-    const type_one = 1;//归属门店
-    const type_two = 2;//客户负责人
-    const type_three = 3;//客户跟进记录创建人
-
-    const type_list = [
-        -1 => '待跟进',
-        0 => '跟进中',
-        1 => '联系不上',
-        2 => '无意向',
-        3 => '已成交',
-    ];
-}

+ 0 - 46
app/Model/DeliveryNote.php

@@ -1,46 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-/**
- * 交车单
- * Class Unit
- * @package App\Models
- */
-class DeliveryNote extends Model
-{
-    protected $table = "delivery_note"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-
-    const STATE_ZERO = 0;
-    const STATE_ONE = 1;
-
-    public static $name = [
-        self::STATE_ZERO => '已保存',
-        self::STATE_ONE => '已交车',
-    ];
-
-    public function getBreakAttribute($value)
-    {
-        return json_decode($value, true);
-    }
-
-
-
-    public function getBreakMarkAttribute($value)
-    {
-        return json_decode($value, true);
-    }
-
-
-
-    public function getProjectIdAttribute($value)
-    {
-        return json_decode($value, true);
-    }
-
-}

+ 0 - 21
app/Model/DeliveryNoteDetail.php

@@ -1,21 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class DeliveryNoteDetail extends Model
-{
-    protected $table = "delivery_note_detail"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-
-    const TYPE_ONE = 1;
-    const TYPE_TWO = 2;
-
-    public static $name = [
-        self::TYPE_ONE => '销售顾问',
-        self::TYPE_TWO => '安装主管',
-    ];
-}

+ 0 - 13
app/Model/DepartIndex.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class DepartIndex extends Model
-{
-    protected $table = "depart_index"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 13
app/Model/DepartWithDHF.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class DepartWithDHF extends Model
-{
-    protected $table = "depart_with_dhf"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 28
app/Model/FollowUpRecord.php

@@ -1,28 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class FollowUpRecord extends Model
-{
-    protected $table = "follow_up_record"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 'customer';
-    const type_two = 'sales_order';
-    public static $type = [
-        self::type_one => '客户跟进记录',
-        self::type_two => '合同跟进记录',
-    ];
-
-    const follow_type_zero = 0;
-    const follow_type_one = 1;
-    const follow_type_two = 2;
-    public static $follow_type = [
-        self::follow_type_zero => '跟进中',
-        self::follow_type_one => '联系不上',
-        self::follow_type_two => '无意向',
-    ];
-}

+ 0 - 17
app/Model/FollowUpRecordFile.php

@@ -1,17 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class FollowUpRecordFile extends Model
-{
-    protected $table = "follow_up_record_file"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1; // 图片
-    public static $type = [
-        self::type_one,
-    ];
-}

+ 0 - 33
app/Model/Inventory.php

@@ -1,33 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class Inventory extends UseScopeBaseModel
-{
-    protected $table = "inventory"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const State_minus_one = -1;//驳回
-    const STATE_ZERO = 0;//未审核
-    const STATE_ONE = 1;//待审核
-    const STATE_TWO = 2;//审核通过
-    const prefix = 'PD';
-    public static $name = [
-        self::State_minus_one => '驳回',
-        self::STATE_ZERO => '未审核',
-        self::STATE_ONE => '待审核',
-        self::STATE_TWO => '审核通过'
-    ];
-
-    const range_function = '';
-    const is_check_function = 'inventoryCheck';
-
-    public static $wait_check = [
-        self::State_minus_one,
-        self::STATE_ZERO,
-        self::STATE_ONE,
-    ];
-}

+ 0 - 14
app/Model/InventorySub.php

@@ -1,14 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class InventorySub extends Model
-{
-    protected $table = "inventory_sub"; //指定表
-    const CREATED_AT = null;
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-
-}

+ 0 - 28
app/Model/InvoiceOrder.php

@@ -1,28 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class InvoiceOrder extends UseScopeBaseModel
-{
-    protected $table = "invoice_order"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const STATE_ZERO = 0;//未确认
-    const STATE_ONE = 1;//待确认
-    const STATE_TWO = 2;//已确认
-    const prefix = 'FH';
-    public static $name = [
-        0 => '未确认',
-        1 => '待确认',
-        2 => '已确认',
-    ];
-
-    const range_function = 'invoiceRange';
-    const is_check_function = 'invoiceCheck';
-
-    public static $wait_check = [
-        self::STATE_ZERO,
-        self::STATE_ONE
-    ];
-}

+ 0 - 13
app/Model/InvoiceOrderInfo.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class InvoiceOrderInfo extends Model
-{
-    protected $table = "invoice_order_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 14
app/Model/LastJc.php

@@ -1,14 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class LastJc extends Model
-{
-    protected $guarded = [];
-    protected $table = "last_jc"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 11
app/Model/MonthlyPerFormance.php

@@ -1,11 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class MonthlyPerFormance extends UseScopeBaseModel
-{
-    protected $table = "monthly_performance"; //指定表
-    const CREATED_AT = null;
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-}

+ 0 - 19
app/Model/OperationLog.php

@@ -1,19 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-/**
- *
- * Class Unit
- * @package App\Models
- */
-class OperationLog extends Model
-{
-    protected $table = "operation_log"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-
-}

+ 0 - 19
app/Model/OperationLogDetail.php

@@ -1,19 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-/**
- *
- * Class Unit
- * @package App\Models
- */
-class OperationLogDetail extends Model
-{
-    protected $table = "operation_log_detail"; //指定表
-    const CREATED_AT = null;
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-
-}

+ 0 - 19
app/Model/OrderInventoryStock.php

@@ -1,19 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class OrderInventoryStock extends Model
-{
-    protected $table = "order_inventory_stock"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1;//校验库存
-    const type_two = 2;//不校验证库存
-    public static $type_name = [
-        self::type_one => '是',
-        self::type_two => '否',
-    ];
-}

+ 0 - 87
app/Model/OrderOperation.php

@@ -1,87 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-
-class OrderOperation extends Model
-{
-    protected $table = "order_operation"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-
-    //审批操作对应的数值
-    const zero = 0;
-    const one = 1;
-    const two = 2;
-    const three = 3;
-    const four = 4;
-    const five = 5;
-    const six = 6;
-    const seven = 7;
-    const eight = 8;
-    const nine = 9;
-    const ten = 10;
-    const eve = 11;
-    const twl = 12;
-    const thi = 13;
-    const fourteen = 14;
-    const fif = 15;
-    const sixty = 16;
-    const seventeen = 17;
-    const eighteen = 18;
-    const nineteen = 19;
-    const twenty = 20;
-    const twenty_one = 21;
-    const twenty_two = 22;
-    const twenty_three = 23;
-    const twenty_four = 24;
-    const twenty_five = 25;
-    const twenty_six = 26;
-    const twenty_seven = 27;
-    const twenty_eight = 28;
-    const twenty_nine = 29;
-    const thirty = 30;
-    const thirty_one = 31;
-    const thirty_two = 32;
-    const thirty_three = 33;
-
-    public static $type = [
-        self::zero => '系统设置变更 ',
-        self::one => '线上派单',
-        self::two => '门店派单',
-        self::three => '合同确认',
-        self::four => '合同弃审',
-        self::five => '合同公司完结',
-        self::six => '合同客户完结',
-        self::seven => '金额记账记录增加',
-        self::eight => '发货单确认',
-        self::nine => '退换货审核',
-        self::ten => '退换货弃审',
-        self::eve => '施工单审核',
-        self::twl => '施工单弃审',
-        self::thi => '采购确认',
-        self::fourteen => '采购入库',
-        self::fif => '采购入库弃审',
-        self::sixty => '合同修改负责人',
-        self::seventeen => '合同修改协同人',
-        self::eighteen => '合同分配',
-        self::nineteen => '合同移交',
-        self::twenty => '采购确认弃审',
-        self::twenty_one => '收付款单审核',
-        self::twenty_two => '收付款单弃审',
-        self::twenty_three => '客户分配',
-        self::twenty_four => '客户移交',
-        self::twenty_five => '合同批量确认',
-        self::twenty_six => '施工单分配/调配',
-        self::twenty_seven => '活动包确认',
-        self::twenty_eight => '活动包弃审',
-        self::twenty_nine => '虚拟采购单确认',
-        self::thirty => '虚拟采购单弃审',
-        self::thirty_one => '合同批量门店派单',
-        self::thirty_two => '申请出库',
-        self::thirty_three => '销售单仓库出库',
-    ];
-}

+ 0 - 43
app/Model/OutBoundOrder.php

@@ -1,43 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class OutBoundOrder extends UseScopeBaseModel
-{
-    protected $table = "out_bound_order"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const State_minus_one = -1;//驳回
-    const STATE_ZERO = 0;//未确认
-    const STATE_ONE = 1;//待确认
-    const STATE_TWO = 2;//已确认
-    const prefix = 'CK';
-    public static $name = [
-        self::State_minus_one => '已驳回',
-        self::STATE_ZERO => '待创建人确认',
-        self::STATE_ONE => '待审批人审核',
-        self::STATE_TWO => '审核通过',
-    ];
-
-    const range_function = '';
-    const is_check_function = '';
-
-    public static $wait_check = [
-        self::STATE_ZERO,
-        self::STATE_ONE
-    ];
-
-    const out_type_one = 1;
-    const out_type_two = 2;
-
-    public static $out_type = [
-        self::out_type_one,
-        self::out_type_two
-    ];
-
-    public static $out_type_name = [
-        self::out_type_one => '合同',
-        self::out_type_two => '',
-    ];
-}

+ 0 - 14
app/Model/OutBoundOrderInfo.php

@@ -1,14 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class OutBoundOrderInfo extends Model
-{
-    protected $table = "out_bound_order_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1;//合同
-}

+ 0 - 52
app/Model/PaymentReceipt.php

@@ -1,52 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class PaymentReceipt extends UseScopeBaseModel
-{
-    protected $table = "payment_receipt"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const State_minus_one = -1;//驳回
-    const STATE_ZERO = 0;//未确认
-    const STATE_ONE = 1;//待确认
-    const STATE_TWO = 2;//已确认
-    public static $name = [
-        self::State_minus_one => '驳回',
-        self::STATE_ZERO => '未核销',
-        self::STATE_ONE => '待核销',
-        self::STATE_TWO => '已核销',
-    ];
-
-    const type_one = 1; // 收款
-    const type_two = 2; // 付款
-    const type_three = 3; // 红冲
-    const type_four = 4; // 坏账
-    public static $model_type = [
-        self::type_one => '收款',
-        self::type_two => '付款',
-        self::type_three => '红冲',
-        self::type_four => '坏账',
-    ];
-
-    const data_type_one = 1; // 合同
-    const data_type_two = 2; // 采购
-    const data_type_three = 3; // 虚拟采购
-    public static $data_type = [
-        self::data_type_one => '合同',
-        self::data_type_two => '采购',
-        self::data_type_three => '虚拟采购',
-    ];
-
-    const prefix = "T9RMO.";
-    const is_check_function = 'paymentReceiptCheck';
-
-    public static $wait_check = [
-        self::State_minus_one,
-        self::STATE_ZERO,
-        self::STATE_ONE
-    ];
-}

+ 0 - 24
app/Model/PaymentReceiptInfo.php

@@ -1,24 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class PaymentReceiptInfo extends Model
-{
-    protected $table = "payment_receipt_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1; // 文件/图片
-    const type_two = 2; // 归属人
-    const type_three = 3; // 回款信息
-    public static $type = [
-        self::type_one,
-        self::type_two,
-        self::type_three,
-    ];
-    public static $man = [
-        self::type_two,
-    ];
-}

+ 0 - 18
app/Model/ProductActivity.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class ProductActivity extends UseScopeBaseModel
-{
-    protected $table = "product_activity"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const range_function = '';
-    const type_one = 1;
-    const type_two = 2;
-    public static $type_name = [
-        self::type_one => '零售活动',
-        self::type_two => '供应商活动',
-    ];
-}

+ 0 - 13
app/Model/ProductActivityPrice.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ProductActivityPrice extends Model
-{
-    protected $table = "product_activity_price"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 33
app/Model/ProductAdjustment.php

@@ -1,33 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ProductAdjustment extends UseScopeBaseModel
-{
-    protected $table = "product_adjustment"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const State_minus_one = -1;//驳回
-    const STATE_ZERO = 0;//未审核
-    const STATE_ONE = 1;//待审核
-    const STATE_TWO = 2;//审核通过
-    const prefix = 'PAD';
-    public static $name = [
-        self::State_minus_one => '驳回',
-        self::STATE_ZERO => '未审核',
-        self::STATE_ONE => '待审核',
-        self::STATE_TWO => '审核通过'
-    ];
-
-    const range_function = '';
-    const is_check_function = 'productAdjustmentCheck';
-
-    public static $wait_check = [
-        self::State_minus_one,
-        self::STATE_ZERO,
-        self::STATE_ONE,
-    ];
-}

+ 0 - 14
app/Model/ProductAdjustmentSub.php

@@ -1,14 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ProductAdjustmentSub extends Model
-{
-    protected $table = "product_adjustment_sub"; //指定表
-    const CREATED_AT = null;
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-
-}

+ 0 - 22
app/Model/ProductCategory.php

@@ -1,22 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class ProductCategory extends UseScopeBaseModel
-{
-    protected $table = "product_category"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    public static $is_edit_unit_price = [
-        0 => "否",
-        1 => "是",
-    ];
-    const Special_for_roll = 112; //有模有样
-    const Special_for_roll_p = 293; //三模一垫
-    const Special_for_roll1 = 306; //改色膜
-    const Special_for_roll2 = 313; //彩色车衣
-    const Special_for_roll3 = 321; //脚垫
-    const Special_for_p = 449; //t9总社专用
-    const Special_for_sn = 297; //车窗膜
-}

+ 0 - 13
app/Model/ProductCategoryOrderBy.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ProductCategoryOrderBy extends Model
-{
-    protected $table = "product_category_orderby"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 13
app/Model/ProductIntroduction.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ProductIntroduction extends Model
-{
-    protected $table = "product_introduction"; //指定表
-    const CREATED_AT = null;
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-}

+ 0 - 11
app/Model/ProductInventory.php

@@ -1,11 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class ProductInventory extends UseScopeBaseModel
-{
-    protected $table = "product_inventory"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-}

+ 0 - 11
app/Model/ProductInventoryOfTop.php

@@ -1,11 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class ProductInventoryOfTop extends UseScopeBaseModel
-{
-    protected $table = "product_inventory_of_top"; //指定表
-    const CREATED_AT = null;
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-}

+ 0 - 20
app/Model/ProductInventorySet.php

@@ -1,20 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use App\Scopes\TopDepartmentScope;
-use Illuminate\Database\Eloquent\Model;
-
-class ProductInventorySet extends UseScopeBaseModel
-{
-    protected $table = "depart_set"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1;//校验库存
-    const type_two = 2;//不校验证库存
-    public static $type_name = [
-        self::type_one => '是',
-        self::type_two => '否',
-    ];
-}

+ 0 - 13
app/Model/ProductItemCodeMessage.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ProductItemCodeMessage extends Model
-{
-    protected $table = "product_item_code_message"; //指定表
-    const CREATED_AT = null;
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-}

+ 0 - 13
app/Model/ProductPriceDetail.php

@@ -1,13 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ProductPriceDetail extends Model
-{
-    protected $table = "product_price_detail"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-}

+ 0 - 19
app/Model/ProductRange.php

@@ -1,19 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ProductRange extends Model
-{
-    protected $table = "product_range"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const type_one = 1; // 部门
-    const type_two = 2; // 人
-    public static $type = [
-        self::type_one,
-        self::type_two,
-    ];
-}

+ 0 - 20
app/Model/ProductSnInfo.php

@@ -1,20 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class ProductSnInfo extends UseScopeBaseModel
-{
-    protected $table = "product_sn_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const range_function = '';
-    const type_one = 1;
-    const type_two = 2;
-    const type_three = 3;
-    public static $type_name = [
-        self::type_one => '施工单',
-        self::type_two => '合同',
-        self::type_three => '用户主动创建质保',
-    ];
-}

+ 0 - 57
app/Model/PurchaseOrder.php

@@ -1,57 +0,0 @@
-<?php
-
-namespace App\Model;
-
-class PurchaseOrder extends UseScopeBaseModel
-{
-    protected $table = "purchase_order"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = 'upd_time';
-    protected $dateFormat = 'U';
-    const State_minus_one = -1;//驳回
-    const STATE_ZERO = 0;//未确认
-    const STATE_ONE = 1;//待确认
-    const STATE_TWO = 2;//未入库
-    const STATE_Three = 3;//待入库
-    const STATE_Four = 4;//已入库
-    const prefix = 'CG';
-    public static $name = [
-        self::State_minus_one => '驳回',
-        self::STATE_ZERO => '未确认',
-        self::STATE_ONE => '待确认',
-        self::STATE_TWO => '已审核',
-        self::STATE_Three => '待入库',
-        self::STATE_Four => '已入库',
-    ];
-
-    const invoice_state_zero = 0;//未发货
-    const invoice_state_one = 1;//待发货
-    public static $invoice_name = [
-        self::invoice_state_zero => '未发货',
-        self::invoice_state_one => '待发货',
-    ];
-
-    const Order_type_one = 1;//总社采购
-    const Order_type_two = 2;//分社外采
-    const Order_type_three = 3;//分社要货 不要合同
-    const Order_type_four = 4;//分社订货 要合同
-    const Order_type_five = 5;
-
-    public static $order_type = [
-        self::Order_type_one => '总社采购',
-        self::Order_type_two => '分社外采',
-        self::Order_type_three => '分社要货',
-        self::Order_type_four => '分社订货',
-    ];
-
-    const range_function = 'purchaseRange';
-    const is_check_function = 'purchaseCheck';
-
-    public static $wait_check = [
-        self::State_minus_one,
-        self::STATE_ZERO,
-        self::STATE_ONE,
-    ];
-
-    const usage_return = "returnExchange";
-}

+ 0 - 17
app/Model/PurchaseOrderFile.php

@@ -1,17 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class PurchaseOrderFile extends Model
-{
-    protected $table = "purchase_order_file"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-    const type_one = 1; // 文件
-    public static $type = [
-        self::type_one,
-    ];
-}

+ 0 - 21
app/Model/PurchaseOrderInfo.php

@@ -1,21 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class PurchaseOrderInfo extends Model
-{
-    protected $table = "purchase_order_info"; //指定表
-    const CREATED_AT = 'crt_time';
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-    const STATE_ZERO = 0;//未发货
-    const STATE_ONE = 1;//部分已发货
-    const STATE_TWO = 2;//已发货
-    public static $name = [
-        0 => '未发货',
-        1 => '部分已发货',
-        2 => '已发货'
-    ];
-}

+ 0 - 25
app/Model/PurchaseOrderInfoForOutBound.php

@@ -1,25 +0,0 @@
-<?php
-
-namespace App\Model;
-
-use Illuminate\Database\Eloquent\Model;
-
-class PurchaseOrderInfoForOutBound extends Model
-{
-    protected $table = "purchase_order_info_for_outbound"; //指定表
-    const CREATED_AT = null;
-    const UPDATED_AT = null;
-    protected $dateFormat = 'U';
-    const is_not_use = 0;
-    const is_use = 1;
-    const type_one = 1;
-    const prefix = 'CGCk';
-    const prefix2 = 'SJZL';
-
-    const from_type_zero = 0; // 采购单
-    const from_type_one = 1;  // 盘点单
-    const from_type = [
-        self::from_type_zero,
-        self::from_type_one,
-    ];
-}

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä