123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497 |
- <?php
- namespace App\Http\Controllers\Api;
- use App\Model\BoxDetail;
- use App\Model\DispatchSub;
- use App\Model\OrdersProduct;
- use App\Model\SaleOrdersProduct;
- use App\Service\FinishedOrderService;
- use App\Service\MeasureService;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Facades\Storage;
- class TestController extends BaseController
- {
- public function tt(){
- // die('d');
- $list = SaleOrdersProduct::where('out_order_no_time','<','1693497600')->where('production_quantity',0)->orderBy('id','desc')->get()->toArray();
- $url = 'https://fyy_api.qingyaokeji.com/api/productionAdd';
- echo count($list);
- die;
- foreach ($list as $v){
- $header = [
- 'Authorization' => '[personalComputer]eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTc0NDMzMzMsIm5iZiI6MTY5NzQ0MzMzMiwiZXhwIjoxNzA2MDgzMzMzLCJkYXRhIjp7InVzZXJfaWQiOjF9fQ.wP5c0fPquR6mWYWdAIudf-J60aUBQiSYAmCaI0bWx6k',
- 'Zt'=> '999'
- ];
- $post = [
- 'id' => [$v['id']],
- 'quantity' => [$v['order_quantity']],
- ];
- $a = $this->curlOpen($url,['header'=>$header,'post'=>$post]);
- echo $a;
- }
- }
- public function tt1(){
- $list = SaleOrdersProduct::where('out_order_no_time','<','1693497600')->where('production_quantity',0)->get()->toArray();
- $url = 'https://fyy_api.qingyaokeji.com/api/productionAdd';
- echo count($list);
- foreach ($list as $v){
- $header = [
- 'Authorization' => '[personalComputer]eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTc0NDMzMzMsIm5iZiI6MTY5NzQ0MzMzMiwiZXhwIjoxNzA2MDgzMzMzLCJkYXRhIjp7InVzZXJfaWQiOjF9fQ.wP5c0fPquR6mWYWdAIudf-J60aUBQiSYAmCaI0bWx6k',
- 'Zt'=> '999'
- ];
- $post = [
- 'id' => [$v['id']],
- 'quantity' => [$v['order_quantity']],
- ];
- $a = $this->curlOpen($url,['header'=>$header,'post'=>$post]);
- echo $a;
- }
- }
- public function ttt(){
- $list = OrdersProduct::where('production_time','>','1697385600')->where('dispatch_complete_quantity',0)->get()->toArray();
- $url = 'https://fyy_api.qingyaokeji.com/api/dispatchAdd';
- $n = 0;
- $ids = [];
- $out_order_no_times = [];
- foreach ($list as $v){
- $header = [
- 'Authorization' => '[personalComputer]eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTc0NDMzMzMsIm5iZiI6MTY5NzQ0MzMzMiwiZXhwIjoxNzA2MDgzMzMzLCJkYXRhIjp7InVzZXJfaWQiOjF9fQ.wP5c0fPquR6mWYWdAIudf-J60aUBQiSYAmCaI0bWx6k',
- 'Zt'=> '999'
- ];
- if($n < 20){
- $ids[] = $v['id'];
- $out_order_no_times[] = $v['order_quantity'];
- $n++;
- }
- if($n == 20){
- $post = [
- 'dispatch_time' => [$v['out_order_no_time']+86400,$v['out_order_no_time']+(86400*2)],
- 'employee_id' => [rand(431,432)],
- 'equipment_id' => 11,
- 'id' => $ids,
- 'is_split' => 1,
- 'out_order_no_time' => [$v['out_order_no_time']+86400,$v['out_order_no_time']+(86400*2)],
- 'process_id' => 9,
- 'quantity' => $out_order_no_times,
- 'team_id' => 68,
- ];
- $a = $this->curlOpen($url,['header'=>$header,'post'=>$post]);
- var_dump($a);
- $n = 0;
- $ids = [];
- $out_order_no_times = [];
- }
- }
- }
- public function ttt1(){
- $list = OrdersProduct::where('production_time','>','1697385600')->where('dispatch_complete_quantity',0)->orderBy('id','desc')->get()->toArray();
- $url = 'https://fyy_api.qingyaokeji.com/api/dispatchAdd';
- var_dump(count($list));
- $n = 0;
- foreach ($list as $v){
- $header = [
- 'Authorization' => '[personalComputer]eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTc0NDMzMzMsIm5iZiI6MTY5NzQ0MzMzMiwiZXhwIjoxNzA2MDgzMzMzLCJkYXRhIjp7InVzZXJfaWQiOjF9fQ.wP5c0fPquR6mWYWdAIudf-J60aUBQiSYAmCaI0bWx6k',
- 'Zt'=> '999'
- ];
- if($n < 20){
- $ids[] = $v['id'];
- $out_order_no_times[] = $v['order_quantity'];
- $n++;
- }
- if($n == 20){
- $post = [
- 'dispatch_time' => [$v['out_order_no_time']+86400,$v['out_order_no_time']+(86400*2)],
- 'employee_id' => [rand(431,432)],
- 'equipment_id' => 11,
- 'id' => $ids,
- 'is_split' => 1,
- 'out_order_no_time' => [$v['out_order_no_time']+86400,$v['out_order_no_time']+(86400*2)],
- 'process_id' => 9,
- 'quantity' => $out_order_no_times,
- 'team_id' => 68,
- ];
- $a = $this->curlOpen($url,['header'=>$header,'post'=>$post]);
- var_dump($a);
- $n = 0;
- $ids = [];
- $out_order_no_times = [];
- }
- }
- }
- public function tttt(){
- ini_set('output_buffering', 'off');
- // 立即发送所有输出
- ini_set('implicit_flush', 'on');
- // 设置执行时间不限制
- set_time_limit(0);
- $list = DispatchSub::where('crt_time','>','1697385600')->where('finished_num',0)->get()->toArray();
- $url = 'https://fyy_api.qingyaokeji.com/api/finishedOrderAdd';
- echo count($list);
- $n = 0;
- $ids = [];
- $out_order_no_times = [];
- foreach ($list as $v){
- $header = [
- 'Authorization' => '[personalComputer]eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTc0NDMzMzMsIm5iZiI6MTY5NzQ0MzMzMiwiZXhwIjoxNzA2MDgzMzMzLCJkYXRhIjp7InVzZXJfaWQiOjF9fQ.wP5c0fPquR6mWYWdAIudf-J60aUBQiSYAmCaI0bWx6k',
- 'Zt'=> '999'
- ];
- if($n < 2){
- $ids[] = $v['id'];
- $out_order_no_times[] = $v['dispatch_quantity'];
- $n++;
- }
- if($n == 2){
- $post = [
- 'equipment_id' => 11,
- 'finish_id' => [rand(431,432)],
- 'id' => $ids,
- 'quantity' => $out_order_no_times,
- 'team_id' => 68,
- 'waste' => [[]],
- ];
- sleep(10);
- $a = $this->curlOpen($url,['header'=>$header,'post'=>$post]);
- echo $a;
- $n = 0;
- $ids = [];
- $out_order_no_times = [];
- }
- // flush();die;
- }
- }
- public function tttt1(){
- ini_set('output_buffering', 'off');
- // 立即发送所有输出
- ini_set('implicit_flush', 'on');
- // 设置执行时间不限制
- set_time_limit(0);
- $list = DispatchSub::where('crt_time','>','1697385600')->where('finished_num',0)->get()->toArray();
- $url = 'https://fyy_api.qingyaokeji.com/api/finishedOrderAdd';
- echo count($list);
- $n = 0;
- $ids = [];
- $out_order_no_times = [];
- foreach ($list as $v){
- $header = [
- 'Authorization' => '[personalComputer]eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTc0NDMzMzMsIm5iZiI6MTY5NzQ0MzMzMiwiZXhwIjoxNzA2MDgzMzMzLCJkYXRhIjp7InVzZXJfaWQiOjF9fQ.wP5c0fPquR6mWYWdAIudf-J60aUBQiSYAmCaI0bWx6k',
- 'Zt'=> '999'
- ];
- if($n < 2){
- $ids[] = $v['id'];
- $out_order_no_times[] = $v['dispatch_quantity'];
- $n++;
- }
- if($n == 2){
- $post = [
- 'equipment_id' => 11,
- 'finish_id' => [rand(431,432)],
- 'id' => $ids,
- 'quantity' => $out_order_no_times,
- 'team_id' => 68,
- 'waste' => [[]],
- ];
- sleep(10);
- $a = $this->curlOpen($url,['header'=>$header,'post'=>$post]);
- echo $a;
- $n = 0;
- $ids = [];
- $out_order_no_times = [];
- }
- // flush();die;
- }
- }
- public function aa1(){
- ini_set('output_buffering', 'off');
- // 立即发送所有输出
- ini_set('implicit_flush', 'on');
- // 设置执行时间不限制
- set_time_limit(0);
- $list = DispatchSub::where('crt_time','>','1697385600')->where('finished_num',0)->get()->toArray();
- $url = 'https://fyy_api.qingyaokeji.com/api/finishedOrderAdd';
- echo count($list);
- $n = 0;
- $ids = [];
- $out_order_no_times = [];
- foreach ($list as $v){
- $header = [
- 'Authorization' => '[personalComputer]eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTc0NDMzMzMsIm5iZiI6MTY5NzQ0MzMzMiwiZXhwIjoxNzA2MDgzMzMzLCJkYXRhIjp7InVzZXJfaWQiOjF9fQ.wP5c0fPquR6mWYWdAIudf-J60aUBQiSYAmCaI0bWx6k',
- 'Zt'=> '999'
- ];
- if($n < 1){
- $ids[] = $v['id'];
- $out_order_no_times[] = $v['dispatch_quantity'];
- $n++;
- }
- if($n == 1){
- $post = [
- 'equipment_id' => 11,
- 'finish_id' => [rand(431,432)],
- 'id' => $ids,
- 'quantity' => $out_order_no_times,
- 'team_id' => 68,
- 'waste' => [[]],
- ];
- var_dump($post);
- $a = $this->curlOpen($url,['header'=>$header,'post'=>$post]);
- var_dump($a);die;
- $n = 0;
- $ids = [];
- $out_order_no_times = [];
- }
- // flush();die;
- }
- }
- function curlOpen($url, $config = array())
- {
- $arr = array('post' => false,'referer' => $url,'cookie' => '', 'useragent' => 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; customie8)', 'timeout' => 100, 'return' => true, 'proxy' => '', 'userpwd' => '', 'nobody' => false,'header'=>array(),'gzip'=>true,'ssl'=>true,'isupfile'=>false,'returnheader'=>false,'request'=>'post');
- $arr = array_merge($arr, $config);
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, $arr['return']);
- curl_setopt($ch, CURLOPT_NOBODY, $arr['nobody']);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_USERAGENT, $arr['useragent']);
- curl_setopt($ch, CURLOPT_REFERER, $arr['referer']);
- curl_setopt($ch, CURLOPT_TIMEOUT, $arr['timeout']);
- curl_setopt($ch, CURLOPT_HEADER, $arr['returnheader']);//��ȡheader
- if($arr['gzip']) curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
- if($arr['ssl'])
- {
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
- }
- if(!empty($arr['cookie']))
- {
- curl_setopt($ch, CURLOPT_COOKIEJAR, $arr['cookie']);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $arr['cookie']);
- }
- if(!empty($arr['proxy']))
- {
- //curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
- curl_setopt ($ch, CURLOPT_PROXY, $arr['proxy']);
- if(!empty($arr['userpwd']))
- {
- curl_setopt($ch,CURLOPT_PROXYUSERPWD,$arr['userpwd']);
- }
- }
- //ip�Ƚ����⣬�ü�ֵ��ʾ
- if(!empty($arr['header']['ip']))
- {
- array_push($arr['header'],'X-FORWARDED-FOR:'.$arr['header']['ip'],'CLIENT-IP:'.$arr['header']['ip']);
- unset($arr['header']['ip']);
- }
- $arr['header'] = array_filter($arr['header']);
- if(!empty($arr['header']))
- {
- $header = [];
- foreach ($arr['header'] as $k=>$v){
- $header[] = $k.':'.$v;
- }
- $header[] = 'Content-Type: application/json';
- curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
- }
- if($arr['request'] === 'put'){
- curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, "PUT");
- curl_setopt($ch, CURLOPT_POSTFIELDS,$arr['post']);
- }elseif($arr['post'] != false)
- {
- curl_setopt($ch, CURLOPT_POST, true);
- // if(is_array($arr['post']) && $arr['isupfile'] === false)
- // {
- // $post = http_build_query($arr['post']);
- // }
- // else
- // {
- // $post = $arr['post'];
- // }
- curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($arr['post']));
- }
- $result = curl_exec($ch);
- curl_close($ch);
- return $result;
- }
- 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' => "SO202307270001", 'CustomerName' => "金华市金东区方氏防火建材经营部", 'rate' => 55],
- 1 => ['Code' => "SO202307270002", 'CustomerName' => "岳阳耀东翔建筑材料有限公司", 'rate' => 20],
- 2 => ['Code' => "SO202307270003", 'CustomerName' => "森泓(内蒙古)建材有限公司", 'rate' => 99],
- 3 => ['Code' => "SO202307270004", 'CustomerName' => "重庆渝人实业有限公司", 'rate' => 65],
- 4 => ['Code' => "SO202307270005", 'CustomerName' => "九龙坡区优源木业销售中心", 'rate' => 37],
- 5 => ['Code' => "SO202307270006", 'CustomerName' => "湖北嘉宜木业有限公司", 'rate' => 16],
- 6 => ['Code' => "SO202307270007", 'CustomerName' => "中牟县国威家居建材商行", 'rate' => 44],
- 7 => ['Code' => "SO202307270008", 'CustomerName' => "绵阳市森元高科林业有限公司", 'rate' => 66],
- 8 => ['Code' => "SO202307270009", 'CustomerName' => "红花岗区美梦晨建材经营部", 'rate' => 22],
- 9 => ['Code' => "SO202307270010", 'CustomerName' => "茅箭区火车站鸿发装饰部", 'rate' => 15],
- 10 => ['Code' => "SO202307270011", 'CustomerName' => "郯城县王钦红建材五金店", 'rate' => 80],
- 11 => ['Code' => "SO202307270012", 'CustomerName' => "合肥麦凯森新材料科技有限公司", 'rate' => 15],
- 12 => ['Code' => "SO202307270013", 'CustomerName' => "湖北旺百福建材有限公司", 'rate' => 78],
- 13 => ['Code' => "SO202307270014", 'CustomerName' => "义乌市鼎泰建材有限公司", 'rate' => 15],
- 14 => ['Code' => "SO202307270015", 'CustomerName' => "平舆县艾力熊板材销售店", 'rate' => 40],
- 15 => ['Code' => "SO202307270016", 'CustomerName' => "杭州德兔装饰材料有限公司", 'rate' => 14],
- 16 => ['Code' => "SO202307270017", 'CustomerName' => "徐州美尔娜装饰材料有限公司", 'rate' => 88],
- 17 => ['Code' => "SO202307270018", 'CustomerName' => "合肥市包河区郭玉春建材经营部", 'rate' => 84],
- 18 => ['Code' => "SO202307270019", 'CustomerName' => "深圳雅匠新材料科技有限公司", 'rate' => 82],
- 19 => ['Code' => "SO202307270020", 'CustomerName' => "乌鲁木齐市米东区信和建材商行", 'rate' => 72],
- ];
- 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"=> "20"
- ],
- [
- "value"=> "2023-01-02",
- "num"=> "40"
- ],
- [
- "value"=> "2023-01-03",
- "num"=> "35"
- ],
- [
- "value"=> "2023-01-04",
- "num"=> "15"
- ],
- [
- "value"=> "2023-01-05",
- "num"=> "40",
- ]
- ];
- 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"
- ]
- ];
- 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"=>"SO202307270001",
- "product_title"=>"大王椰600经典型E0全桉-免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_5"=>[
- "order_no"=>"SO202307270002",
- "product_title"=>"大王椰600经典型E0全桉-免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_41"=>[
- "order_no"=>"SO202307270003",
- "product_title"=>"大王椰1700金装型E0香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_40"=>[
- "order_no"=>"SO202307270004",
- "product_title"=>"大王椰1700金装型ENF香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_12"=>[
- "order_no"=>"SO202307270005",
- "product_title"=>"大王椰900尊贵型E0-家具专用背板BW",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_3"=>[
- "order_no"=>"SO202307270006",
- "product_title"=>"家具A6森芯背板E0商标使用费",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_46"=>[
- "order_no"=>"SO202307270007",
- "product_title"=>"大王椰1800尊贵型E0指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_43"=>[
- "order_no"=>"SO202307270008",
- "product_title"=>"大王椰1800尊贵型E0指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_39"=>[
- "order_no"=>"SO202307270009",
- "product_title"=>"大王椰1800尊贵型ENF指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_36"=>[
- "order_no"=>"SO202307270010",
- "product_title"=>"大王椰封边皮家具2.2CM×1.0×6卷/件",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_37"=>[
- "order_no"=>"SO202307270011",
- "product_title"=>"大王椰封边皮家具2.2CM×1.0×6卷/件",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_33"=>[
- "order_no"=>"SO202307270012",
- "product_title"=>"大王椰封边皮家具2.2CM×1.0×6卷/件",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_11"=>[
- "order_no"=>"SO202307270013",
- "product_title"=>"大王椰1800尊贵型ENF-柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_28"=>[
- "order_no"=>"SO202307270014",
- "product_title"=>"大王椰1800尊贵型E0-家具柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_27"=>[
- "order_no"=>"SO202307270015",
- "product_title"=>"大王椰1800尊贵型E0指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_26"=>[
- "order_no"=>"SO202307270016",
- "product_title"=>"大王椰1700金装型E0香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_24"=>[
- "order_no"=>"SO202307270017",
- "product_title"=>"大王椰700尊贵型E0全桉-免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],"K23070127_1_34"=>[
- "order_no"=>"SO202307270018",
- "product_title"=>"大王椰1700金装型E0香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>61,
- "finish_num"=>0
- ],
- "K23070127_1_55"=>[
- "order_no"=>"SO202307270019",
- "product_title"=>"大王椰1800尊贵型E0指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_22"=>[
- "order_no"=>"SO202307270020",
- "product_title"=>"大王椰1800尊贵型ENF-柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_31"=>[
- "order_no"=>"SO202307270021",
- "product_title"=>"大王椰1800尊贵型ENF-柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_54"=>[
- "order_no"=>"SO202307270022",
- "product_title"=>"大王椰1800尊贵型ENF-柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- ];
- return $this->json_return(200,'',$arr);
- }
- public function nu_work_order(Request $request){
- $arr = [
- "K23070127_1_8"=>[
- "order_no"=>"SO202307270001",
- "product_title"=>"大王椰600经典型E0全桉-免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_5"=>[
- "order_no"=>"SO202307270002",
- "product_title"=>"大王椰600经典型E0全桉-免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_41"=>[
- "order_no"=>"SO202307270003",
- "product_title"=>"大王椰1700金装型E0香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_40"=>[
- "order_no"=>"SO202307270004",
- "product_title"=>"大王椰1700金装型ENF香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_12"=>[
- "order_no"=>"SO202307270005",
- "product_title"=>"大王椰900尊贵型E0-家具专用背板BW",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_3"=>[
- "order_no"=>"SO202307270006",
- "product_title"=>"家具A6森芯背板E0商标使用费",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_46"=>[
- "order_no"=>"SO202307270007",
- "product_title"=>"大王椰1800尊贵型E0指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_43"=>[
- "order_no"=>"SO202307270008",
- "product_title"=>"大王椰1800尊贵型E0指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_39"=>[
- "order_no"=>"SO202307270009",
- "product_title"=>"大王椰1800尊贵型ENF指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_36"=>[
- "order_no"=>"SO202307270010",
- "product_title"=>"大王椰封边皮家具2.2CM×1.0×6卷/件",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_37"=>[
- "order_no"=>"SO202307270011",
- "product_title"=>"大王椰封边皮家具2.2CM×1.0×6卷/件",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_33"=>[
- "order_no"=>"SO202307270012",
- "product_title"=>"大王椰封边皮家具2.2CM×1.0×6卷/件",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_11"=>[
- "order_no"=>"SO202307270013",
- "product_title"=>"大王椰1800尊贵型ENF-柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_28"=>[
- "order_no"=>"SO202307270014",
- "product_title"=>"大王椰1800尊贵型E0-家具柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_27"=>[
- "order_no"=>"SO202307270015",
- "product_title"=>"大王椰1800尊贵型E0指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_26"=>[
- "order_no"=>"SO202307270016",
- "product_title"=>"大王椰1700金装型E0香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_24"=>[
- "order_no"=>"SO202307270017",
- "product_title"=>"大王椰700尊贵型E0全桉-免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_34"=>[
- "order_no"=>"SO202307270018",
- "product_title"=>"大王椰1700金装型E0香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>61,
- "finish_num"=>0
- ],
- "K23070127_1_55"=>[
- "order_no"=>"SO202307270019",
- "product_title"=>"大王椰1800尊贵型E0指接芯香杉木-智能生态免漆板W",
- "procedure"=>"压贴",
- "product_num"=>6,
- "finish_num"=>0
- ],
- "K23070127_1_22"=>[
- "order_no"=>"SO202307270020",
- "product_title"=>"大王椰1800尊贵型ENF-柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_31"=>[
- "order_no"=>"SO202307270021",
- "product_title"=>"大王椰1800尊贵型ENF-柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- "K23070127_1_54"=>[
- "order_no"=>"SO202307270022",
- "product_title"=>"大王椰1800尊贵型ENF-柜门板PLW",
- "procedure"=>"压贴",
- "product_num"=>12,
- "finish_num"=>0
- ],
- ];
- return $this->json_return(200,'',$arr);
- }
- // public function product_num(Request $request){
- // $arr = [
- // [
- // "machine_day_num"=> "5.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"=> "4.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"=> "4.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"=>"SO202307270001",
- // "product_title"=>"银梨4号 AH68491-3油 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_5"=>[
- // "order_no"=>"SO202307270002",
- // "product_title"=>"K4001K 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_41"=>[
- // "order_no"=>"SO202307270003",
- // "product_title"=>"尤加利 AH53386-2-科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_40"=>[
- // "order_no"=>"SO202307270004",
- // "product_title"=>"混油橡木-2 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_12"=>[
- // "order_no"=>"SO202307270005",
- // "product_title"=>"混油胡桃-2 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_3"=>[
- // "order_no"=>"SO202307270006",
- // "product_title"=>"混油胡桃-3 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_46"=>[
- // "order_no"=>"SO202307270007",
- // "product_title"=>"科技木2号科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_43"=>[
- // "order_no"=>"SO202307270008",
- // "product_title"=>"YC 71310-2油 半透胡桃3号 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_39"=>[
- // "order_no"=>"SO202307270009",
- // "product_title"=>"科技木2号科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_36"=>[
- // "order_no"=>"SO202307270010",
- // "product_title"=>"90167-6橡木色1号 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_37"=>[
- // "order_no"=>"SO202307270011",
- // "product_title"=>"YC 71310-2油 半透胡桃3号 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_33"=>[
- // "order_no"=>"SO202307270012",
- // "product_title"=>"6293-70 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_11"=>[
- // "order_no"=>"SO202307270013",
- // "product_title"=>"时光流离-6 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_28"=>[
- // "order_no"=>"SO202307270014",
- // "product_title"=>"风调雨顺 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_27"=>[
- // "order_no"=>"SO202307270015",
- // "product_title"=>"科技木3号科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_26"=>[
- // "order_no"=>"SO202307270016",
- // "product_title"=>"诗和远方-科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_24"=>[
- // "order_no"=>"SO202307270017",
- // "product_title"=>"88036-1Y 银梨1007-7 -科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],"K23070127_1_34"=>[
- // "order_no"=>"SO202307270018",
- // "product_title"=>"天使白小浮雕 -科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>61,
- // "finish_num"=>0
- // ],
- // "K23070127_1_55"=>[
- // "order_no"=>"SO202307270019",
- // "product_title"=>"YC 71310-2油 半透胡桃3号 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_22"=>[
- // "order_no"=>"SO202307270020",
- // "product_title"=>"烟熏橡木 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_31"=>[
- // "order_no"=>"SO202307270021",
- // "product_title"=>"博尔诺胡桃-科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_54"=>[
- // "order_no"=>"SO202307270022",
- // "product_title"=>"整装1号-科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // ];
- //
- // return $this->json_return(200,'',$arr);
- // }
- //
- // public function nu_work_order(Request $request){
- // $arr = [
- // "K23070127_1_8"=>[
- // "order_no"=>"SO202307270001",
- // "product_title"=>"银梨4号 AH68491-3油 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_5"=>[
- // "order_no"=>"SO202307270002",
- // "product_title"=>"K4001K 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_41"=>[
- // "order_no"=>"SO202307270003",
- // "product_title"=>"尤加利 AH53386-2-科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_40"=>[
- // "order_no"=>"SO202307270004",
- // "product_title"=>"混油橡木-2 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_12"=>[
- // "order_no"=>"SO202307270005",
- // "product_title"=>"混油胡桃-2 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_3"=>[
- // "order_no"=>"SO202307270006",
- // "product_title"=>"混油胡桃-3 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_46"=>[
- // "order_no"=>"SO202307270007",
- // "product_title"=>"科技木2号科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_43"=>[
- // "order_no"=>"SO202307270008",
- // "product_title"=>"YC 71310-2油 半透胡桃3号 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_39"=>[
- // "order_no"=>"SO202307270009",
- // "product_title"=>"科技木2号科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_36"=>[
- // "order_no"=>"SO202307270010",
- // "product_title"=>"90167-6橡木色1号 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_37"=>[
- // "order_no"=>"SO202307270011",
- // "product_title"=>"YC 71310-2油 半透胡桃3号 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_33"=>[
- // "order_no"=>"SO202307270012",
- // "product_title"=>"6293-70 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_11"=>[
- // "order_no"=>"SO202307270013",
- // "product_title"=>"时光流离-6 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_28"=>[
- // "order_no"=>"SO202307270014",
- // "product_title"=>"风调雨顺 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_27"=>[
- // "order_no"=>"SO202307270015",
- // "product_title"=>"科技木3号科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_26"=>[
- // "order_no"=>"SO202307270016",
- // "product_title"=>"诗和远方-科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_24"=>[
- // "order_no"=>"SO202307270017",
- // "product_title"=>"88036-1Y 银梨1007-7 -科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],"K23070127_1_34"=>[
- // "order_no"=>"SO202307270018",
- // "product_title"=>"天使白小浮雕 -科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>61,
- // "finish_num"=>0
- // ],
- // "K23070127_1_55"=>[
- // "order_no"=>"SO202307270019",
- // "product_title"=>"YC 71310-2油 半透胡桃3号 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>6,
- // "finish_num"=>0
- // ],
- // "K23070127_1_22"=>[
- // "order_no"=>"SO202307270020",
- // "product_title"=>"烟熏橡木 科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_31"=>[
- // "order_no"=>"SO202307270021",
- // "product_title"=>"博尔诺胡桃-科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // "K23070127_1_54"=>[
- // "order_no"=>"SO202307270022",
- // "product_title"=>"整装1号-科技木皮",
- // "procedure"=>"压贴",
- // "product_num"=>12,
- // "finish_num"=>0
- // ],
- // ];
- // return $this->json_return(200,'',$arr);
- // }
- public function testFile(Request $request){
- $data = $request->all();
- $file = $request->file('file');
- $filename = $this->uploadItemBillFile($file);
- // 使用 'public' 磁盘驱动来获取文件路径
- $filePath = Storage::disk('public')->path('big_tree/'.$filename);
- $realPath = realpath($filePath);
- $url = $data['url'];
- $header = $data['header'];
- $header = explode(',',$header);
- $curl = curl_init();
- curl_setopt_array($curl, array(
- CURLOPT_URL => $url,
- // CURLOPT_VERBOSE => true,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => '',
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 0,
- CURLOPT_FOLLOWLOCATION => true,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
- CURLOPT_POSTFIELDS => ['file' => new \CURLFile($realPath)],
- // CURLOPT_HTTPHEADER => ["Content-Type:application/json;charset=UTF-8"],
- ));
- $response = curl_exec($curl);
- // $info = curl_getinfo($curl);
- curl_close($curl);
- Storage::disk('public')->delete('big_tree\\'.$filename);
- return $this->json_return(200,'',['data' => json_decode($response,true)]);
- }
- public function uploadItemBillFile($file){
- // 获取文件相关信息
- $ext = $file->getClientOriginalExtension(); // 扩展名
- $realPath = $file->getRealPath(); //临时文件的绝对路径
- $filename = $file->getClientOriginalName();//上传文件名
- // 上传文件
- // $file_name = time().rand(1000,9999);
- // $filename = $file_name.'.' . $ext;
- // 使用我们新建的uploads本地存储空间(目录)
- Storage::disk('public')->put('big_tree/'.$filename, file_get_contents($realPath));
- return $filename;
- }
- public function testaa(Request $request){
- $data = $request->all();
- $url = $data['url'];
- $post = $data['post'];
- $header = $data['header'];
- $curl = curl_init();
- $json = str_replace('"workflowSearchBean":{}','"workflowSearchBean":[]',json_encode($post));
- $json = str_replace('"workflowSearchBean":[]','"workflowSearchBean":{}',json_encode($post));
- $json = str_replace('"loginBindingParameters":[]','"loginBindingParameters":{}',json_encode($post));
- file_put_contents('1.txt',$json);
- curl_setopt_array($curl, array(
- CURLOPT_URL => $url,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => '',
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 0,
- CURLOPT_FOLLOWLOCATION => true,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
- CURLOPT_POSTFIELDS => $json,
- CURLOPT_HTTPHEADER => $header,
- ));
- $response = curl_exec($curl);
- curl_close($curl);
- return $this->json_return(200,'',json_decode($response,true));
- }
- public function testa(Request $request){
- $data = $request->all();
- $url = $data['url'];
- $header = $data['header'];
- $curl = curl_init();
- curl_setopt_array($curl, array(
- CURLOPT_URL => $url,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => '',
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 0,
- CURLOPT_FOLLOWLOCATION => true,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'GET',
- CURLOPT_HTTPHEADER => $header,
- ));
- $response = curl_exec($curl);
- curl_close($curl);
- return $this->json_return(200,'',json_decode($response,true));
- }
- public function testdwyput(Request $request){
- $data = $request->all();
- $url = $data['url'];
- $post = $data['post'];
- $header = $data['header'];
- $curl = curl_init();
- $json = str_replace('"workflowSearchBean":{}','"workflowSearchBean":[]',json_encode($post));
- $json = str_replace('"workflowSearchBean":[]','"workflowSearchBean":{}',json_encode($post));
- file_put_contents('1.txt',$json);
- curl_setopt_array($curl, array(
- CURLOPT_URL => $url,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => '',
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 0,
- CURLOPT_FOLLOWLOCATION => true,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'PUT',
- CURLOPT_POSTFIELDS => $json,
- CURLOPT_HTTPHEADER => $header,
- ));
- $response = curl_exec($curl);
- curl_close($curl);
- return $this->json_return(200,'',json_decode($response,true));
- }
- public function testdwydel(Request $request){
- $data = $request->all();
- $url = $data['url'];
- $header = $data['header'];
- $curl = curl_init();
- curl_setopt_array($curl, array(
- CURLOPT_URL => $url,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => '',
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 0,
- CURLOPT_FOLLOWLOCATION => true,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'DELETE',
- CURLOPT_HTTPHEADER => $header,
- ));
- $response = curl_exec($curl);
- curl_close($curl);
- return $this->json_return(200,'',json_decode($response,true));
- }
- public function testaa1(Request $request){
- $curl = curl_init();
- curl_setopt_array($curl, array(
- CURLOPT_URL => 'http://121.36.142.167:7774/jbl/api/module-data/team_list/page',
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => '',
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 0,
- CURLOPT_FOLLOWLOCATION => true,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
- CURLOPT_POSTFIELDS =>'{"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[],"size":15,"specialConditions":[],"dynamicFormCode":"team","developmentSystemId":null,"debugFlag":true}',
- CURLOPT_HTTPHEADER => array(
- 'Content-Sign: 88cb27fd67215452422c18f3ed71028e',
- 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0MTUwODMxfQ.1_Adx5tdReisZdgyyQfBjU4VCXzGDKNiztJ-WjPlZ3bG0EQHzcKZs7Pi0yk2xxQn1XWp0dNVHqUPbTMpkEU1aA',
- 'Content-Type: application/json',
- ),
- ));
- $response = curl_exec($curl);
- curl_close($curl);
- echo $response;
- }
- public function testapp(){
- $curl=curl_init();
- curl_setopt_array($curl,array(
- CURLOPT_URL=>'http://121.36.142.167:7774/jbl/api/module-data/dispatch_orders/page',
- CURLOPT_RETURNTRANSFER=>true,
- CURLOPT_ENCODING=>'',
- CURLOPT_MAXREDIRS=>10,
- CURLOPT_TIMEOUT=>0,
- CURLOPT_FOLLOWLOCATION=>true,
- CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST=>'POST',
- CURLOPT_POSTFIELDS=>'{"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[{"field":"dispatch_orders.dispatch_no","option":"LIKE_ANYWHERE","values":["PG2023081400027"]},{"field":"product_no","option":"LIKE_ANYWHERE","values":["BC030101000001"]}],"size":15,"specialConditions":[],"workflowSearchBean":{},"dynamicFormCode":"dispatch_orders","dynamicFormTable":null,"ignoreField":true,"developmentSystemId":null,"debugFlag":true}',
- CURLOPT_HTTPHEADER=>array(
- 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOLFJPTEVfSU5URVJGQUNFIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0Njc0MTE0fQ.L3Di3K_cpF0rWSgvzbcLufLm8bkCxd3Y-xudfKzSm4F-qdpDr0hYWWQP5K5BYTNuZnu4tWpGmSW2KRHU0pjt-A',
- 'Content-Type:application/json',
- ),
- ));
- $response=curl_exec($curl);
- curl_close($curl);
- dump(json_decode($response,true));die;
- $str = '{"result":[{"id":121,"finished_num":0,"dispatch_quantity":100,"out_order_no_time":"1691683200","process_id":9,"dispatch_no":"20230811001","order_product_id":119,"sale_orders_product_id":4499,"order_no":"2023081116917417502029","product_no":"00031412","product_title":"\u65b0\u897f\u5170\u677e","price":"10.0000000000","customer_name":"\u6c5f\u897f\u5fb7\u514b\u65af\u8bfa\uff08\u4e0a\u6d77\u5ba6\u821f\u53a8\u5177\u6709\u9650\u516c\u53f8\uff09"}],"data":{"id":[121],"quantity":["10"],"team_id":[68],"equipment_id":[8],"waste":[[]],"finish_id":[0]}}';
- $data = json_decode($str,true);
- list($status,$msg) = (new FinishedOrderService())->addInJob($data['result'],$data['data']);
- dump($msg);die;
- }
- public function te(){dump(222);die;
- $query = DB::table('orders_product_bom_process_202301_03 as bom')
- ->join('orders_product as op', function ($join) {
- $join->on('op.order_no', '=', 'bom.order_no')
- ->on('op.product_no', '=', 'bom.product_no')
- ->on('op.out_order_no', '=', 'bom.out_order_no');
- })
- ->where('bom.order_product_id', 4461)
- ->orderBy('bom.id','asc')
- ->select('bom.id','op.id as oid')
- ->chunk(10, function ($results) {dump($results);die;
- foreach ($results as $result) {
- // 处理每个分块的数据
- $id = $result->id;
- $orderProductId = $result->order_product_id;
- $oid = $result->oid;
- // 在这里进行你的逻辑处理
- }
- });
- }
- }
|