1
schangxiang@126.com
2024-08-31 11a0ed37d6fb4650d616cc94b11f07d283ea1e97
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
using iWare.Wms.Core.Util.LowCode.Dto;
using Microsoft.EntityFrameworkCore;
using System;
 
namespace iWare.Wms.Application
{
    /// <summary>
    /// 设备刀具详情表输出参数
    /// </summary>
    public class KnifeToolEquipmentInfoOutput
    {
        /// <summary>
        /// 设备编号
        /// </summary>
        public string EquipmentID { get; set; }
        /// <summary>
        /// 设备名称
        /// </summary>
        public string EquipmentName { get; set; }
 
        /// <summary>
        /// 工序编号
        /// </summary>
        public string WorkingProcedure { get; set; }
        
        /// <summary>
        /// 工位
        /// </summary>
        public string Station { get; set; }
        
        /// <summary>
        /// 刀具编号
        /// </summary>
        public string KnifeToolID { get; set; }
        
        /// <summary>
        /// 刀具名称
        /// </summary>
        public string KnifeToolName { get; set; }
        
        /// <summary>
        /// 换上时寿命
        /// </summary>
        public int? StartLife { get; set; }
 
        /// <summary>
        /// 剩余寿命
        /// </summary>
        public int ResidueLife { get { 
                if(ChangeStartTime.HasValue)
                {
                    return StartLife.HasValue? StartLife.Value:0 + (DateTime.Now - ChangeStartTime.Value).Days;
                }
                else
                {
                    return 0;
                }
            } }
 
        /// <summary>
        /// 当前寿命
        /// </summary>
        public int? CurrentLife { get; set; }
        /// <summary>
        /// 刀具寿命
        /// </summary>
        public int? KnifeToolLife { get; set; }
        /// <summary>
        /// 刀具更换预警阈值
        /// </summary>
        public int KnifeToolChangeAlertThreshold { get; set; }
        /// <summary>
        /// 刀具是否告警
        /// </summary>
        public bool IsAlert
        {
            get
            {
                if (CurrentLife.HasValue&& KnifeToolLife.HasValue)
                {
                    if (KnifeToolLife <= CurrentLife.Value + KnifeToolChangeAlertThreshold)
                    {
                        return true;
                    }
                }
                return false;
            }
        }
 
        /// <summary>
        /// 换上时间
        /// </summary>
        public DateTime? ChangeStartTime { get; set; }
        /// <summary>
        /// 换下时间
        /// </summary>
        public DateTime? ChangeEndTime { get; set; }
 
        /// <summary>
        /// 备注1
        /// </summary>
        public string Remarks1 { get; set; }
        
        /// <summary>
        /// 备注2
        /// </summary>
        public string Remarks2 { get; set; }
        
        /// <summary>
        /// 备注3
        /// </summary>
        public string Remarks3 { get; set; }
        
        /// <summary>
        /// Id主键
        /// </summary>
        public long Id { get; set; }
        
    }
}