init: F9智慧缫丝系统 - 后端(server) + 主前端(web) + 打印设计器(openprint) 首次提交
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$login = Invoke-RestMethod -Uri "http://localhost:5210/api/auth/login" -Method Post -Body (@{ phone = "13800000000"; password = "123456" } | ConvertTo-Json) -ContentType "application/json"
|
||||
$h = @{ Authorization = "Bearer $($login.data.token)" }
|
||||
Write-Output "=== GENCODE ==="
|
||||
foreach ($t in @(@("RawMaterial_Zhuangkou","Code"), @("Process_ProcessZhuangkou","Code"), @("Fims_Batch","BatchNo"), @("Lims_Check","CheckNo"))) {
|
||||
$r = Invoke-RestMethod -Uri "http://localhost:5210/api/meta/gencode/$($t[0])/$($t[1])" -Method Post -Headers $h
|
||||
Write-Output " $($t[0]).$($t[1]) => $($r.data.value)"
|
||||
}
|
||||
Write-Output "=== REFS ==="
|
||||
foreach ($tb in @("ProXuan_Team","ProQian_Machine","Fims_Batch","RawMaterial_Zhuangkou","BaseCommon_Partner","HRS_Employee")) {
|
||||
try {
|
||||
$ref = Invoke-RestMethod -Uri "http://localhost:5210/api/meta/refs/$tb" -Headers $h -TimeoutSec 15
|
||||
Write-Output " $tb => $($ref.data.Count) items"
|
||||
} catch {
|
||||
Write-Output " $tb => ERROR"
|
||||
}
|
||||
}
|
||||
Write-Output "DONE"
|
||||
Reference in New Issue
Block a user