分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-01-26 13137e3acdb759d1541f754fba81c616f418e2a1
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm.ItemDB;
 
namespace WIDESEA_Comm.DBItem
{
    public partial class MachineDB
    {
        public event Action<string, MachineDB> OnReadSignal;
 
        public string R_Name { get; set; }
        /// <summary>
        /// SN
        /// </summary>
        public string R_o_wp_id { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime R_o_mach_start_time { get; set; }
        /// <summary>
        /// 完成时间
        /// </summary>
        public DateTime R_o_mach_finish_time { get; set; }
        /// <summary>
        /// 操作人
        /// </summary>
        public string R_o_operator { get; set; }
        /// <summary>
        /// 去向
        /// </summary>
        public string R_o_shift { get; set; }
        /// <summary>
        /// 质检状态 0:未定义,1:OK,2:NG
        /// </summary>
        public short R_o_wp_status { get; set; }
        /// <summary>
        /// 结果
        /// </summary>
        public short R_o_result { get; set; }
        /// <summary>
        /// 错误代码
        /// </summary>
        public short R_o_error_code { get; set; }
 
        public short R_o_substation { get; set; }
 
        public string R_o_value_result_real_1 { get; set; }
        public string R_o_value_result_real_2 { get; set; }
        public string R_o_value_result_real_3 { get; set; }
        public string R_o_value_result_real_4 { get; set; }
        public bool R_o_value_result_bool { get; set; }
        public short oi_on { get; set; }
        public short R_oi_on
        {
            get
            {
                return oi_on;
            }
            set
            {
                if (value == 1 && R_Name.Contains("视觉检测"))
                    ReadSignal(OperationType.OperationType_Record, this);
                else if (value == 1 && R_Name.Contains("链条机"))
                    ReadSignal(OperationType.OperationType_Processor, this);
                oi_on = value;
 
 
            }
        }
 
        public void ReadSignal(string type, MachineDB reader)
        {
            Task.Run(() =>
            {
                OnReadSignal?.Invoke(type, reader);
            });
        }
    }
}