12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439 |
- <?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);
- $url = $data['url'];
- $header = $data['header'];
- $header = explode(',',$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 => 'POST',
- CURLOPT_POSTFIELDS => ['file' => new \CURLFile($filePath)],
- // CURLOPT_HTTPHEADER => $header,
- ));
- $response = curl_exec($curl);
- curl_close($curl);
- Storage::disk('public')->delete('big_tree\\'.$filename);
- return $this->json_return(200,'',json_decode($response,true));
- }
- public function uploadItemBillFile($file){
- // 获取文件相关信息
- $ext = $file->getClientOriginalExtension(); // 扩展名
- $realPath = $file->getRealPath(); //临时文件的绝对路径
- // 上传文件
- $file_name = time().rand(1000,9999);
- $filename = $file_name.'.' . $ext;
- // 使用我们新建的uploads本地存储空间(目录)
- Storage::disk('public')->put('big_tree/'.$filename, file_get_contents($realPath));
- return $file_name. '.' .$ext;
- }
- 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;
- // 在这里进行你的逻辑处理
- }
- });
- }
- }
|