数据分析平台 记录回货信息抓取规则调整

This commit is contained in:
jh_peng 2025-04-17 09:52:26 +08:00
parent 12d3f80619
commit a36a86554c

View File

@ -314,6 +314,10 @@ func CronABList() {
for _, abListStock := range abListStocks { for _, abListStock := range abListStocks {
if abListStock.ReturnDate == k { if abListStock.ReturnDate == k {
isHandled = true isHandled = true
global.PostGreSQL.Model(&abListStock).Updates(map[string]interface{}{
"pass_quantity": v[0],
"fail_quantity": v[1],
})
} }
} }
if !isHandled { if !isHandled {
@ -564,6 +568,10 @@ func CronBPList() {
for _, bpListStock := range bpListStocks { for _, bpListStock := range bpListStocks {
if bpListStock.ReturnDate == k { if bpListStock.ReturnDate == k {
isHandled = true isHandled = true
global.PostGreSQL.Model(&bpListStock).Updates(map[string]interface{}{
"pass_quantity": v[0],
"fail_quantity": v[1],
})
} }
} }
if !isHandled { if !isHandled {
@ -779,6 +787,10 @@ func CronCPList() {
for _, cpListStock := range cpListStocks { for _, cpListStock := range cpListStocks {
if cpListStock.ReturnDate == k { if cpListStock.ReturnDate == k {
isHandled = true isHandled = true
global.PostGreSQL.Model(&cpListStock).Updates(map[string]interface{}{
"pass_quantity": v[0],
"fail_quantity": v[1],
})
} }
} }
if !isHandled { if !isHandled {
@ -1451,6 +1463,10 @@ func CronTRList() {
for _, trListStock := range trListStocks { for _, trListStock := range trListStocks {
if trListStock.ReturnDate == k { if trListStock.ReturnDate == k {
isHandled = true isHandled = true
global.PostGreSQL.Model(&trListStock).Updates(map[string]interface{}{
"pass_quantity": v[0],
"fail_quantity": v[1],
})
} }
} }
if !isHandled { if !isHandled {