|
|
@@ -7,7 +7,9 @@ use App\Components\Database;
|
|
|
use App\Components\ErrorPush;
|
|
|
use App\MaterialBox;
|
|
|
use App\MaterialBoxModel;
|
|
|
+use App\Services\RejectedService;
|
|
|
use App\User;
|
|
|
+use App\Waybill;
|
|
|
use Illuminate\Http\Request;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
@@ -33,9 +35,42 @@ class TestController extends Controller
|
|
|
}
|
|
|
public function test(Request $request)
|
|
|
{
|
|
|
- dd(implode(" ",User::query()->select("id")->pluck("id")->toArray()));
|
|
|
+ dd(1);
|
|
|
Log::error(json_encode($request->header(),JSON_UNESCAPED_UNICODE));
|
|
|
return json_encode($request->header(),JSON_UNESCAPED_UNICODE);
|
|
|
}
|
|
|
+
|
|
|
+ private function paramDefault($waybill):array
|
|
|
+ {
|
|
|
+ $update = [];
|
|
|
+ if (!$waybill->order_type){
|
|
|
+ $update["order_type"] = $waybill->order_type = Waybill::ORDER_TYPE_DEFAULT;
|
|
|
+ }
|
|
|
+ if (!$waybill->transport_type){
|
|
|
+ $update["transport_type"] = $waybill->transport_type = "JZKH";
|
|
|
+ }
|
|
|
+ if (!$waybill->cargo_name){
|
|
|
+ $update["cargo_name"] = $waybill->cargo_name = "补货";
|
|
|
+ }
|
|
|
+ if (!$waybill->total_number){
|
|
|
+ $update["total_number"] = $waybill->total_number = 1;
|
|
|
+ }
|
|
|
+ if (!$waybill->total_weight){
|
|
|
+ $update["total_weight"] = $waybill->total_weight = 1;
|
|
|
+ }
|
|
|
+ if (!$waybill->package_service){
|
|
|
+ $update["package_service"] = $waybill->package_service = '托膜';
|
|
|
+ }
|
|
|
+ if (!$waybill->deliveryType_id){
|
|
|
+ $update["deliveryType_id"] = $waybill->deliveryType_id = 3;
|
|
|
+ }
|
|
|
+ if (!$waybill->pay_type){
|
|
|
+ $update["pay_type"] = $waybill->pay_type = Waybill::PAY_TYPE_DEFAULT;
|
|
|
+ }
|
|
|
+ if (!$waybill->back_sign_bill){
|
|
|
+ $update["back_sign_bill"] = $waybill->back_sign_bill = Waybill::BACK_SIGN_BILL_DEFAULT;
|
|
|
+ }
|
|
|
+ return array($update,$waybill);
|
|
|
+ }
|
|
|
}
|
|
|
|