feat: 新增工序签字功能,移除移料指令模块
新增操作工/检验员工序签字功能,支持工艺步骤配置签字要求;删除移料指令相关代码,将移料页签重命名为产线点位(上料/下料);新增成品入库功能及相关权限;优化备料单状态、质量状态逻辑,新增批次序号字段;修复AGV取消后备料单回退状态问题。
This commit is contained in:
@@ -217,7 +217,7 @@ func semiOutboundHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
}
|
||||
// 盘点冻结守卫(问题2):盘点期间库存量冻结,禁止半成品/成品出库。
|
||||
if rec.StocktakeNo != "" {
|
||||
fail(w, http.StatusConflict, catLabel+" "+req.Sn+" 正在盘点单 "+rec.StocktakeNo+" 锁定中,盘点期间禁止出库")
|
||||
fail(w, http.StatusConflict, catLabel+" "+req.Sn+" 正在盘点单 "+rec.StocktakeNo+" 中冻结,盘点期间禁止出库")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -244,6 +244,7 @@ type semiViewRow struct {
|
||||
Quantity int `json:"quantity"`
|
||||
ZoneCode string `json:"zoneCode"`
|
||||
Status string `json:"status"`
|
||||
QualityStatus string `json:"qualityStatus"` // 质量状态(成品入库记录表展示;新增字段,semi 页不受影响)
|
||||
OrderNo string `json:"orderNo"`
|
||||
OwnershipNo string `json:"ownershipNo"`
|
||||
ProductWorkNo string `json:"productWorkNo"`
|
||||
@@ -253,6 +254,7 @@ type semiViewRow struct {
|
||||
RecordedBy string `json:"recordedBy"`
|
||||
RecordedAt int64 `json:"recordedAt"`
|
||||
OutboundReason string `json:"outboundReason"`
|
||||
Remark string `json:"remark"` // 备注(成品入库记录表区分来源:手工成品入库 / 成品完工回流)
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
UpdatedAt int64 `json:"updatedAt"`
|
||||
}
|
||||
@@ -268,6 +270,7 @@ func semiView(inv *ent.Inventory) *semiViewRow {
|
||||
Quantity: inv.Quantity,
|
||||
ZoneCode: inv.ZoneCode,
|
||||
Status: inv.Status,
|
||||
QualityStatus: inv.QualityStatus,
|
||||
OrderNo: inv.OrderNo,
|
||||
OwnershipNo: inv.OwnershipNo,
|
||||
ProductWorkNo: inv.ProductWorkNo,
|
||||
@@ -277,6 +280,7 @@ func semiView(inv *ent.Inventory) *semiViewRow {
|
||||
RecordedBy: inv.RecordedBy,
|
||||
RecordedAt: inv.RecordedAt,
|
||||
OutboundReason: inv.OutboundReason,
|
||||
Remark: inv.Remark,
|
||||
CreatedAt: inv.CreatedAt,
|
||||
UpdatedAt: inv.UpdatedAt,
|
||||
}
|
||||
@@ -384,9 +388,9 @@ func materialFuture5QtyMap(ctx *svc.ServiceContext) map[string]int {
|
||||
func materialAvailableQty(ctx *svc.ServiceContext, code string) int {
|
||||
rows, err := ctx.EntClient.Inventory.Query().
|
||||
Where(
|
||||
inventory.MaterialCodeEQ(code),
|
||||
inventory.StatusIn("在库", "锁定"),
|
||||
inventory.QualityStatusEQ(QStatusPass),
|
||||
inventory.MaterialCodeEQ(code),
|
||||
inventory.StatusIn("在库", "锁定"),
|
||||
inventory.QualityStatusIn(QStatusPass, QStatusConcession),
|
||||
).All(ctx0())
|
||||
if err != nil {
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user