|
|
@@ -65,6 +65,7 @@ use Illuminate\Support\Facades\Auth;
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
use Illuminate\Http\Request;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
+use Illuminate\Support\Facades\Storage;
|
|
|
use Illuminate\Support\Str;
|
|
|
use Maatwebsite\Excel\Facades\Excel;
|
|
|
use Ramsey\Collection\Collection;
|
|
|
@@ -104,34 +105,17 @@ class TestController extends Controller
|
|
|
app(BatchUpdateService::class)->batchUpdate('inventory_accounts',$updateParams);
|
|
|
}
|
|
|
}
|
|
|
- public function zzd()
|
|
|
+ public function zzd(Request $request)
|
|
|
{
|
|
|
- foreach (StoreItems::query()->with(["depository","store"])->where("store_id",0)->cursor() as $flight){
|
|
|
- $sql = <<<sql
|
|
|
- select ASNNO from DOC_ASN_DETAILS left join bas_sku on DOC_ASN_DETAILS.SKU= BAS_SKU.SKU
|
|
|
- WHERE asnlineno = ? AND skudescrc = ?
|
|
|
- AND BAS_SKU.sku = ? AND alternate_sku1 = ? AND expectedqty_each = ? and LINESTATUS = '99'
|
|
|
-sql;
|
|
|
- $param = [$flight->asn_line_code,$flight->name,$flight->sku,$flight->barcode,$flight->amount];
|
|
|
-if ($flight->depository)$sql.= " AND LOTATT05 = '".$flight->depository->code."' ";
|
|
|
-else $sql .=" AND LOTATT05 IS NULL";
|
|
|
- $r = DB::connection("oracle")->select(DB::raw($sql),$param);
|
|
|
- $dd = [];
|
|
|
- foreach ($r as $data){
|
|
|
- $store = Store::query()->where("asn_code",$data->asnno)->where("stored_method","快速入库")->first();
|
|
|
- if ($store){
|
|
|
- $dd[] = $store->id;
|
|
|
- }
|
|
|
- }
|
|
|
- if($dd){
|
|
|
- if (count($dd) == 1){
|
|
|
- StoreItems::query()->where("id",$flight->id)->where("store_id",0)->update(["store_id"=>$dd[0]]);
|
|
|
- echo "更改ID“".$flight->id."”的store_id为:".$dd[0]."<br>";
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ Storage::download("test.jpg");
|
|
|
+ return 123;
|
|
|
}
|
|
|
|
|
|
+ public function zzd1()
|
|
|
+ {
|
|
|
+ echo \request()->input("name");
|
|
|
+ exit();
|
|
|
+ }
|
|
|
public function mergeCarrier(){
|
|
|
$carriers = Carrier::query()->get();
|
|
|
$logistics = [];
|