feat: 完成多模块迭代更新
- 新增过程巡检按步骤上报、数量不符上报、工位退料功能 - 增加工单工程编号三级归属字段 - 新增物料安全库存与缺货预警 - 新增附件管理、退库单管理模块 - 优化生产看板展示逻辑与前端页面文案 - 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
@@ -17,6 +17,9 @@ func createZoneHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
ZoneCode string `json:"zoneCode"`
|
||||
ZoneName string `json:"zoneName"`
|
||||
Description string `json:"description"`
|
||||
ShelfNo string `json:"shelfNo"`
|
||||
LayerNo string `json:"layerNo"`
|
||||
PositionNo string `json:"positionNo"`
|
||||
}
|
||||
if err := parseJSON(r, &req); err != nil {
|
||||
fail(w, http.StatusBadRequest, "参数错误")
|
||||
@@ -43,6 +46,9 @@ func createZoneHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
SetZoneCode(req.ZoneCode).
|
||||
SetZoneName(req.ZoneName).
|
||||
SetNillableDescription(strPtr(req.Description)).
|
||||
SetNillableShelfNo(strPtr(req.ShelfNo)).
|
||||
SetNillableLayerNo(strPtr(req.LayerNo)).
|
||||
SetNillablePositionNo(strPtr(req.PositionNo)).
|
||||
SetStatus("启用").
|
||||
Save(ctx0())
|
||||
if err != nil {
|
||||
@@ -63,6 +69,9 @@ func updateZoneHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
ZoneCode string `json:"zoneCode"`
|
||||
ZoneName string `json:"zoneName"`
|
||||
Description string `json:"description"`
|
||||
ShelfNo string `json:"shelfNo"`
|
||||
LayerNo string `json:"layerNo"`
|
||||
PositionNo string `json:"positionNo"`
|
||||
}
|
||||
if err := parseJSON(r, &req); err != nil || req.ID <= 0 {
|
||||
fail(w, http.StatusBadRequest, "参数错误")
|
||||
@@ -77,6 +86,9 @@ func updateZoneHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
upd.SetZoneCode(req.ZoneCode)
|
||||
}
|
||||
upd.SetNillableDescription(strPtr(req.Description))
|
||||
upd.SetNillableShelfNo(strPtr(req.ShelfNo))
|
||||
upd.SetNillableLayerNo(strPtr(req.LayerNo))
|
||||
upd.SetNillablePositionNo(strPtr(req.PositionNo))
|
||||
z, err := upd.Save(ctx0())
|
||||
if err != nil {
|
||||
fail(w, http.StatusInternalServerError, "更新区域失败: "+err.Error())
|
||||
|
||||
Reference in New Issue
Block a user