1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444 |
- <?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));
- 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 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;
- // 在这里进行你的逻辑处理
- }
- });
- }
- }
|