|
@@ -3,1502 +3,7 @@
|
|
|
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();
|
|
|
- if(empty($post)){
|
|
|
- $json = json_encode((object)$post);
|
|
|
- }else{
|
|
|
- $json = json_encode($post);
|
|
|
- }
|
|
|
-// $json = str_replace('"workflowSearchBean":{}','"workflowSearchBean":[]',json_encode($post));
|
|
|
- $json = str_replace('"workflowSearchBean":[]','"workflowSearchBean":{}',$json);
|
|
|
- $json = str_replace('"loginBindingParameters":[]','"loginBindingParameters":{}',$json);
|
|
|
-
|
|
|
- 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,
|
|
|
- CURLOPT_SSL_VERIFYPEER =>false,
|
|
|
- ));
|
|
|
- $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;
|
|
|
-
|
|
|
- // 在这里进行你的逻辑处理
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
}
|