WMS/HHWMS.Web/Models/Agv/AgvTaskLog.cs
sunwang c76e7bb681 fix:永丰售后修复BUG,
1,物料库存获取不到ERP:重新调整触发查询逻辑
2,工序变更导致物料无法出库:配置旧工序
3,测试出库订单ERP推送,任务下发
2026-10-29 13:12:11 +08:00

110 lines
3.9 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web.Models.Agv
{
/// <summary>
/// AGV 任务状态与报文日志(每次状态变更/关键动作写一条)
/// 对应《平库AGV方案流程(AGV自调度版).md》9.6 / 10.2 DDL 第 4 段
/// </summary>
[Index(nameof(TaskNo), nameof(CreateTime))]
[Index(nameof(OrderId))]
[Table("AgvTaskLog")]
public class AgvTaskLog : BasePoco
{
// 必须声明 public new int ID,否则 EF 会用 BasePoco 的 Guid 主键
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public new int ID { get; set; }
/// <summary>
/// WMS 任务号
/// </summary>
[Display(Name = "AGV.TaskNo", Description = "WMS任务号")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
[Required(ErrorMessage = "Validate.{0}required")]
public string TaskNo { get; set; }
/// <summary>
/// AGV 返回运单号(与 TaskNo 一致,原值留痕)
/// </summary>
[Display(Name = "AGV.OrderId", Description = "AGV运单号")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string OrderId { get; set; }
/// <summary>
/// 变更前状态
/// </summary>
[Display(Name = "AGV.FromStatus", Description = "变更前状态")]
public AgvTaskStatusEnum? FromStatus { get; set; }
/// <summary>
/// 变更后状态
/// </summary>
[Display(Name = "AGV.ToStatus", Description = "变更后状态")]
public AgvTaskStatusEnum? ToStatus { get; set; }
/// <summary>
/// 回调事件(如 Loaded/Unloaded/Exception/Canceled)
/// </summary>
[Display(Name = "AGV.Event", Description = "回调事件")]
[StringLength(30, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Event { get; set; }
/// <summary>
/// 方向:down=下发,up=回调
/// </summary>
[Display(Name = "AGV.Direction", Description = "方向(down/up)")]
[StringLength(10, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Direction { get; set; }
/// <summary>
/// 事件发生时间
/// </summary>
[Display(Name = "AGV.EventTime", Description = "事件发生时间")]
public DateTime? EventTime { get; set; }
/// <summary>
/// 来源 IP
/// </summary>
[Display(Name = "AGV.SourceIp", Description = "来源IP")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string SourceIp { get; set; }
/// <summary>
/// 耗时(毫秒)
/// </summary>
[Display(Name = "AGV.DurationMs", Description = "耗时(毫秒)")]
public int? DurationMs { get; set; }
/// <summary>
/// 请求报文
/// </summary>
[Display(Name = "AGV.RequestJson", Description = "请求报文")]
public string RequestJson { get; set; }
/// <summary>
/// 响应报文
/// </summary>
[Display(Name = "AGV.ResponseJson", Description = "响应报文")]
public string ResponseJson { get; set; }
/// <summary>
/// 操作人(AGV 回调记 AGV)
/// </summary>
[Display(Name = "AGV.Operator", Description = "操作人")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Operator { get; set; }
/// <summary>
/// 备注/异常信息
/// </summary>
[Display(Name = "AGV.Remark", Description = "备注")]
[StringLength(500, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Remark { get; set; }
}
}