修改统计
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntdUI" Version="1.8.9" />
|
||||
|
@ -375,6 +375,22 @@ namespace DH.Commons.Enums
|
||||
[Description("异常")]
|
||||
DSExcept = 32
|
||||
}
|
||||
public enum RunState
|
||||
{
|
||||
[ColorSelect("Gold")]
|
||||
[Description("空闲")]
|
||||
Idle = 1,
|
||||
[ColorSelect("Lime")]
|
||||
[Description("运行中")]
|
||||
Running = 2,
|
||||
[ColorSelect("Gray")]
|
||||
[Description("停止")]
|
||||
Stop = 3,
|
||||
[ColorSelect("Red")]
|
||||
[Description("宕机")]
|
||||
Down = 99,
|
||||
}
|
||||
|
||||
public enum PriorityDirection
|
||||
{
|
||||
X,
|
||||
|
26
DH.Commons/Models/ProductSummary.cs
Normal file
26
DH.Commons/Models/ProductSummary.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.Commons.Models
|
||||
{
|
||||
public class CameraSummary
|
||||
{
|
||||
public string CameraName { get; set; } // 相机名称
|
||||
public int TiggerCount { get; set; } //触发数
|
||||
public int OKCount { get; set; } // OK 数
|
||||
public int NGCount { get; set; } // NG 数
|
||||
public int TotalCount => OKCount + NGCount; // 总检测数量
|
||||
public string YieldStr => $"{Yield:f2} %"; // 良率(字符串形式)
|
||||
public double Yield => OKCount + NGCount > 0 ? (double)OKCount / (OKCount + NGCount) * 100 : 0;
|
||||
}
|
||||
|
||||
public class ProductSummary
|
||||
{
|
||||
public int ProductAmount { get; set; }
|
||||
public string ResultDesc { get; set; }
|
||||
public string PercentStr { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user