using Org.BouncyCastle.Crypto; using Prism.Mvvm; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; namespace DM_Weight.Models { /// /// /// [Serializable] public class ChannelStock : BindableBase { /// /// /// //[SugarColumn(ColumnName = "id", IsPrimaryKey = true)] public string Id { get; set; } public string Chnguid { get; set; } /// /// /// 默认值: NULL /// public string MachineId { get; set; } /// /// /// 默认值: NULL /// public int DrawerNo { get; set; } /// /// /// 默认值: NULL /// public int ColNo { get; set; } /// /// /// 默认值: NULL /// public int PosNo { get; set; } /// /// /// 默认值: NULL /// public string DrugId { get; set; } /// /// /// 默认值: NULL /// public string ManuNo { get; set; } /// /// /// 默认值: NULL /// public string EffDate { get; set; } /// /// /// 默认值: NULL /// public int Quantity { get; set; } /// /// /// 默认值: 1 /// public int DrawerType { get; set; } /// /// /// 默认值: 1 /// public int BoardType { get; set; } /// /// /// 默认值: 1 /// public int? State { get; set; } public bool IsSelected { get; set; } public InOutInvoice Invoice { get; set; } public string Location { get => DrawerNo + "-" + ColNo; } private int _addQuantity = 0; public int AddQuantity { get => _addQuantity; set { if (value < 0) { throw new ArgumentException("加药数量不能小于0"); } SetProperty(ref _addQuantity, value); } } private int _takeQuantity = 0; public int TakeQuantity { get => _takeQuantity; set { if (value > Quantity) { throw new ArgumentException("取药数量不能大于库存"); } if (value < 0) { throw new ArgumentException("取药数量不能小于0"); } SetProperty(ref _takeQuantity, value); } } //private string _tipMessage=string.Empty; //[SugarColumn(IsIgnore = true)] //public string TipMessage //{ // get => _tipMessage; // set // { // SetProperty(ref _tipMessage, value); // } //} private int _returnQuantity = 0; public int ReturnQuantity { get => _returnQuantity; set { SetProperty(ref _returnQuantity, value); } } private int _checkQuantity = 0; public int CheckQuantity { get => _checkQuantity; set { if (value < 0) { throw new ArgumentException("盘点数量不能是负数"); } SetProperty(ref _checkQuantity, value); } } public int? CanReturnQuantity { get; set; } private DrugInfo? _DrugInfo; public DrugInfo DrugInfo { get => _DrugInfo; set => SetProperty(ref _DrugInfo, value); } public int process { get; set; } = 0; private DrugManuNo? _drugManuNo; public DrugManuNo? drugManuNo { get => _drugManuNo; set => SetProperty(ref _drugManuNo, value); } //private string _manuNoEffDate; //[SugarColumn(IsIgnore = true)] //public string ManuNoEffDate { get => _manuNoEffDate; set => SetProperty(ref _manuNoEffDate, value); } private ChannelList? _channelList; public ChannelList ChannelLst { get => _channelList; set => SetProperty(ref _channelList, value); } } }