feat: 大屏多订单改为同屏并列展示,物料申请新增跨工位借料来源并移除工单完成日期
This commit is contained in:
@@ -101,6 +101,17 @@ func callCompleteHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
// 借料来源透传(库房知情权):排除本工位自取项,仅保留真正借出的兄弟工位
|
||||
borrowForWMS := map[string]int{}
|
||||
for k, v := range call.BorrowFrom {
|
||||
if k == strconv.Itoa(call.StationNo) {
|
||||
continue
|
||||
}
|
||||
if v > 0 {
|
||||
borrowForWMS[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
// 2. FIFO 选库存(口径同 /api/internal/stock/batches:在库 + 合格 + 未锁定部分)
|
||||
rows, err := ctx.EntClient.Inventory.Query().
|
||||
Where(
|
||||
@@ -166,6 +177,7 @@ func callCompleteHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
TargetDock: call.TargetDock,
|
||||
TargetStation: strconv.Itoa(call.StationNo),
|
||||
NeedAgv: call.NeedAgv,
|
||||
BorrowFrom: borrowForWMS,
|
||||
}
|
||||
if p.sn != "" {
|
||||
payload.SnList = []string{p.sn}
|
||||
|
||||
Reference in New Issue
Block a user