| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- using Prism.Mvvm;
- using System;
- using System.Windows;
- namespace TeamAAS_VP.Models
- {
- /// <summary>
- /// 设备信息配置,用于保存线别/站点/机台以及 MES 上传设置。
- /// </summary>
- public class DeviceInfo : BindableBase
- {
- private int _deviceNo;
- /// <summary>
- /// 设备编号,从0开始
- /// </summary>
- public int DeviceNo { get => _deviceNo; set => SetProperty(ref _deviceNo, value); }
- private string _deviceName;
- /// <summary>
- /// 设备名称
- /// </summary>
- public string DeviceName { get => _deviceName; set => SetProperty(ref _deviceName, value); }
- private string _deviceDesc;
- /// <summary>
- /// 设备描述
- /// </summary>
- public string DeviceDesc { get => _deviceDesc; set => SetProperty(ref _deviceDesc, value); }
- private string _line;
- /// <summary>
- /// 当前作业的线别
- /// </summary>
- public string Line { get => _line; set => SetProperty(ref _line, value); }
- private string _station;
- /// <summary>
- /// 当前作业的站点
- /// </summary>
- public string Station { get => _station; set => SetProperty(ref _station, value); }
- private string _fixtureId;
- /// <summary>
- /// 当前作业的机台编号
- /// </summary>
- public string FixtureId { get => _fixtureId; set => SetProperty(ref _fixtureId, value); }
- private bool _enableMes;
- /// <summary>
- /// 是否启用 MES 通讯功能
- /// </summary>
- public bool EnableMES { get => _enableMes; set => SetProperty(ref _enableMes, value); }
- private bool _enableXY;
- /// <summary>
- /// 是否启用锁螺丝XY超限 通讯功能,默认不启用
- /// </summary>
- public bool EnableXY { get => _enableXY; set => SetProperty(ref _enableXY, value); }
- private string _mesUrl;
- /// <summary>
- /// URL
- /// </summary>
- public string MesUrl { get => _mesUrl; set => SetProperty(ref _mesUrl, value); }
- private string _LogUrl;
- /// <summary>
- /// log的url
- /// </summary>
- public string LogUrl { get => _LogUrl; set => SetProperty(ref _LogUrl, value); }
- private string _ApiKey;
- /// <summary>
- /// ApiKey
- /// </summary>
- public string ApiKey { get => _ApiKey; set => SetProperty(ref _ApiKey, value); }
- private string _f;
- /// <summary>
- /// 全局function参数,传模块,组装站PQC检测组装的传PTL
- /// f=PTL
- /// </summary>
- public string F { get => _f; set => SetProperty(ref _f, value); }
- private string _comp;
- /// <summary>
- /// 此参数只有包装站是必传,其他组装站不用传,格式是部件名:部件编码,多个时用英文逗号隔开
- /// comp=battery1:B00012345,battery2:B00022355
- /// </summary>
- public string comp { get => _comp; set => SetProperty(ref _comp, value); }
- private bool _saveCsv;
- /// <summary>
- /// 是否保存CSV文件,默认不保存
- /// </summary>
- public bool SaveCsv { get => _saveCsv; set => SetProperty(ref _saveCsv, value); }
- private bool _saveCsvPPID;
- /// <summary>
- /// 是否保存CSV文件的PPID,默认不保存
- /// </summary>
- public bool SaveCsvPPID { get => _saveCsvPPID; set => SetProperty(ref _saveCsvPPID, value); }
- private string _saveCsvPath;
- /// <summary>
- /// 保存的CSV文件路径
- /// </summary>
- public string SaveCsvPath { get => _saveCsvPath; set => SetProperty(ref _saveCsvPath, value); }
- //private bool _enableDoubleMes;
- ///// <summary>
- ///// 是否启用两次产品编号MES获取,默认不启用
- ///// </summary>
- //public bool EnableDoubleMes { get => _enableDoubleMes; set => SetProperty(ref _enableDoubleMes, value); }
- private CTQ_Data _dataInfo = new CTQ_Data();
- public CTQ_Data DataInfo
- {
- get { return _dataInfo; }
- set { SetProperty(ref _dataInfo, value); }
- }
- public DeviceInfo()
- {
- DeviceNo = 0;
- Line = string.Empty;
- Station = string.Empty;
- FixtureId = string.Empty;
- F = string.Empty;
- comp = string.Empty;
- MesUrl = string.Empty;
- LogUrl = string.Empty;
- ApiKey = string.Empty;
- EnableMES = false;
- EnableXY = false;
- SaveCsvPPID = true;
- }
- public DeviceInfo Copy()
- {
- return new DeviceInfo
- {
- DeviceNo = this.DeviceNo,
- DeviceName = this.DeviceName,
- DeviceDesc = this.DeviceDesc,
- Line = this.Line,
- Station = this.Station,
- FixtureId = this.FixtureId,
- F = this.F,
- comp = this.comp,
- MesUrl = this.MesUrl,
- EnableMES = this.EnableMES,
- EnableXY = this.EnableXY,
- SaveCsv = this.SaveCsv,
- SaveCsvPath = this.SaveCsvPath,
- //EnableDoubleMes = this.EnableDoubleMes,
- DataInfo = this.DataInfo.Copy(),
- LogUrl = this.LogUrl,
- ApiKey = this.ApiKey,
- };
- }
- }
- }
|