diff --git a/bj_power_mes/internal/handler/production/plc_torque_scan.go b/bj_power_mes/internal/handler/production/plc_torque_scan.go index 45861f3..e145e6d 100644 --- a/bj_power_mes/internal/handler/production/plc_torque_scan.go +++ b/bj_power_mes/internal/handler/production/plc_torque_scan.go @@ -161,13 +161,12 @@ func ProcessStepsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { } } - // TorqueAuditHandler POST /torque/audit 拧紧记录审核签字 func TorqueAuditHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req struct { RecordId int `json:"recordId"` - Remark string `json:"remark"` + Remark string `json:"remark"` } if err := httpx.ParseJSON(r, &req); err != nil { httpx.BadRequest(w, "请求体解析失败") @@ -202,4 +201,3 @@ func TorqueAuditLogHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { httpx.Ok(w, data) } } - diff --git a/bj_power_mes/internal/logic/workpiece.go b/bj_power_mes/internal/logic/workpiece.go index 5157104..4f7e1ed 100644 --- a/bj_power_mes/internal/logic/workpiece.go +++ b/bj_power_mes/internal/logic/workpiece.go @@ -502,17 +502,17 @@ func (s *Service) ListWorkpieces(ctx context.Context, sn, orderNo string) ([]*en // InProcessItem 在制品(已进线未完工)视图项。跨天工件继续停留,日排产不重复排。 type InProcessItem struct { - Sn string `json:"sn"` - OrderNo string `json:"orderNo"` - ProductCode string `json:"productCode"` - ProductName string `json:"productName"` - CurrentStation int `json:"currentStation"` // 0=上线位, 13=下线位, 其余为物理工位 + Sn string `json:"sn"` + OrderNo string `json:"orderNo"` + ProductCode string `json:"productCode"` + ProductName string `json:"productName"` + CurrentStation int `json:"currentStation"` // 0=上线位, 13=下线位, 其余为物理工位 CurrentStationName string `json:"currentStationName"` // 工位显示名(上线位/下线位/装配X) - Status string `json:"status"` - OnlineAt string `json:"onlineAt"` - DwellSec int64 `json:"dwellSec"` // 停留时长(秒),自进线起算 - DoneSteps int `json:"doneSteps"` - TotalSteps int `json:"totalSteps"` + Status string `json:"status"` + OnlineAt string `json:"onlineAt"` + DwellSec int64 `json:"dwellSec"` // 停留时长(秒),自进线起算 + DoneSteps int `json:"doneSteps"` + TotalSteps int `json:"totalSteps"` } // WorkpiecesInProcess 列出停在各工位、尚未完工的在制品(ONLINE/PROCESSING/REPAIR)。 @@ -588,17 +588,17 @@ func (s *Service) WorkpiecesInProcess(ctx context.Context, stationNo int, orderN stName = "下线位(虚拟)" } out = append(out, InProcessItem{ - Sn: wp.Sn, - OrderNo: wp.OrderNo, - ProductCode: code, - ProductName: name, - CurrentStation: cur, + Sn: wp.Sn, + OrderNo: wp.OrderNo, + ProductCode: code, + ProductName: name, + CurrentStation: cur, CurrentStationName: stName, - Status: wp.Status, - OnlineAt: onlineAt, - DwellSec: dwell, - DoneSteps: done, - TotalSteps: len(seq), + Status: wp.Status, + OnlineAt: onlineAt, + DwellSec: dwell, + DoneSteps: done, + TotalSteps: len(seq), }) } return out, nil