2025-11-28 16:05:22 +08:00

175 lines
5.1 KiB
C#
Raw 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.

namespace RIZO.Model.Mes.Dto.WorkOrderInfo
{
/// <summary>
/// 工单主表查询对象
/// </summary>
public class WorkOrderQueryDto : PagerInfo
{
public string WorkOrderCode { get; set; }
public string LineCode { get; set; }
public string LineName { get; set; }
public string OrderDate { get; set; }
public DateTime? StartTime { get; set; }
public DateTime? EndTime { get; set; }
}
/// <summary>
/// 工单主表输入输出对象
/// </summary>
public class WorkOrderDto
{
[ExcelColumn(Ignore = true)]
public long Id { get; set; }
[ExcelColumn(Ignore = true)]
public int OrderStatus { get; set; }
[ExcelColumn(Name = "工单状态")]
public string OrderStatusText
{
get
{
return OrderStatus switch
{
0 => "待执行",
1 => "执行中",
2 => "已完成"
};
}
}
[ExcelColumn(Name = "工单编码")]
public string WorkOrderCode { get; set; }
[ExcelColumn(Name = "产线编码")]
public string LineCode { get; set; }
[ExcelColumn(Name = "产线名称")]
public string LineName { get; set; }
[ExcelColumn(Name = "工艺路线编码")]
public string ProcessCode { get; set; }
[ExcelColumn(Name = "工艺路线名称")]
public string ProcessName { get; set; }
[ExcelColumn(Name = "订单日期")]
public string OrderDate { get; set; }
[ExcelColumn(Ignore = true)]
public string MaterialCode { get; set; }
[ExcelColumn(Ignore = true)]
public string MaterialName { get; set; }
[ExcelColumn(Name = "批次号")]
public string BatchNumber { get; set; }
[ExcelColumn(Name = "总数")]
public int TotalQty { get; set; }
[ExcelColumn(Name = "合格数")]
public int OkQty { get; set; }
[ExcelColumn(Name = "不合格数")]
public int NgQty { get; set; }
[ExcelColumn(Name = "不良原因")]
public string DefectReason { get; set; }
[ExcelColumn(Ignore = true)]
public string CreateBy { get; set; }
[ExcelColumn(Name = "创建人")]
public string CreateName { get; set; }
[ExcelColumn(Name = "创建时间")]
public DateTime? CreateTime { get; set; }
[ExcelColumn(Ignore = true)]
public string UpdateBy { get; set; }
[ExcelColumn(Name = "最后修改人")]
public string UpdateName { get; set; }
[ExcelColumn(Name = "最后修改时间")]
public DateTime? UpdateTime { get; set; }
[ExcelColumn(Name = "是否首检")]
public int FirstInspection { get; set; }
[ExcelColumn(Name = "是否首检合格")]
public int FirstInspectionResult { get; set; }
[ExcelColumn(Name = "首检合格时间")]
public DateTime? FirstInspectionTime { get; set; }
}
public class ScanCodeParm
{
// 可添加 [Required] 特性进行自动验证
[Required(ErrorMessage = "产线编码不能为空")]
public string LineCode { get; set; }
public string LineName { get; set; }
[Required(ErrorMessage = "扫码编码不能为空")]
public string IDCode { get; set; }
public string UserId { get; set; }
public string UserName { get; set; }
}
public class WorkOrderState
{
public List<long> Ids { get; set; }
public int OrderStatus { get; set; }
public string UserId { get; set; }
public string UserName { get; set; }
}
/// <summary>
/// 饼图数据项模型(单条数据)
/// </summary>
public class PieChartItem
{
/// <summary>
/// 分类名称(如 A类、B类对应前端 name
/// </summary>
public string name { get; set; }
/// <summary>
/// 对应数值(对应前端 value用 double 兼容整数/小数)
/// </summary>
public double value { get; set; }
}
/// <summary>
/// 饼图响应模型(外层统一格式)
/// </summary>
public class PieChartResponse
{
public int code { get; set; } = 200;
public string msg { get; set; } = "操作成功";
/// <summary>
/// 饼图核心数据(直接返回数组)
/// </summary>
public List<PieChartItem> data { get; set; } = new List<PieChartItem>();
}
/// <summary>
/// 折线图返回模型
/// </summary>
public class ChartResponse
{
/// <summary>
/// X轴数据
/// </summary>
public List<string> xAxisData { get; set; } = new List<string>();
/// <summary>
/// 系列数据
/// </summary>
public List<ChartSeries> series { get; set; } = new List<ChartSeries>();
}
public class ChartSeries
{
public string Name { get; set; }
public List<double> Data { get; set; } = new List<double>();
}
}