123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536 |
- <?php
- namespace App\Http\Controllers\Api;
- use App\Model\BoxDetail;
- use App\Service\MeasureService;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\DB;
- class TestController extends BaseController
- {
- public function aa(){
- $data = [
- 'out_order_no' => 'test123',
- 'top_id' => '1',
- 'ext_1' => '1',
- 'ext_2' => '2',
- 'ext_3' => '3',
- 'ext_4' => '4',
- 'ext_5' => '5',
- 'detail' => [
- [
- 'top_id' => '1',
- 'code' => '001',
- 'title' => '产品名称',
- 'ext_1' => '1',
- 'ext_2' => '2',
- 'ext_3' => '3',
- 'ext_4' => '4',
- 'ext_5' => '5',
- ],[
- 'top_id' => '2',
- 'code' => '002',
- 'title' => '产品名称1',
- 'ext_1' => '11',
- 'ext_2' => '22',
- 'ext_3' => '33',
- 'ext_4' => '44',
- 'ext_5' => '55',
- ],
- ],
- ];
- var_dump(json_encode($data));die;
- $service = BoxHookService::getInstance();
- list($status,$msg) = $service->boxInsert($data);
- var_dump($status);
- var_dump($msg);
- }
- // public function aa(){
- // $service = BoxHookService::getInstance();
- //
- // list($status,$msg) = $service->boxDetail(['order_no'=>'202306130543108902']);
- // var_dump($status);
- // var_dump($msg);
- // }
- public function testData(Request $request){
- date_default_timezone_set('PRC');
- $arr = ['title' => json_encode($request->all()),
- 'crt_time' => date('Y-m-d H:i:s')
- ];
- DB::table('test_shebei')->insert($arr);
- // DB::table('test_shebei')->insert(['title' => '2223354']);
- }
- public function order_process1(Request $request) {
- $arr = [
- 0 => ['Code' => "S23070197", 'CustomerName' => "方侦涛", 'rate' => 20],
- 1 => ['Code' => "S23070196", 'CustomerName' => "杭州速方", 'rate' => 20],
- 2 => ['Code' => "S23070194", 'CustomerName' => "杭州速方", 'rate' => 19],
- 3 => ['Code' => "S23070193", 'CustomerName' => "方侦涛", 'rate' => 19],
- 4 => ['Code' => "S23070180", 'CustomerName' => "杭州速方", 'rate' => 16],
- 5 => ['Code' => "S23070179", 'CustomerName' => "杭州速方", 'rate' => 16],
- 6 => ['Code' => "S23070178", 'CustomerName' => "杭州速方", 'rate' => 16],
- 7 => ['Code' => "S23070177", 'CustomerName' => "杭州速方", 'rate' => 16],
- 8 => ['Code' => "S23070176", 'CustomerName' => "杭州速方", 'rate' => 16],
- 9 => ['Code' => "S23070175", 'CustomerName' => "杭州速方", 'rate' => 15],
- 10 => ['Code' => "S23070174", 'CustomerName' => "杭州速方", 'rate' => 15],
- 11 => ['Code' => "S23070173", 'CustomerName' => "杭州速方", 'rate' => 15],
- 12 => ['Code' => "S23070172", 'CustomerName' => "杭州速方", 'rate' => 15],
- 13 => ['Code' => "S23070171", 'CustomerName' => "杭州速方", 'rate' => 15],
- 14 => ['Code' => "S23070170", 'CustomerName' => "杭州速方", 'rate' => 15],
- 15 => ['Code' => "S23070169", 'CustomerName' => "杭州速方", 'rate' => 14],
- 16 => ['Code' => "S23070144", 'CustomerName' => "方侦涛", 'rate' => 88],
- 17 => ['Code' => "S23070142", 'CustomerName' => "王玉", 'rate' => 84],
- 18 => ['Code' => "S23070141", 'CustomerName' => "王玉", 'rate' => 82],
- 19 => ['Code' => "S23070136", 'CustomerName' => "杭州速方", 'rate' => 72],
- 20 => ['Code' => "S23070135", 'CustomerName' => "杭州速方", 'rate' => 70],
- 21 => ['Code' => "S23070133", 'CustomerName' => "杭州速方", 'rate' => 66],
- 22 => ['Code' => "S23070126", 'CustomerName' => "杭州速方", 'rate' => 52],
- 23 => ['Code' => "S23070125", 'CustomerName' => "杭州速方", 'rate' => 50],
- 24 => ['Code' => "S23070124", 'CustomerName' => "王玉", 'rate' => 48],
- 25 => ['Code' => "S23070122", 'CustomerName' => "方侦涛", 'rate' => 44],
- 26 => ['Code' => "S23070120", 'CustomerName' => "杭州速方", 'rate' => 40],
- 27 => ['Code' => "S23070115", 'CustomerName' => "杭州速方", 'rate' => 30],
- 28 => ['Code' => "S23070114", 'CustomerName' => "杭州速方", 'rate' => 29],
- 29 => ['Code' => "S23070113", 'CustomerName' => "方侦涛", 'rate' => 26],
- 30 => ['Code' => "S23070109", 'CustomerName' => "方侦涛", 'rate' => 18],
- ];
- return $this->json_return(200,'',$arr);
- }
- public function project_region(Request $request){
- $arr = [
- "all_num" => 2373,
- "num" => 188,
- ];
- return $this->json_return(200,'',$arr);
- }
- public function output_value_month1(Request $request){
- $arr = [
- [
- "value"=> "2023-01-01",
- "num"=> "0"
- ],
- [
- "value"=> "2023-01-02",
- "num"=> "0"
- ],
- [
- "value"=> "2023-01-03",
- "num"=> "0"
- ],
- [
- "value"=> "2023-01-04",
- "num"=> "0"
- ],
- [
- "value"=> "2023-01-05",
- "num"=> "0",
- ],
- ["num" => 0]
- ];
- return $this->json_return(200,'',$arr);
- }
- public function output_value_efficiency(Request $request){
- $arr = [
- [
- "time"=> "2023-01-01",
- "output"=> "0"
- ],
- [
- "time"=> "2023-01-02",
- "output"=> "0"
- ],
- [
- "time"=> "2023-01-03",
- "output"=> "2711"
- ],
- [
- "time"=> "2023-01-04",
- "output"=> "2239"
- ],
- [
- "time"=> "2023-01-05",
- "output"=> "1101"
- ],
- [
- "output"=> 0
- ]
- ];
- return $this->json_return(200,'',$arr);
- }
- public function capacity(Request $request){
- $arr = [
- [
- [
- "title"=> "直贴",
- "rate"=> "70"
- ],
- [
- "title"=> "包装",
- "rate"=> "50"
- ]
- ],
- ];
- return $this->json_return(200,'',['data' => $arr]);
- }
- public function product_num(Request $request){
- $arr = [
- [
- "machine_day_num"=> "4903.69",
- "machine_month_num"=> "139.64",
- "machine_week_num"=> "47.21",
- "break_day_num"=> "0",
- "break_month_num"=> "10",
- "break_week_num"=> "3",
- "start_time"=> date("Y-m-d H:i:s",time()),
- "day_num"=> "766",
- "week_num"=> "4598",
- "month_num"=> "14489",
- "rate"=> "72"
- ],
- [
- "machine_day_num"=> "469591.19",
- "machine_month_num"=> "107.03",
- "machine_week_num"=> "35.23",
- "break_day_num"=> 0,
- "break_month_num"=> "210",
- "break_week_num"=> "18",
- "start_time"=> date("Y-m-d H:i:s",time()),
- "day_num"=> 0,
- "week_num"=> "2353",
- "month_num"=> "6255",
- "rate"=> 0
- ],
- [
- "machine_day_num"=> "0",
- "machine_month_num"=> "14.02",
- "machine_week_num"=> "6.88",
- "break_day_num"=> "0",
- "break_month_num"=> "0",
- "break_week_num"=> "0",
- "start_time"=> date("Y-m-d H:i:s",time()),
- "day_num"=> "0",
- "week_num"=> "494",
- "month_num"=> "3058",
- "rate"=> "0"
- ],
- [
- "machine_day_num"=> "4903.77",
- "machine_month_num"=> "149.14",
- "machine_week_num"=> "56.72",
- "break_day_num"=> "0",
- "break_month_num"=> "0",
- "break_week_num"=> "0",
- "start_time"=> date("Y-m-d H:i:s",time()),
- "day_num"=> "626",
- "week_num"=> "4460",
- "month_num"=> "13034",
- "rate"=> "48"
- ]
- ];
- return $this->json_return(200,'',$arr);
- }
- public function work_order(Request $request){
- $arr = [
- "K23070127_1_8"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"四边锯清边",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_5"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"压门",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_41"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"凹槽喷漆",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_40"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"凹槽刷漆",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_12"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"雕刻",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_3"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"电子锯开料",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_46"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"发货",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_43"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"包装",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_39"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"面检",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_36"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"面漆",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_37"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"底检",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_33"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"打磨",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_11"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"配套质检",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_28"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"订背面条",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_27"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"组装",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_26"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"开横板启口",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_24"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"开组装槽",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_10"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"UV",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_7"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"封边",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_23"=>[
- "order_no"=>"K23070127",
- "product_title"=>"单开门",
- "procedure"=>"数控开料",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_4_46"=>[
- "order_no"=>"K23070127",
- "product_title"=>"双垭口",
- "procedure"=>"发货",
- "product_num"=>1,
- "finish_num"=>0
- ]
- ];
- return $this->json_return(200,'',$arr);
- }
- public function nu_work_order(Request $request){
- $arr = [
- "K23070188_1_28"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"订背面条",
- "product_num"=>8
- ],
- "K23070188_1_27"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"组装",
- "product_num"=>8
- ],
- "K23070188_1_26"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"开横板启口",
- "product_num"=>8
- ],
- "K23070188_1_24"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"开组装槽",
- "product_num"=>8
- ],
- "K23070188_1_23"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"数控开料",
- "product_num"=>8
- ],
- "K23070188_1_46"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"发货",
- "product_num"=>16
- ],
- "K23070188_1_43"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"包装",
- "product_num"=>16
- ],
- "K23070188_1_39"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"面检",
- "product_num"=>16
- ],
- "K23070188_1_36"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"面漆",
- "product_num"=>16
- ],
- "K23070188_1_35"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"底漆",
- "product_num"=>16
- ],
- "K23070188_1_37"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"底检",
- "product_num"=>16
- ],
- "K23070188_1_33"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"打磨",
- "product_num"=>16
- ],
- "K23070188_1_11"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"配套质检",
- "product_num"=>16
- ],
- "K23070188_1_7"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"封边",
- "product_num"=>16
- ],
- "K23070188_1_8"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"四边锯清边",
- "product_num"=>8
- ],
- "K23070188_1_5"=>[
- "order_no"=>"K23070188",
- "product_title"=>"单开门",
- "procedure"=>"压门",
- "product_num"=>8
- ],
- "D22120382_1_7" => [
- "order_no"=> "D22120382",
- "product_title"=>"单开门",
- "procedure"=>"封边",
- "product_num"=>4
- ],
- "D22120382_1_11" => [
- "order_no"=>"D22120382",
- "product_title"=>"单开门",
- "procedure"=>"四边锯清边",
- "product_num"=>2
- ],
- "D22120382_1_24" => [
- "order_no"=>"D22120382",
- "product_title"=>"单开门",
- "procedure"=>"开组装槽",
- "product_num"=>2
- ],
- "D22120382_1_26" =>[
- "order_no"=>"D22120382",
- "product_title"=>"单开门",
- "procedure"=>"开横板启口",
- "product_num"=>2
- ],
- ];
- return $this->json_return(200,'',$arr);
- }
- }
|