feat: 两库对等物料管理及产品工号贯通全流程
- 新增 MES 本地物料表及双向同步接口,WMS 物料变更自动同步 - 全流程新增产品工号字段,贯通入库/库存/出库/检验环节 - 工单管理支持多工单混产,移除单工单互斥限制 - 新增批次号/SN 字段支持质量检验联动 WMS 库存处置 - 修复权限规则,仅内置管理员账号不允许修改删除 - 工位终端新增 SN 扫码自动切换所属工单功能
This commit is contained in:
@@ -37,11 +37,13 @@ func CreateInspectionHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
httpx.FailHTTP(w, http.StatusForbidden, "无操作权限:"+code)
|
||||
return
|
||||
}
|
||||
if err := logic.New(svcCtx).CreateInspection(r.Context(), req, operator(r, "")); err != nil {
|
||||
msg, err := logic.New(svcCtx).CreateInspection(r.Context(), req, operator(r, ""))
|
||||
if err != nil {
|
||||
httpx.Fail(w, 2301, err.Error())
|
||||
return
|
||||
}
|
||||
httpx.OkMessage(w, "巡检记录已提交", nil)
|
||||
// message 放 data 返回:质量检验页需读取「库存联动失败/已联动」提示(含 WMS 原文原因)
|
||||
httpx.Ok(w, map[string]any{"message": msg})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,8 +95,8 @@ func UploadPhotoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func InspectionDisposalHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req struct {
|
||||
Id int `json:"id"`
|
||||
DisposalType string `json:"disposalType"`
|
||||
Id int `json:"id"`
|
||||
DisposalType string `json:"disposalType"`
|
||||
DisposalRemark string `json:"disposalRemark"`
|
||||
}
|
||||
if err := httpx.ParseJSON(r, &req); err != nil || req.Id <= 0 {
|
||||
|
||||
Reference in New Issue
Block a user