feat: 移除工位模板、AGV 链路增强与产品BOM/混产模板完善
- 移除工位模板体系(handler/logic 全删),同步路由与 seed - AGV 链路增强:点位锁、车辆状态、退料派车调整,新增海康 RCS Postman 调试集合 - MES 产品BOM/混产模板完善:新增 ProductBOMDialog 组件,调整 handler/logic;日排产达成对比调整 - WMS 业务完善:出入库、检验、备料、退料、成品入库、缺料代报等 handler 与前端页面调整 - 前端通用:双端新增 RemotePageSelect 组件,统一 nextStep 规则/帮助文档/布局/请求拦截 - 文档:更新产线API/案例/部署手册/问题记录等
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"bj_power_mes/ent/station"
|
||||
"bj_power_mes/ent/workorder"
|
||||
)
|
||||
|
||||
// ============ B5 叫料池 + 叫料单(2026-10-13 定稿) ============
|
||||
//
|
||||
// 池子来源:启用状态(CONFIRMED)的日排产 × 工单工艺组合(flow_combination) × 工艺物料清单(flow_material),
|
||||
@@ -41,20 +42,20 @@ type BorrowSource struct {
|
||||
|
||||
// CallPoolRow 叫料池行(含派生可用量,供叫料页)
|
||||
type CallPoolRow struct {
|
||||
StationNo int `json:"stationNo"`
|
||||
MaterialCode string `json:"materialCode"`
|
||||
MaterialName string `json:"materialName"`
|
||||
Unit string `json:"unit"`
|
||||
SnMode int `json:"snMode"`
|
||||
ReqQty int `json:"reqQty"`
|
||||
AdjQty int `json:"adjQty"`
|
||||
SentQty int `json:"sentQty"`
|
||||
ReservedQty int `json:"reservedQty"`
|
||||
AvailQty int `json:"availQty"`
|
||||
BorrowAvail int `json:"borrowAvail"` // 同工序其他工位对该物料的可借剩余额度(仅供前端提示与限额)
|
||||
StationNo int `json:"stationNo"`
|
||||
MaterialCode string `json:"materialCode"`
|
||||
MaterialName string `json:"materialName"`
|
||||
Unit string `json:"unit"`
|
||||
SnMode int `json:"snMode"`
|
||||
ReqQty int `json:"reqQty"`
|
||||
AdjQty int `json:"adjQty"`
|
||||
SentQty int `json:"sentQty"`
|
||||
ReservedQty int `json:"reservedQty"`
|
||||
AvailQty int `json:"availQty"`
|
||||
BorrowAvail int `json:"borrowAvail"` // 同工序其他工位对该物料的可借剩余额度(仅供前端提示与限额)
|
||||
BorrowSources []BorrowSource `json:"borrowSources"` // 同工序其他工位该物料的可借明细(stationNo→可用),供手动分配借料
|
||||
CrossDay bool `json:"crossDay"`
|
||||
PlanDates string `json:"planDates"`
|
||||
CrossDay bool `json:"crossDay"`
|
||||
PlanDates string `json:"planDates"`
|
||||
}
|
||||
|
||||
// CallItem 叫料明细行:一个物料 + 一个量 + 一个目标接驳台 = 一张叫料单 = 一个托盘 = 一次配送
|
||||
@@ -266,8 +267,9 @@ func (s *Service) recomputePoolStations(ctx context.Context, stationNos []int) (
|
||||
if fm.MaterialCode == "" {
|
||||
continue
|
||||
}
|
||||
// R7(2026-11-03 拍板):备料量=工单需求×单台用量,不预放折损率;损耗走补料审批(shortage)
|
||||
need := int(math.Ceil(float64(q) * fm.UnitQty))
|
||||
// 2026-11-17 用户拍板:叫料量=工单需求×单台净用量×(1+损耗率/100),损耗进叫料;
|
||||
// Σ分账=总账的平衡校验仍用净量,口径分离。
|
||||
need := int(math.Ceil(float64(q) * unitQtyWithLoss(fm.UnitQty, fm.LossRate)))
|
||||
if need <= 0 {
|
||||
continue
|
||||
}
|
||||
@@ -384,20 +386,20 @@ func (s *Service) StationPool(ctx context.Context, stationNo int) ([]CallPoolRow
|
||||
out := make([]CallPoolRow, 0, len(rows))
|
||||
for _, r := range rows {
|
||||
out = append(out, CallPoolRow{
|
||||
StationNo: r.StationNo,
|
||||
MaterialCode: r.MaterialCode,
|
||||
MaterialName: r.MaterialName,
|
||||
Unit: r.Unit,
|
||||
SnMode: r.SnMode,
|
||||
ReqQty: r.ReqQty,
|
||||
AdjQty: r.AdjQty,
|
||||
SentQty: r.SentQty,
|
||||
ReservedQty: r.ReservedQty,
|
||||
AvailQty: poolAvail(r.ReqQty, r.AdjQty, r.SentQty, r.ReservedQty),
|
||||
BorrowAvail: borrowByMat[r.MaterialCode],
|
||||
StationNo: r.StationNo,
|
||||
MaterialCode: r.MaterialCode,
|
||||
MaterialName: r.MaterialName,
|
||||
Unit: r.Unit,
|
||||
SnMode: r.SnMode,
|
||||
ReqQty: r.ReqQty,
|
||||
AdjQty: r.AdjQty,
|
||||
SentQty: r.SentQty,
|
||||
ReservedQty: r.ReservedQty,
|
||||
AvailQty: poolAvail(r.ReqQty, r.AdjQty, r.SentQty, r.ReservedQty),
|
||||
BorrowAvail: borrowByMat[r.MaterialCode],
|
||||
BorrowSources: borrowSrcByMat[r.MaterialCode],
|
||||
CrossDay: r.CrossDay,
|
||||
PlanDates: r.PlanDates,
|
||||
CrossDay: r.CrossDay,
|
||||
PlanDates: r.PlanDates,
|
||||
})
|
||||
}
|
||||
return out, nil
|
||||
|
||||
Reference in New Issue
Block a user