|
@@ -215,7 +215,7 @@ class DwyController extends BaseController
|
|
|
foreach ($list as $kk => $vv) {
|
|
|
|
|
|
//写死的代码
|
|
|
- if($vv['num'] > 0 ) $vv['num'] = 3;
|
|
|
+ if($vv['num'] > 0 ) $vv['num'] = 300;
|
|
|
//end
|
|
|
|
|
|
if ($vv['num'] == 0) continue;
|
|
@@ -229,12 +229,29 @@ class DwyController extends BaseController
|
|
|
$v['send_qty'] += ($v['qty'] - $v['send_qty']);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//把产品相关参数进行封装
|
|
|
+ ////产品编号
|
|
|
+ //"product_code": "",
|
|
|
+ ////产品名称
|
|
|
+ //"product_code_show": "",
|
|
|
+ ////工艺
|
|
|
+ //"process_title": "",
|
|
|
+ ////花色
|
|
|
+ //"color": "",
|
|
|
+ ////工艺2
|
|
|
+ //"process_title_two": "",
|
|
|
+ ////花色2
|
|
|
+ //"color_two": "",
|
|
|
$key_arr = [
|
|
|
'product_code' => $vv['product_code'] ?? '',
|
|
|
'product_code_show' => $vv['product_code_show'] ?? '',
|
|
|
'order_item_id' => $vv['order_item_id'] ?? '',
|
|
|
'order_item_id_show' => $vv['order_item_id_show'] ?? '',
|
|
|
+ 'process_title' => $vv['process_title'] ?? '',
|
|
|
+ 'color' => $vv['color'] ?? '',
|
|
|
+ 'process_title_two' => $vv['process_title_two'] ?? '',
|
|
|
+ 'color_two' => $vv['color_two'] ?? '',
|
|
|
'send_qty' => $vv['num'],
|
|
|
// 'send_qty' => 0,
|
|
|
'restock_qty' => $vv['restock_qty'] ?? 0,
|
|
@@ -276,21 +293,49 @@ class DwyController extends BaseController
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- sort($data);
|
|
|
foreach ($data as $kk=>$vv){
|
|
|
- if($vv['box_code'] === 'CK00013'){
|
|
|
- $data[$kk]['box_code'] = 'CK00010';
|
|
|
- $data[$kk]['box_code_show'] = '商标七号仓';
|
|
|
-
|
|
|
+ if($vv['box_code'] === 'CK00008'){
|
|
|
+// $data[$kk]['box_code'] = 'CK00008';
|
|
|
+// $data[$kk]['box_code_show'] = '商标五号仓';
|
|
|
|
|
|
$c = $vv;
|
|
|
- $c['box_code'] = 'CK00008';
|
|
|
- $c['box_code_show'] = '商标五号仓';
|
|
|
- $data[] = $c;
|
|
|
- }
|
|
|
+ $c['box_code'] = 'CK00004';
|
|
|
+ $c['box_code_show'] = '商标一号仓';
|
|
|
|
|
|
+//
|
|
|
+// $b = $vv;
|
|
|
+// $b['box_code'] = 'CK00010';
|
|
|
+// $b['box_code_show'] = '商标七号仓';
|
|
|
+ }
|
|
|
|
|
|
+// if($vv['box_code'] === 'CK00008'){
|
|
|
+//
|
|
|
+// unset($data[$kk]);
|
|
|
+//
|
|
|
+//// $c = $vv;
|
|
|
+//// $c['box_code'] = 'CK00009';
|
|
|
+//// $c['box_code_show'] = '商标六号仓';
|
|
|
+//// $data[] = $c;
|
|
|
+// }
|
|
|
+//
|
|
|
+ if($vv['box_code'] === 'CK00004'){
|
|
|
+
|
|
|
+ unset($data[$kk]);
|
|
|
+
|
|
|
+// $c = $vv;
|
|
|
+// $c['box_code'] = 'CK00009';
|
|
|
+// $c['box_code_show'] = '商标六号仓';
|
|
|
+// $data[] = $c;
|
|
|
+ }
|
|
|
+//
|
|
|
+//
|
|
|
}
|
|
|
+ if(isset($c)) {
|
|
|
+ $data[] = $c;
|
|
|
+// $data[] = $b;
|
|
|
+ }
|
|
|
+
|
|
|
+ sort($data);
|
|
|
return ['status' => 200, 'data' => $data];
|
|
|
}
|
|
|
|
|
@@ -348,7 +393,7 @@ class DwyController extends BaseController
|
|
|
$url = 'https://tm.dwycloud.com/jbl/api/module-data/brand_in_stock/brand_in_stock/diy/11';
|
|
|
$lead_bind = $param['lead_out'];
|
|
|
$this->post_helper($url, json_encode($lead_bind), $header);
|
|
|
- return ['status'=>200,'success'];
|
|
|
+ return ['status'=>200,'msg'=>'success'];
|
|
|
}
|
|
|
|
|
|
public function post_helper($url, $data, $header)
|
|
@@ -393,4 +438,18 @@ class DwyController extends BaseController
|
|
|
|
|
|
return [200, 'data' => json_decode($result['data'],true)];
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ public function getBoxTrademark(Request $request){
|
|
|
+ $data = $request->all();
|
|
|
+ $box_nos = $data['box_nos'];
|
|
|
+ $dv = $data['mac'];
|
|
|
+ $detail = [];
|
|
|
+ foreach ($box_nos as $v){
|
|
|
+// var_dump(file_get_contents('/'.$dv.'_'.$box_nos.'.txt'));die;
|
|
|
+ $detail[$v] = json_decode(file_get_contents(''.$dv.'_'.$v.'.txt'),true);
|
|
|
+ }
|
|
|
+
|
|
|
+ return ['status'=>200, 'data' => $detail];
|
|
|
+ }
|
|
|
}
|