添加项目文件。
| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					<Project Sdk="Microsoft.NET.Sdk">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <PropertyGroup>
 | 
				
			||||||
 | 
					    <TargetFramework>net6.0-windows</TargetFramework>
 | 
				
			||||||
 | 
					    <Nullable>enable</Nullable>
 | 
				
			||||||
 | 
					    <UseWPF>true</UseWPF>
 | 
				
			||||||
 | 
					    <Platforms>AnyCPU;x86</Platforms>
 | 
				
			||||||
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <Reference Include="SCHelper">
 | 
				
			||||||
 | 
					      <HintPath>dll\SCHelper.dll</HintPath>
 | 
				
			||||||
 | 
					    </Reference>
 | 
				
			||||||
 | 
					    <Reference Include="SCHelper.Database">
 | 
				
			||||||
 | 
					      <HintPath>dll\SCHelper.Database.dll</HintPath>
 | 
				
			||||||
 | 
					    </Reference>
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</Project>
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,87 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 账册
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public class AccountModel
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 总结存
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int StockQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 借入数量
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int InQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 发出数量
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int OutQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 日期
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string OperationTime { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 凭证号
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string InvoiceId { get;set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品名称
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品ID
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 单位
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string PackUnit { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 剂型
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Dosage { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 厂家
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Manufactory { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批次
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string ManuNo { get;set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 效期
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string EffDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string OperatorName { get;set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 复核人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string ReviewerName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 规格
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 供应单位
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string SupplierDept { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 领用部门
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string ReceiveDept { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 账册类型
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public class AccountType
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 账册类型名称
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string  AccountTypeName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 账册类型值
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int AccountTypeValue { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,176 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    //[SugarTable("channel_list")]
 | 
				
			||||||
 | 
					    public class ChannelList 
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "chnguid", IsPrimaryKey = true)]
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
 | 
				
			||||||
 | 
					        public string Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        /////</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "machine_id")]
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "row_no")]
 | 
				
			||||||
 | 
					        public int DrawerNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int ColNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int PosNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ///// <summary>
 | 
				
			||||||
 | 
					        /////  
 | 
				
			||||||
 | 
					        ///// 默认值: NULL
 | 
				
			||||||
 | 
					        /////</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "manu_no")]
 | 
				
			||||||
 | 
					        //public string ManuNo { get; set; }
 | 
				
			||||||
 | 
					        ///// <summary>
 | 
				
			||||||
 | 
					        /////  
 | 
				
			||||||
 | 
					        ///// 默认值: NULL
 | 
				
			||||||
 | 
					        /////</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "eff_date")]
 | 
				
			||||||
 | 
					        //public string EffDate { get; set; }
 | 
				
			||||||
 | 
					        ///// <summary>
 | 
				
			||||||
 | 
					        /////  
 | 
				
			||||||
 | 
					        ///// 默认值: NULL
 | 
				
			||||||
 | 
					        /////</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "quantity")]
 | 
				
			||||||
 | 
					        //public int Quantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int DrawerType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int BoardType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        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;
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int AddQuantity
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    get => _addQuantity;
 | 
				
			||||||
 | 
					        //    set
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        SetProperty(ref _addQuantity, value);
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private int _takeQuantity = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int TakeQuantity
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    get => _takeQuantity;
 | 
				
			||||||
 | 
					        //    set
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        if (value > Quantity)
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            throw new ArgumentException("取药数量不能大于库存");
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //        SetProperty(ref _takeQuantity, value);
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					        //private int _returnQuantity = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int ReturnQuantity
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    get => _returnQuantity;
 | 
				
			||||||
 | 
					        //    set
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        SetProperty(ref _returnQuantity, value);
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private int _checkQuantity = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int CheckQuantity
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    get => _checkQuantity;
 | 
				
			||||||
 | 
					        //    set
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        if (value < 0)
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            throw new ArgumentException("盘点数量不能是负数");
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //        SetProperty(ref _checkQuantity, value);
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int? CanReturnQuantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private DrugInfo? _DrugInfo;
 | 
				
			||||||
 | 
					        //[Navigate(NavigateType.ManyToOne, nameof(DrugId))]
 | 
				
			||||||
 | 
					        //public DrugInfo Drug { get => _DrugInfo; set => SetProperty(ref _DrugInfo, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ////[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        ////public int process { get; set; } = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private DrugManuNo? _drugManuNo;
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public DrugManuNo? drugManuNo { get => _drugManuNo; set => SetProperty(ref _drugManuNo, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private List<ChannelStock>? _channelStocks;
 | 
				
			||||||
 | 
					        //[Navigate(NavigateType.OneToMany, nameof(ChannelStock.Chnguid))]
 | 
				
			||||||
 | 
					        //public List<ChannelStock> channelStocks { get => _channelStocks; set => SetProperty(ref _channelStocks, value); }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        //public int _totalCount;
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int totalCount { get => _totalCount;set=> SetProperty(ref _totalCount, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,150 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary>
 | 
				
			||||||
 | 
					    [Serializable]
 | 
				
			||||||
 | 
					    public class ChannelStock 
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
 | 
				
			||||||
 | 
					        public string Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string Chnguid { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int DrawerNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int ColNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int PosNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string ManuNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string EffDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int Quantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int DrawerType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int BoardType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        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;
 | 
				
			||||||
 | 
					            set;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private int _takeQuantity = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int TakeQuantity
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get;
 | 
				
			||||||
 | 
					            set;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        //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;
 | 
				
			||||||
 | 
					            set;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private int _checkQuantity = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int CheckQuantity
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get;
 | 
				
			||||||
 | 
					            set;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int? CanReturnQuantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private DrugInfo? _DrugInfo;
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int process { get; set; } = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private DrugManuNo? _drugManuNo;
 | 
				
			||||||
 | 
					        public DrugManuNo? drugManuNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private string _manuNoEffDate;
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public string ManuNoEffDate { get => _manuNoEffDate; set => SetProperty(ref _manuNoEffDate, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private ChannelList? _channelList;
 | 
				
			||||||
 | 
					        public ChannelList ChannelLst { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,25 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class ChannelStockCount
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public int DrawerNo { get; set; }
 | 
				
			||||||
 | 
					        public int ColNo { get; set; }
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					        public string ManuNo { get;set; }
 | 
				
			||||||
 | 
					        public int Quantity { get;set; }
 | 
				
			||||||
 | 
					        public string EffDate { get; set; }
 | 
				
			||||||
 | 
					        public string DrugName { get; set; }
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					        public string Dosage { get;set; }
 | 
				
			||||||
 | 
					        public string ManuFactory { get;set; }
 | 
				
			||||||
 | 
					        public string SmallUnit { get;set; }
 | 
				
			||||||
 | 
					        public string PackUnit { get; set; }
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,73 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 盘点后药品库存数
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public class CheckRecordStock
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public int ID { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 抽屉号
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int rowNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 列号
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int colNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 数量
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int quantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批次
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string manuNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 效期
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string effDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品名称
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string drugName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 规格
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string drugSpec { get; set; }
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					        public string packUnit { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 厂商
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string manufactory { get; set; }
 | 
				
			||||||
 | 
					        public int maxStock { get; set; }
 | 
				
			||||||
 | 
					        public string drugId { get; set; }
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批次总库存
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int ManuQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作时间
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string optdate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string operatorUser { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 审核人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string reviewerUser { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public List<CheckRecordStock> manuNoDetails { get;set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,77 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    internal class Class1
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /// <summary>    /// 行政区表    
 | 
				
			||||||
 | 
					    /// /// </summary>  
 | 
				
			||||||
 | 
					    public class DistrictModel
 | 
				
			||||||
 | 
					    {        /// <summary>        /// 主键        /// </summary>        
 | 
				
			||||||
 | 
					        private int id;        /// <summary>        /// 代码        /// </summary>        
 | 
				
			||||||
 | 
					        private int code;        /// <summary>        /// 名称        /// </summary>        
 | 
				
			||||||
 | 
					        private string name;
 | 
				
			||||||
 | 
					        public int Id { get { return id; } set { id = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 代码        /// </summary>        
 | 
				
			||||||
 | 
					        public int Code { get { return code; } set { code = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 名称        /// </summary>        
 | 
				
			||||||
 | 
					        public string Name { get { return name; } set { name = value; } }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /// <summary>    /// 表    /// </summary>    
 | 
				
			||||||
 | 
					    public class MapSpotModel
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        private int id;        //名称
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string name;        //代码
 | 
				
			||||||
 | 
					        private int code;        //个数
 | 
				
			||||||
 | 
					        private int allNumber;        //面积
 | 
				
			||||||
 | 
					        private double allArea;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private int hCTureNumber;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private double hCTrueArea;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 通过个数
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        private int hCTruePassNumber;        //不通过个数
 | 
				
			||||||
 | 
					        private int hCTrueNoPassNumber;        //通过率
 | 
				
			||||||
 | 
					        private string hCTruePassingRate;        //个数
 | 
				
			||||||
 | 
					        private int jLTureNumber;        //面积
 | 
				
			||||||
 | 
					        private double jLTrueArea;        //通过个数
 | 
				
			||||||
 | 
					        private int jLTruePassNumber;        //不通过个数
 | 
				
			||||||
 | 
					        private int jLTrueNoPassNumber;        //通过率
 | 
				
			||||||
 | 
					        private string jLTruePassingRate;
 | 
				
			||||||
 | 
					        private DistrictModel districtModels;
 | 
				
			||||||
 | 
					        public int Id { get { return id; } set { id = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 名称        /// </summary>        
 | 
				
			||||||
 | 
					        public string Name { get { return name; } set { name = value; } }        /// <summary>        /// 代码        /// </summary>        
 | 
				
			||||||
 | 
					        public int Code { get { return code; } set { code = value; } }        /// <summary>        /// 个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int AllNumber { get { return allNumber; } set { allNumber = value; } }        /// <summary>        /// 面积        /// </summary>        
 | 
				
			||||||
 | 
					        public double AllArea { get { return allArea; } set { allArea = value; } }        /// <summary>        /// 个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int HCTureNumber { get { return hCTureNumber; } set { hCTureNumber = value; } }        /// <summary>        /// 面积        /// </summary>        
 | 
				
			||||||
 | 
					        public double HCTrueArea { get { return hCTrueArea; } set { hCTrueArea = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 通过个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int HCTruePassNumber { get { return hCTruePassNumber; } set { hCTruePassNumber = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 不通过个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int HCTrueNoPassNumber { get { return hCTrueNoPassNumber; } set { hCTrueNoPassNumber = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 通过率        /// </summary>        
 | 
				
			||||||
 | 
					        public string HCTruePassingRate { get { return hCTruePassingRate; } set { hCTruePassingRate = value; } }        /// <summary>        /// 个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int JLTureNumber { get { return jLTureNumber; } set { jLTureNumber = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 面积        /// </summary>        
 | 
				
			||||||
 | 
					        public double JLTrueArea { get { return jLTrueArea; } set { jLTrueArea = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 通过个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int JLTruePassNumber { get { return jLTruePassNumber; } set { jLTruePassNumber = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 不通过个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int JLTrueNoPassNumber { get { return jLTrueNoPassNumber; } set { jLTrueNoPassNumber = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 监理单位已审核图斑-通过率        /// </summary>        
 | 
				
			||||||
 | 
					        public string JLTruePassingRate { get { return jLTruePassingRate; } set { jLTruePassingRate = value; } }
 | 
				
			||||||
 | 
					        public DistrictModel DistrictModels { get { return districtModels; } set { districtModels = value; } }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,73 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary>
 | 
				
			||||||
 | 
					    public class DrugInfo
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "pharmacy")]
 | 
				
			||||||
 | 
					        //public string Pharmacy { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ҩƷID 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ƴ 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PyCode { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "BD_code")]
 | 
				
			||||||
 | 
					        //public string BdCode { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ҩƷ 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugBarcode { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ҩƷ<D2A9><C6B7><EFBFBD><EFBFBD> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugBrandname { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ҩƷ<D2A9><C6B7><EFBFBD> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// <20><><EFBFBD><EFBFBD> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Dosage { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// <20><>װ<EFBFBD><D7B0>λ 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PackUnit { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Manufactory { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// <20><><EFBFBD>ҩ<EFBFBD><D2A9> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? MaxStock { get; set; }
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore=true)]
 | 
				
			||||||
 | 
					        public List<ChannelStock> channelStocks { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public List<DrugManuNo>? DrugManuNos { get; set; }
 | 
				
			||||||
 | 
					        public int? StockQuantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string drug_name_spec { get; set; }
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "drug_name_spec")]
 | 
				
			||||||
 | 
					        //public string Name { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,31 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class DrugManuNo
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        private string _id;
 | 
				
			||||||
 | 
					        public string Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string _drugId;
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string _manuNo;
 | 
				
			||||||
 | 
					        public string ManuNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string _manuDate;
 | 
				
			||||||
 | 
					        public string ManuDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string _effDate;
 | 
				
			||||||
 | 
					        public string EffDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private string _manuNoEffDate;
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public string ManuNoEffDate { get => _manuNoEffDate; set => SetProperty(ref _manuNoEffDate, value); }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,32 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    //交接班表
 | 
				
			||||||
 | 
					    public class HkcChangeShifts
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DateTime? OptDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string FromOperator { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string FromRviewer { get; set; }
 | 
				
			||||||
 | 
					        public string ToOperator { get;set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string ToReviewer { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DateTime? ToDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string State { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string OptState { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string Machineid { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,125 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class InOutInvoice
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 主键(序号)       
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string InPharmacyId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string OutPharmacyId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 库存管理单位(入库单位代码) 
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string storage { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         /// <summary>
 | 
				
			||||||
 | 
					         /// 单据号
 | 
				
			||||||
 | 
					         /// </summary>
 | 
				
			||||||
 | 
					        public string InvoiceNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string InvoiceDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品id
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品规格
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 计算单位
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Units { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 厂商标识
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string FirmId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 包装规格(反映药品含量及包装信息,如0.25g*30)   
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string PackageSpec { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 数量(以包装单位所计的数量)      
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int quantity { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 计量单位,可使用任一级管理上方便的包装
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string PackageUnits { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品批次
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugManuNo { get; set; }
 | 
				
			||||||
 | 
					       
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 创建时间(入库日期)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public DateTime CreateTime { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 1.请领入库 0.其它
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int Type { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 类型描述
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string TypeDescribe { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 供货方
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Supplier { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Operator { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 存放库房
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string SubStorage { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 备注
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Memos { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int Status { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string DrugEffDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string HisId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int CancelFlag { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int CountNum { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int SumQuantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,20 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    [Serializable]
 | 
				
			||||||
 | 
					    public class Invoice
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public string InvoiceNo { get; set; }
 | 
				
			||||||
 | 
					        public string InvoiceDate { get; set; }
 | 
				
			||||||
 | 
					        public int Count { get; set; }
 | 
				
			||||||
 | 
					        public int Quantity { get; set; }
 | 
				
			||||||
 | 
					        public int Status { get; set; }
 | 
				
			||||||
 | 
					        public string PharmacyName1 { get; set; }
 | 
				
			||||||
 | 
					        public string PharmacyName2 { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,129 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Security.Principal;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{ 
 | 
				
			||||||
 | 
					    public class MachineRecord
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 主键 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 设备id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 数量 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int Quantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int? StockQuantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int? CheckQuantity { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批号 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string ManuNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作人id 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? Operator { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public UserList User { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 审核人id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int? Reviewer { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作时间 
 | 
				
			||||||
 | 
					        /// 默认值: CURRENT_TIMESTAMP
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public DateTime OperationTime { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 效期 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public DateTime? EffDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 出库入库类型(1入库2出库31还药32还空瓶4盘点5日结存) 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int Type { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 出入库调拨单id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string InvoiceId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 列号 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int ColNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 抽屉号 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int DrawerNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 取药科室 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string DepartmentId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 是否已经退药(0:没有1:还了部分2:完成) 
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int Status { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 退药量 
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "return_quantity1", IsOnlyIgnoreInsert = true)] 
 | 
				
			||||||
 | 
					        public int ReturnQuantity1 { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 退空瓶量 
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "return_quantity2", IsOnlyIgnoreInsert = true 
 | 
				
			||||||
 | 
					        public int ReturnQuantity2 { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 取药记录id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int? GetId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 是否已经销毁 
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int? IsDestroy { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int CanReturnQuantity
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => Quantity - ReturnQuantity1 - ReturnQuantity2;
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public bool IsSelected { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品对应批号库存
 | 
				
			||||||
 | 
					        /// </summary> 
 | 
				
			||||||
 | 
					        public int? ManunoQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 供应单位
 | 
				
			||||||
 | 
					        /// </summary> 
 | 
				
			||||||
 | 
					        public string SupplierDept { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 领用部门
 | 
				
			||||||
 | 
					        /// </summary> 
 | 
				
			||||||
 | 
					        public string ReceiveDept { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,112 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq; 
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary> 
 | 
				
			||||||
 | 
					    public class OrderDetail
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "order_id")]
 | 
				
			||||||
 | 
					        //public int? OrderId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PatientId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string OrderNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public DateTime ChargeDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "serial_no")]
 | 
				
			||||||
 | 
					        //public int? SerialNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int Quantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string OrderUnit { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? UnitConvercoef { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string SetManuNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string SetEffDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "price")]
 | 
				
			||||||
 | 
					        //public string Price { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "total_price")]
 | 
				
			||||||
 | 
					        //public string TotalPrice { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseDiscrip { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseFrequ { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseOnce { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseBy { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: '0'
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseSelf { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseDosage { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,24 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{ 
 | 
				
			||||||
 | 
					    public class OrderFinish
 | 
				
			||||||
 | 
					    { 
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public string Pharmacy { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public string PatientId { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public string OrderNo { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int State { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public string Operator { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,166 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq; 
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary> 
 | 
				
			||||||
 | 
					    public class OrderInfo
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int OrderId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string Pharmacy { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string OrderNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string PatientId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PName { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Sex { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Age { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string IdNumber { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PatientCard { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string InvoiceNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PatientNo { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DoctorName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public DateTime OrderDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public DateTime ChargeDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public DateTime RecvDate { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DeptName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Disease { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string OrderType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string ChargeType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int State { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? HisDispFlag { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? CancelFlag { get; set; }
 | 
				
			||||||
 | 
					       
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? DmStatus { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "agent_name")]
 | 
				
			||||||
 | 
					        //public string AgentName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "agent_id_no")]
 | 
				
			||||||
 | 
					        //public string AgentIdNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public decimal? Costs { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "payments")]
 | 
				
			||||||
 | 
					        //public decimal? Payments { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "dispensary")]
 | 
				
			||||||
 | 
					        //public string Dispensary { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "identity")]
 | 
				
			||||||
 | 
					        //public string Identity { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,34 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Collections.ObjectModel;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary>
 | 
				
			||||||
 | 
					    [Serializable]
 | 
				
			||||||
 | 
					    public class PremissionDm
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 主键 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public int Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 菜单名 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public string PremissionName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 菜单路径 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public string PremissionPath { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 图片source 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PremissionImage { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        public ObservableCollection<PremissionDm>? Children { get; set; }
 | 
				
			||||||
 | 
					     
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,34 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary>
 | 
				
			||||||
 | 
					    public class RoleDm
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public int? Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public string RoleName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName="role_des"    )]
 | 
				
			||||||
 | 
					        //public string RoleDes { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        ///[SugarColumn(ColumnName="permissions"    )]
 | 
				
			||||||
 | 
					        public List<PremissionDm> Permissions { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public string MachineId { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,40 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class ShiftsReport
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string DrugName { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int? BeforeNum { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int? GetNum { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int? UseNum { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string ManuNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int? Surplus { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DateTime OptDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string FromOperator { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string FromReviewer { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string ToOperator { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string ToReviewer { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,66 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Dal.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary> 
 | 
				
			||||||
 | 
					    public class UserList
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public int Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string UserName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string Nickname { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string PassWord { get; set; }
 | 
				
			||||||
 | 
					       
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string UserBarcode { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         //[SugarColumn(ColumnName="status"    )]
 | 
				
			||||||
 | 
					         //public int? Status { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public int? RoleId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public RoleDm? Role { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName="user_card"    )]
 | 
				
			||||||
 | 
					        // public string UserCard { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public byte[] Sign { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public override string ToString()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return "userList = [UserName:" + Nickname + ", UserId:" + UserName + "]";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,419 @@
 | 
				
			||||||
 | 
					using DM_Dal.Models;
 | 
				
			||||||
 | 
					using Newtonsoft.Json;
 | 
				
			||||||
 | 
					using SCHelper.Database;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Configuration;
 | 
				
			||||||
 | 
					using System.Data;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					using System.Windows.Controls;
 | 
				
			||||||
 | 
					using System.Xml;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Dal
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class MysqlHelperDal
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        static string machine_id = ConfigurationManager.AppSettings["machineId"].ToString();
 | 
				
			||||||
 | 
					        #region 公共
 | 
				
			||||||
 | 
					        ////获取抽屉数量
 | 
				
			||||||
 | 
					        public int FindDrawerCount()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            int count = 0;
 | 
				
			||||||
 | 
					            string sql = $@"SELECT COUNT(1) FROM (SELECT COUNT(row_no) FROM channel_list  WHERE ( drawer_type <> 3 )  AND  (machine_id = '{machine_id}') GROUP BY row_no ) CountTable";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            DataSet ds = DBHelper.GetInstance().ExecuteQuery(sql);
 | 
				
			||||||
 | 
					            if (ds != null && ds.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                count = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return count;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #region 用户登录 
 | 
				
			||||||
 | 
					        //指纹登录
 | 
				
			||||||
 | 
					        public UserList CheckUserByFingerPrinter(int fingerPrinterId)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            UserList? user = null;
 | 
				
			||||||
 | 
					            int id = fingerPrinterId;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            string sql = $@"select ul.id as id,ul.User_name as userName,r.id as roleId,r.role_name,r.permissions,r.machine_id from user_list ul 
 | 
				
			||||||
 | 
					                                INNER JOIN role r on ul.machine_role_id=r.id where ul.Id={fingerPrinterId} and ul.machine_id='{machine_id}' and r.machine_id='{machine_id}'";
 | 
				
			||||||
 | 
					            DataSet ds = DBHelper.GetInstance().ExecuteQuery(sql);
 | 
				
			||||||
 | 
					            if (ds.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                user = new UserList();
 | 
				
			||||||
 | 
					                user.Id = ds.Tables[0].Rows[0]["id"] is DBNull ? 0 : Convert.ToInt32(ds.Tables[0].Rows[0]["id"]);
 | 
				
			||||||
 | 
					                user.UserName = ds.Tables[0].Rows[0]["userName"] is DBNull ? "" : ds.Tables[0].Rows[0]["userName"].ToString();
 | 
				
			||||||
 | 
					                user.Nickname = ds.Tables[0].Rows[0]["userName"] is DBNull ? "" : ds.Tables[0].Rows[0]["userName"].ToString();
 | 
				
			||||||
 | 
					                user.MachineId = ds.Tables[0].Rows[0]["machine_id"] is DBNull ? "" : ds.Tables[0].Rows[0]["machine_id"].ToString();
 | 
				
			||||||
 | 
					                RoleDm role = new RoleDm();
 | 
				
			||||||
 | 
					                role.Id = ds.Tables[0].Rows[0]["roleId"] is DBNull ? 0 : Convert.ToInt32(ds.Tables[0].Rows[0]["roleId"]);
 | 
				
			||||||
 | 
					                role.RoleName = ds.Tables[0].Rows[0]["role_name"] is DBNull ? "" : ds.Tables[0].Rows[0]["role_name"].ToString();
 | 
				
			||||||
 | 
					                role.Permissions = JsonConvert.DeserializeObject<List<PremissionDm>>(ds.Tables[0].Rows[0]["permissions"] is DBNull ? "" : ds.Tables[0].Rows[0]["permissions"].ToString());  // JsonConvert.SerializeObject(reader.GetString("permissions")).ToList();
 | 
				
			||||||
 | 
					                user.Role = role;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return user;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        //用户名密码登录
 | 
				
			||||||
 | 
					        public UserList CheckUserForLogin(string userName)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            UserList user = null;
 | 
				
			||||||
 | 
					            string sql = $@"select ul.id as id,ul.User_name as userName,ul.pass_word,r.id as roleId,r.role_name,r.permissions,r.machine_id from user_list ul 
 | 
				
			||||||
 | 
					                                INNER JOIN role r on ul.machine_role_id=r.id where ul.user_ID='{userName}' and ul.machine_id='{machine_id}' and r.machine_id='{machine_id}'";
 | 
				
			||||||
 | 
					            DataSet ds = DBHelper.GetInstance().ExecuteQuery(sql);
 | 
				
			||||||
 | 
					            if (ds.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                user = new UserList();
 | 
				
			||||||
 | 
					                user.Id = ds.Tables[0].Rows[0]["id"] is DBNull ? 0 : Convert.ToInt32(ds.Tables[0].Rows[0]["id"]);
 | 
				
			||||||
 | 
					                user.UserName = ds.Tables[0].Rows[0]["userName"] is DBNull ? "" : ds.Tables[0].Rows[0]["userName"].ToString();
 | 
				
			||||||
 | 
					                user.Nickname = ds.Tables[0].Rows[0]["userName"] is DBNull ? "" : ds.Tables[0].Rows[0]["userName"].ToString();
 | 
				
			||||||
 | 
					                user.MachineId = ds.Tables[0].Rows[0]["machine_id"] is DBNull ? "" : ds.Tables[0].Rows[0]["machine_id"].ToString();
 | 
				
			||||||
 | 
					                RoleDm role = new RoleDm();
 | 
				
			||||||
 | 
					                role.Id = ds.Tables[0].Rows[0]["roleId"] is DBNull ? 0 : Convert.ToInt32(ds.Tables[0].Rows[0]["roleId"]);
 | 
				
			||||||
 | 
					                role.RoleName = ds.Tables[0].Rows[0]["role_name"] is DBNull ? "" : ds.Tables[0].Rows[0]["role_name"].ToString();
 | 
				
			||||||
 | 
					                role.Permissions = JsonConvert.DeserializeObject<List<PremissionDm>>(ds.Tables[0].Rows[0]["permissions"] is DBNull ? "" : ds.Tables[0].Rows[0]["permissions"].ToString());  // JsonConvert.SerializeObject(reader.GetString("permissions")).ToList();
 | 
				
			||||||
 | 
					                user.Role = role;
 | 
				
			||||||
 | 
					                user.PassWord = ds.Tables[0].Rows[0]["pass_word"] is DBNull ? "" : ds.Tables[0].Rows[0]["pass_word"].ToString();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return user;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #region 处方取药
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 处方取药
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="OrderDate"></param>
 | 
				
			||||||
 | 
					        /// <param name="pageNum"></param>
 | 
				
			||||||
 | 
					        /// <param name="pageSize"></param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        public List<OrderInfo> GetOrderInfos(string Code, string SearchValue, string OrderDate, int pageNum, int pageSize, ref int totalCount)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            List<OrderInfo> orderInfos = new List<OrderInfo>();
 | 
				
			||||||
 | 
					            totalCount = 0;
 | 
				
			||||||
 | 
					            pageNum = (pageNum - 1) * pageSize;
 | 
				
			||||||
 | 
					            string countSql = $@" SELECT COUNT(1) FROM (SELECT oi.order_id FROM order_info oi Inner JOIN order_detail od ON ( oi.order_no = od.order_no )  
 | 
				
			||||||
 | 
					                                    Inner JOIN (SELECT chnguid,machine_id,row_no,col_no,pos_no,drug_id,drawer_type,board_type,state FROM channel_list 
 | 
				
			||||||
 | 
					                                    WHERE ( drawer_type = 1 )  AND  (machine_id = '{machine_id}') GROUP BY drug_id  ) t 
 | 
				
			||||||
 | 
					                                 ON ( od.drug_id = t.drug_id )   WHERE  ( oi.dm_status = 0 ) 
 | 
				
			||||||
 | 
					                                 AND ( oi.his_disp_flag = 0 )  AND ( oi.cancel_flag = 0 ) ";
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(OrderDate))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                countSql += $"  AND  (DATE_FORMAT(oi.recv_date, '%Y-%m-%d') = '{OrderDate}' ) ";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(Code) && !string.IsNullOrEmpty(SearchValue))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (Code.Equals("OrderNo"))
 | 
				
			||||||
 | 
					                    countSql += $"  AND  ( oi.order_no = '{SearchValue}' ) ";
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                    countSql += $"  AND  ( oi.patient_id = '{SearchValue}' ) ";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            countSql += " GROUP BY oi.order_no  ) CountTable ";
 | 
				
			||||||
 | 
					            DataSet ds = DBHelper.GetInstance().ExecuteQuery(countSql);
 | 
				
			||||||
 | 
					            if (ds != null && ds.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                totalCount = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            string sql = $@"SELECT oi.order_id,oi.pharmacy,oi.order_no,oi.patient_id,oi.p_name,oi.sex,oi.age,oi.id_number,
 | 
				
			||||||
 | 
					                             oi.patient_card, oi.invoice_no,oi.patient_no,oi.doctor_name,oi.order_date,oi.charge_date,oi.recv_date,
 | 
				
			||||||
 | 
					                             oi.dept_name,oi.disease,oi.order_type,oi.charge_type,oi.state,oi.his_disp_flag,oi.cancel_flag,oi.dm_status,oi.costs FROM order_info oi Inner JOIN order_detail od ON ( oi.order_no = od.order_no )  Inner JOIN 
 | 
				
			||||||
 | 
					                             (SELECT chnguid,machine_id,row_no,col_no,pos_no,drug_id,drawer_type,board_type,state FROM channel_list 
 | 
				
			||||||
 | 
					                              WHERE ( drawer_type = 1 )  AND  (machine_id = '{machine_id}') GROUP BY drug_id  ) t  
 | 
				
			||||||
 | 
					                              ON ( od.drug_id = t.drug_id )   
 | 
				
			||||||
 | 
					                           WHERE ( oi.dm_status = 0 )  AND ( oi.his_disp_flag = 0 ) AND ( oi.cancel_flag = 0 ) ";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(OrderDate))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                sql += $"  AND  (DATE_FORMAT(oi.recv_date, '%Y-%m-%d') = '{OrderDate}' ) ";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(Code) && !string.IsNullOrEmpty(SearchValue))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (Code.Equals("OrderNo"))
 | 
				
			||||||
 | 
					                    sql += $"  AND  ( oi.order_no = '{SearchValue}' ) ";
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                    sql += $"  AND  ( oi.patient_id = '{SearchValue}' ) ";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            sql += $" GROUP BY oi.order_no   LIMIT {pageNum},{pageSize}";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            DataSet dsTable = DBHelper.GetInstance().ExecuteQuery(sql);
 | 
				
			||||||
 | 
					            if (dsTable != null && dsTable.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                for (int i = 0; i < dsTable.Tables[0].Rows.Count; i++)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    OrderInfo order = new OrderInfo();
 | 
				
			||||||
 | 
					                    order.OrderId = Convert.ToInt32(dsTable.Tables[0].Rows[i]["order_id"]);
 | 
				
			||||||
 | 
					                    order.Pharmacy = dsTable.Tables[0].Rows[i]["pharmacy"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["pharmacy"].ToString();
 | 
				
			||||||
 | 
					                    order.OrderNo = dsTable.Tables[0].Rows[i]["order_no"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["order_no"].ToString();
 | 
				
			||||||
 | 
					                    order.PatientId = dsTable.Tables[0].Rows[i]["patient_id"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["patient_id"].ToString();
 | 
				
			||||||
 | 
					                    order.PName = dsTable.Tables[0].Rows[i]["p_name"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["p_name"].ToString();
 | 
				
			||||||
 | 
					                    order.Sex = dsTable.Tables[0].Rows[i]["sex"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["sex"].ToString();
 | 
				
			||||||
 | 
					                    order.Age = dsTable.Tables[0].Rows[i]["age"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["age"].ToString();
 | 
				
			||||||
 | 
					                    order.IdNumber = dsTable.Tables[0].Rows[i]["id_number"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["id_number"].ToString();
 | 
				
			||||||
 | 
					                    order.PatientCard = dsTable.Tables[0].Rows[i]["patient_card"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["patient_card"].ToString();
 | 
				
			||||||
 | 
					                    order.InvoiceNo = dsTable.Tables[0].Rows[i]["invoice_no"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["invoice_no"].ToString();
 | 
				
			||||||
 | 
					                    order.PatientNo = dsTable.Tables[0].Rows[i]["patient_no"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["patient_no"].ToString();
 | 
				
			||||||
 | 
					                    order.DoctorName = dsTable.Tables[0].Rows[i]["doctor_name"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["doctor_name"].ToString();
 | 
				
			||||||
 | 
					                    order.OrderDate = dsTable.Tables[0].Rows[i]["order_date"] is DBNull ? DateTime.Now.AddYears(-1) : Convert.ToDateTime(dsTable.Tables[0].Rows[i]["order_date"]);
 | 
				
			||||||
 | 
					                    order.ChargeDate = dsTable.Tables[0].Rows[i]["charge_date"] is DBNull ? DateTime.Now.AddYears(-1) : Convert.ToDateTime(dsTable.Tables[0].Rows[i]["charge_date"]);
 | 
				
			||||||
 | 
					                    order.RecvDate = dsTable.Tables[0].Rows[i]["recv_date"] is DBNull ? DateTime.Now.AddYears(-1) : Convert.ToDateTime(dsTable.Tables[0].Rows[i]["recv_date"]);
 | 
				
			||||||
 | 
					                    order.DeptName = dsTable.Tables[0].Rows[i]["dept_name"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["dept_name"].ToString();
 | 
				
			||||||
 | 
					                    order.Disease = dsTable.Tables[0].Rows[i]["disease"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["disease"].ToString();
 | 
				
			||||||
 | 
					                    order.OrderType = dsTable.Tables[0].Rows[i]["order_type"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["order_type"].ToString();
 | 
				
			||||||
 | 
					                    order.ChargeType = dsTable.Tables[0].Rows[i]["charge_type"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["charge_type"].ToString();
 | 
				
			||||||
 | 
					                    order.State = Convert.ToInt32(dsTable.Tables[0].Rows[i]["state"]);
 | 
				
			||||||
 | 
					                    order.HisDispFlag = Convert.ToInt32(dsTable.Tables[0].Rows[i]["his_disp_flag"]);
 | 
				
			||||||
 | 
					                    order.CancelFlag = Convert.ToInt32(dsTable.Tables[0].Rows[i]["cancel_flag"]);
 | 
				
			||||||
 | 
					                    order.DmStatus = Convert.ToInt32(dsTable.Tables[0].Rows[i]["dm_status"]);
 | 
				
			||||||
 | 
					                    order.Costs = dsTable.Tables[0].Rows[i]["costs"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[i]["costs"]);
 | 
				
			||||||
 | 
					                    orderInfos.Add(order);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return orderInfos;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 根据处方号获取处方详情
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="orderNo"></param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        public List<OrderDetail> GetOrderDetails(string orderNo)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            List<OrderDetail> orderDetails = new List<OrderDetail>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            string strSql = $@"SELECT od.id,od.patient_id,od.order_no,od.charge_date,od.drug_id,od.quantity,od.order_unit,
 | 
				
			||||||
 | 
					                            od.unit_convercoef,od.set_manu_no,od.set_eff_date,od.use_discrip,od.use_frequ,od.use_once,od.use_by,
 | 
				
			||||||
 | 
					                            od.use_self,od.use_dosage,D.drug_name
 | 
				
			||||||
 | 
					                            FROM order_detail od 
 | 
				
			||||||
 | 
					                            INNER JOIN DRUG_INFO D ON od.DRUG_ID=D.DRUG_ID
 | 
				
			||||||
 | 
					                            Inner JOIN 
 | 
				
			||||||
 | 
					                            (SELECT chsguid,chnguid,machine_id,row_no,col_no,pos_no,drug_id,manu_no,eff_date,quantity,drawer_type,board_type,state 
 | 
				
			||||||
 | 
					                            FROM channel_stock  WHERE ( drawer_type = 1 )  AND  (machine_id = '{machine_id}') GROUP BY drug_id  ) t 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                             ON ( od.drug_id = t.drug_id )   WHERE ( od.order_no = '{orderNo}' )";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            DataSet dsTable = DBHelper.GetInstance().ExecuteQuery(strSql);
 | 
				
			||||||
 | 
					            if (dsTable != null && dsTable.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                for (int i = 0; i < dsTable.Tables[0].Rows.Count; i++)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    OrderDetail od = new OrderDetail();
 | 
				
			||||||
 | 
					                    DrugInfo oi = new DrugInfo();
 | 
				
			||||||
 | 
					                    od.Id = Convert.ToInt32(dsTable.Tables[0].Rows[i]["id"]);
 | 
				
			||||||
 | 
					                    od.PatientId = dsTable.Tables[0].Rows[i]["patient_id"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["patient_id"].ToString();
 | 
				
			||||||
 | 
					                    od.OrderNo = dsTable.Tables[0].Rows[i]["order_no"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["order_no"].ToString();
 | 
				
			||||||
 | 
					                    od.ChargeDate = dsTable.Tables[0].Rows[i]["charge_date"] is DBNull ? DateTime.Now.AddYears(-1) : Convert.ToDateTime(dsTable.Tables[0].Rows[i]["charge_date"]);
 | 
				
			||||||
 | 
					                    od.DrugId = dsTable.Tables[0].Rows[i]["drug_id"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["drug_id"].ToString();
 | 
				
			||||||
 | 
					                    od.Quantity = dsTable.Tables[0].Rows[i]["quantity"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[i]["quantity"]);
 | 
				
			||||||
 | 
					                    od.OrderUnit = dsTable.Tables[0].Rows[i]["order_unit"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["order_unit"].ToString();
 | 
				
			||||||
 | 
					                    od.SetEffDate = dsTable.Tables[0].Rows[i]["set_eff_date"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["set_eff_date"].ToString();
 | 
				
			||||||
 | 
					                    od.SetManuNo = dsTable.Tables[0].Rows[i]["set_manu_no"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["set_manu_no"].ToString();
 | 
				
			||||||
 | 
					                    oi.DrugName = dsTable.Tables[0].Rows[i]["drug_name"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["drug_name"].ToString();
 | 
				
			||||||
 | 
					                    od.DrugInfo = oi;
 | 
				
			||||||
 | 
					                    orderDetails.Add(od);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return orderDetails;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 获取药品对应库存信息
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        public List<ChannelStock> GetChannelStocks(string drugId)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            List<ChannelStock> channelStocks = new List<ChannelStock>();
 | 
				
			||||||
 | 
					            string strSql = $@"SELECT cs.chsguid,cs.chnguid,cs.machine_id,cs.row_no,cs.col_no,cs.pos_no,cs.drug_id,cs.manu_no,
 | 
				
			||||||
 | 
					                                cs.eff_date,cs.quantity,cs.drawer_type,cs.board_type,cs.state,D.Drug_Name,D.drug_spec FROM channel_stock cs Inner JOIN channel_list cl ON (( cs.chnguid = cl.chnguid ) AND ( cs.drug_id = cl.drug_id ))  
 | 
				
			||||||
 | 
					                                INNER JOIN DRUG_INFO D ON cs.drug_id=D.drug_id
 | 
				
			||||||
 | 
					                                WHERE ( cs.quantity > 0 )  AND ( cs.drawer_type = 1 )  AND  (cs.machine_id = '{machine_id}')   
 | 
				
			||||||
 | 
					                                AND ( cs.drug_id = '{drugId}' )ORDER BY cs.eff_date ASC,cs.row_no ASC,cs.manu_no ASC ";
 | 
				
			||||||
 | 
					            DataSet dsTable = DBHelper.GetInstance().ExecuteQuery(strSql);
 | 
				
			||||||
 | 
					            if (dsTable != null && dsTable.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                for (int i = 0; i < dsTable.Tables[0].Rows.Count; i++)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    ChannelStock channelStock = new ChannelStock();
 | 
				
			||||||
 | 
					                    DrugInfo drugInfo = new DrugInfo();
 | 
				
			||||||
 | 
					                    channelStock.Id = dsTable.Tables[0].Rows[i]["chsguid"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["chsguid"].ToString();
 | 
				
			||||||
 | 
					                    channelStock.Chnguid = dsTable.Tables[0].Rows[i]["chnguid"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["chnguid"].ToString();
 | 
				
			||||||
 | 
					                    channelStock.MachineId = dsTable.Tables[0].Rows[i]["machine_id"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["machine_id"].ToString();
 | 
				
			||||||
 | 
					                    channelStock.DrawerNo = dsTable.Tables[0].Rows[i]["row_no"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[i]["row_no"]);
 | 
				
			||||||
 | 
					                    channelStock.ColNo = dsTable.Tables[0].Rows[i]["col_no"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[i]["col_no"]);
 | 
				
			||||||
 | 
					                    channelStock.DrugId = dsTable.Tables[0].Rows[i]["drug_id"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["drug_id"].ToString();
 | 
				
			||||||
 | 
					                    channelStock.ManuNo = dsTable.Tables[0].Rows[i]["manu_no"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["manu_no"].ToString();
 | 
				
			||||||
 | 
					                    channelStock.EffDate = dsTable.Tables[0].Rows[i]["eff_date"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["eff_date"].ToString();
 | 
				
			||||||
 | 
					                    channelStock.Quantity = dsTable.Tables[0].Rows[i]["quantity"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[i]["quantity"]);
 | 
				
			||||||
 | 
					                    channelStock.DrawerType = dsTable.Tables[0].Rows[i]["drawer_type"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[i]["drawer_type"]);
 | 
				
			||||||
 | 
					                    channelStock.BoardType = dsTable.Tables[0].Rows[i]["board_type"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[i]["board_type"]);
 | 
				
			||||||
 | 
					                    channelStock.State = dsTable.Tables[0].Rows[i]["state"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[i]["state"]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    drugInfo.DrugName = dsTable.Tables[0].Rows[i]["Drug_Name"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["Drug_Name"].ToString();
 | 
				
			||||||
 | 
					                    drugInfo.DrugSpec = dsTable.Tables[0].Rows[i]["drug_spec"] is DBNull ? "" : dsTable.Tables[0].Rows[i]["drug_spec"].ToString();
 | 
				
			||||||
 | 
					                    channelStock.DrugInfo = drugInfo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    channelStocks.Add(channelStock);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return channelStocks;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 完成处方取药
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        public bool SaveOrderTakeInfo(string orderNo, string orderDeptName, List<ChannelStock> record, int? operatorUser, int? reviewerUser)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            bool bFlag = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                string strSql = $"UPDATE order_info SET dm_status=1 WHERE ORDER_NO='{orderNo}'";
 | 
				
			||||||
 | 
					                int iResult = DBHelper.GetInstance().ExecuteNonQuery(strSql);
 | 
				
			||||||
 | 
					                if (iResult > 0)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    for (int i = 0; i < record.Count; i++)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        ChannelStock it = record[i];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        int quantity = it.Quantity - it.TakeQuantity;
 | 
				
			||||||
 | 
					                        // 更新数据 库存信息
 | 
				
			||||||
 | 
					                        strSql = $"UPDATE channel_stock SET quantity={quantity},manu_no='{it.ManuNo}',eff_date='{it.EffDate}' WHERE chsguid='{it.Id}'";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        iResult = DBHelper.GetInstance().ExecuteNonQuery(strSql);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        if (iResult > 0)
 | 
				
			||||||
 | 
					                        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            // 获取更新完库存后的药品库存
 | 
				
			||||||
 | 
					                            List<ChannelStock> nowChannels = new List<ChannelStock>();
 | 
				
			||||||
 | 
					                            string querySql = $@"SELECT Quantity,Manu_No,drug_id FROM channel_stock WHERE drawer_type=1 and machine_id='{machine_id}' AND drug_id='{it.DrugId}' ";
 | 
				
			||||||
 | 
					                            DataSet ds = DBHelper.GetInstance().ExecuteQuery(querySql);
 | 
				
			||||||
 | 
					                            if (ds != null && ds.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
 | 
					                                for (int j = 0; j < ds.Tables[0].Rows.Count; j++)
 | 
				
			||||||
 | 
					                                {
 | 
				
			||||||
 | 
					                                    ChannelStock stock = new ChannelStock();
 | 
				
			||||||
 | 
					                                    stock.Quantity = ds.Tables[0].Rows[j]["Quantity"] is DBNull ? 0 : Convert.ToInt32(ds.Tables[0].Rows[j]["Quantity"]); ;
 | 
				
			||||||
 | 
					                                    stock.DrugId = ds.Tables[0].Rows[j]["drug_id"] is DBNull ? "" : ds.Tables[0].Rows[j]["drug_id"].ToString();
 | 
				
			||||||
 | 
					                                    stock.ManuNo = ds.Tables[0].Rows[j]["Manu_No"] is DBNull ? "" : ds.Tables[0].Rows[j]["Manu_No"].ToString();
 | 
				
			||||||
 | 
					                                    nowChannels.Add(stock);
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                            DateTime EFFDATE = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : DateTime.Now;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            int stockQuantity = nowChannels.Sum(it => it.Quantity);
 | 
				
			||||||
 | 
					                            int manunoQuantity = nowChannels.FindAll(it2 => it2.ManuNo == it.ManuNo).Sum(it => it.Quantity);
 | 
				
			||||||
 | 
					                            string supplierDept = ConfigurationManager.AppSettings["receiveDept"].ToString();
 | 
				
			||||||
 | 
					                            string insertSql = $"INSERT INTO  dm_machine_record " +
 | 
				
			||||||
 | 
					                                    $"SET MACHINE_ID='{it.MachineId}',drawer_no='{it.DrawerNo}',COL_NO='{it.ColNo}',DRUG_ID='{it.DrugId}',MANU_NO='{it.ManuNo}'," +
 | 
				
			||||||
 | 
					                                    $"EFF_DATE='{EFFDATE}',Operator={operatorUser},reviewer={reviewerUser}," +
 | 
				
			||||||
 | 
					                                    $"operation_time=NOW(),quantity={it.TakeQuantity},type=2,invoice_id='{orderNo}',stock_quantity={stockQuantity}," +
 | 
				
			||||||
 | 
					                                    $"manunoQuantity={manunoQuantity},supplierDept='{supplierDept}',receiveDept='{orderDeptName}'";
 | 
				
			||||||
 | 
					                            iResult = DBHelper.GetInstance().ExecuteNonQuery(insertSql);
 | 
				
			||||||
 | 
					                            if (iResult > 0)
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
 | 
					                                bFlag = true;
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch (Exception ex)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                bFlag = false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return bFlag;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 根据抽屉号、库位号查询库存信息
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="rowNo"></param>
 | 
				
			||||||
 | 
					        /// <param name="colNo"></param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        public List<ChannelStock> GetChannelStockList(int rowNo, int colNo)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            List<ChannelStock> channel = new List<ChannelStock>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            string strSql = $"SELECT ROW_NO,COL_NO,eff_date,quantity FROM CHANNEL_STOCK WHERE MACHINE_ID='{ConfigurationManager.AppSettings["machineId"] ?? "DM1"}' AND ROW_NO={rowNo} AND COL_NO={colNo} ORDER BY EFF_DATE";
 | 
				
			||||||
 | 
					            DataSet dsTable = DBHelper.GetInstance().ExecuteQuery(strSql);
 | 
				
			||||||
 | 
					            if (dsTable != null && dsTable.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                for (int i = 0; i < dsTable.Tables[0].Rows.Count; i++)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    ChannelStock cs = new ChannelStock();
 | 
				
			||||||
 | 
					                    cs.DrawerNo = dsTable.Tables[0].Rows[0]["row_no"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[0]["row_no"]);
 | 
				
			||||||
 | 
					                    cs.ColNo = dsTable.Tables[0].Rows[0]["col_no"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[0]["col_no"]);
 | 
				
			||||||
 | 
					                    cs.EffDate = dsTable.Tables[0].Rows[0]["eff_date"] is DBNull ? "" : dsTable.Tables[0].Rows[0]["eff_date"].ToString();
 | 
				
			||||||
 | 
					                    cs.Quantity = dsTable.Tables[0].Rows[0]["quantity"] is DBNull ? 0 : Convert.ToInt32(dsTable.Tables[0].Rows[0]["quantity"]);
 | 
				
			||||||
 | 
					                    channel.Add(cs);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return channel;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #region 调拨出库
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #region 抽屉取药
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 通过抽屉号获取库存信息
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        public List<ChannelStock> GetChannelStockByDrawer(int row_no)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            List<ChannelStock> channelStocks = new List<ChannelStock>();
 | 
				
			||||||
 | 
					            string strSql = $@"SELECT chsguid,chnguid,machine_id,row_no,col_no,pos_no,drug_id,manu_no,eff_date,quantity,drawer_type,board_type,state FROM channel_stock
 | 
				
			||||||
 | 
					                            WHERE ( row_no = {row_no} )  AND ( drug_id IS NOT NULL )  AND  (machine_id = '{machine_id}')   AND ( drawer_type = 1 )  AND ( quantity > 0 )ORDER BY col_no ASC,eff_date ASC";
 | 
				
			||||||
 | 
					            DataSet ds = DBHelper.GetInstance().ExecuteQuery(strSql);
 | 
				
			||||||
 | 
					            if (ds != null && ds.Tables[0].Rows.Count > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    ChannelStock stock = new ChannelStock();
 | 
				
			||||||
 | 
					                    stock.Id = ds.Tables[0].Rows[i]["chsguid"].ToString();
 | 
				
			||||||
 | 
					                    stock.Chnguid = ds.Tables[0].Rows[i]["chnguid"].ToString();
 | 
				
			||||||
 | 
					                    stock.DrawerNo = row_no;
 | 
				
			||||||
 | 
					                    stock.ColNo = Convert.ToInt32(ds.Tables[0].Rows[i]["col_no"]);
 | 
				
			||||||
 | 
					                    stock.ManuNo = ds.Tables[0].Rows[i]["chnguid"].ToString();
 | 
				
			||||||
 | 
					                    stock.EffDate = ds.Tables[0].Rows[i]["eff_date"].ToString();
 | 
				
			||||||
 | 
					                    stock.Quantity = Convert.ToInt32(ds.Tables[0].Rows[i]["quantity"]);
 | 
				
			||||||
 | 
					                    stock.BoardType = Convert.ToInt32(ds.Tables[0].Rows[i]["board_type"]);
 | 
				
			||||||
 | 
					                    stock.MachineId = ds.Tables[0].Rows[i]["machine_id"].ToString();
 | 
				
			||||||
 | 
					                    channelStocks.Add(stock);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return channelStocks;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #endregion
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,31 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Microsoft Visual Studio Solution File, Format Version 12.00
 | 
				
			||||||
 | 
					# Visual Studio Version 17
 | 
				
			||||||
 | 
					VisualStudioVersion = 17.3.32922.545
 | 
				
			||||||
 | 
					MinimumVisualStudioVersion = 10.0.40219.1
 | 
				
			||||||
 | 
					Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DM_Weight", "DM_Weight\DM_Weight.csproj", "{439FA76B-F874-40DB-BAF2-E3647CD55B10}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
 | 
					Global
 | 
				
			||||||
 | 
						GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
				
			||||||
 | 
							Debug|Any CPU = Debug|Any CPU
 | 
				
			||||||
 | 
							Debug|x86 = Debug|x86
 | 
				
			||||||
 | 
							Release|Any CPU = Release|Any CPU
 | 
				
			||||||
 | 
							Release|x86 = Release|x86
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
				
			||||||
 | 
							{439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
				
			||||||
 | 
							{439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
				
			||||||
 | 
							{439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x86.ActiveCfg = Debug|x86
 | 
				
			||||||
 | 
							{439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x86.Build.0 = Debug|x86
 | 
				
			||||||
 | 
							{439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
 | 
							{439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
 | 
							{439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x86.ActiveCfg = Release|x86
 | 
				
			||||||
 | 
							{439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x86.Build.0 = Release|x86
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(SolutionProperties) = preSolution
 | 
				
			||||||
 | 
							HideSolutionNode = FALSE
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(ExtensibilityGlobals) = postSolution
 | 
				
			||||||
 | 
							SolutionGuid = {E50E8179-1102-41F1-92F5-2905C75898A6}
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
					EndGlobal
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,74 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<configuration>
 | 
				
			||||||
 | 
					  <connectionStrings>
 | 
				
			||||||
 | 
						<!-- 数据库连接字符串 -->
 | 
				
			||||||
 | 
						<!--<add name="database" connectionString="server=127.0.0.1;database=wpf_dm_program;userid=root;password=qq1223" />-->
 | 
				
			||||||
 | 
						<add name="database" connectionString="server=127.0.0.1;port=3306;database=hunanxianchang_db;userid=root;password=root;SslMode=none;Charset=utf8mb4;" />
 | 
				
			||||||
 | 
					  </connectionStrings>
 | 
				
			||||||
 | 
						<!--<runtime>
 | 
				
			||||||
 | 
							--><!--配置之后,Appdomain.CurrentDomain.UnhandledException 事件的 IsTerminating 就变成了 false 啦!也就是说,程序并不会因为这次的异常而崩溃退出。--><!--
 | 
				
			||||||
 | 
							<legacyUnhandledExceptionPolicy enabled="1"/>
 | 
				
			||||||
 | 
						</runtime>-->
 | 
				
			||||||
 | 
						<appSettings>
 | 
				
			||||||
 | 
							<!-- 设备id -->
 | 
				
			||||||
 | 
							<add key="machineId" value="DM1" />
 | 
				
			||||||
 | 
							<!-- 供应单位 -->
 | 
				
			||||||
 | 
							<add key="supplierDept" value="药库" />
 | 
				
			||||||
 | 
							<!-- 领用部门 -->
 | 
				
			||||||
 | 
							<add key="receiveDept" value="麻精药房" />
 | 
				
			||||||
 | 
							<!--2023/7/13 药房代码 有则写无则空 -->
 | 
				
			||||||
 | 
							<add key="storage" value="" />
 | 
				
			||||||
 | 
							<!-- 登录模式 1单人登录2双人登录 -->
 | 
				
			||||||
 | 
							<add key="loginMode" value="2" />
 | 
				
			||||||
 | 
							<!-- 登录顺序,指定先登录的人的名称有效值,只有在登录模式等于2时才会生效; 发药人:【operator】审核人:【reviewer】 -->
 | 
				
			||||||
 | 
							<add key="firstLogin" value="operator" />
 | 
				
			||||||
 | 
							<!-- 按处方还药或者按取药记录还药 1:处方2:药品-->
 | 
				
			||||||
 | 
							<add key="returnDrugMode" value="2" />
 | 
				
			||||||
 | 
							<!-- 自动退出时间,单位秒,为0时不自动退出 -->
 | 
				
			||||||
 | 
							<add key="autoExit" value="300"/>
 | 
				
			||||||
 | 
							<!--报表数据库连接-->
 | 
				
			||||||
 | 
							<add key="gridConnectionString" value="MYSQL; Database=hunanxianchang_db; Password=root; Port=3306; Server=127.0.0.1; User=root;"/>
 | 
				
			||||||
 | 
							<!-- 查询处方是orderNo还是orderGroupNo -->
 | 
				
			||||||
 | 
							<add key="OrderNoName" value="orderNo" />
 | 
				
			||||||
 | 
							<!-- 后门耗材板地址 没有则填写0-->
 | 
				
			||||||
 | 
							<add key="DoorAddr" value="1" />
 | 
				
			||||||
 | 
							<!-- 是否有can总线串口-->
 | 
				
			||||||
 | 
							<add key="CanBusExsit" value="true" />
 | 
				
			||||||
 | 
							<!-- 单支抽屉储物箱有则写地址无则为0-->
 | 
				
			||||||
 | 
							<add key="StorageBoxAddr" value="1" />
 | 
				
			||||||
 | 
							<!-- 抽屉串口使用的协议232或者485 -->
 | 
				
			||||||
 | 
							<add key="DrawerProtocol" value="485" />
 | 
				
			||||||
 | 
							<!-- 抽屉串口的串口号 -->
 | 
				
			||||||
 | 
							<add key="DrawerPortPath" value="COM3" />
 | 
				
			||||||
 | 
							<!-- can总线串口的串口号 -->
 | 
				
			||||||
 | 
							<add key="CanBusPortPath" value="COM9" />
 | 
				
			||||||
 | 
							<!-- 条码枪串口的串口号 -->
 | 
				
			||||||
 | 
							<add key="ScanCodePortPath" value="COM111" />
 | 
				
			||||||
 | 
							<!-- 抽屉串口的串口号 --><!--
 | 
				
			||||||
 | 
							<add key="DrawerPortPath" value="COM11" />
 | 
				
			||||||
 | 
							--><!-- can总线串口的串口号 --><!--
 | 
				
			||||||
 | 
							<add key="CanBusPortPath" value="COM12" />
 | 
				
			||||||
 | 
							--><!-- 条码枪串口的串口号 --><!--
 | 
				
			||||||
 | 
							<add key="ScanPortPath" value="COM7" />-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<!-- 指纹机类型 1:无屏幕(BW设备);2:有屏幕(TFT设备) -->
 | 
				
			||||||
 | 
							<add  key="machineType" value="2"/>
 | 
				
			||||||
 | 
							<!-- 指纹机号码 -->
 | 
				
			||||||
 | 
							<add  key="machineNumber" value="1"/>
 | 
				
			||||||
 | 
							<!-- 指纹机ip -->
 | 
				
			||||||
 | 
							<add  key="fingerIp" value="192.168.50.201"/>
 | 
				
			||||||
 | 
							<!--一个抽屉对应标签数-->
 | 
				
			||||||
 | 
							<add  key="labelCount" value="2"/>
 | 
				
			||||||
 | 
							<!--库存盘点17号库位线程等待时间(毫秒)-->
 | 
				
			||||||
 | 
							<add  key="CheckSleepMilliseconds" value="500"/>
 | 
				
			||||||
 | 
							<!--海康威视IP-->
 | 
				
			||||||
 | 
							<add key="HIKIP" value="192.168.1.15"/>
 | 
				
			||||||
 | 
							<!--海康威视端口-->
 | 
				
			||||||
 | 
							<add key="HIKPort" value="8000"/>
 | 
				
			||||||
 | 
							<!--海康威视用户名-->
 | 
				
			||||||
 | 
							<add key="HIKUser" value="admin"/>
 | 
				
			||||||
 | 
							<!--海康威视密码-->
 | 
				
			||||||
 | 
							<add key="HIKPassword" value="HKC123456"/>
 | 
				
			||||||
 | 
						</appSettings>
 | 
				
			||||||
 | 
					</configuration>
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					<prism:PrismApplication x:Class="DM_Weight.App"
 | 
				
			||||||
 | 
					             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 | 
				
			||||||
 | 
					             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
				
			||||||
 | 
					             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 | 
				
			||||||
 | 
					             xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
 | 
				
			||||||
 | 
					             d1p1:Ignorable="d"
 | 
				
			||||||
 | 
					             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
 | 
				
			||||||
 | 
					             xmlns:local="clr-namespace:DM_Weight"
 | 
				
			||||||
 | 
					             xmlns:prism="http://prismlibrary.com/" Startup="PrismApplication_Startup">
 | 
				
			||||||
 | 
					    <Application.Resources>
 | 
				
			||||||
 | 
					        <ResourceDictionary>
 | 
				
			||||||
 | 
					            <ResourceDictionary.MergedDictionaries>
 | 
				
			||||||
 | 
					                <materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="Indigo" SecondaryColor="Cyan" />
 | 
				
			||||||
 | 
					                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </ResourceDictionary.MergedDictionaries>
 | 
				
			||||||
 | 
					        </ResourceDictionary>
 | 
				
			||||||
 | 
					    </Application.Resources>
 | 
				
			||||||
 | 
					    </prism:PrismApplication>
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,367 @@
 | 
				
			||||||
 | 
					using DM_Weight.Finger;
 | 
				
			||||||
 | 
					using DM_Weight.Port;
 | 
				
			||||||
 | 
					using DM_Weight.util.TabTip;
 | 
				
			||||||
 | 
					using DM_Weight.util;
 | 
				
			||||||
 | 
					using DM_Weight.ViewModels;
 | 
				
			||||||
 | 
					using DM_Weight.Views.Dialog;
 | 
				
			||||||
 | 
					using DM_Weight.Views;
 | 
				
			||||||
 | 
					using log4net.Config;
 | 
				
			||||||
 | 
					using Prism.Ioc;
 | 
				
			||||||
 | 
					using Prism.Services.Dialogs;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.ComponentModel;
 | 
				
			||||||
 | 
					using System.Configuration;
 | 
				
			||||||
 | 
					using System.Data;
 | 
				
			||||||
 | 
					using System.IO;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					using System.Windows.Controls;
 | 
				
			||||||
 | 
					using Prism.Unity;
 | 
				
			||||||
 | 
					using log4net;
 | 
				
			||||||
 | 
					using System.Windows.Interop;
 | 
				
			||||||
 | 
					using System.Windows.Threading;
 | 
				
			||||||
 | 
					using System.Timers;
 | 
				
			||||||
 | 
					using SqlSugar;
 | 
				
			||||||
 | 
					using Microsoft.Extensions.DependencyInjection;
 | 
				
			||||||
 | 
					using DM_Weight.Services;
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					using System.Diagnostics;
 | 
				
			||||||
 | 
					using System.Runtime.InteropServices;
 | 
				
			||||||
 | 
					//using DM_Dal;
 | 
				
			||||||
 | 
					//using DM_Dal.Models;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// Interaction logic for App.xaml
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public partial class App : PrismApplication
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        #region 当前登录用户的发药人信息
 | 
				
			||||||
 | 
					        private static UserList _currentFaUserList = new UserList();
 | 
				
			||||||
 | 
					        public static UserList CurrentFaUserList
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => _currentFaUserList;
 | 
				
			||||||
 | 
					            set => _currentFaUserList = value;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #endregion 当前登录用户的发药人信息
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #region 当前登录用户的审核人信息
 | 
				
			||||||
 | 
					        private static UserList _currentShenUserList = new UserList();
 | 
				
			||||||
 | 
					        public static UserList CurrentShenUserList
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => _currentShenUserList;
 | 
				
			||||||
 | 
					            set => _currentShenUserList = value;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        #endregion 当前登录用户的审核人信息
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private readonly ILog logger = LogManager.GetLogger(typeof(App));
 | 
				
			||||||
 | 
					        public App()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            TabTipAutomation.IgnoreHardwareKeyboard = HardwareKeyboardIgnoreOptions.IgnoreAll;
 | 
				
			||||||
 | 
					            TabTipAutomation.BindTo<TextBox>();
 | 
				
			||||||
 | 
					            TabTipAutomation.BindTo<PasswordBox>();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        protected override Window CreateShell()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            //UI线程未捕获异常处理事件
 | 
				
			||||||
 | 
					            this.DispatcherUnhandledException += OnDispatcherUnhandledException;
 | 
				
			||||||
 | 
					            //Task线程内未捕获异常处理事件
 | 
				
			||||||
 | 
					            TaskScheduler.UnobservedTaskException += OnUnobservedTaskException;
 | 
				
			||||||
 | 
					            //多线程异常
 | 
				
			||||||
 | 
					            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return Container.Resolve<MainWindow>();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        void OnDispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            logger.Error($"发生错误:{e.Exception.Message}");
 | 
				
			||||||
 | 
					            e.Handled = true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            foreach (Exception item in e.Exception.InnerExceptions)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                logger.Error($"异常类型:{item.StackTrace};{item.GetType()}{Environment.NewLine}来自:{item.Source}{Environment.NewLine}异常内容:{item.Message}");
 | 
				
			||||||
 | 
					                if (item.GetType() == typeof(SqlSugar.SqlSugarException))
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    //UserList userList = new SqlHelperService().CheckUserByFingerPrinter(1);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //将异常标识为已经观察到 
 | 
				
			||||||
 | 
					            e.SetObserved();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            logger.Error($"Unhandled exception.{e.ToString()}");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        protected override void InitializeShell(Window shell)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            base.InitializeShell(shell);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        protected override void RegisterTypes(IContainerRegistry containerRegistry)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 注入日志
 | 
				
			||||||
 | 
					            XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config"));
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterInstance<ILog>(LogManager.GetLogger(""));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 串口工具
 | 
				
			||||||
 | 
					            containerRegistry.RegisterSingleton<PortUtil>();
 | 
				
			||||||
 | 
					            // 指纹机工具
 | 
				
			||||||
 | 
					            containerRegistry.RegisterSingleton<FingerprintUtil>();
 | 
				
			||||||
 | 
					            // 组态屏工具
 | 
				
			||||||
 | 
					            containerRegistry.RegisterSingleton<ScreenUtil>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterSingleton<SqlSugarHelper>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            containerRegistry.Register<IDialogService, MaterialDialogService>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 主窗口
 | 
				
			||||||
 | 
					            containerRegistry.Register<MainWindow>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<MainWindow, MainWindowViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 分页
 | 
				
			||||||
 | 
					            //containerRegistry.Register<Pagination>();
 | 
				
			||||||
 | 
					            //containerRegistry.Register<PaginationViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 登录页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<LoginWindow, LoginWindowViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 布局页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<HomeWindow, HomeWindowViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 录入指纹模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<FingerprintDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<FingerprintDialog, FingerprintDialogViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            #region 取药
 | 
				
			||||||
 | 
					            // 处方取药页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<OrderTakeDrugWindow, OrderTakeDrugWindowViewModel>();
 | 
				
			||||||
 | 
					            // 处方取药模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<OrderTakeDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<OrderTakeDialog, OrderTakeDialogViewModel>();
 | 
				
			||||||
 | 
					            // 调拨取药页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<InvoiceOutWindow, InvoiceOutWindowViewModel>();
 | 
				
			||||||
 | 
					            // 调拨取药模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<InvoiceTakeDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<InvoiceTakeDialog, InvoiceTakeDialogViewModel>();
 | 
				
			||||||
 | 
					            // 抽屉取药页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<DrawerTakeDrugWindow, DrawerTakeDrugWindowViewModel>();
 | 
				
			||||||
 | 
					            // 自选取药模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<SelfTakeDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<SelfTakeDialog, SelfTakeDialogViewModel>();
 | 
				
			||||||
 | 
					            // 自选取药页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<SelfTakeDrugWindow, SelfTakeDrugWindowViewModel>();
 | 
				
			||||||
 | 
					            #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            #region 加药
 | 
				
			||||||
 | 
					            // 自选加药页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<SelfAddWindow, SelfAddWindowViewModel>();
 | 
				
			||||||
 | 
					            // 调拨加药页面
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterForNavigation<InvoiceInWindow, InvoiceInWindowViewModel>();
 | 
				
			||||||
 | 
					            // 调拨加药页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<InvoiceInNewWindow, InvoiceInNewWindowViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 调拨取药模态框
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterDialog<InvoiceAddDialog>();
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterForNavigation<InvoiceAddDialog, InvoiceAddDialogViewModel>();
 | 
				
			||||||
 | 
					            // 抽屉加药页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<DrawerAddDrugWindow, DrawerAddDrugWindowViewModel>();
 | 
				
			||||||
 | 
					            // 自选加药模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<SelfAddDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<SelfAddDialog, SelfAddDialogViewModel>();
 | 
				
			||||||
 | 
					            //多批次抽屉加药
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<AddDrugControl, AddDrugControlViewModel>();
 | 
				
			||||||
 | 
					            #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            #region 还药
 | 
				
			||||||
 | 
					            // 还药页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<ReturnDrugWindow, ReturnDrugWindowViewModel>();
 | 
				
			||||||
 | 
					            // 按记录归还药品模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<ReturnDrugDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<ReturnDrugDialog, ReturnDrugDialogViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 还药页面2
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<ReturnDrugWindow2, ReturnDrugWindow2ViewModel>();
 | 
				
			||||||
 | 
					            // 按处方归还药品模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<OrderReturnDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<OrderReturnDialog, OrderReturnDialogViewModel>();
 | 
				
			||||||
 | 
					            // 还空瓶页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<ReturnEmptyWindow, ReturnEmptyWindowViewModel>();
 | 
				
			||||||
 | 
					            // 归还空瓶模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<ReturnEmptyDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<ReturnEmptyDialog, ReturnEmptyDialogViewModel>();
 | 
				
			||||||
 | 
					            #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            #region 库存管理
 | 
				
			||||||
 | 
					            // 库存列表页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<StockListWindow, StockListWindowViewModel>();
 | 
				
			||||||
 | 
					            // 库位绑定模态框
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterDialog<BindingChannelDialog>();
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterForNavigation<BindingChannelDialog, BindingChannelDialogViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 库位绑定模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<BindingChannelNewDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<BindingChannelNewDialog, BindingChannelNewDialogViewModel>();
 | 
				
			||||||
 | 
					            // 库存盘点页面
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterForNavigation<CheckStockWindow, CheckStockWindowViewModel>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<CheckRecordDetailDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<CheckRecordDetailDialog, CheckRecordDetailDialogViewModel>();
 | 
				
			||||||
 | 
					            // 库存盘点页面--新(类似库存列表页面)
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<CheckStockNewWindow, CheckStockNewWindowViewModel>();
 | 
				
			||||||
 | 
					            // 库存盘点页面--新(类似库存列表页面)
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterForNavigation<CheckStockNew2Window, CheckStockNew2WindowViewModel>();
 | 
				
			||||||
 | 
					            // 库存盘点页面--新(类似库存列表页面)
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<CheckRecordNewWindow, CheckRecordNewWindowViewModel>();
 | 
				
			||||||
 | 
					            // 药品列表页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<DrugListWindow, DrugListWindowViewModel>();
 | 
				
			||||||
 | 
					            //库存列表导出账册弹窗
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterForNavigation<StockListAccountDialog, StockListAccountDialogViewModel>();
 | 
				
			||||||
 | 
					            #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            #region 系统设置
 | 
				
			||||||
 | 
					            // 用户管理页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<UserManagerWindow, UserManagerWindowViewModel>();
 | 
				
			||||||
 | 
					            // 编辑用户模态框
 | 
				
			||||||
 | 
					            containerRegistry.RegisterDialog<EditUserDialog>();
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<EditUserDialog, EditUserDialogViewModel>();
 | 
				
			||||||
 | 
					            // 角色管理页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<RoleManagerWindow, RoleManagerWindowViewModel>();
 | 
				
			||||||
 | 
					            // 系统设置
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<SettingWindow, SettingWindowViewModel>();
 | 
				
			||||||
 | 
					            // 调试页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<DebugWindow, DebugWindowViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 设备记录页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<MachineRecordWindow, MachineRecordWindowViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<ShowMessageDialog, ShowMessageDialogViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //交接班
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterForNavigation<ChangeShiftsWindow, ChangeShiftsWindowViewModel>();
 | 
				
			||||||
 | 
					            //交接班记录
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<ChangeShiftsListWindow, ChangeShiftsListWindowViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<PrintPdfView, PrintPdfViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //交接班
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<ChangeShiftsDialog, ChangeShiftsDialogViewModel>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterSingleton<SqlSugarScope>(() => SqlSugarHelperNew.GetInstance());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            #region SqlSugar-IOC单例
 | 
				
			||||||
 | 
					            //containerRegistry.RegisterSingleton<ISqlSugarClient>(s =>
 | 
				
			||||||
 | 
					            //   {
 | 
				
			||||||
 | 
					            //       SqlSugarScope sqlSugar = new SqlSugarScope(new ConnectionConfig()
 | 
				
			||||||
 | 
					            //       {
 | 
				
			||||||
 | 
					            //           ConnectionString = ConfigurationManager.ConnectionStrings["database"].ToString(),
 | 
				
			||||||
 | 
					            //           DbType = SqlSugar.DbType.MySql,
 | 
				
			||||||
 | 
					            //           IsAutoCloseConnection = true
 | 
				
			||||||
 | 
					            //       },
 | 
				
			||||||
 | 
					            //      db =>
 | 
				
			||||||
 | 
					            //      {
 | 
				
			||||||
 | 
					            //          //单例参数配置,所有上下文生效
 | 
				
			||||||
 | 
					            //          db.Aop.OnLogExecuting = (sql, pars) =>
 | 
				
			||||||
 | 
					            //          {
 | 
				
			||||||
 | 
					            //              //获取IOC对象不要求在一个上下文
 | 
				
			||||||
 | 
					            //              //vra log=s.GetService<Log>()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //              //获取IOC对象要求在一个上下文
 | 
				
			||||||
 | 
					            //              //var appServive = s.GetService<IHttpContextAccessor>();
 | 
				
			||||||
 | 
					            //              //var log= appServive?.HttpContext?.RequestServices.GetService<Log>();
 | 
				
			||||||
 | 
					            //          };
 | 
				
			||||||
 | 
					            //      });
 | 
				
			||||||
 | 
					            //       return sqlSugar;
 | 
				
			||||||
 | 
					            //   }); 
 | 
				
			||||||
 | 
					            #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //账册页面
 | 
				
			||||||
 | 
					            containerRegistry.RegisterForNavigation<AccountWindow, AccountWindowViewModel>();
 | 
				
			||||||
 | 
					            //账册服务类
 | 
				
			||||||
 | 
					            containerRegistry.Register<MachineRecordService>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //containerRegistry.Register<SqlHelperService>();
 | 
				
			||||||
 | 
					            // 配置数据库信息
 | 
				
			||||||
 | 
					            //SCHelper.Database.DBHelper.GetInstance().SetConnectionConfig(SCHelper.Database.SCDbType.MySQL,
 | 
				
			||||||
 | 
					            //    ConfigurationManager.AppSettings["DataBaseIP"],
 | 
				
			||||||
 | 
					            //    ConfigurationManager.AppSettings["DataBaseName"],
 | 
				
			||||||
 | 
					            //    "root",
 | 
				
			||||||
 | 
					            //    ConfigurationManager.AppSettings["Password"]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private void PrismApplication_Startup(object sender, StartupEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 配置数据库信息
 | 
				
			||||||
 | 
					            SCHelper.Database.DBHelper.GetInstance().SetConnectionConfig(SCHelper.Database.SCDbType.MySQL,
 | 
				
			||||||
 | 
					            "127.0.0.1",
 | 
				
			||||||
 | 
					            "hunanxianchang_db",
 | 
				
			||||||
 | 
					            "root",
 | 
				
			||||||
 | 
					            "root");
 | 
				
			||||||
 | 
					            //获取欲启动程序名
 | 
				
			||||||
 | 
					            string processName = System.Diagnostics.Process.GetCurrentProcess().ProcessName;
 | 
				
			||||||
 | 
					            //检查程序是否已经启动,已经启动则显示提示退出程序
 | 
				
			||||||
 | 
					            if (System.Diagnostics.Process.GetProcessesByName(processName).Length > 1)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                //系统在运行
 | 
				
			||||||
 | 
					                RaiseOtherProcess();
 | 
				
			||||||
 | 
					                Application.Current.Shutdown();
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        private static void RaiseOtherProcess()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            Process proc = Process.GetCurrentProcess();
 | 
				
			||||||
 | 
					            foreach (Process otherProc in Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (proc.Id != otherProc.Id)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    IntPtr hWnd = otherProc.MainWindowHandle;
 | 
				
			||||||
 | 
					                    if (IsIconic(hWnd))
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        ShowWindowAsync(hWnd, 9);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    SetForegroundWindow(hWnd);
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        [DllImport("user32.dll")]
 | 
				
			||||||
 | 
					        private static extern bool SetForegroundWindow(IntPtr hWnd);
 | 
				
			||||||
 | 
					        [DllImport("user32.dll")]
 | 
				
			||||||
 | 
					        private static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
 | 
				
			||||||
 | 
					        [DllImport("user32.dll")]
 | 
				
			||||||
 | 
					        private static extern bool IsIconic(IntPtr hWnd);
 | 
				
			||||||
 | 
					        //protected IServiceProvider ConfigureServices(IServiceCollection services)
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    // 创建 SqlSugar 实例
 | 
				
			||||||
 | 
					        //    var db = new SqlSugarClient(new ConnectionConfig()
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        ConnectionString = "server=127.0.0.1;uid=root;pwd=123456;database=mydb",
 | 
				
			||||||
 | 
					        //        DbType = DbType.MySql,
 | 
				
			||||||
 | 
					        //        IsAutoCloseConnection = true,
 | 
				
			||||||
 | 
					        //        InitKeyType = InitKeyType.Attribute
 | 
				
			||||||
 | 
					        //    });
 | 
				
			||||||
 | 
					        //    // 将实例注册到 IServiceCollection 中
 | 
				
			||||||
 | 
					        //    services.AddSingleton(db);
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,10 @@
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[assembly: ThemeInfo(
 | 
				
			||||||
 | 
					    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
 | 
				
			||||||
 | 
					                                     //(used if a resource is not found in the page,
 | 
				
			||||||
 | 
					                                     // or application resource dictionaries)
 | 
				
			||||||
 | 
					    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
 | 
				
			||||||
 | 
					                                              //(used if a resource is not found in the page,
 | 
				
			||||||
 | 
					                                              // app, or any theme specific resource dictionaries)
 | 
				
			||||||
 | 
					)]
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,37 @@
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					using Newtonsoft.Json;
 | 
				
			||||||
 | 
					using SCHelper.Database;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Data;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Reflection.PortableExecutable;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.CommonDal
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class LoginDal
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public UserList GetLoginInfo(string userName,string passWord)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            UserList user = new UserList(); ;
 | 
				
			||||||
 | 
					            string sql = @"select ul.id as id,ul.User_name as userName,r.id as rId,r.role_name,r.permissions,r.machine_id from user_list ul 
 | 
				
			||||||
 | 
					                                INNER JOIN role r on ul.machine_role_id=r.id where ul.Id=@ID and ul.machine_id=@machine_id and r.machine_id=@machine_id";
 | 
				
			||||||
 | 
					            DataSet ds=  DBHelper.GetInstance().ExecuteQuery(sql);
 | 
				
			||||||
 | 
					            if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows.Count>0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                user.Id =Convert.ToInt32(ds.Tables[0].Rows[0]["id"] ??0);
 | 
				
			||||||
 | 
					                user.UserName = ds.Tables[0].Rows[0]["userName"].ToString() ?? "";
 | 
				
			||||||
 | 
					                user.Nickname = ds.Tables[0].Rows[0]["userName"].ToString()??"";
 | 
				
			||||||
 | 
					                user.MachineId = ds.Tables[0].Rows[0]["machine_id"].ToString()??"";
 | 
				
			||||||
 | 
					                RoleDm role = new RoleDm();
 | 
				
			||||||
 | 
					                role.Id = Convert.ToInt32(ds.Tables[0].Rows[0]["rId"] ?? 0);
 | 
				
			||||||
 | 
					                role.RoleName = ds.Tables[0].Rows[0]["role_name"].ToString() ?? ""; ;
 | 
				
			||||||
 | 
					                role.Permissions = JsonConvert.DeserializeObject<List<PremissionDm>>(ds.Tables[0].Rows[0]["permissions"] is DBNull ? "" : ds.Tables[0].Rows[0]["permissions"].ToString());  // JsonConvert.SerializeObject(reader.GetString("permissions")).ToList();
 | 
				
			||||||
 | 
					                user.Role = role;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return user;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,43 @@
 | 
				
			||||||
 | 
					<UserControl x:Class="DM_Weight.Components.pagination.Pagination"
 | 
				
			||||||
 | 
					             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 | 
				
			||||||
 | 
					             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
				
			||||||
 | 
					             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
 | 
				
			||||||
 | 
					             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 | 
				
			||||||
 | 
					             xmlns:local="clr-namespace:DM_Weight.Components.pagination"
 | 
				
			||||||
 | 
					             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    <Grid>
 | 
				
			||||||
 | 
					        <StackPanel Margin="0 6 20 6" HorizontalAlignment="Right" Orientation="Horizontal">
 | 
				
			||||||
 | 
					            <TextBlock x:Name="InfoBlock" Padding="0 0 6 0" VerticalAlignment="Center" />
 | 
				
			||||||
 | 
					            <Button
 | 
				
			||||||
 | 
					                ToolTip="首页"
 | 
				
			||||||
 | 
					                Style="{StaticResource MaterialDesignIconForegroundButton}"
 | 
				
			||||||
 | 
					                Command="{x:Static local:Pagination.FirstCommand}"
 | 
				
			||||||
 | 
					                Name="First"
 | 
				
			||||||
 | 
					                Content="{materialDesign:PackIcon PageFirst}" />
 | 
				
			||||||
 | 
					            <Button
 | 
				
			||||||
 | 
					                ToolTip="上一页"
 | 
				
			||||||
 | 
					                Style="{StaticResource MaterialDesignIconForegroundButton}"
 | 
				
			||||||
 | 
					                Command="{x:Static local:Pagination.PrevCommand}"
 | 
				
			||||||
 | 
					                Name="Prve"
 | 
				
			||||||
 | 
					                Content="{materialDesign:PackIcon ChevronLeft}"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextBlock x:Name="CurrentPageText" Padding="6 0 6 0" VerticalAlignment="Center" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <Button
 | 
				
			||||||
 | 
					                ToolTip="下一页"
 | 
				
			||||||
 | 
					                Style="{StaticResource MaterialDesignIconForegroundButton}"
 | 
				
			||||||
 | 
					                Command="{x:Static local:Pagination.NextCommand}"
 | 
				
			||||||
 | 
					                Name="Next"
 | 
				
			||||||
 | 
					                Content="{materialDesign:PackIcon ChevronRight}"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <Button
 | 
				
			||||||
 | 
					                ToolTip="末页"
 | 
				
			||||||
 | 
					                Style="{StaticResource MaterialDesignIconForegroundButton}"
 | 
				
			||||||
 | 
					                Command="{x:Static local:Pagination.EndCommand}"
 | 
				
			||||||
 | 
					                Name="End"
 | 
				
			||||||
 | 
					                Content="{materialDesign:PackIcon PageLast}" />
 | 
				
			||||||
 | 
					        </StackPanel>
 | 
				
			||||||
 | 
					    </Grid>
 | 
				
			||||||
 | 
					</UserControl>
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,265 @@
 | 
				
			||||||
 | 
					//using NetTaste;
 | 
				
			||||||
 | 
					using Prism.Commands;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.ComponentModel;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Reflection;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					using System.Windows.Controls;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					using System.Windows.Documents;
 | 
				
			||||||
 | 
					using System.Windows.Input;
 | 
				
			||||||
 | 
					using System.Windows.Media;
 | 
				
			||||||
 | 
					using System.Windows.Media.Imaging;
 | 
				
			||||||
 | 
					using System.Windows.Navigation;
 | 
				
			||||||
 | 
					using System.Windows.Shapes;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Components.pagination
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// Pagination.xaml 的交互逻辑
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public partial class Pagination : UserControl
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public Pagination()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            InitializeComponent();
 | 
				
			||||||
 | 
					            ResetInfoText();
 | 
				
			||||||
 | 
					            ResetCurrentPageText();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        static Pagination()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            InitializeCommands();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private static readonly Type _typeofSelf = typeof(Pagination);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private static void InitializeCommands()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            FirstCommand = new RoutedCommand("First", _typeofSelf);
 | 
				
			||||||
 | 
					            PrevCommand = new RoutedCommand("Prev", _typeofSelf);
 | 
				
			||||||
 | 
					            NextCommand = new RoutedCommand("Next", _typeofSelf);
 | 
				
			||||||
 | 
					            EndCommand = new RoutedCommand("End", _typeofSelf);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            CommandManager.RegisterClassCommandBinding(_typeofSelf,
 | 
				
			||||||
 | 
					                new CommandBinding(FirstCommand, OnFirstComman, OnCanFirstComman));
 | 
				
			||||||
 | 
					            CommandManager.RegisterClassCommandBinding(_typeofSelf,
 | 
				
			||||||
 | 
					                new CommandBinding(PrevCommand, OnPrevCommand, OnCanPrevCommand));
 | 
				
			||||||
 | 
					            CommandManager.RegisterClassCommandBinding(_typeofSelf,
 | 
				
			||||||
 | 
					                new CommandBinding(NextCommand, OnNextCommand, OnCanNextCommand));
 | 
				
			||||||
 | 
					            CommandManager.RegisterClassCommandBinding(_typeofSelf,
 | 
				
			||||||
 | 
					                new CommandBinding(EndCommand, OnEndCommand, OnCanEndCommand));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static RoutedCommand FirstCommand { get; private set; }
 | 
				
			||||||
 | 
					        private static void OnFirstComman(object sender, RoutedEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var ctrl = sender as Pagination;
 | 
				
			||||||
 | 
					            ctrl.CurrentPage = 1;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private static void OnCanFirstComman(object sender, CanExecuteRoutedEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var ctrl = sender as Pagination;
 | 
				
			||||||
 | 
					            e.CanExecute = ctrl.CurrentPage > 1;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static RoutedCommand PrevCommand { get; private set; }
 | 
				
			||||||
 | 
					        private static void OnPrevCommand(object sender, RoutedEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var ctrl = sender as Pagination;
 | 
				
			||||||
 | 
					            ctrl.CurrentPage--;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private static void OnCanPrevCommand(object sender, CanExecuteRoutedEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var ctrl = sender as Pagination;
 | 
				
			||||||
 | 
					            e.CanExecute = ctrl.CurrentPage > 1;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static RoutedCommand NextCommand { get; private set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private static void OnNextCommand(object sender, RoutedEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var ctrl = sender as Pagination;
 | 
				
			||||||
 | 
					            ctrl.CurrentPage++;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private static void OnCanNextCommand(object sender, CanExecuteRoutedEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var ctrl = sender as Pagination;
 | 
				
			||||||
 | 
					            e.CanExecute = ctrl.CurrentPage < ctrl.PageCount;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        public static RoutedCommand EndCommand { get; private set; }
 | 
				
			||||||
 | 
					        private static void OnEndCommand(object sender, RoutedEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var ctrl = sender as Pagination;
 | 
				
			||||||
 | 
					            ctrl.CurrentPage = ctrl.PageCount;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private static void OnCanEndCommand(object sender, CanExecuteRoutedEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var ctrl = sender as Pagination;
 | 
				
			||||||
 | 
					            e.CanExecute = ctrl.CurrentPage < ctrl.PageCount;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 默认当前页码
 | 
				
			||||||
 | 
					        public static int DefaultCurrentPage = 1;
 | 
				
			||||||
 | 
					        // 默认总条数
 | 
				
			||||||
 | 
					        public static int DefaultTotalPages = 0;
 | 
				
			||||||
 | 
					        // 默认每页条数列表
 | 
				
			||||||
 | 
					        public static List<int> DefaultPageSizeList = new List<int> { 10, 20, 50, 100 };
 | 
				
			||||||
 | 
					        // 是否显示页码条数信息
 | 
				
			||||||
 | 
					        public static bool DefaultInfoTextIsEnabel = true;
 | 
				
			||||||
 | 
					        // 默认每页条数
 | 
				
			||||||
 | 
					        public static int DefaultPageSize = 10;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static readonly DependencyProperty CurrentPageProperty = DependencyProperty
 | 
				
			||||||
 | 
					                .Register("CurrentPage",
 | 
				
			||||||
 | 
					                typeof(int),
 | 
				
			||||||
 | 
					                typeof(Pagination),
 | 
				
			||||||
 | 
					                new FrameworkPropertyMetadata(DefaultCurrentPage, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
 | 
				
			||||||
 | 
					        public static readonly DependencyProperty PageSizeProperty = DependencyProperty
 | 
				
			||||||
 | 
					                .Register("PageSize",
 | 
				
			||||||
 | 
					                typeof(int),
 | 
				
			||||||
 | 
					                typeof(Pagination),
 | 
				
			||||||
 | 
					                new FrameworkPropertyMetadata(DefaultPageSize, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
 | 
				
			||||||
 | 
					        public static readonly DependencyProperty TotalPagesProperty = DependencyProperty
 | 
				
			||||||
 | 
					                .Register("TotalPages",
 | 
				
			||||||
 | 
					                typeof(int),
 | 
				
			||||||
 | 
					                typeof(Pagination),
 | 
				
			||||||
 | 
					                new FrameworkPropertyMetadata(DefaultTotalPages, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(OnItemsSourceChanged)));
 | 
				
			||||||
 | 
					        public static readonly DependencyProperty InfoTextIsEnabelProperty = DependencyProperty
 | 
				
			||||||
 | 
					                .Register("InfoTextIsEnabel",
 | 
				
			||||||
 | 
					                typeof(bool),
 | 
				
			||||||
 | 
					                typeof(Pagination),
 | 
				
			||||||
 | 
					                new FrameworkPropertyMetadata(DefaultInfoTextIsEnabel, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
 | 
				
			||||||
 | 
					        private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            Pagination p = (Pagination)d;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            p.ResetInfoText();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        [Bindable(true)]
 | 
				
			||||||
 | 
					        [Category("Appearance")]
 | 
				
			||||||
 | 
					        public int CurrentPage
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get { return (int)GetValue(CurrentPageProperty); }
 | 
				
			||||||
 | 
					            set
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                SetValue(CurrentPageProperty, value);
 | 
				
			||||||
 | 
					                if (InfoTextIsEnabel)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    ResetInfoText();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                ResetCurrentPageText();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private static void OnCurrentPageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    Pagination p = d as Pagination;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //    if (p != null)
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        Console.WriteLine(e.NewValue);
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        [Bindable(true)]
 | 
				
			||||||
 | 
					        [Category("Appearance")]
 | 
				
			||||||
 | 
					        public int PageSize
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get { return (int)GetValue(PageSizeProperty); }
 | 
				
			||||||
 | 
					            set
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                SetValue(PageSizeProperty, value);
 | 
				
			||||||
 | 
					                if (InfoTextIsEnabel)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    ResetInfoText();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                ResetCurrentPageText();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        [Bindable(true)]
 | 
				
			||||||
 | 
					        [Category("Appearance")]
 | 
				
			||||||
 | 
					        public int TotalPages
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get { return (int)GetValue(TotalPagesProperty); }
 | 
				
			||||||
 | 
					            set
 | 
				
			||||||
 | 
					            { 
 | 
				
			||||||
 | 
					                SetValue(TotalPagesProperty, value);
 | 
				
			||||||
 | 
					                if (InfoTextIsEnabel)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    ResetInfoText();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                ResetCurrentPageText();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public bool InfoTextIsEnabel
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get { return (bool)GetValue(InfoTextIsEnabelProperty); }
 | 
				
			||||||
 | 
					            set { SetValue(InfoTextIsEnabelProperty, value); }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int PageCount
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => (int)Math.Ceiling((double)TotalPages / PageSize);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public void ResetInfoText()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            this.Dispatcher.BeginInvoke(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (InfoTextIsEnabel)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    if (TotalPages <= PageSize)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        this.InfoBlock.Text = $"1-{TotalPages}/{TotalPages}";
 | 
				
			||||||
 | 
					                        if (TotalPages == 0)
 | 
				
			||||||
 | 
					                        {
 | 
				
			||||||
 | 
					                            this.InfoBlock.Text = $"0-{TotalPages}/{TotalPages}";
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    } else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        this.InfoBlock.Text = ((CurrentPage - 1) * PageSize + 1) + "-" + (CurrentPage * PageSize > TotalPages ? TotalPages : CurrentPage * PageSize) + "/" + TotalPages;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    
 | 
				
			||||||
 | 
					                } else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    this.InfoBlock.Visibility = Visibility.Visible;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public void ResetCurrentPageText()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            this.Dispatcher.BeginInvoke(() =>
 | 
				
			||||||
 | 
					            { 
 | 
				
			||||||
 | 
					                this.CurrentPageText.Text = CurrentPage + "";
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,81 @@
 | 
				
			||||||
 | 
					using Prism.Commands;
 | 
				
			||||||
 | 
					using Prism.Mvvm;
 | 
				
			||||||
 | 
					using Prism.Regions;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Components.pagination
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class PaginationViewModel: BindableBase, IRegionMemberLifetime
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public static readonly DependencyProperty PageSizeProperty = DependencyProperty
 | 
				
			||||||
 | 
					        .Register("CurrentPage",
 | 
				
			||||||
 | 
					                typeof(int),
 | 
				
			||||||
 | 
					                typeof(Pagination),
 | 
				
			||||||
 | 
					                new FrameworkPropertyMetadata(10));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 每页条数
 | 
				
			||||||
 | 
					        private int _pageSize = 10;
 | 
				
			||||||
 | 
					        // 当前页码
 | 
				
			||||||
 | 
					        private int _currentPage = 1;
 | 
				
			||||||
 | 
					        // 总条数
 | 
				
			||||||
 | 
					        private int _totalPages = 0;
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        public int PageSize { get=> _pageSize;  set => SetProperty(ref _pageSize, value); }
 | 
				
			||||||
 | 
					        public int CurrentPage { get => _currentPage; set => SetProperty(ref _currentPage, value); }
 | 
				
			||||||
 | 
					        public int TotalPages { get => _totalPages; set => SetProperty(ref _totalPages, value); }
 | 
				
			||||||
 | 
					        // 总页数 
 | 
				
			||||||
 | 
					        public int PageCount
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => (int)Math.Ceiling((double)TotalPages/ PageSize);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string InfoText
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => ((CurrentPage - 1) * PageSize + 1) + "-" + (CurrentPage * PageSize > TotalPages ? TotalPages : CurrentPage * PageSize) + "/" + TotalPages;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public bool KeepAlive => false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DelegateCommand ToFirst
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => new(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CurrentPage = 1;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DelegateCommand ToPrve
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => new(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CurrentPage -= 1;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DelegateCommand ToNext
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => new(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CurrentPage += 1;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DelegateCommand ToEnd
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => new(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CurrentPage = PageCount;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,109 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class BoardTypeConverter : IMultiValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            int BoardType, DrawerType;
 | 
				
			||||||
 | 
					            bool boardBool = int.TryParse(value[0].ToString(), out BoardType);
 | 
				
			||||||
 | 
					            bool drawerBool = int.TryParse(value[1].ToString(), out DrawerType);
 | 
				
			||||||
 | 
					            //int BoardType = int.Parse(value[0].ToString());
 | 
				
			||||||
 | 
					            //int DrawerType = int.Parse(value[1].ToString());
 | 
				
			||||||
 | 
					            switch (BoardType)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                case 1:
 | 
				
			||||||
 | 
					                    if (DrawerType == 1)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "物理隔断";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else if(DrawerType == 2)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "内置回收";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "外置回收";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                case 2:
 | 
				
			||||||
 | 
					                    if (DrawerType == 1)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "单支计数";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else if (DrawerType == 2)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "计数回收(内置)";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "计数回收(外置)";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                case 3:
 | 
				
			||||||
 | 
					                    if (DrawerType == 1)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "管控药盒";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else if (DrawerType == 2)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "药盒回收(内置)";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "外置回收";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                case 4:
 | 
				
			||||||
 | 
					                    if (DrawerType == 1)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "冰箱";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else if (DrawerType == 2)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "内置回收";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "外置回收";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                case 5:
 | 
				
			||||||
 | 
					                    if (DrawerType == 1)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "智能显示";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else if (DrawerType == 2)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "内置回收";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "外置回收";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                case 6:
 | 
				
			||||||
 | 
					                    if (DrawerType == 1)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "称重计数";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else if (DrawerType == 2)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "称重回收(内置)";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        return "计数回收(外置)";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return "";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,25 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class ChangeShiftsStatusConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            //bool status = bool.Parse(value.ToString());
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,36 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    internal class DrawerSelectConverter : IMultiValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (value != null && value.Length > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                //int ButtonDrawerNo = int.Parse(value[0].ToString());
 | 
				
			||||||
 | 
					                //int SelectedDrawerNo = int.Parse(value[1].ToString());
 | 
				
			||||||
 | 
					                int ButtonDrawerNo, SelectedDrawerNo;
 | 
				
			||||||
 | 
					                int.TryParse(value[0].ToString(), out ButtonDrawerNo);
 | 
				
			||||||
 | 
					                int.TryParse(value[1].ToString(), out SelectedDrawerNo);
 | 
				
			||||||
 | 
					                return ButtonDrawerNo == SelectedDrawerNo;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,31 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Drawing;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class ForeColorConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if((bool)value)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                return "#3ECFED";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                return "#808080";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,48 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Collections.ObjectModel;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class GroupSumConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        #region 分组组内求和
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var total = 0;
 | 
				
			||||||
 | 
					            // DataGrid分组后对应的组及组内元素CollectionViewGroup.Items 类型是ReadOnlyObservableCollection<object>
 | 
				
			||||||
 | 
					            if (value is ReadOnlyObservableCollection<object> items)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                foreach (var item in items)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    var de = item as ChannelStock;
 | 
				
			||||||
 | 
					                    try
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        total += de.Quantity;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    catch (Exception)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        var de2 = item as CheckRecordStock;
 | 
				
			||||||
 | 
					                        total = de2.quantity;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return "总库存:" + total;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,29 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class InputQuantityConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public bool ReadOnlyValue { get; set; } = true;
 | 
				
			||||||
 | 
					        public bool NotReadOnlyValue { get; set; } = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            int iResult;
 | 
				
			||||||
 | 
					            int.TryParse(value.ToString(), out iResult);
 | 
				
			||||||
 | 
					            //return int.Parse(value.ToString()) == 2 || int.Parse(value.ToString()) == 6 ? ReadOnlyValue : NotReadOnlyValue;
 | 
				
			||||||
 | 
					            return iResult == 2 || iResult == 6 ? ReadOnlyValue : NotReadOnlyValue;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return Binding.DoNothing;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,84 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    internal class MachineTypeConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            //int status = int.Parse(value.ToString());
 | 
				
			||||||
 | 
					            int status;
 | 
				
			||||||
 | 
					            int.TryParse(value.ToString(), out status);
 | 
				
			||||||
 | 
					            string para = parameter?.ToString() ?? "";
 | 
				
			||||||
 | 
					            //完成
 | 
				
			||||||
 | 
					            if (para.Equals("drugNameSearch"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if ((status == 1) || (status == 2))
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Visible;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Collapsed;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if(para.Equals("saveBtn"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if(status==1)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Visible;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Collapsed;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if(para.Equals("gridviewColumn"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if(status== 1)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return 150;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return 0;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if(para.Equals("gridviewCheckQuantity"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if(status== 4)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return 150;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return 0;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (para.Equals("gridviewQuantity"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (status == 4)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return 0;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return 100;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return Visibility.Collapsed;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,27 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class NullableToEnabelConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public bool NullValue { get; set; } = false;
 | 
				
			||||||
 | 
					        public bool NotNullValue { get; set; } = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return value == null ? NullValue : NotNullValue;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return Binding.DoNothing;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,38 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class OrderStatusConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            string strRet = string.Empty;
 | 
				
			||||||
 | 
					            switch (value.ToString())
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                case "0":
 | 
				
			||||||
 | 
					                    strRet = "待取药";
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                    case "1":
 | 
				
			||||||
 | 
					                    strRet = "已取药";
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                    case "2":
 | 
				
			||||||
 | 
					                    strRet = "已退回";
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                default:
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return strRet;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,56 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class PaginationConverter : IMultiValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            string type = values[0].ToString();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(type) && "First".Equals(type))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                int CurrentPage = int.Parse(values[1].ToString());
 | 
				
			||||||
 | 
					                return CurrentPage > 1;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(type) && "Prve".Equals(type))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                int CurrentPage = int.Parse(values[1].ToString());
 | 
				
			||||||
 | 
					                return CurrentPage > 1;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(type) && "Next".Equals(type))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                int CurrentPage = int.Parse(values[1].ToString());
 | 
				
			||||||
 | 
					                int PageCount = int.Parse(values[2].ToString());
 | 
				
			||||||
 | 
					                return PageCount > CurrentPage;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(type) && "End".Equals(type))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                int CurrentPage = int.Parse(values[1].ToString());
 | 
				
			||||||
 | 
					                int PageCount = int.Parse(values[2].ToString());
 | 
				
			||||||
 | 
					                return PageCount > CurrentPage;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(type) && "InfoText".Equals(type))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                int CurrentPage = int.Parse(values[1].ToString());
 | 
				
			||||||
 | 
					                int PageCount = int.Parse(values[2].ToString());
 | 
				
			||||||
 | 
					                int PageSize = int.Parse(values[3].ToString());
 | 
				
			||||||
 | 
					                int TotalPages = int.Parse(values[4].ToString());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return ((CurrentPage - 1) * PageSize + 1) + "-" + (CurrentPage * PageSize > TotalPages ? TotalPages : CurrentPage * PageSize) + "/" + TotalPages; ;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,34 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class QuantityCountConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public bool IsEnabled { get; set; } = true;
 | 
				
			||||||
 | 
					        public bool NotIsEnabled { get; set; } = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ((int)value> 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                return true;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,30 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class ShiftsStateConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if(value.ToString().Equals("1"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                return "已交班";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                return "未交班";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,99 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    internal class StatusConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            //int status = int.Parse(value.ToString());
 | 
				
			||||||
 | 
					            int status;
 | 
				
			||||||
 | 
					            int.TryParse(value.ToString(),out status);
 | 
				
			||||||
 | 
					            string para = parameter?.ToString()??"";
 | 
				
			||||||
 | 
					            //完成
 | 
				
			||||||
 | 
					            if (para.Equals("CompleteBtn"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (status == 3)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Visible;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Collapsed;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            //关闭
 | 
				
			||||||
 | 
					            if (para.Equals("CloseBtn"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (status > 0 && status < 3)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return false;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return true;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (para.Equals("opearBtnLoading"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (status > 0 && status < 3)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return true;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return false;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            //取药
 | 
				
			||||||
 | 
					            if (para.Equals("opearBtnVisible"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (status < 3)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Visible;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Collapsed;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            //取消
 | 
				
			||||||
 | 
					            if (para.Equals("CancelBtn"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (status > 0&&status!=4)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Visible;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Collapsed;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            //保存
 | 
				
			||||||
 | 
					            if (para.Equals("SaveBtn"))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (status == 4)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Visible;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    return Visibility.Collapsed;
 | 
				
			||||||
 | 
					                }    
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return Visibility.Collapsed;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,33 @@
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Globalization;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Converter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class TotalCountConverter : IValueConverter
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var total = 0;
 | 
				
			||||||
 | 
					            if (value is List<ChannelStock> items)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                foreach (var item in items)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    var de = item as ChannelStock;
 | 
				
			||||||
 | 
					                    total += de.Quantity;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return total;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            throw new NotImplementedException();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,20 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public sealed class MessageAttribute : Attribute
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public MessageAttribute()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        public MessageAttribute(int value)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,152 @@
 | 
				
			||||||
 | 
					<Project Sdk="Microsoft.NET.Sdk">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <PropertyGroup>
 | 
				
			||||||
 | 
					    <OutputType>WinExe</OutputType>
 | 
				
			||||||
 | 
					    <TargetFramework>net6.0-windows</TargetFramework>
 | 
				
			||||||
 | 
					    <Nullable>enable</Nullable>
 | 
				
			||||||
 | 
					    <UseWPF>true</UseWPF>
 | 
				
			||||||
 | 
					    <PackageIcon></PackageIcon>
 | 
				
			||||||
 | 
					    <Product>毒麻管理程序</Product>
 | 
				
			||||||
 | 
					    <ApplicationIcon>Images\favicon.ico</ApplicationIcon>
 | 
				
			||||||
 | 
					    <Platforms>AnyCPU;x86</Platforms>
 | 
				
			||||||
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<ItemGroup>
 | 
				
			||||||
 | 
							<None Remove="Images\body-bg.jpg" />
 | 
				
			||||||
 | 
							<None Remove="Images\box-16.jpg" />
 | 
				
			||||||
 | 
							<None Remove="Images\box.png" />
 | 
				
			||||||
 | 
							<None Remove="Images\favicon.ico" />
 | 
				
			||||||
 | 
							<None Remove="Images\finger-bg-r.png" />
 | 
				
			||||||
 | 
							<None Remove="Images\logo.png" />
 | 
				
			||||||
 | 
							<None Remove="Images\TbExit.png" />
 | 
				
			||||||
 | 
							<None Remove="Images\TbJiay.png" />
 | 
				
			||||||
 | 
							<None Remove="Images\TbKuc.png" />
 | 
				
			||||||
 | 
							<None Remove="Images\TbQyao.png" />
 | 
				
			||||||
 | 
							<None Remove="Images\TbSet.png" />
 | 
				
			||||||
 | 
							<None Remove="Images\TbTuiy.png" />
 | 
				
			||||||
 | 
						</ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <COMReference Include="zkemkeeper">
 | 
				
			||||||
 | 
					      <WrapperTool>tlbimp</WrapperTool>
 | 
				
			||||||
 | 
					      <VersionMinor>0</VersionMinor>
 | 
				
			||||||
 | 
					      <VersionMajor>1</VersionMajor>
 | 
				
			||||||
 | 
					      <Guid>fe9ded34-e159-408e-8490-b720a5e632c7</Guid>
 | 
				
			||||||
 | 
					      <Lcid>0</Lcid>
 | 
				
			||||||
 | 
					      <Isolated>false</Isolated>
 | 
				
			||||||
 | 
					      <EmbedInteropTypes>False</EmbedInteropTypes>
 | 
				
			||||||
 | 
					    </COMReference>
 | 
				
			||||||
 | 
					    <COMReference Include="gregn6Lib">
 | 
				
			||||||
 | 
					      <WrapperTool>tlbimp</WrapperTool>
 | 
				
			||||||
 | 
					      <VersionMinor>0</VersionMinor>
 | 
				
			||||||
 | 
					      <VersionMajor>6</VersionMajor>
 | 
				
			||||||
 | 
					      <Guid>4018f953-1bfe-441e-8a04-dc8ba1ff060e</Guid>
 | 
				
			||||||
 | 
					      <Lcid>0</Lcid>
 | 
				
			||||||
 | 
					      <Isolated>false</Isolated>
 | 
				
			||||||
 | 
					      <EmbedInteropTypes>False</EmbedInteropTypes>
 | 
				
			||||||
 | 
					    </COMReference>
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <Content Include="Images\favicon.ico" />
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
						<Resource Include="Images\body-bg.jpg" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\box-16.jpg" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\box.png" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\favicon.ico" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\finger-bg-r.png" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\logo.png" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\TbExit.png" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\TbJiay.png" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\TbKuc.png" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\TbQyao.png" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\TbSet.png" />
 | 
				
			||||||
 | 
					    <Resource Include="Images\TbTuiy.png" />
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <PackageReference Include="log4net" Version="2.0.15" />
 | 
				
			||||||
 | 
					    <PackageReference Include="MaterialDesignThemes" Version="4.8.0" />
 | 
				
			||||||
 | 
					    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
 | 
				
			||||||
 | 
					    <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2365.46" />
 | 
				
			||||||
 | 
					    <PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
 | 
				
			||||||
 | 
					    <PackageReference Include="MySql.Data" Version="8.3.0" />
 | 
				
			||||||
 | 
					    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
 | 
				
			||||||
 | 
					    <PackageReference Include="Prism.Unity" Version="8.1.97" />
 | 
				
			||||||
 | 
					    <PackageReference Include="SqlSugarCore" Version="5.1.4.152" />
 | 
				
			||||||
 | 
					    <PackageReference Include="SqlSugarCoreNoDrive" Version="5.1.4.151" />
 | 
				
			||||||
 | 
					    <PackageReference Include="SuperSimpleTcp" Version="3.0.10" />
 | 
				
			||||||
 | 
					    <PackageReference Include="System.Drawing.Common" Version="7.0.0" />
 | 
				
			||||||
 | 
					    <PackageReference Include="System.IO.Ports" Version="7.0.0" />
 | 
				
			||||||
 | 
					    <PackageReference Include="System.Management" Version="7.0.1" />
 | 
				
			||||||
 | 
					    <PackageReference Include="System.Reactive" Version="5.0.0" />
 | 
				
			||||||
 | 
					    <PackageReference Include="System.Speech" Version="7.0.0" />
 | 
				
			||||||
 | 
					    <PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <Reference Include="MySql.Data">
 | 
				
			||||||
 | 
					      <HintPath>bin\Debug\net6.0-windows\MySql.Data.dll</HintPath>
 | 
				
			||||||
 | 
					    </Reference>
 | 
				
			||||||
 | 
					    <Reference Include="SCHelper">
 | 
				
			||||||
 | 
					      <HintPath>bin\Debug\net6.0-windows\SCHelper.dll</HintPath>
 | 
				
			||||||
 | 
					    </Reference>
 | 
				
			||||||
 | 
					    <Reference Include="SCHelper.Database">
 | 
				
			||||||
 | 
					      <HintPath>bin\Debug\net6.0-windows\SCHelper.Database.dll</HintPath>
 | 
				
			||||||
 | 
					    </Reference>
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <ApplicationDefinition Update="App.xaml">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </ApplicationDefinition>
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <None Update="App.config">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="log4net.config">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\changeShifts_temp.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\account_book_temp.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\changeShifts_temp.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\machine_log_check.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\machine_log_check_new.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\machine_log_check_new2.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\machine_log_return.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\machine_log_add.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\machine_log_take.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					    <None Update="ReportTemp\stock_template.grf">
 | 
				
			||||||
 | 
					      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 | 
				
			||||||
 | 
					    </None>
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <Page Update="Views\Dialog\InvoiceTakeDialog.xaml">
 | 
				
			||||||
 | 
					      <XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
 | 
				
			||||||
 | 
					    </Page>
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</Project>
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,182 @@
 | 
				
			||||||
 | 
					using log4net;
 | 
				
			||||||
 | 
					using log4net.Repository.Hierarchy;
 | 
				
			||||||
 | 
					using Microsoft.Data.SqlClient.Server;
 | 
				
			||||||
 | 
					using Newtonsoft.Json;
 | 
				
			||||||
 | 
					using Prism.Events;
 | 
				
			||||||
 | 
					using SqlSugar;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Configuration;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					using DM_Weight.msg;
 | 
				
			||||||
 | 
					using DM_Weight.util;
 | 
				
			||||||
 | 
					using zkemkeeper;
 | 
				
			||||||
 | 
					namespace DM_Weight.Finger
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class FingerprintUtil
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private readonly ILog logger = LogManager.GetLogger(typeof(FingerprintUtil));
 | 
				
			||||||
 | 
					        public zkemkeeper.CZKEMClass axCZKEM1= new zkemkeeper.CZKEMClass();
 | 
				
			||||||
 | 
					        public bool bIsConnected = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string fingerIp = ConfigurationManager.AppSettings["fingerIp"]?.ToString() ?? "";
 | 
				
			||||||
 | 
					        private int fingerPort = 4370;
 | 
				
			||||||
 | 
					        private int machineNumber = Convert.ToInt32(ConfigurationManager.AppSettings["machineNumber"]?.ToString() ?? "0");
 | 
				
			||||||
 | 
					        private int machineType = Convert.ToInt32(ConfigurationManager.AppSettings["machineType"]?.ToString() ?? "0");
 | 
				
			||||||
 | 
					        private readonly IEventAggregator _eventAggregator;
 | 
				
			||||||
 | 
					        public FingerprintUtil(IEventAggregator eventAggregator)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            _eventAggregator = eventAggregator;
 | 
				
			||||||
 | 
					            logger.Info($"进入构造器,开始连接指纹机");
 | 
				
			||||||
 | 
					           // Task.Factory.StartNew(() =>
 | 
				
			||||||
 | 
					           //{
 | 
				
			||||||
 | 
					               ConnectionMain();
 | 
				
			||||||
 | 
					        //});
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public void ConnectionMain()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                //axCZKEM1 = new CZKEMClass();
 | 
				
			||||||
 | 
					                bIsConnected = axCZKEM1.Connect_Net(fingerIp, fingerPort);
 | 
				
			||||||
 | 
					                logger.Info($"连接指纹机,IP:{fingerIp},端口:{fingerPort},机器号:{machineNumber},连接结果:{bIsConnected}");
 | 
				
			||||||
 | 
					                if (bIsConnected)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    if (axCZKEM1.RegEvent(machineNumber, 9))
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        this.axCZKEM1.OnAttTransactionEx += new zkemkeeper._IZKEMEvents_OnAttTransactionExEventHandler(axCZKEM1_OnAttTransactionEx);
 | 
				
			||||||
 | 
					                        //this.axCZKEM1.OnEnrollFinger += new zkemkeeper._IZKEMEvents_OnEnrollFingerEventHandler(axCZKEM1_OnEnrollFinger);
 | 
				
			||||||
 | 
					                        this.axCZKEM1.OnEnrollFingerEx += new zkemkeeper._IZKEMEvents_OnEnrollFingerExEventHandler(axCZKEM1_OnEnrollFingerEx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                _eventAggregator.GetEvent<FingerprintEvent>().Publish(new FingerprintMsg()
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    Message = "CONNECT",
 | 
				
			||||||
 | 
					                    Result = bIsConnected,
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch (Exception ex)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                logger.Info($"连接指纹机异常{ex.Message.ToString()}");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //If your fingerprint(or your card) passes the verification,this event will be triggered
 | 
				
			||||||
 | 
					        private void axCZKEM1_OnAttTransactionEx(string sEnrollNumber, int iIsInValid, int iAttState, int iVerifyMethod, int iYear, int iMonth, int iDay, int iHour, int iMinute, int iSecond, int iWorkCode)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            FingerprintMsg message = new FingerprintMsg()
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Message = "LOGIN",
 | 
				
			||||||
 | 
					                Id = Convert.ToInt32(sEnrollNumber),
 | 
				
			||||||
 | 
					                VerifyMethod = iVerifyMethod
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            logger.Info($"触发用户验证通过事件,用户id:{sEnrollNumber}验证方式:{iVerifyMethod}");
 | 
				
			||||||
 | 
					            _eventAggregator.GetEvent<FingerprintEvent>().Publish(message);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //When you are enrolling your finger,this event will be triggered.
 | 
				
			||||||
 | 
					        private void axCZKEM1_OnEnrollFinger(int iEnrollNumber, int iFingerIndex, int iActionResult, int iTemplateLength)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            FingerprintMsg message = new FingerprintMsg()
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Message = "INS_FINGER",
 | 
				
			||||||
 | 
					                Id = iEnrollNumber,
 | 
				
			||||||
 | 
					                FingerIndex = iFingerIndex
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            axCZKEM1.StartIdentify();
 | 
				
			||||||
 | 
					            axCZKEM1.RefreshData(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            logger.Info($"触发用户登记指纹事件,用户id:{iEnrollNumber}指纹索引:{iFingerIndex}登记结果:{(iActionResult == 0)}");
 | 
				
			||||||
 | 
					            message.Result = (iActionResult == 0);
 | 
				
			||||||
 | 
					            _eventAggregator.GetEvent<FingerprintEvent>().Publish(message);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private void axCZKEM1_OnEnrollFingerEx(string iEnrollNumber, int iFingerIndex, int iActionResult, int iTemplateLength)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            FingerprintMsg message = new FingerprintMsg()
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Message = "INS_FINGER",
 | 
				
			||||||
 | 
					                Id = Convert.ToInt32(iEnrollNumber),
 | 
				
			||||||
 | 
					                FingerIndex = iFingerIndex
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            axCZKEM1.StartIdentify();
 | 
				
			||||||
 | 
					            axCZKEM1.RefreshData(1);
 | 
				
			||||||
 | 
					            logger.Info($"触发用户登记指纹事件1,用户id:{iEnrollNumber}指纹索引:{iFingerIndex}登记结果:{(iActionResult == 0)}");
 | 
				
			||||||
 | 
					            message.Result = (iActionResult == 0);
 | 
				
			||||||
 | 
					            _eventAggregator.GetEvent<FingerprintEvent>().Publish(message);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /**
 | 
				
			||||||
 | 
					         * 删除用户
 | 
				
			||||||
 | 
					         */
 | 
				
			||||||
 | 
					        public bool DelUser(int Id)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            bool result = false;
 | 
				
			||||||
 | 
					            axCZKEM1.EnableDevice(machineNumber, false);
 | 
				
			||||||
 | 
					            if (machineType == 1)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                result = axCZKEM1.DeleteEnrollData(machineNumber, Id, machineNumber, 12);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                result = axCZKEM1.SSR_DeleteEnrollData(machineNumber, Id.ToString(), 12);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            axCZKEM1.RefreshData(machineNumber);
 | 
				
			||||||
 | 
					            axCZKEM1.EnableDevice(machineNumber, true);
 | 
				
			||||||
 | 
					            return result;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /**
 | 
				
			||||||
 | 
					         * 添加或修改用户
 | 
				
			||||||
 | 
					         */
 | 
				
			||||||
 | 
					        public bool SaveUser(UserList User)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            bool result = false;
 | 
				
			||||||
 | 
					            axCZKEM1.SetStrCardNumber(User.UserBarcode);
 | 
				
			||||||
 | 
					            if (machineType == 1)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                result = axCZKEM1.SetUserInfo(machineNumber, User.Id, User.Nickname, "123456", 0, true);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                result = axCZKEM1.SSR_SetUserInfo(machineNumber, User.Id.ToString(), User.Nickname, "123456", 0, true);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return result;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /**
 | 
				
			||||||
 | 
					         * 添加或修改用户指纹
 | 
				
			||||||
 | 
					         */
 | 
				
			||||||
 | 
					        public bool SaveFingerprint(int Id, int FingerIndex)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            bool result = false;
 | 
				
			||||||
 | 
					            // 取消其他操作
 | 
				
			||||||
 | 
					            bool res2 = axCZKEM1.CancelOperation();
 | 
				
			||||||
 | 
					            if (machineType == 1)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                // 删除源指纹
 | 
				
			||||||
 | 
					                bool res = axCZKEM1.DelUserTmp(machineNumber, Id, FingerIndex);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                // 删除源指纹
 | 
				
			||||||
 | 
					                bool res = axCZKEM1.SSR_DelUserTmp(machineNumber, Id.ToString(), FingerIndex);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            // 添加新指纹
 | 
				
			||||||
 | 
					            result = axCZKEM1.StartEnrollEx(Id.ToString(), FingerIndex, 3);
 | 
				
			||||||
 | 
					            return result;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,161 @@
 | 
				
			||||||
 | 
					using DM_Weight.util;
 | 
				
			||||||
 | 
					using PreviewDemo;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Controls;
 | 
				
			||||||
 | 
					using System.Windows;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.HIKVISION
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    internal class CHKFunction
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        private bool m_bInitSDK = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private static int m_lRealHandle = -1;
 | 
				
			||||||
 | 
					        public static int HKUserId = -1; 
 | 
				
			||||||
 | 
					        private uint iLastErr = 0; 
 | 
				
			||||||
 | 
					        private string str;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public CHCNetSDK.NET_DVR_USER_LOGIN_INFO struLogInfo;
 | 
				
			||||||
 | 
					        public CHCNetSDK.NET_DVR_DEVICEINFO_V40 DeviceInfo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private System.ComponentModel.Container components = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public bool HIKInit()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            m_bInitSDK = CHCNetSDK.NET_DVR_Init();
 | 
				
			||||||
 | 
					            if (m_bInitSDK == false)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                //MessageBox.Show("NET_DVR_Init error!");
 | 
				
			||||||
 | 
					                //return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                //保存SDK日志 To save the SDK log
 | 
				
			||||||
 | 
					                CHCNetSDK.NET_DVR_SetLogToFile(3, "C:\\SdkLog\\", true);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return m_bInitSDK;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int HIKLogin()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            string ip= ReadApp.ReadAppSetting("HIKIP");
 | 
				
			||||||
 | 
					            string port=ReadApp.ReadAppSetting("HIKPort");
 | 
				
			||||||
 | 
					            string userName= ReadApp.ReadAppSetting("HIKUser");
 | 
				
			||||||
 | 
					            string password= ReadApp.ReadAppSetting("HIKPassword");
 | 
				
			||||||
 | 
					            if (HKUserId < 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                struLogInfo = new CHCNetSDK.NET_DVR_USER_LOGIN_INFO();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                //设备IP地址或者域名
 | 
				
			||||||
 | 
					                byte[] byIP = System.Text.Encoding.Default.GetBytes(ip);
 | 
				
			||||||
 | 
					                struLogInfo.sDeviceAddress = new byte[129];
 | 
				
			||||||
 | 
					                byIP.CopyTo(struLogInfo.sDeviceAddress, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                //设备用户名
 | 
				
			||||||
 | 
					                byte[] byUserName = System.Text.Encoding.Default.GetBytes(userName);
 | 
				
			||||||
 | 
					                struLogInfo.sUserName = new byte[64];
 | 
				
			||||||
 | 
					                byUserName.CopyTo(struLogInfo.sUserName, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                //设备密码
 | 
				
			||||||
 | 
					                byte[] byPassword = System.Text.Encoding.Default.GetBytes(password);
 | 
				
			||||||
 | 
					                struLogInfo.sPassword = new byte[64];
 | 
				
			||||||
 | 
					                byPassword.CopyTo(struLogInfo.sPassword, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                struLogInfo.wPort = ushort.Parse(port);//设备服务端口号
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                //if (LoginCallBack == null)
 | 
				
			||||||
 | 
					                //{
 | 
				
			||||||
 | 
					                //    LoginCallBack = new CHCNetSDK.LOGINRESULTCALLBACK(cbLoginCallBack);//注册回调函数                    
 | 
				
			||||||
 | 
					                //}
 | 
				
			||||||
 | 
					                //struLogInfo.cbLoginResult = LoginCallBack;
 | 
				
			||||||
 | 
					                struLogInfo.bUseAsynLogin = false; //是否异步登录:0- 否,1- 是 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                DeviceInfo = new CHCNetSDK.NET_DVR_DEVICEINFO_V40();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                //登录设备 Login the device
 | 
				
			||||||
 | 
					                HKUserId = CHCNetSDK.NET_DVR_Login_V40(ref struLogInfo, ref DeviceInfo);
 | 
				
			||||||
 | 
					                if (HKUserId < 0)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    iLastErr = CHCNetSDK.NET_DVR_GetLastError();
 | 
				
			||||||
 | 
					                    str = "NET_DVR_Login_V40 failed, error code= " + iLastErr; //登录失败,输出错误号
 | 
				
			||||||
 | 
					                    MessageBox.Show(str);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    //登录成功
 | 
				
			||||||
 | 
					                    //MessageBox.Show("Login Success!");
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                //注销登录 Logout the device
 | 
				
			||||||
 | 
					                if (m_lRealHandle >= 0)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    //MessageBox.Show("Please stop live view firstly");
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (!CHCNetSDK.NET_DVR_Logout(HKUserId))
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    iLastErr = CHCNetSDK.NET_DVR_GetLastError();
 | 
				
			||||||
 | 
					                    str = "NET_DVR_Logout failed, error code= " + iLastErr;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                HKUserId = -1;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return HKUserId;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public void HIKLoginOut()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (m_lRealHandle >= 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CHCNetSDK.NET_DVR_StopRealPlay(m_lRealHandle);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (HKUserId >= 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CHCNetSDK.NET_DVR_Logout(HKUserId);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (m_bInitSDK == true)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CHCNetSDK.NET_DVR_Cleanup();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public bool HIKStartDVRRecord()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            bool isStart= CHCNetSDK.NET_DVR_StartDVRRecord(HKUserId, 5, 2);
 | 
				
			||||||
 | 
					            return isStart;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        public bool HIKStopDVRRecord()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            bool isStart = CHCNetSDK.NET_DVR_StopDVRRecord(HKUserId, 5);
 | 
				
			||||||
 | 
					            return isStart;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 清理所有正在使用的资源。
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public void Dispose()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (m_lRealHandle >= 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CHCNetSDK.NET_DVR_StopRealPlay(m_lRealHandle);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (HKUserId >= 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CHCNetSDK.NET_DVR_Logout(HKUserId);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (m_bInitSDK == true)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                CHCNetSDK.NET_DVR_Cleanup();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            //base.Dispose(disposing);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
		 After Width: | Height: | Size: 5.5 KiB  | 
| 
		 After Width: | Height: | Size: 5.4 KiB  | 
| 
		 After Width: | Height: | Size: 20 KiB  | 
| 
		 After Width: | Height: | Size: 5.6 KiB  | 
| 
		 After Width: | Height: | Size: 5.4 KiB  | 
| 
		 After Width: | Height: | Size: 5.6 KiB  | 
| 
		 After Width: | Height: | Size: 19 KiB  | 
| 
		 After Width: | Height: | Size: 18 KiB  | 
| 
		 After Width: | Height: | Size: 5.5 KiB  | 
| 
		 After Width: | Height: | Size: 264 KiB  | 
| 
		 After Width: | Height: | Size: 53 KiB  | 
| 
		 After Width: | Height: | Size: 3.6 KiB  | 
| 
						 | 
					@ -0,0 +1,87 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 账册
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public class AccountModel
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 总结存
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int StockQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 借入数量
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int InQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 发出数量
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int OutQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 日期
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string OperationTime { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 凭证号
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string InvoiceId { get;set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品名称
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品ID
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 单位
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string PackUnit { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 剂型
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Dosage { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 厂家
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Manufactory { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批次
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string ManuNo { get;set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 效期
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string EffDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string OperatorName { get;set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 复核人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string ReviewerName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 规格
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 供应单位
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string SupplierDept { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 领用部门
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string ReceiveDept { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 账册类型
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public class AccountType
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 账册类型名称
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string  AccountTypeName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 账册类型值
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int AccountTypeValue { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,180 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using Prism.Mvvm;
 | 
				
			||||||
 | 
					using SqlSugar;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    //[SugarTable("channel_list")]
 | 
				
			||||||
 | 
					    public class ChannelList : BindableBase
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "chnguid", IsPrimaryKey = true)]
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
 | 
				
			||||||
 | 
					        public string Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        /////</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "machine_id")]
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "row_no")]
 | 
				
			||||||
 | 
					        public int DrawerNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int ColNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int PosNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ///// <summary>
 | 
				
			||||||
 | 
					        /////  
 | 
				
			||||||
 | 
					        ///// 默认值: NULL
 | 
				
			||||||
 | 
					        /////</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "manu_no")]
 | 
				
			||||||
 | 
					        //public string ManuNo { get; set; }
 | 
				
			||||||
 | 
					        ///// <summary>
 | 
				
			||||||
 | 
					        /////  
 | 
				
			||||||
 | 
					        ///// 默认值: NULL
 | 
				
			||||||
 | 
					        /////</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "eff_date")]
 | 
				
			||||||
 | 
					        //public string EffDate { get; set; }
 | 
				
			||||||
 | 
					        ///// <summary>
 | 
				
			||||||
 | 
					        /////  
 | 
				
			||||||
 | 
					        ///// 默认值: NULL
 | 
				
			||||||
 | 
					        /////</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "quantity")]
 | 
				
			||||||
 | 
					        //public int Quantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int DrawerType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int BoardType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        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;
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int AddQuantity
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    get => _addQuantity;
 | 
				
			||||||
 | 
					        //    set
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        SetProperty(ref _addQuantity, value);
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private int _takeQuantity = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int TakeQuantity
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    get => _takeQuantity;
 | 
				
			||||||
 | 
					        //    set
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        if (value > Quantity)
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            throw new ArgumentException("取药数量不能大于库存");
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //        SetProperty(ref _takeQuantity, value);
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					        //private int _returnQuantity = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int ReturnQuantity
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    get => _returnQuantity;
 | 
				
			||||||
 | 
					        //    set
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        SetProperty(ref _returnQuantity, value);
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private int _checkQuantity = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int CheckQuantity
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    get => _checkQuantity;
 | 
				
			||||||
 | 
					        //    set
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        if (value < 0)
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            throw new ArgumentException("盘点数量不能是负数");
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //        SetProperty(ref _checkQuantity, value);
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int? CanReturnQuantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private DrugInfo? _DrugInfo;
 | 
				
			||||||
 | 
					        public DrugInfo Drug { get => _DrugInfo; set => SetProperty(ref _DrugInfo, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public int process { get; set; } = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private DrugManuNo? _drugManuNo; 
 | 
				
			||||||
 | 
					        public DrugManuNo? drugManuNo { get => _drugManuNo; set => SetProperty(ref _drugManuNo, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //public List<ChannelStock> channelStocks { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private List<ChannelStock>? _channelStocks; 
 | 
				
			||||||
 | 
					        public List<ChannelStock> channelStocks { get => _channelStocks; set => SetProperty(ref _channelStocks, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //public int totalCount { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int _totalCount; 
 | 
				
			||||||
 | 
					        public int totalCount { get => _totalCount; set => SetProperty(ref _totalCount, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,181 @@
 | 
				
			||||||
 | 
					using Org.BouncyCastle.Crypto;
 | 
				
			||||||
 | 
					using Prism.Mvvm;
 | 
				
			||||||
 | 
					using SqlSugar;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary>
 | 
				
			||||||
 | 
					    [Serializable]
 | 
				
			||||||
 | 
					    public class ChannelStock : BindableBase
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
 | 
				
			||||||
 | 
					        public string Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string Chnguid { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int DrawerNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int ColNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int PosNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string ManuNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string EffDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int Quantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int DrawerType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int BoardType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        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); }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,25 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class ChannelStockCount
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public int DrawerNo { get; set; }
 | 
				
			||||||
 | 
					        public int ColNo { get; set; }
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					        public string ManuNo { get;set; }
 | 
				
			||||||
 | 
					        public int Quantity { get;set; }
 | 
				
			||||||
 | 
					        public string EffDate { get; set; }
 | 
				
			||||||
 | 
					        public string DrugName { get; set; }
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					        public string Dosage { get;set; }
 | 
				
			||||||
 | 
					        public string ManuFactory { get;set; }
 | 
				
			||||||
 | 
					        public string SmallUnit { get;set; }
 | 
				
			||||||
 | 
					        public string PackUnit { get; set; }
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,73 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 盘点后药品库存数
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public class CheckRecordStock
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public int ID { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 抽屉号
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int rowNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 列号
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int colNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 数量
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int quantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批次
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string manuNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 效期
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string effDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品名称
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string drugName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 规格
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string drugSpec { get; set; }
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					        public string packUnit { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 厂商
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string manufactory { get; set; }
 | 
				
			||||||
 | 
					        public int maxStock { get; set; }
 | 
				
			||||||
 | 
					        public string drugId { get; set; }
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批次总库存
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int ManuQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作时间
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string optdate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string operatorUser { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 审核人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string reviewerUser { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public List<CheckRecordStock> manuNoDetails { get;set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,77 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    internal class Class1
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /// <summary>    /// 行政区表    
 | 
				
			||||||
 | 
					    /// /// </summary>  
 | 
				
			||||||
 | 
					    public class DistrictModel
 | 
				
			||||||
 | 
					    {        /// <summary>        /// 主键        /// </summary>        
 | 
				
			||||||
 | 
					        private int id;        /// <summary>        /// 代码        /// </summary>        
 | 
				
			||||||
 | 
					        private int code;        /// <summary>        /// 名称        /// </summary>        
 | 
				
			||||||
 | 
					        private string name;
 | 
				
			||||||
 | 
					        public int Id { get { return id; } set { id = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 代码        /// </summary>        
 | 
				
			||||||
 | 
					        public int Code { get { return code; } set { code = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 名称        /// </summary>        
 | 
				
			||||||
 | 
					        public string Name { get { return name; } set { name = value; } }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /// <summary>    /// 表    /// </summary>    
 | 
				
			||||||
 | 
					    public class MapSpotModel
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        private int id;        //名称
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string name;        //代码
 | 
				
			||||||
 | 
					        private int code;        //个数
 | 
				
			||||||
 | 
					        private int allNumber;        //面积
 | 
				
			||||||
 | 
					        private double allArea;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private int hCTureNumber;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private double hCTrueArea;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 通过个数
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        private int hCTruePassNumber;        //不通过个数
 | 
				
			||||||
 | 
					        private int hCTrueNoPassNumber;        //通过率
 | 
				
			||||||
 | 
					        private string hCTruePassingRate;        //个数
 | 
				
			||||||
 | 
					        private int jLTureNumber;        //面积
 | 
				
			||||||
 | 
					        private double jLTrueArea;        //通过个数
 | 
				
			||||||
 | 
					        private int jLTruePassNumber;        //不通过个数
 | 
				
			||||||
 | 
					        private int jLTrueNoPassNumber;        //通过率
 | 
				
			||||||
 | 
					        private string jLTruePassingRate;
 | 
				
			||||||
 | 
					        private DistrictModel districtModels;
 | 
				
			||||||
 | 
					        public int Id { get { return id; } set { id = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 名称        /// </summary>        
 | 
				
			||||||
 | 
					        public string Name { get { return name; } set { name = value; } }        /// <summary>        /// 代码        /// </summary>        
 | 
				
			||||||
 | 
					        public int Code { get { return code; } set { code = value; } }        /// <summary>        /// 个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int AllNumber { get { return allNumber; } set { allNumber = value; } }        /// <summary>        /// 面积        /// </summary>        
 | 
				
			||||||
 | 
					        public double AllArea { get { return allArea; } set { allArea = value; } }        /// <summary>        /// 个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int HCTureNumber { get { return hCTureNumber; } set { hCTureNumber = value; } }        /// <summary>        /// 面积        /// </summary>        
 | 
				
			||||||
 | 
					        public double HCTrueArea { get { return hCTrueArea; } set { hCTrueArea = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 通过个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int HCTruePassNumber { get { return hCTruePassNumber; } set { hCTruePassNumber = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 不通过个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int HCTrueNoPassNumber { get { return hCTrueNoPassNumber; } set { hCTrueNoPassNumber = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 通过率        /// </summary>        
 | 
				
			||||||
 | 
					        public string HCTruePassingRate { get { return hCTruePassingRate; } set { hCTruePassingRate = value; } }        /// <summary>        /// 个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int JLTureNumber { get { return jLTureNumber; } set { jLTureNumber = value; } }
 | 
				
			||||||
 | 
					        /// <summary>        /// 面积        /// </summary>        
 | 
				
			||||||
 | 
					        public double JLTrueArea { get { return jLTrueArea; } set { jLTrueArea = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 通过个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int JLTruePassNumber { get { return jLTruePassNumber; } set { jLTruePassNumber = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 不通过个数        /// </summary>        
 | 
				
			||||||
 | 
					        public int JLTrueNoPassNumber { get { return jLTrueNoPassNumber; } set { jLTrueNoPassNumber = value; } }
 | 
				
			||||||
 | 
					        /// /// <summary>        /// 监理单位已审核图斑-通过率        /// </summary>        
 | 
				
			||||||
 | 
					        public string JLTruePassingRate { get { return jLTruePassingRate; } set { jLTruePassingRate = value; } }
 | 
				
			||||||
 | 
					        public DistrictModel DistrictModels { get { return districtModels; } set { districtModels = value; } }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,73 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary>
 | 
				
			||||||
 | 
					    public class DrugInfo
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "pharmacy")]
 | 
				
			||||||
 | 
					        //public string Pharmacy { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ҩƷID 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ƴ 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PyCode { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "BD_code")]
 | 
				
			||||||
 | 
					        //public string BdCode { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ҩƷ 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugBarcode { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ҩƷ<D2A9><C6B7><EFBFBD><EFBFBD> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugBrandname { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// ҩƷ<D2A9><C6B7><EFBFBD> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// <20><><EFBFBD><EFBFBD> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Dosage { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// <20><>װ<EFBFBD><D7B0>λ 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PackUnit { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Manufactory { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// <20><><EFBFBD>ҩ<EFBFBD><D2A9> 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? MaxStock { get; set; }
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore=true)]
 | 
				
			||||||
 | 
					        public List<ChannelStock> channelStocks { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public List<DrugManuNo>? DrugManuNos { get; set; }
 | 
				
			||||||
 | 
					        public int? StockQuantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string drug_name_spec { get; set; }
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "drug_name_spec")]
 | 
				
			||||||
 | 
					        //public string Name { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,33 @@
 | 
				
			||||||
 | 
					using Prism.Mvvm;
 | 
				
			||||||
 | 
					using SqlSugar;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class DrugManuNo : BindableBase
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        private string _id;
 | 
				
			||||||
 | 
					        public string Id { get => _id; set => SetProperty(ref _id, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string _drugId;
 | 
				
			||||||
 | 
					        public string DrugId { get => _drugId; set => SetProperty(ref _drugId, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string _manuNo;
 | 
				
			||||||
 | 
					        public string ManuNo { get => _manuNo; set => SetProperty(ref _manuNo, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string _manuDate;
 | 
				
			||||||
 | 
					        public string ManuDate { get => _manuDate; set => SetProperty(ref _manuDate, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string _effDate;
 | 
				
			||||||
 | 
					        public string EffDate { get => _effDate; set => SetProperty(ref _effDate, value); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //private string _manuNoEffDate;
 | 
				
			||||||
 | 
					        //[SugarColumn(IsIgnore = true)]
 | 
				
			||||||
 | 
					        //public string ManuNoEffDate { get => _manuNoEffDate; set => SetProperty(ref _manuNoEffDate, value); }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,32 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    //交接班表
 | 
				
			||||||
 | 
					    public class HkcChangeShifts
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DateTime? OptDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string FromOperator { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string FromRviewer { get; set; }
 | 
				
			||||||
 | 
					        public string ToOperator { get;set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string ToReviewer { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DateTime? ToDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string State { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string OptState { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string Machineid { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,125 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class InOutInvoice
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 主键(序号)       
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string InPharmacyId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string OutPharmacyId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 库存管理单位(入库单位代码) 
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string storage { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         /// <summary>
 | 
				
			||||||
 | 
					         /// 单据号
 | 
				
			||||||
 | 
					         /// </summary>
 | 
				
			||||||
 | 
					        public string InvoiceNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string InvoiceDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品id
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品规格
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 计算单位
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Units { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 厂商标识
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string FirmId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 包装规格(反映药品含量及包装信息,如0.25g*30)   
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string PackageSpec { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 数量(以包装单位所计的数量)      
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int quantity { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 计量单位,可使用任一级管理上方便的包装
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string PackageUnits { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品批次
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string DrugManuNo { get; set; }
 | 
				
			||||||
 | 
					       
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 创建时间(入库日期)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public DateTime CreateTime { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 1.请领入库 0.其它
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int Type { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 类型描述
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string TypeDescribe { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 供货方
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Supplier { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作人
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Operator { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 存放库房
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string SubStorage { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 备注
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Memos { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int Status { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string DrugEffDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string HisId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int CancelFlag { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int CountNum { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int SumQuantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,20 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    [Serializable]
 | 
				
			||||||
 | 
					    public class Invoice
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public string InvoiceNo { get; set; }
 | 
				
			||||||
 | 
					        public string InvoiceDate { get; set; }
 | 
				
			||||||
 | 
					        public int Count { get; set; }
 | 
				
			||||||
 | 
					        public int Quantity { get; set; }
 | 
				
			||||||
 | 
					        public int Status { get; set; }
 | 
				
			||||||
 | 
					        public string PharmacyName1 { get; set; }
 | 
				
			||||||
 | 
					        public string PharmacyName2 { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,129 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Security.Principal;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{ 
 | 
				
			||||||
 | 
					    public class MachineRecord
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 主键 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 设备id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 数量 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int Quantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int? StockQuantity { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int? CheckQuantity { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批号 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string ManuNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作人id 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? Operator { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public UserList User { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 审核人id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int? Reviewer { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 操作时间 
 | 
				
			||||||
 | 
					        /// 默认值: CURRENT_TIMESTAMP
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public DateTime OperationTime { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 效期 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public DateTime? EffDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 出库入库类型(1入库2出库31还药32还空瓶4盘点5日结存) 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int Type { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 出入库调拨单id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string InvoiceId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 列号 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int ColNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 抽屉号 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int DrawerNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 取药科室 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string DepartmentId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 是否已经退药(0:没有1:还了部分2:完成) 
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int Status { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 退药量 
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "return_quantity1", IsOnlyIgnoreInsert = true)] 
 | 
				
			||||||
 | 
					        public int ReturnQuantity1 { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 退空瓶量 
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "return_quantity2", IsOnlyIgnoreInsert = true 
 | 
				
			||||||
 | 
					        public int ReturnQuantity2 { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 取药记录id 
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int? GetId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 是否已经销毁 
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int? IsDestroy { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int CanReturnQuantity
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get => Quantity - ReturnQuantity1 - ReturnQuantity2;
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public bool IsSelected { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 药品对应批号库存
 | 
				
			||||||
 | 
					        /// </summary> 
 | 
				
			||||||
 | 
					        public int? ManunoQuantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 供应单位
 | 
				
			||||||
 | 
					        /// </summary> 
 | 
				
			||||||
 | 
					        public string SupplierDept { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 领用部门
 | 
				
			||||||
 | 
					        /// </summary> 
 | 
				
			||||||
 | 
					        public string ReceiveDept { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,112 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq; 
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary> 
 | 
				
			||||||
 | 
					    public class OrderDetail
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "order_id")]
 | 
				
			||||||
 | 
					        //public int? OrderId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PatientId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string OrderNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public DateTime ChargeDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "serial_no")]
 | 
				
			||||||
 | 
					        //public int? SerialNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DrugId { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public DrugInfo DrugInfo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int Quantity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string OrderUnit { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 1
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? UnitConvercoef { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string SetManuNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string SetEffDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "price")]
 | 
				
			||||||
 | 
					        //public string Price { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "total_price")]
 | 
				
			||||||
 | 
					        //public string TotalPrice { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseDiscrip { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseFrequ { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseOnce { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseBy { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: '0'
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseSelf { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string UseDosage { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,24 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{ 
 | 
				
			||||||
 | 
					    public class OrderFinish
 | 
				
			||||||
 | 
					    { 
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public string Pharmacy { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public string PatientId { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public string OrderNo { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int State { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public string Operator { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,166 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq; 
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary> 
 | 
				
			||||||
 | 
					    public class OrderInfo
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public int OrderId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string Pharmacy { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string OrderNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public string PatientId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PName { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Sex { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Age { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string IdNumber { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PatientCard { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string InvoiceNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PatientNo { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DoctorName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					        public DateTime OrderDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public DateTime ChargeDate { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public DateTime RecvDate { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string DeptName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string Disease { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string OrderType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string ChargeType { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int State { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? HisDispFlag { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? CancelFlag { get; set; }
 | 
				
			||||||
 | 
					       
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: 0
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public int? DmStatus { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "agent_name")]
 | 
				
			||||||
 | 
					        //public string AgentName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "agent_id_no")]
 | 
				
			||||||
 | 
					        //public string AgentIdNo { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public decimal? Costs { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "payments")]
 | 
				
			||||||
 | 
					        //public decimal? Payments { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "dispensary")]
 | 
				
			||||||
 | 
					        //public string Dispensary { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        /// 默认值: NULL
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName = "identity")]
 | 
				
			||||||
 | 
					        //public string Identity { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,34 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Collections.ObjectModel;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary>
 | 
				
			||||||
 | 
					    [Serializable]
 | 
				
			||||||
 | 
					    public class PremissionDm
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 主键 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public int Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 菜单名 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public string PremissionName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 菜单路径 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public string PremissionPath { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 图片source 
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        public string PremissionImage { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        public ObservableCollection<PremissionDm>? Children { get; set; }
 | 
				
			||||||
 | 
					     
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,34 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary>
 | 
				
			||||||
 | 
					    public class RoleDm
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public int? Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public string RoleName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName="role_des"    )]
 | 
				
			||||||
 | 
					        //public string RoleDes { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        ///[SugarColumn(ColumnName="permissions"    )]
 | 
				
			||||||
 | 
					        public List<PremissionDm> Permissions { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         public string MachineId { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,40 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class ShiftsReport
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public int Id { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string DrugName { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string DrugSpec { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int? BeforeNum { get; set; }
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public int? GetNum { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int? UseNum { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string ManuNo { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public int? Surplus { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public DateTime OptDate { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string FromOperator { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string FromReviewer { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string ToOperator { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string ToReviewer { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public string MachineId { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,66 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					namespace DM_Weight.Models
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    ///</summary> 
 | 
				
			||||||
 | 
					    public class UserList
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public int Id { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string UserName { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string Nickname { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string PassWord { get; set; }
 | 
				
			||||||
 | 
					       
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string UserBarcode { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					         //[SugarColumn(ColumnName="status"    )]
 | 
				
			||||||
 | 
					         //public int? Status { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public int? RoleId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					        public RoleDm? Role { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary>
 | 
				
			||||||
 | 
					        //[SugarColumn(ColumnName="user_card"    )]
 | 
				
			||||||
 | 
					        // public string UserCard { get; set; }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public string MachineId { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///  
 | 
				
			||||||
 | 
					        ///</summary> 
 | 
				
			||||||
 | 
					         public byte[] Sign { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public override string ToString()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return "userList = [UserName:" + Nickname + ", UserId:" + UserName + "]";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,171 @@
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					using log4net;
 | 
				
			||||||
 | 
					using SuperSimpleTcp;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.IO;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Channels;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using System.Windows.Markup;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Port
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class ScreenUtil
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        private readonly ILog logger = LogManager.GetLogger(typeof(ScreenUtil));
 | 
				
			||||||
 | 
					        SimpleTcpServer server = new SimpleTcpServer("0.0.0.0:8888");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        string ipport { get; set; } = "";
 | 
				
			||||||
 | 
					        public ScreenUtil()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            server.Events.ClientConnected += (object sender, ConnectionEventArgs e) =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                ipport = e.IpPort;
 | 
				
			||||||
 | 
					                logger.Info($"[{e.IpPort}] client connected");
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            server.Events.ClientDisconnected += (object sender, ConnectionEventArgs e) =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                logger.Info($"[{e.IpPort}] client disconnected: {e.Reason}");
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            server.Events.DataReceived += (object sender, DataReceivedEventArgs e) =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                logger.Info($"[{e.IpPort}]: {e.Data.Array}");
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            // let's go!
 | 
				
			||||||
 | 
					            server.Start();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private byte[] head = new byte[] { 0xee, 0xb1, 0x12 };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private byte[] end = new byte[] { 0xFF, 0xFC, 0xFF, 0xFF };
 | 
				
			||||||
 | 
					        public void SetStockInfo(ChannelStock channel, int screenId)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 添加画面id
 | 
				
			||||||
 | 
					            byte[] a = Copy2NewArr(head, HighLow(screenId));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
 | 
				
			||||||
 | 
					            //if (channel.DrugInfo.DrugName != null)
 | 
				
			||||||
 | 
					            //{
 | 
				
			||||||
 | 
					            byte[] content = Encoding.GetEncoding("gb2312").GetBytes(channel.DrugInfo?.DrugName??"");
 | 
				
			||||||
 | 
					                a = WriteInfo(a, content, channel.ColNo * 10 + 1);
 | 
				
			||||||
 | 
					            //}
 | 
				
			||||||
 | 
					            //if (channel.DrugInfo.Manufactory != null)
 | 
				
			||||||
 | 
					            //{
 | 
				
			||||||
 | 
					                byte[] content1 = Encoding.GetEncoding("gb2312").GetBytes(channel.DrugInfo?.Manufactory?? "");
 | 
				
			||||||
 | 
					                a = WriteInfo(a, content1, channel.ColNo * 10 + 2);
 | 
				
			||||||
 | 
					            //}
 | 
				
			||||||
 | 
					            //if (channel.DrugInfo.DrugSpec != null)
 | 
				
			||||||
 | 
					            //{
 | 
				
			||||||
 | 
					                byte[] content2 = Encoding.GetEncoding("gb2312").GetBytes(channel.DrugInfo?.DrugSpec ?? "");
 | 
				
			||||||
 | 
					                a = WriteInfo(a, content2, channel.ColNo * 10 + 3);
 | 
				
			||||||
 | 
					            //}
 | 
				
			||||||
 | 
					            //if (channel.ManuNo != null)
 | 
				
			||||||
 | 
					            //{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                byte[] content3 = Encoding.GetEncoding("gb2312").GetBytes(channel.ManuNo);
 | 
				
			||||||
 | 
					                a = WriteInfo(a, content3, channel.ColNo * 10 + 4);
 | 
				
			||||||
 | 
					            //}
 | 
				
			||||||
 | 
					            //if (channel.EffDate != null)
 | 
				
			||||||
 | 
					            //{
 | 
				
			||||||
 | 
					                byte[] content4 = Encoding.GetEncoding("gb2312").GetBytes(channel.EffDate);
 | 
				
			||||||
 | 
					                a = WriteInfo(a, content4, channel.ColNo * 10 + 5);
 | 
				
			||||||
 | 
					            //}
 | 
				
			||||||
 | 
					            //if (channel.Quantity != null)
 | 
				
			||||||
 | 
					            //{
 | 
				
			||||||
 | 
					                byte[] content5 = Encoding.GetEncoding("gb2312").GetBytes(channel.Quantity.ToString());
 | 
				
			||||||
 | 
					                a = WriteInfo(a, content5, channel.ColNo * 10 + 6);
 | 
				
			||||||
 | 
					            //}
 | 
				
			||||||
 | 
					            // 添加结束块
 | 
				
			||||||
 | 
					            byte[] b = Copy2NewArr(a, end);
 | 
				
			||||||
 | 
					            server.Send(ipport, b);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public void TellChange(int d)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            byte[] buffer = new byte[] { 0xee, 0xb5, 0x01, 0x00, 0xFF, 0xFC, 0xFF, 0xFF };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public void SetStockInfo(List<ChannelStock> channels, int screenId)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 添加画面id
 | 
				
			||||||
 | 
					            byte[] a = Copy2NewArr(head, HighLow(screenId));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for (int i = 0; i < channels.Count; i++)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                ChannelStock channel = channels[i];
 | 
				
			||||||
 | 
					                if (channel.DrugInfo.DrugName != null)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    byte[] content = Encoding.ASCII.GetBytes(channel.DrugInfo.DrugName);
 | 
				
			||||||
 | 
					                    a = WriteInfo(a, content, channels[0].DrawerNo * 10 + 1);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if (channel.DrugInfo.Manufactory != null)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    byte[] content = Encoding.ASCII.GetBytes(channel.DrugInfo.Manufactory);
 | 
				
			||||||
 | 
					                    a = WriteInfo(a, content, channels[0].DrawerNo * 10 + 2);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if (channel.DrugInfo.DrugSpec != null)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    byte[] content = Encoding.ASCII.GetBytes(channel.DrugInfo.DrugSpec);
 | 
				
			||||||
 | 
					                    a = WriteInfo(a, content, channels[0].DrawerNo * 10 + 3);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if (channel.ManuNo != null)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    byte[] content = Encoding.ASCII.GetBytes(channel.ManuNo);
 | 
				
			||||||
 | 
					                    a = WriteInfo(a, content, channels[0].DrawerNo * 10 + 4);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if (channel.EffDate != null)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    byte[] content = Encoding.ASCII.GetBytes(channel.EffDate);
 | 
				
			||||||
 | 
					                    a = WriteInfo(a, content, channels[0].DrawerNo * 10 + 5);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if (channel.Quantity != null)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    byte[] content = Encoding.ASCII.GetBytes(channel.Quantity.ToString());
 | 
				
			||||||
 | 
					                    a = WriteInfo(a, content, channels[0].DrawerNo * 10 + 6);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            // 添加结束块
 | 
				
			||||||
 | 
					            byte[] b = Copy2NewArr(a, end);
 | 
				
			||||||
 | 
					            server.Send(ipport, b);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public byte[] WriteInfo(byte[] a, byte[] content, int id)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 添加控件id
 | 
				
			||||||
 | 
					            byte[] b = Copy2NewArr(a, HighLow(id));
 | 
				
			||||||
 | 
					            // 添加需要向控件内写入的字节长度
 | 
				
			||||||
 | 
					            byte[] c = Copy2NewArr(b, HighLow(content.Length));
 | 
				
			||||||
 | 
					            // 写入内容
 | 
				
			||||||
 | 
					            return Copy2NewArr(c, content);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public byte[] HighLow(int data)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            byte high = Convert.ToByte((data >> 8) & 0x00ff); //位运算:右移8位
 | 
				
			||||||
 | 
					            byte low = Convert.ToByte(data & 0x00ff);         //去掉高位
 | 
				
			||||||
 | 
					            return new byte[] {high, low};
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public byte[] Copy2NewArr(byte[] source1, byte[] source2)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            byte[] target = new byte[source1.Length + source2.Length];
 | 
				
			||||||
 | 
					            Buffer.BlockCopy(source1, 0, target, 0, source1.Length);
 | 
				
			||||||
 | 
					            Buffer.BlockCopy(source2, 0, target, source1.Length, source2.Length);
 | 
				
			||||||
 | 
					            return target;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,434 @@
 | 
				
			||||||
 | 
					using gregn6Lib;
 | 
				
			||||||
 | 
					using Newtonsoft.Json;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.IO;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					using System.Configuration;
 | 
				
			||||||
 | 
					using DM_Weight.util;
 | 
				
			||||||
 | 
					using DM_Weight.Views;
 | 
				
			||||||
 | 
					using System.Diagnostics;
 | 
				
			||||||
 | 
					using log4net;
 | 
				
			||||||
 | 
					using log4net.Repository.Hierarchy;
 | 
				
			||||||
 | 
					using DM_Weight.ViewModels;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Report
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class GridReportUtil
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					        public static GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					        public static string gridConnectionString = ConfigurationManager.AppSettings["gridConnectionString"];
 | 
				
			||||||
 | 
					        /**
 | 
				
			||||||
 | 
					         * 打印预览
 | 
				
			||||||
 | 
					         * tempname: 模板文件名称
 | 
				
			||||||
 | 
					         * data: 模板数据
 | 
				
			||||||
 | 
					         */
 | 
				
			||||||
 | 
					        public static void PrintReport(string tempname, object data)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					            GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					            // 加载模板文件
 | 
				
			||||||
 | 
					            Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + tempname);
 | 
				
			||||||
 | 
					            string s = JsonConvert.SerializeObject(data);
 | 
				
			||||||
 | 
					            // 加载数据
 | 
				
			||||||
 | 
					            Report.LoadDataFromXML(JsonConvert.SerializeObject(data));
 | 
				
			||||||
 | 
					            Report.PrintPreview(true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static void PrintReportStock()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					            GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					            Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            string machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					            string SQL = $@"SELECT cl.`row_no` AS drawerNo,cl.`col_no` AS colNo,cl.`quantity` AS quantity,cl.`manu_no` AS manuNo,cl.`eff_date` AS effDate,
 | 
				
			||||||
 | 
					                          di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,
 | 
				
			||||||
 | 
					                          cl.`drug_id` AS drugId FROM channel_stock cl INNER JOIN drug_info di ON di.`drug_id` = cl.`drug_id` WHERE cl.`machine_id` =  '{machine_id}' AND cl.`drawer_type` = 1 ORDER BY cl.`drug_id`";
 | 
				
			||||||
 | 
					            // 加载模板文件
 | 
				
			||||||
 | 
					            Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "stock_template.grf");
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.QuerySQL = SQL;
 | 
				
			||||||
 | 
					            //Report.PrintPreview(true);
 | 
				
			||||||
 | 
					            string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "stock_template.pdf";
 | 
				
			||||||
 | 
					            if (File.Exists(filePath))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    File.Delete(filePath);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch (Exception ex)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    FindAndKillProcess();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 导出盘点后库存信息
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="startDate"></param>
 | 
				
			||||||
 | 
					        /// <param name="endDate"></param>
 | 
				
			||||||
 | 
					        public static void PrintReportStockNew(DateTime? startDate, DateTime? endDate)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
 | 
				
			||||||
 | 
					            DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
 | 
				
			||||||
 | 
					            // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					            GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					            //Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
 | 
				
			||||||
 | 
					            //{
 | 
				
			||||||
 | 
					            //    Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					            //});
 | 
				
			||||||
 | 
					            string machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					            string SQL = $@"SELECT cl.`row_no` AS drawerNo,cl.`col_no` AS colNo,cl.`quantity` AS quantity,cl.`manu_no` AS manuNo,cl.`eff_date` AS effDate,
 | 
				
			||||||
 | 
					                          `drug_name` AS drugName,`drug_spec` AS drugSpec,`pack_unit` AS packUnit,`manufactory` AS manuFactory,`max_stock` AS baseQuantity,
 | 
				
			||||||
 | 
					                          cl.`drug_id` AS drugId,cl.manuquantity, cl.`optdate` FROM check_stock cl WHERE cl.`machine_id` =  '{machine_id}' AND cl.`optdate` > '{p_startDate}' AND cl.`optdate` < '{p_endDate}' ORDER BY cl.`optdate` desc, cl.`drug_id`";
 | 
				
			||||||
 | 
					            // 加载模板文件
 | 
				
			||||||
 | 
					            Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_check_new2.grf");
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.QuerySQL = SQL;
 | 
				
			||||||
 | 
					            // Report.PrintPreview(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "machine_log_check_new2.pdf";
 | 
				
			||||||
 | 
					            if (File.Exists(filePath))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    File.Delete(filePath);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch (Exception ex)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    FindAndKillProcess();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        public static Task<string> PrintReportStockNewTest(DateTime? startDate, DateTime? endDate)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return Task.Run(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                string filePath = string.Empty;
 | 
				
			||||||
 | 
					                DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
 | 
				
			||||||
 | 
					                DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
 | 
				
			||||||
 | 
					                // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					                GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					                //Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
 | 
				
			||||||
 | 
					                //{
 | 
				
			||||||
 | 
					                //    Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					                //});
 | 
				
			||||||
 | 
					                string machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					                string SQL = $@"SELECT cl.`row_no` AS drawerNo,cl.`col_no` AS colNo,cl.`quantity` AS quantity,cl.`manu_no` AS manuNo,cl.`eff_date` AS effDate,
 | 
				
			||||||
 | 
					                          `drug_name` AS drugName,`drug_spec` AS drugSpec,`pack_unit` AS packUnit,`manufactory` AS manuFactory,`max_stock` AS baseQuantity,
 | 
				
			||||||
 | 
					                          cl.`drug_id` AS drugId,cl.manuquantity, cl.`optdate` FROM check_stock cl WHERE cl.`machine_id` =  '{machine_id}' AND cl.`optdate` > '{p_startDate}' AND cl.`optdate` < '{p_endDate}' ORDER BY cl.`optdate` desc, cl.`drug_id`";
 | 
				
			||||||
 | 
					                // 加载模板文件
 | 
				
			||||||
 | 
					                Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_check_new2.grf");
 | 
				
			||||||
 | 
					                Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
 | 
				
			||||||
 | 
					                Report.DetailGrid.Recordset.QuerySQL = SQL;
 | 
				
			||||||
 | 
					                // Report.PrintPreview(true);
 | 
				
			||||||
 | 
					                //Report.SaveToFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "Test.pdf");
 | 
				
			||||||
 | 
					                bool isSave = Report.ExportDirect(GRExportType.gretPDF, new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_check_new2.pdf", false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (isSave)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp\\" + "machine_log_check_new2.pdf";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                return filePath;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        public static void PrintReportAccountBook(DateTime? startDate, DateTime? endDate, int type, string drug_id)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
 | 
				
			||||||
 | 
					            DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
 | 
				
			||||||
 | 
					            string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					            // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					            GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					            // 加载模板文件
 | 
				
			||||||
 | 
					            Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "account_book_temp.grf");
 | 
				
			||||||
 | 
					            string SQL = string.Empty;
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
 | 
				
			||||||
 | 
					            Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					                Report.ParameterByName("startDate").Value = startDate ?? Convert.ToDateTime("2010-1-1");
 | 
				
			||||||
 | 
					                Report.ParameterByName("endDate").Value = endDate ?? DateTime.Now.AddDays(1);
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            //Report.DetailGrid.Recordset.QuerySQL = SQL;
 | 
				
			||||||
 | 
					            SQL = $@"SELECT TYPE, stockQuantity,inQuantity,outQuantity,operationTime,invoiceId,drugName,drugId,drugSpec,packUnit,dosage,manufactory,manuNo,effDate,
 | 
				
			||||||
 | 
					                        operatorName,reviewerName,supplierDept,receiveDept,bigUnit FROM 
 | 
				
			||||||
 | 
					                        (SELECT mr.type, mr.`stock_quantity` AS `stockQuantity`, 
 | 
				
			||||||
 | 
					                        IF(mr.`type` IN (1, 31), mr.`quantity`, IF(mr.`type` = 4 AND mr.`quantity` > 0, mr.`quantity`, IF(mr.`type` = 5,mr.return_quantity1,0))) AS `inQuantity`, 
 | 
				
			||||||
 | 
					                        IF(mr.`type` = 2, mr.`quantity`, IF(mr.`type` = 4 AND mr.`quantity` < 0, (0 - mr.`quantity`), IF(mr.`type` = 5,mr.return_quantity2,0))) AS `outQuantity`,
 | 
				
			||||||
 | 
					                         mr.`operation_time` AS `operationTime`,IF(mr.`type`=1||mr.type=5,mr.`invoice_id`,NULL) AS `invoiceId`, di.`drug_name` AS `drugName`, di.`drug_id` AS `drugId`,
 | 
				
			||||||
 | 
					                         di.`drug_spec` AS `drugSpec`, di.`pack_unit` AS `packUnit`,di.big_unit as bigUnit, di.`dosage` AS `dosage`, di.`manufactory` AS `manufactory`, 
 | 
				
			||||||
 | 
					                        mr.`manu_no` AS `manuNo`, mr.`eff_date` AS `effDate`, u1.`user_name` AS `operatorName`, u2.`user_name` AS `reviewerName`,mr.supplierDept,mr.receiveDept FROM 
 | 
				
			||||||
 | 
					                        dm_machine_record mr  LEFT JOIN drug_info di ON mr.`drug_id` = di.`drug_id`  LEFT JOIN user_list u1 ON mr.`operator` = u1.`id`  
 | 
				
			||||||
 | 
					                        LEFT JOIN user_list u2 ON mr.`reviewer` = u2.`id` WHERE mr.`machine_id` = '{p_machine_id}' AND mr.`operation_time` > '{p_startDate}'
 | 
				
			||||||
 | 
					                        AND mr.`operation_time` < '{p_endDate}'  and IF(mr.`type` = 4 AND mr.`quantity` = 0, 99999, mr.`quantity`) <>99999 ";
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(drug_id))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                SQL += " AND mr.drug_id='" + drug_id + "' ";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            SQL += " ORDER BY mr.`drug_id`, mr.`operation_time`, mr.`id`) AS T";
 | 
				
			||||||
 | 
					            if (type > 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (type == 1)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    SQL += " WHERE inQuantity>0 ";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if (type == 2)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    SQL += " WHERE outQuantity>0 ";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if (type == 5)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    SQL += " WHERE type=5 ";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.QuerySQL = SQL;
 | 
				
			||||||
 | 
					            //Report.PrintPreview(true);
 | 
				
			||||||
 | 
					            string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "account_book_temp.pdf";
 | 
				
			||||||
 | 
					            if (File.Exists(filePath))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    File.Delete(filePath);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch (Exception ex)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    FindAndKillProcess();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static void PrintReportMechineRecord(int type, DateTime? startDate, DateTime? endDate)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            string saveFileName = string.Empty;
 | 
				
			||||||
 | 
					            // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					            GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					            DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
 | 
				
			||||||
 | 
					            DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
 | 
				
			||||||
 | 
					            string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					            string SQL = string.Empty;
 | 
				
			||||||
 | 
					            Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					                Report.ParameterByName("startDate").Value = startDate ?? DateTime.Now.AddYears(-10);
 | 
				
			||||||
 | 
					                Report.ParameterByName("endDate").Value = endDate ?? DateTime.Now.AddDays(1);
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            // 加载模板文件
 | 
				
			||||||
 | 
					            if (type == 1)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                saveFileName = "machine_log_add.pdf";
 | 
				
			||||||
 | 
					                Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_add.grf");
 | 
				
			||||||
 | 
					                SQL = $@"SELECT dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,dmr.`quantity` AS quantity,
 | 
				
			||||||
 | 
					                      dmr.`manu_no` AS manuNo,dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,
 | 
				
			||||||
 | 
					                      di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
 | 
				
			||||||
 | 
					                      di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,dmr.`drug_id` AS drugId,
 | 
				
			||||||
 | 
					                      ul.`user_name` AS nickname FROM dm_machine_record dmr LEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`
 | 
				
			||||||
 | 
					                    LEFT JOIN user_list ul ON ul.`id` = dmr.`Operator` WHERE dmr.`type` = 1 AND dmr.`machine_id` = '{p_machine_id}'
 | 
				
			||||||
 | 
					                     AND dmr.`operation_time` > '{p_startDate}' AND dmr.`operation_time` < '{p_endDate}'";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else if (type == 2)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                saveFileName = "machine_log_take.pdf";
 | 
				
			||||||
 | 
					                Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_take.grf");
 | 
				
			||||||
 | 
					                SQL = $@" SELECT dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,dmr.`quantity` AS quantity,
 | 
				
			||||||
 | 
					                      dmr.`manu_no` AS manuNo,dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,
 | 
				
			||||||
 | 
					                      di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
 | 
				
			||||||
 | 
					                      di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,dmr.`drug_id` AS drugId,
 | 
				
			||||||
 | 
					                      ul.`user_name` AS nickname FROM dm_machine_record dmr LEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`
 | 
				
			||||||
 | 
					                    LEFT JOIN user_list ul ON ul.`id` = dmr.`Operator` WHERE dmr.`type` = 2 
 | 
				
			||||||
 | 
					                     AND dmr.`machine_id` ='{p_machine_id}'  AND dmr.`operation_time` > '{p_startDate}'
 | 
				
			||||||
 | 
					                     AND dmr.`operation_time` < '{p_endDate}'";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else if (type == 3)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                saveFileName = "machine_log_return.pdf";
 | 
				
			||||||
 | 
					                Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_return.grf");
 | 
				
			||||||
 | 
					                SQL = $@" SELECT dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,
 | 
				
			||||||
 | 
					                      CONCAT(dmr.`quantity`,IF(dmr.`type`=32,""(空瓶)"","""")) AS quantity,dmr.`manu_no` AS manuNo,
 | 
				
			||||||
 | 
					                      dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,di.`drug_name` AS drugName,
 | 
				
			||||||
 | 
					                      di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
 | 
				
			||||||
 | 
					                      di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,
 | 
				
			||||||
 | 
					                      dmr.`drug_id` AS drugId,ul.`user_name` AS nickname FROM dm_machine_record dmr
 | 
				
			||||||
 | 
					                    LEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id` LEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`
 | 
				
			||||||
 | 
					                    WHERE dmr.`type` in (31, 32) AND dmr.`machine_id` = '{p_machine_id}' AND dmr.`operation_time` > '{p_startDate}'
 | 
				
			||||||
 | 
					                     AND dmr.`operation_time` < '{p_endDate}'";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                saveFileName = "machine_log_check.pdf";
 | 
				
			||||||
 | 
					                Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_check.grf");
 | 
				
			||||||
 | 
					                SQL = $@" SELECT dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,dmr.`check_quantity` AS quantity,
 | 
				
			||||||
 | 
					                          dmr.`manu_no` AS manuNo,dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,
 | 
				
			||||||
 | 
					                          di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
 | 
				
			||||||
 | 
					                          di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,dmr.`drug_id` AS drugId,
 | 
				
			||||||
 | 
					                          ul.`user_name` AS nickname,u2.`user_name` as reviewer FROM dm_machine_record dmr 
 | 
				
			||||||
 | 
					                          LEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`
 | 
				
			||||||
 | 
					                          LEFT JOIN user_list ul ON ul.`id` = dmr.`Operator` 
 | 
				
			||||||
 | 
					                          LEFT JOIN user_list u2 ON dmr.`reviewer` = u2.`id` WHERE dmr.`type` = 4 
 | 
				
			||||||
 | 
					                          AND dmr.`machine_id` = '{p_machine_id}' AND dmr.`operation_time` > '{p_startDate}'
 | 
				
			||||||
 | 
					                          AND dmr.`operation_time` < '{p_endDate}'";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.QuerySQL = SQL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //Report.PrintPreview(true);
 | 
				
			||||||
 | 
					            string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + saveFileName;
 | 
				
			||||||
 | 
					            if (File.Exists(filePath))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    File.Delete(filePath);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch (Exception ex)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    FindAndKillProcess();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static bool FindAndKillProcess()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            foreach (Process clsProcess in Process.GetProcesses())
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (clsProcess.ProcessName.Contains("wps")||clsProcess.ProcessName.Contains("msedge"))
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    clsProcess.Kill();
 | 
				
			||||||
 | 
					                    //return true;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            //process not found, return false
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /**
 | 
				
			||||||
 | 
					         * 打印预览
 | 
				
			||||||
 | 
					         * tempname: 模板文件名称
 | 
				
			||||||
 | 
					         * data: 模板数据
 | 
				
			||||||
 | 
					         */
 | 
				
			||||||
 | 
					        public static void PrintMachineRecordReport(List<MachineRecord> data)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					            GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					            // 加载模板文件
 | 
				
			||||||
 | 
					            Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//machine_log.grf");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 加载数据
 | 
				
			||||||
 | 
					            Report.ParameterByName("type").AsInteger = 1;
 | 
				
			||||||
 | 
					            //Report.PrintPreview(true);
 | 
				
			||||||
 | 
					            string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "machine_log.pdf";
 | 
				
			||||||
 | 
					            if (File.Exists(filePath))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    File.Delete(filePath);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch (Exception ex)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    FindAndKillProcess();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        //交接班记录报表
 | 
				
			||||||
 | 
					        public static void PrintChangeShiftsReport(DateTime? startDate, DateTime? endDate)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
 | 
				
			||||||
 | 
					            DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
 | 
				
			||||||
 | 
					            string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					            // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					            GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					            // 加载模板文件
 | 
				
			||||||
 | 
					            Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "changeShifts_temp.grf");
 | 
				
			||||||
 | 
					            string SQL = string.Empty;
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
 | 
				
			||||||
 | 
					            Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					                Report.ParameterByName("startDate").Value = startDate ?? Convert.ToDateTime("2010-1-1");
 | 
				
			||||||
 | 
					                Report.ParameterByName("endDate").Value = endDate ?? DateTime.Now.AddDays(1);
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            SQL = $@"SELECT opt_date,drug_name,drug_spec,beforenum,getnum,usenum,manu_no,surplus,CONCAT(fromoperator,' ',fromreviewer) as fromoperator,
 | 
				
			||||||
 | 
					                    CONCAT(tooperator,' ',toreviewer) as tooperator
 | 
				
			||||||
 | 
					                    from `hkc_shiftsreport` WHERE `machineid` = '{p_machine_id}' AND `opt_date` > '{p_startDate}'
 | 
				
			||||||
 | 
					                        AND opt_date < '{p_endDate}'  ORDER BY opt_date";
 | 
				
			||||||
 | 
					            Report.DetailGrid.Recordset.QuerySQL = SQL;
 | 
				
			||||||
 | 
					            //Report.PrintPreview(true);
 | 
				
			||||||
 | 
					            string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "changeShifts_temp.pdf";
 | 
				
			||||||
 | 
					            if (File.Exists(filePath))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    File.Delete(filePath);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch (Exception ex)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    FindAndKillProcess();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 盘点页面导出记录,按选中行进行导出
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="type"></param>
 | 
				
			||||||
 | 
					        /// <param name="startDate"></param>
 | 
				
			||||||
 | 
					        /// <param name="endDate"></param>
 | 
				
			||||||
 | 
					        public static void PrintReportMechineRecordForSelect(List<MachineRecord> data)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 定义Grid++Report报表主对象
 | 
				
			||||||
 | 
					            GridppReport Report = new GridppReport();
 | 
				
			||||||
 | 
					            // 加载模板文件
 | 
				
			||||||
 | 
					            Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//machine_log_check.grf");
 | 
				
			||||||
 | 
					            Dictionary<string, List<MachineRecord>> records = new Dictionary<string, List<MachineRecord>>();
 | 
				
			||||||
 | 
					            records.Add("table", data);
 | 
				
			||||||
 | 
					            string str = JsonConvert.SerializeObject(records);
 | 
				
			||||||
 | 
					            Report.LoadDataFromXML(str);
 | 
				
			||||||
 | 
					            // 加载数据
 | 
				
			||||||
 | 
					            //Report.PrintPreview(true);
 | 
				
			||||||
 | 
					            string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "machine_log_check.pdf";
 | 
				
			||||||
 | 
					            if (File.Exists(filePath))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    File.Delete(filePath);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch (Exception ex)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    FindAndKillProcess();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,615 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						"Version":"6.3.0.1",
 | 
				
			||||||
 | 
						"Font":{
 | 
				
			||||||
 | 
							"Name":"宋体",
 | 
				
			||||||
 | 
							"Size":105000,
 | 
				
			||||||
 | 
							"Weight":400,
 | 
				
			||||||
 | 
							"Charset":134
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Printer":{
 | 
				
			||||||
 | 
							"Oriention":"Landscape",
 | 
				
			||||||
 | 
							"LeftMargin":1,
 | 
				
			||||||
 | 
							"TopMargin":1.42875,
 | 
				
			||||||
 | 
							"RightMargin":1,
 | 
				
			||||||
 | 
							"BottomMargin":1.8
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"DetailGrid":{
 | 
				
			||||||
 | 
							"CenterView":true,
 | 
				
			||||||
 | 
							"Recordset":{
 | 
				
			||||||
 | 
								"Field":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"日期",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"M/d",
 | 
				
			||||||
 | 
										"DBFieldName":"operationTime"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"操作类型",
 | 
				
			||||||
 | 
										"DBFieldName":"type"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"批号",
 | 
				
			||||||
 | 
										"DBFieldName":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"上次批次结存",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"beforeManuQuan"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"入库数量",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"inQuantity"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"出库数量",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"outQuantity"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"批号结存",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"manuQuantity"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"总结存",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"stockQuantity"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"收/发药人",
 | 
				
			||||||
 | 
										"DBFieldName":"operatorName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"复核人",
 | 
				
			||||||
 | 
										"DBFieldName":"reviewerName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"药品名称",
 | 
				
			||||||
 | 
										"DBFieldName":"drugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"规格",
 | 
				
			||||||
 | 
										"DBFieldName":"drugSpec"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"单位",
 | 
				
			||||||
 | 
										"DBFieldName":"bigUnit"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"剂型",
 | 
				
			||||||
 | 
										"DBFieldName":"dosage"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"厂家",
 | 
				
			||||||
 | 
										"DBFieldName":"manuFactory"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"有效期",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yy/M/d",
 | 
				
			||||||
 | 
										"DBFieldName":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"sign1",
 | 
				
			||||||
 | 
										"Type":"Binary"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"sign2",
 | 
				
			||||||
 | 
										"Type":"Binary"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drugId"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"凭证号",
 | 
				
			||||||
 | 
										"DBFieldName":"invoiceId"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"供应单位",
 | 
				
			||||||
 | 
										"DBFieldName":"supplierDept"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"领用部门",
 | 
				
			||||||
 | 
										"DBFieldName":"receiveDept"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Column":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"日期",
 | 
				
			||||||
 | 
									"Width":1.77271
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"凭证号",
 | 
				
			||||||
 | 
									"Width":2.19604
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"批号",
 | 
				
			||||||
 | 
									"Width":3.99521
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"有效期",
 | 
				
			||||||
 | 
									"Width":2.43417
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"入库数量",
 | 
				
			||||||
 | 
									"Width":1.79917
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"出库数量",
 | 
				
			||||||
 | 
									"Width":1.79917
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Column4",
 | 
				
			||||||
 | 
									"Width":1.98438
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"收/发药人",
 | 
				
			||||||
 | 
									"Width":2.80458
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"复核人",
 | 
				
			||||||
 | 
									"Width":2.80458
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Column2",
 | 
				
			||||||
 | 
									"Width":2.35479
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Column3",
 | 
				
			||||||
 | 
									"Width":2.38125
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							"ColumnContent":{
 | 
				
			||||||
 | 
								"Height":0.85,
 | 
				
			||||||
 | 
								"ColumnContentCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"日期",
 | 
				
			||||||
 | 
										"WordWrap":true,
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"ShrinkFontToFit":true,
 | 
				
			||||||
 | 
										"DataField":"日期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"凭证号",
 | 
				
			||||||
 | 
										"DataField":"凭证号"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"批号",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"批号"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"有效期",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"有效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"入库数量",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"入库数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"出库数量",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"出库数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"Column4",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"总结存"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"收/发药人",
 | 
				
			||||||
 | 
										"FreeCell":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox12",
 | 
				
			||||||
 | 
												"Dock":"Fill",
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"DataField":"收/发药人"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										]
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"复核人",
 | 
				
			||||||
 | 
										"FreeCell":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox13",
 | 
				
			||||||
 | 
												"Dock":"Fill",
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"DataField":"复核人"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										]
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"Column2",
 | 
				
			||||||
 | 
										"FreeCell":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox14",
 | 
				
			||||||
 | 
												"Dock":"Fill",
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"DataField":"供应单位"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										]
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"Column3",
 | 
				
			||||||
 | 
										"FreeCell":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox15",
 | 
				
			||||||
 | 
												"Dock":"Fill",
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"DataField":"领用部门"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										]
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"ColumnTitle":{
 | 
				
			||||||
 | 
								"Height":1.19063,
 | 
				
			||||||
 | 
								"RepeatStyle":"OnGroupHeaderPage",
 | 
				
			||||||
 | 
								"ColumnTitleCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"日期",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"日期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"凭证号",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"凭证号"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"批号",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"批号"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"有效期",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"有效\r\n期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"入库数量",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"借入\r\n数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"出库数量",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"发出\r\n数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"Column4",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"总结存"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"收/发药人",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"发药人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"复核人",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"复核人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"Column2",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"供应单位"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"Column3",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"领用部门"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Group":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Group1",
 | 
				
			||||||
 | 
									"ByFields":"drugId",
 | 
				
			||||||
 | 
									"GroupHeader":{
 | 
				
			||||||
 | 
										"PrintGridBorder":false,
 | 
				
			||||||
 | 
										"RepeatOnPage":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"StaticBox",
 | 
				
			||||||
 | 
												"Name":"StaticBox15",
 | 
				
			||||||
 | 
												"Left":28.3898,
 | 
				
			||||||
 | 
												"Top":0.238125,
 | 
				
			||||||
 | 
												"Width":2.01083,
 | 
				
			||||||
 | 
												"Height":0.79375,
 | 
				
			||||||
 | 
												"Text":"生产厂家:"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox11",
 | 
				
			||||||
 | 
												"Left":30.3742,
 | 
				
			||||||
 | 
												"Top":0.211667,
 | 
				
			||||||
 | 
												"Width":5.3975,
 | 
				
			||||||
 | 
												"Height":0.79375,
 | 
				
			||||||
 | 
												"Text":"[#manuFactory#]"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"StaticBox",
 | 
				
			||||||
 | 
												"Name":"StaticBox16",
 | 
				
			||||||
 | 
												"Top":0.0529167,
 | 
				
			||||||
 | 
												"Width":1.19063,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"Text":"品名:"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox7",
 | 
				
			||||||
 | 
												"Left":1.16417,
 | 
				
			||||||
 | 
												"Top":0.0529167,
 | 
				
			||||||
 | 
												"Width":5.63563,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"DataField":"药品名称"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"StaticBox",
 | 
				
			||||||
 | 
												"Name":"StaticBox17",
 | 
				
			||||||
 | 
												"Left":6.93208,
 | 
				
			||||||
 | 
												"Top":0.0529167,
 | 
				
			||||||
 | 
												"Width":1.11125,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"Text":"规格:"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox8",
 | 
				
			||||||
 | 
												"Left":8.01688,
 | 
				
			||||||
 | 
												"Top":0.0529167,
 | 
				
			||||||
 | 
												"Width":3.175,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"DataField":"规格"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"StaticBox",
 | 
				
			||||||
 | 
												"Name":"StaticBox18",
 | 
				
			||||||
 | 
												"Left":11.5888,
 | 
				
			||||||
 | 
												"Top":0.0529167,
 | 
				
			||||||
 | 
												"Width":1.21708,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"Text":"单位:"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox9",
 | 
				
			||||||
 | 
												"Left":12.7794,
 | 
				
			||||||
 | 
												"Top":0.0529167,
 | 
				
			||||||
 | 
												"Width":1.87854,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"DataField":"单位"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"StaticBox",
 | 
				
			||||||
 | 
												"Name":"StaticBox19",
 | 
				
			||||||
 | 
												"Left":15.3988,
 | 
				
			||||||
 | 
												"Top":0.0529167,
 | 
				
			||||||
 | 
												"Width":1.16417,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"Text":"剂型:"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox10",
 | 
				
			||||||
 | 
												"Left":16.5365,
 | 
				
			||||||
 | 
												"Top":0.0529167,
 | 
				
			||||||
 | 
												"Width":2.83104,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"DataField":"剂型"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"StaticBox",
 | 
				
			||||||
 | 
												"Name":"StaticBox20",
 | 
				
			||||||
 | 
												"Left":19.7379,
 | 
				
			||||||
 | 
												"Top":0.0529167,
 | 
				
			||||||
 | 
												"Width":2.01083,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"Text":"生产厂家:"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox11",
 | 
				
			||||||
 | 
												"Left":21.7223,
 | 
				
			||||||
 | 
												"Top":0.05,
 | 
				
			||||||
 | 
												"Width":5.92667,
 | 
				
			||||||
 | 
												"Height":0.978958,
 | 
				
			||||||
 | 
												"Font":{
 | 
				
			||||||
 | 
													"Name":"宋体",
 | 
				
			||||||
 | 
													"Size":105000,
 | 
				
			||||||
 | 
													"Bold":true,
 | 
				
			||||||
 | 
													"Charset":134
 | 
				
			||||||
 | 
												},
 | 
				
			||||||
 | 
												"DataField":"厂家"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										],
 | 
				
			||||||
 | 
										"NewPageColumn":"Before"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									"GroupFooter":{
 | 
				
			||||||
 | 
										"Visible":false
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							]
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Parameter":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"machine_id"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"startDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"endDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
 | 
						"ReportHeader":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"ReportHeader1",
 | 
				
			||||||
 | 
								"Height":1.79917,
 | 
				
			||||||
 | 
								"Control":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Type":"MemoBox",
 | 
				
			||||||
 | 
										"Name":"MemoBox1",
 | 
				
			||||||
 | 
										"Dock":"Fill",
 | 
				
			||||||
 | 
										"Center":"Both",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":262500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"麻醉、精神药品逐笔专用账册"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
								"RepeatOnPage":true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,345 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						"Version":"6.3.0.1",
 | 
				
			||||||
 | 
						"Font":{
 | 
				
			||||||
 | 
							"Name":"宋体",
 | 
				
			||||||
 | 
							"Size":105000,
 | 
				
			||||||
 | 
							"Weight":400,
 | 
				
			||||||
 | 
							"Charset":134
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Printer":{
 | 
				
			||||||
 | 
							"Oriention":"Landscape",
 | 
				
			||||||
 | 
							"LeftMargin":1,
 | 
				
			||||||
 | 
							"TopMargin":1.4287,
 | 
				
			||||||
 | 
							"RightMargin":1,
 | 
				
			||||||
 | 
							"BottomMargin":1.8
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"DetailGrid":{
 | 
				
			||||||
 | 
							"CenterView":true,
 | 
				
			||||||
 | 
							"Recordset":{
 | 
				
			||||||
 | 
								"Field":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"日期",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yyyy/MM/dd",
 | 
				
			||||||
 | 
										"DBFieldName":"opt_date"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"品名",
 | 
				
			||||||
 | 
										"DBFieldName":"drug_name"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"规格",
 | 
				
			||||||
 | 
										"DBFieldName":"drug_spec"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"上班结存数",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"beforenum"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"领用数",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"getnum"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"消耗数",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"usenum"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"批号",
 | 
				
			||||||
 | 
										"DBFieldName":"manu_no"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"余",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"surplus"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"交班人",
 | 
				
			||||||
 | 
										"DBFieldName":"fromoperator"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"接班人",
 | 
				
			||||||
 | 
										"DBFieldName":"tooperator"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Column":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"日期",
 | 
				
			||||||
 | 
									"Width":2.56646
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"品名",
 | 
				
			||||||
 | 
									"Width":4.60375
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"规格",
 | 
				
			||||||
 | 
									"Width":2.59292
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"上班结存数",
 | 
				
			||||||
 | 
									"Width":1.4
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"领用数",
 | 
				
			||||||
 | 
									"Width":1.4
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"消耗数",
 | 
				
			||||||
 | 
									"Width":1.4
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"批号",
 | 
				
			||||||
 | 
									"Width":1.98438
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"余",
 | 
				
			||||||
 | 
									"Width":0.608542
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"交班人",
 | 
				
			||||||
 | 
									"Width":2.80458
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"接班人",
 | 
				
			||||||
 | 
									"Width":2.35479
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							"ColumnContent":{
 | 
				
			||||||
 | 
								"Height":0.85,
 | 
				
			||||||
 | 
								"ColumnContentCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"日期",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"日期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"品名",
 | 
				
			||||||
 | 
										"DataField":"品名"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"规格",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"规格"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"上班结存数",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"上班结存数"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"领用数",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"领用数"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"消耗数",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"消耗数"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"批号",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"批号"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"余",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"余"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"交班人",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"交班人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"接班人",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"接班人"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"ColumnTitle":{
 | 
				
			||||||
 | 
								"Height":1.00542,
 | 
				
			||||||
 | 
								"RepeatStyle":"OnPage",
 | 
				
			||||||
 | 
								"ColumnTitleCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"日期",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"日期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"品名",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"品名"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"规格",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"规格"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"上班结存数",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"WordWrap":true,
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"上班\r\n结存数"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"领用数",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"WordWrap":true,
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"领用数"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"消耗数",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"WordWrap":true,
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"消耗数"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"批号",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"批号"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"余",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"余"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"交班人",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"交班人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"接班人",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":105000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"接班人"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Group":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Group1",
 | 
				
			||||||
 | 
									"ByFields":"日期",
 | 
				
			||||||
 | 
									"GroupHeader":{
 | 
				
			||||||
 | 
										"Height":0,
 | 
				
			||||||
 | 
										"PrintGridBorder":false,
 | 
				
			||||||
 | 
										"NewPageColumn":"Before"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									"GroupFooter":{
 | 
				
			||||||
 | 
										"Visible":false,
 | 
				
			||||||
 | 
										"PrintGridBorder":false
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							]
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Parameter":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"machine_id"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"startDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"endDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
 | 
						"ReportHeader":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"ReportHeader1",
 | 
				
			||||||
 | 
								"Height":1.79917,
 | 
				
			||||||
 | 
								"Control":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Type":"MemoBox",
 | 
				
			||||||
 | 
										"Name":"MemoBox1",
 | 
				
			||||||
 | 
										"Dock":"Fill",
 | 
				
			||||||
 | 
										"Center":"Both",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":262500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"交接班记录"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
								"RepeatOnPage":true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,282 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						"Version":"6.3.0.1",
 | 
				
			||||||
 | 
						"Font":{
 | 
				
			||||||
 | 
							"Name":"宋体",
 | 
				
			||||||
 | 
							"Size":105000,
 | 
				
			||||||
 | 
							"Weight":400,
 | 
				
			||||||
 | 
							"Charset":134
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Printer":{
 | 
				
			||||||
 | 
							"LeftMargin":0.3175,
 | 
				
			||||||
 | 
							"TopMargin":0.899583,
 | 
				
			||||||
 | 
							"RightMargin":0.396875
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"DetailGrid":{
 | 
				
			||||||
 | 
							"CenterView":true,
 | 
				
			||||||
 | 
							"Recordset":{
 | 
				
			||||||
 | 
								"QuerySQL":"SELECT \r\n  dmr.`drawer_no` AS drawerNo,\r\n  dmr.`col_no` AS colNo,\r\n  dmr.`type` AS `type`,\r\n  dmr.`quantity` AS quantity,\r\n  dmr.`manu_no` AS manuNo,\r\n  dmr.`eff_date` AS effDate,\r\n  dmr.`operation_time` AS operationTime,\r\n  di.`drug_name` AS drugName,\r\n  di.`drug_spec` AS drugSpec,\r\n  di.`pack_unit` AS packUnit,\r\n  di.`manufactory` AS manuFactory,\r\n  di.`max_stock` AS baseQuantity,\r\n  dmr.`drug_id` AS drugId,\r\n  ul.`user_name` AS nickname\r\nFROM\r\n  dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` = 1 \r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
 | 
				
			||||||
 | 
								"Field":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"操作人",
 | 
				
			||||||
 | 
										"DBFieldName":"Nickname"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"时间",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yyyy/MM/dd HH:mm:ss",
 | 
				
			||||||
 | 
										"DBFieldName":"operationTime"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"药品名称",
 | 
				
			||||||
 | 
										"DBFieldName":"DrugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"数量",
 | 
				
			||||||
 | 
										"DBFieldName":"quantity"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"批次",
 | 
				
			||||||
 | 
										"DBFieldName":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"效期",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yyyy/MM/dd",
 | 
				
			||||||
 | 
										"DBFieldName":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"库位",
 | 
				
			||||||
 | 
										"DBFieldName":"drawerNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"colNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"type2",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"type"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Column":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"操作人",
 | 
				
			||||||
 | 
									"Width":2.38125
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"时间",
 | 
				
			||||||
 | 
									"Width":3.78354
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"药品名称",
 | 
				
			||||||
 | 
									"Width":4.63021
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"数量",
 | 
				
			||||||
 | 
									"Width":1.98438
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"批次",
 | 
				
			||||||
 | 
									"Width":2.61938
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"效期",
 | 
				
			||||||
 | 
									"Width":2.38125
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"库位",
 | 
				
			||||||
 | 
									"Width":2.59292
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							"ColumnContent":{
 | 
				
			||||||
 | 
								"Height":1.00542,
 | 
				
			||||||
 | 
								"ColumnContentCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"操作人",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"操作人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"时间",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"时间"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"库位",
 | 
				
			||||||
 | 
										"FreeCell":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox1",
 | 
				
			||||||
 | 
												"Left":9.60438,
 | 
				
			||||||
 | 
												"Top":-2.16958,
 | 
				
			||||||
 | 
												"Width":2.80458,
 | 
				
			||||||
 | 
												"Height":0.661458
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox1",
 | 
				
			||||||
 | 
												"Dock":"Fill",
 | 
				
			||||||
 | 
												"Center":"Both",
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"Text":"[#库位#] - [#colNo#]"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										]
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"ColumnTitle":{
 | 
				
			||||||
 | 
								"Height":1.40229,
 | 
				
			||||||
 | 
								"RepeatStyle":"OnPage",
 | 
				
			||||||
 | 
								"ColumnTitleCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"操作人",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"操作人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"时间",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"时间"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"库位",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"库位"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Parameter":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"startDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime",
 | 
				
			||||||
 | 
								"Format":"yyyy-MM-dd hh:mm:ss",
 | 
				
			||||||
 | 
								"Value":"2023/1/1"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"endDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime",
 | 
				
			||||||
 | 
								"Format":"yyyy-MM-dd hh:mm:ss",
 | 
				
			||||||
 | 
								"Value":"2023/4/28 23:59:59"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"machine_id",
 | 
				
			||||||
 | 
								"Value":"DM1"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
 | 
						"ReportHeader":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"ReportHeader1",
 | 
				
			||||||
 | 
								"Height":1.79917,
 | 
				
			||||||
 | 
								"Control":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Type":"MemoBox",
 | 
				
			||||||
 | 
										"Name":"MemoBox2",
 | 
				
			||||||
 | 
										"Left":7.59354,
 | 
				
			||||||
 | 
										"Top":0.211667,
 | 
				
			||||||
 | 
										"Width":5.60917,
 | 
				
			||||||
 | 
										"Height":1.19063,
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":217500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"入库记录"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
								"RepeatOnPage":true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,330 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						"Version":"6.3.0.1",
 | 
				
			||||||
 | 
						"Font":{
 | 
				
			||||||
 | 
							"Name":"宋体",
 | 
				
			||||||
 | 
							"Size":105000,
 | 
				
			||||||
 | 
							"Weight":400,
 | 
				
			||||||
 | 
							"Charset":134
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Printer":{
 | 
				
			||||||
 | 
							"LeftMargin":0.3175,
 | 
				
			||||||
 | 
							"TopMargin":0.899583,
 | 
				
			||||||
 | 
							"RightMargin":0.396875
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"DetailGrid":{
 | 
				
			||||||
 | 
							"CenterView":true,
 | 
				
			||||||
 | 
							"Recordset":{
 | 
				
			||||||
 | 
								"QuerySQL":"SELECT \r\n  dmr.`drawer_no` AS drawerNo,\r\n  dmr.`col_no` AS colNo,\r\n  dmr.`type` AS `type`,\r\n  dmr.`quantity` AS quantity,\r\n  dmr.`manu_no` AS manuNo,\r\n  dmr.`eff_date` AS effDate,\r\n  dmr.`operation_time` AS operationTime,\r\n  di.`drug_name` AS drugName,\r\n  di.`drug_spec` AS drugSpec,\r\n  di.`pack_unit` AS packUnit,\r\n  di.`manufactory` AS manuFactory,\r\n  di.`max_stock` AS baseQuantity,\r\n  dmr.`drug_id` AS drugId,\r\n  ul.`user_name` AS nickname\r\nFROM\r\n  dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` = 4 \r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
 | 
				
			||||||
 | 
								"Field":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"操作人",
 | 
				
			||||||
 | 
										"DBFieldName":"Nickname"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"审核人",
 | 
				
			||||||
 | 
										"DBFieldName":"reviewer"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"时间",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yyyy/MM/dd HH:mm:ss",
 | 
				
			||||||
 | 
										"DBFieldName":"operationTime"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"药品名称",
 | 
				
			||||||
 | 
										"DBFieldName":"DrugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"数量",
 | 
				
			||||||
 | 
										"DBFieldName":"quantity"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"批次",
 | 
				
			||||||
 | 
										"DBFieldName":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"效期",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yyyy/MM/dd",
 | 
				
			||||||
 | 
										"DBFieldName":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"库位",
 | 
				
			||||||
 | 
										"DBFieldName":"drawerNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"colNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"type2",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"type"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"规格",
 | 
				
			||||||
 | 
										"DBFieldName":"drugSpec"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Column":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"操作人",
 | 
				
			||||||
 | 
									"Width":2.38125
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"审核人",
 | 
				
			||||||
 | 
									"Width":2.19604
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"时间",
 | 
				
			||||||
 | 
									"Width":3.78354
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"药品名称",
 | 
				
			||||||
 | 
									"Width":4.63021
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"规格",
 | 
				
			||||||
 | 
									"Width":1.69333
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"数量",
 | 
				
			||||||
 | 
									"Width":1.98438
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"批次",
 | 
				
			||||||
 | 
									"Width":2.61938
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"效期",
 | 
				
			||||||
 | 
									"Width":2.38125
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"库位",
 | 
				
			||||||
 | 
									"Width":1.79917
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							"ColumnContent":{
 | 
				
			||||||
 | 
								"Height":1.00542,
 | 
				
			||||||
 | 
								"ColumnContentCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"操作人",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"操作人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"审核人",
 | 
				
			||||||
 | 
										"DataField":"审核人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"时间",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"时间"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"规格",
 | 
				
			||||||
 | 
										"DataField":"规格"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"库位",
 | 
				
			||||||
 | 
										"FreeCell":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox1",
 | 
				
			||||||
 | 
												"Left":9.60438,
 | 
				
			||||||
 | 
												"Top":-2.16958,
 | 
				
			||||||
 | 
												"Width":2.80458,
 | 
				
			||||||
 | 
												"Height":0.661458
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox1",
 | 
				
			||||||
 | 
												"Dock":"Fill",
 | 
				
			||||||
 | 
												"Center":"Both",
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"Text":"[#库位#] - [#colNo#]"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										]
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"ColumnTitle":{
 | 
				
			||||||
 | 
								"Height":1.40229,
 | 
				
			||||||
 | 
								"RepeatStyle":"OnPage",
 | 
				
			||||||
 | 
								"ColumnTitleCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"操作人",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"操作人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"审核人",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"审核人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"时间",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"时间"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"规格",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"规格"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"库位",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"库位"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Parameter":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"startDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime",
 | 
				
			||||||
 | 
								"Format":"yyyy-MM-dd hh:mm:ss",
 | 
				
			||||||
 | 
								"Value":"2023/1/1"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"endDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime",
 | 
				
			||||||
 | 
								"Format":"yyyy-MM-dd hh:mm:ss",
 | 
				
			||||||
 | 
								"Value":"2023/4/28 23:59:59"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"machine_id",
 | 
				
			||||||
 | 
								"Value":"DM1"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
 | 
						"ReportHeader":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"ReportHeader1",
 | 
				
			||||||
 | 
								"Height":1.79917,
 | 
				
			||||||
 | 
								"Control":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Type":"MemoBox",
 | 
				
			||||||
 | 
										"Name":"MemoBox2",
 | 
				
			||||||
 | 
										"Left":7.59354,
 | 
				
			||||||
 | 
										"Top":0.211667,
 | 
				
			||||||
 | 
										"Width":5.60917,
 | 
				
			||||||
 | 
										"Height":1.19063,
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":217500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"盘点表"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
								"RepeatOnPage":true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,313 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						"Version":"6.3.0.1",
 | 
				
			||||||
 | 
						"Font":{
 | 
				
			||||||
 | 
							"Name":"宋体",
 | 
				
			||||||
 | 
							"Size":105000,
 | 
				
			||||||
 | 
							"Weight":400,
 | 
				
			||||||
 | 
							"Charset":134
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Printer":{
 | 
				
			||||||
 | 
							"Oriention":"Landscape"
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"DetailGrid":{
 | 
				
			||||||
 | 
							"CenterView":true,
 | 
				
			||||||
 | 
							"PrintAdaptMethod":"ResizeToFit",
 | 
				
			||||||
 | 
							"Recordset":{
 | 
				
			||||||
 | 
								"QuerySQL":"SELECT \r\n  cl.`row_no` AS drawerNo,\r\n  cl.`col_no` AS colNo,\r\n  cl.`quantity` AS quantity,\r\n  cl.`manu_no` AS manuNo,\r\n  cl.`eff_date` AS effDate,\r\n  di.`drug_name` AS drugName,\r\n  di.`drug_spec` AS drugSpec,\r\n  di.`pack_unit` AS packUnit,\r\n  di.`manufactory` AS manuFactory,\r\n  di.`max_stock` AS baseQuantity,\r\n  cl.`drug_id` AS drugId\r\nFROM\r\n  channel_stock cl\r\nINNER JOIN drug_info di ON di.`drug_id` = cl.`drug_id`\r\nWHERE cl.`machine_id` =  :machine_id\r\n AND cl.`drawer_type` = 1\r\n ORDER BY cl.`drug_id`",
 | 
				
			||||||
 | 
								"Field":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drugSpec"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"manuFactory"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"quantityCount",
 | 
				
			||||||
 | 
										"Type":"Integer"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"quantity",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"Format":"0"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drawerNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drugId"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"baseQuantity",
 | 
				
			||||||
 | 
										"Type":"Integer"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"manuquantity",
 | 
				
			||||||
 | 
										"Type":"Integer"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"optDate",
 | 
				
			||||||
 | 
										"DBFieldName":"optdate"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Column":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"optDate",
 | 
				
			||||||
 | 
									"Width":4.20688
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"drugName",
 | 
				
			||||||
 | 
									"Width":4.57729
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"drugSpec"
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"manuFactory",
 | 
				
			||||||
 | 
									"Width":4.60375
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"quantityCount",
 | 
				
			||||||
 | 
									"Width":2.19604
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"manuNo"
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"effDate",
 | 
				
			||||||
 | 
									"Width":2.61938
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"quantity",
 | 
				
			||||||
 | 
									"Width":1.42875
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							"ColumnContent":{
 | 
				
			||||||
 | 
								"Height":0.79375,
 | 
				
			||||||
 | 
								"ColumnContentCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"optDate",
 | 
				
			||||||
 | 
										"DataField":"optDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"drugName",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"drugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"drugSpec",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"drugSpec"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"manuFactory",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"manuFactory"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"quantityCount",
 | 
				
			||||||
 | 
										"FreeCell":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox1",
 | 
				
			||||||
 | 
												"Dock":"Fill",
 | 
				
			||||||
 | 
												"Text":"[#Sum(manuquantity)#]"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										]
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"manuNo",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"effDate",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"quantity",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"manuquantity"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"ColumnTitle":{
 | 
				
			||||||
 | 
								"Height":1.19063,
 | 
				
			||||||
 | 
								"RepeatStyle":"OnPage",
 | 
				
			||||||
 | 
								"ColumnTitleCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"optDate",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"盘点日期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"drugName",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"drugSpec",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"规格"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"manuFactory",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"厂家"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"quantityCount",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"总库存"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"manuNo",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"effDate",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"quantity",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"数量"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Group":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Group2",
 | 
				
			||||||
 | 
									"ByFields":"optDate",
 | 
				
			||||||
 | 
									"GroupHeader":{
 | 
				
			||||||
 | 
										"Height":0.635,
 | 
				
			||||||
 | 
										"OccupyColumn":true,
 | 
				
			||||||
 | 
										"OccupiedColumns":"optDate",
 | 
				
			||||||
 | 
										"VAlign":"Middle"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									"GroupFooter":{
 | 
				
			||||||
 | 
										"Visible":false,
 | 
				
			||||||
 | 
										"Height":0
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"drugId",
 | 
				
			||||||
 | 
									"ByFields":"drugId",
 | 
				
			||||||
 | 
									"GroupHeader":{
 | 
				
			||||||
 | 
										"Visible":false,
 | 
				
			||||||
 | 
										"Height":0.79375,
 | 
				
			||||||
 | 
										"RepeatOnPage":true,
 | 
				
			||||||
 | 
										"OccupyColumn":true,
 | 
				
			||||||
 | 
										"IncludeFooter":true,
 | 
				
			||||||
 | 
										"OccupiedColumns":"drugName;drugSpec;manuFactory;quantityCount",
 | 
				
			||||||
 | 
										"VAlign":"Middle"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									"GroupFooter":{
 | 
				
			||||||
 | 
										"Visible":false,
 | 
				
			||||||
 | 
										"Height":0
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							]
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Parameter":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"machine_id",
 | 
				
			||||||
 | 
								"Value":"DM1"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
 | 
						"ReportHeader":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"ReportHeader1",
 | 
				
			||||||
 | 
								"Height":2.40771,
 | 
				
			||||||
 | 
								"Control":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Type":"StaticBox",
 | 
				
			||||||
 | 
										"Name":"StaticBox1",
 | 
				
			||||||
 | 
										"Center":"Horizontal",
 | 
				
			||||||
 | 
										"Left":8.22854,
 | 
				
			||||||
 | 
										"Top":0.608542,
 | 
				
			||||||
 | 
										"Width":9.18104,
 | 
				
			||||||
 | 
										"Height":1.21708,
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":217500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"毒麻药品盘点后库存信息"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
								"RepeatOnPage":true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,279 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						"Version":"6.3.0.1",
 | 
				
			||||||
 | 
						"Font":{
 | 
				
			||||||
 | 
							"Name":"宋体",
 | 
				
			||||||
 | 
							"Size":105000,
 | 
				
			||||||
 | 
							"Weight":400,
 | 
				
			||||||
 | 
							"Charset":134
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Printer":{
 | 
				
			||||||
 | 
							"LeftMargin":1,
 | 
				
			||||||
 | 
							"TopMargin":1,
 | 
				
			||||||
 | 
							"RightMargin":1,
 | 
				
			||||||
 | 
							"BottomMargin":1
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"DetailGrid":{
 | 
				
			||||||
 | 
							"Recordset":{
 | 
				
			||||||
 | 
								"Field":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"盘点日期",
 | 
				
			||||||
 | 
										"DBFieldName":"optDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"药品名称",
 | 
				
			||||||
 | 
										"DBFieldName":"drugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drugId"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"规格",
 | 
				
			||||||
 | 
										"DBFieldName":"drugSpec"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"厂家",
 | 
				
			||||||
 | 
										"DBFieldName":"manuFactory"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"总库存",
 | 
				
			||||||
 | 
										"DBFieldName":"quantity"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"批次",
 | 
				
			||||||
 | 
										"DBFieldName":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"效期",
 | 
				
			||||||
 | 
										"DBFieldName":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"数量",
 | 
				
			||||||
 | 
										"DBFieldName":"manuquantity"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Column":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"盘点日期",
 | 
				
			||||||
 | 
									"Width":2.56646
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"药品名称",
 | 
				
			||||||
 | 
									"Width":2.80458
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"规格",
 | 
				
			||||||
 | 
									"Width":2.01083
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"厂家",
 | 
				
			||||||
 | 
									"Width":2.98979
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"总库存",
 | 
				
			||||||
 | 
									"Width":1.69333
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"批次",
 | 
				
			||||||
 | 
									"Width":2.06375
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"效期",
 | 
				
			||||||
 | 
									"Width":2.19604
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"数量",
 | 
				
			||||||
 | 
									"Width":1.69333
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							"ColumnContent":{
 | 
				
			||||||
 | 
								"Height":0.79375,
 | 
				
			||||||
 | 
								"ColumnContentCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"盘点日期",
 | 
				
			||||||
 | 
										"WordWrap":true,
 | 
				
			||||||
 | 
										"DataField":"盘点日期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"DataField":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"规格",
 | 
				
			||||||
 | 
										"DataField":"规格"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"厂家",
 | 
				
			||||||
 | 
										"DataField":"厂家"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"总库存",
 | 
				
			||||||
 | 
										"DataField":"总库存"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"DataField":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"DataField":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"DataField":"数量"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"ColumnTitle":{
 | 
				
			||||||
 | 
								"Height":1.19063,
 | 
				
			||||||
 | 
								"RepeatStyle":"OnPage",
 | 
				
			||||||
 | 
								"ColumnTitleCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"盘点日期",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"盘点日期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"规格",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"规格"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"厂家",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"厂家"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"总库存",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"总库存"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"数量"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Group":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Group1",
 | 
				
			||||||
 | 
									"ByFields":"盘点日期",
 | 
				
			||||||
 | 
									"GroupHeader":{
 | 
				
			||||||
 | 
										"Height":0.635,
 | 
				
			||||||
 | 
										"OccupyColumn":true,
 | 
				
			||||||
 | 
										"OccupiedColumns":"盘点日期",
 | 
				
			||||||
 | 
										"VAlign":"Middle"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									"GroupFooter":{
 | 
				
			||||||
 | 
										"Height":0
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Group2",
 | 
				
			||||||
 | 
									"ByFields":"drugId",
 | 
				
			||||||
 | 
									"GroupHeader":{
 | 
				
			||||||
 | 
										"Height":0.635,
 | 
				
			||||||
 | 
										"OccupyColumn":true,
 | 
				
			||||||
 | 
										"OccupiedColumns":"药品名称;厂家;规格;总库存",
 | 
				
			||||||
 | 
										"VAlign":"Middle"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									"GroupFooter":{
 | 
				
			||||||
 | 
										"Height":0
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							]
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"ReportHeader":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"ReportHeader1",
 | 
				
			||||||
 | 
								"Height":1.32292,
 | 
				
			||||||
 | 
								"Control":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Type":"MemoBox",
 | 
				
			||||||
 | 
										"Name":"MemoBox1",
 | 
				
			||||||
 | 
										"Dock":"Fill",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":157500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"毒麻药品盘点后库存信息"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,282 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						"Version":"6.3.0.1",
 | 
				
			||||||
 | 
						"Font":{
 | 
				
			||||||
 | 
							"Name":"宋体",
 | 
				
			||||||
 | 
							"Size":105000,
 | 
				
			||||||
 | 
							"Weight":400,
 | 
				
			||||||
 | 
							"Charset":134
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Printer":{
 | 
				
			||||||
 | 
							"LeftMargin":0.3175,
 | 
				
			||||||
 | 
							"TopMargin":0.899583,
 | 
				
			||||||
 | 
							"RightMargin":0.396875
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"DetailGrid":{
 | 
				
			||||||
 | 
							"CenterView":true,
 | 
				
			||||||
 | 
							"Recordset":{
 | 
				
			||||||
 | 
								"QuerySQL":"SELECT \r\n  dmr.`drawer_no` AS drawerNo,\r\n  dmr.`col_no` AS colNo,\r\n  dmr.`type` AS `type`,\r\n  CONCAT(dmr.`quantity`,IF(dmr.`type`=32,\"(空瓶)\",\"\")) AS quantity,\r\n  dmr.`manu_no` AS manuNo,\r\n  dmr.`eff_date` AS effDate,\r\n  dmr.`operation_time` AS operationTime,\r\n  di.`drug_name` AS drugName,\r\n  di.`drug_spec` AS drugSpec,\r\n  di.`pack_unit` AS packUnit,\r\n  di.`manufactory` AS manuFactory,\r\n  di.`max_stock` AS baseQuantity,\r\n  dmr.`drug_id` AS drugId,\r\n  ul.`user_name` AS nickname\r\nFROM\r\n  dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` in (31, 32)\r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
 | 
				
			||||||
 | 
								"Field":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"操作人",
 | 
				
			||||||
 | 
										"DBFieldName":"Nickname"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"时间",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yyyy/MM/dd HH:mm:ss",
 | 
				
			||||||
 | 
										"DBFieldName":"operationTime"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"药品名称",
 | 
				
			||||||
 | 
										"DBFieldName":"DrugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"数量",
 | 
				
			||||||
 | 
										"DBFieldName":"quantity"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"批次",
 | 
				
			||||||
 | 
										"DBFieldName":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"效期",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yyyy/MM/dd",
 | 
				
			||||||
 | 
										"DBFieldName":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"库位",
 | 
				
			||||||
 | 
										"DBFieldName":"drawerNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"colNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"type2",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"type"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Column":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"操作人",
 | 
				
			||||||
 | 
									"Width":2.38125
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"时间",
 | 
				
			||||||
 | 
									"Width":3.78354
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"药品名称",
 | 
				
			||||||
 | 
									"Width":4.63021
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"数量",
 | 
				
			||||||
 | 
									"Width":1.98438
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"批次",
 | 
				
			||||||
 | 
									"Width":2.61938
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"效期",
 | 
				
			||||||
 | 
									"Width":2.38125
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"库位",
 | 
				
			||||||
 | 
									"Width":2.59292
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							"ColumnContent":{
 | 
				
			||||||
 | 
								"Height":1.00542,
 | 
				
			||||||
 | 
								"ColumnContentCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"操作人",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"操作人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"时间",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"时间"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"库位",
 | 
				
			||||||
 | 
										"FreeCell":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox1",
 | 
				
			||||||
 | 
												"Left":9.60438,
 | 
				
			||||||
 | 
												"Top":-2.16958,
 | 
				
			||||||
 | 
												"Width":2.80458,
 | 
				
			||||||
 | 
												"Height":0.661458
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox1",
 | 
				
			||||||
 | 
												"Dock":"Fill",
 | 
				
			||||||
 | 
												"Center":"Both",
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"Text":"[#库位#] - [#colNo#]"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										]
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"ColumnTitle":{
 | 
				
			||||||
 | 
								"Height":1.40229,
 | 
				
			||||||
 | 
								"RepeatStyle":"OnPage",
 | 
				
			||||||
 | 
								"ColumnTitleCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"操作人",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"操作人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"时间",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"时间"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"库位",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"库位"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Parameter":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"startDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime",
 | 
				
			||||||
 | 
								"Format":"yyyy-MM-dd hh:mm:ss",
 | 
				
			||||||
 | 
								"Value":"2023/1/1"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"endDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime",
 | 
				
			||||||
 | 
								"Format":"yyyy-MM-dd hh:mm:ss",
 | 
				
			||||||
 | 
								"Value":"2023/4/28 23:59:59"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"machine_id",
 | 
				
			||||||
 | 
								"Value":"DM1"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
 | 
						"ReportHeader":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"ReportHeader1",
 | 
				
			||||||
 | 
								"Height":1.79917,
 | 
				
			||||||
 | 
								"Control":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Type":"MemoBox",
 | 
				
			||||||
 | 
										"Name":"MemoBox2",
 | 
				
			||||||
 | 
										"Left":7.59354,
 | 
				
			||||||
 | 
										"Top":0.211667,
 | 
				
			||||||
 | 
										"Width":5.60917,
 | 
				
			||||||
 | 
										"Height":1.19063,
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":217500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"归还记录"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
								"RepeatOnPage":true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,282 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						"Version":"6.3.0.1",
 | 
				
			||||||
 | 
						"Font":{
 | 
				
			||||||
 | 
							"Name":"宋体",
 | 
				
			||||||
 | 
							"Size":105000,
 | 
				
			||||||
 | 
							"Weight":400,
 | 
				
			||||||
 | 
							"Charset":134
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Printer":{
 | 
				
			||||||
 | 
							"LeftMargin":0.3175,
 | 
				
			||||||
 | 
							"TopMargin":0.899583,
 | 
				
			||||||
 | 
							"RightMargin":0.396875
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"DetailGrid":{
 | 
				
			||||||
 | 
							"CenterView":true,
 | 
				
			||||||
 | 
							"Recordset":{
 | 
				
			||||||
 | 
								"QuerySQL":"SELECT \r\n  dmr.`drawer_no` AS drawerNo,\r\n  dmr.`col_no` AS colNo,\r\n  dmr.`type` AS `type`,\r\n  dmr.`quantity` AS quantity,\r\n  dmr.`manu_no` AS manuNo,\r\n  dmr.`eff_date` AS effDate,\r\n  dmr.`operation_time` AS operationTime,\r\n  di.`drug_name` AS drugName,\r\n  di.`drug_spec` AS drugSpec,\r\n  di.`pack_unit` AS packUnit,\r\n  di.`manufactory` AS manuFactory,\r\n  di.`max_stock` AS baseQuantity,\r\n  dmr.`drug_id` AS drugId,\r\n  ul.`user_name` AS nickname\r\nFROM\r\n  dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` = 2 \r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
 | 
				
			||||||
 | 
								"Field":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"操作人",
 | 
				
			||||||
 | 
										"DBFieldName":"Nickname"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"时间",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yyyy/MM/dd HH:mm:ss",
 | 
				
			||||||
 | 
										"DBFieldName":"operationTime"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"药品名称",
 | 
				
			||||||
 | 
										"DBFieldName":"DrugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"数量",
 | 
				
			||||||
 | 
										"DBFieldName":"quantity"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"批次",
 | 
				
			||||||
 | 
										"DBFieldName":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"效期",
 | 
				
			||||||
 | 
										"Type":"DateTime",
 | 
				
			||||||
 | 
										"Format":"yyyy/MM/dd",
 | 
				
			||||||
 | 
										"DBFieldName":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"库位",
 | 
				
			||||||
 | 
										"DBFieldName":"drawerNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"colNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"type2",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"DBFieldName":"type"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Column":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"操作人",
 | 
				
			||||||
 | 
									"Width":2.38125
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"时间",
 | 
				
			||||||
 | 
									"Width":3.78354
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"药品名称",
 | 
				
			||||||
 | 
									"Width":4.63021
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"数量",
 | 
				
			||||||
 | 
									"Width":1.98438
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"批次",
 | 
				
			||||||
 | 
									"Width":2.61938
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"效期",
 | 
				
			||||||
 | 
									"Width":2.38125
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"库位",
 | 
				
			||||||
 | 
									"Width":2.59292
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							"ColumnContent":{
 | 
				
			||||||
 | 
								"Height":1.00542,
 | 
				
			||||||
 | 
								"ColumnContentCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"操作人",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"操作人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"时间",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"时间"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"库位",
 | 
				
			||||||
 | 
										"FreeCell":true,
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"FieldBox",
 | 
				
			||||||
 | 
												"Name":"FieldBox1",
 | 
				
			||||||
 | 
												"Left":9.60438,
 | 
				
			||||||
 | 
												"Top":-2.16958,
 | 
				
			||||||
 | 
												"Width":2.80458,
 | 
				
			||||||
 | 
												"Height":0.661458
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox1",
 | 
				
			||||||
 | 
												"Dock":"Fill",
 | 
				
			||||||
 | 
												"Center":"Both",
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"Text":"[#库位#] - [#colNo#]"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										]
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"ColumnTitle":{
 | 
				
			||||||
 | 
								"Height":1.40229,
 | 
				
			||||||
 | 
								"RepeatStyle":"OnPage",
 | 
				
			||||||
 | 
								"ColumnTitleCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"操作人",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"操作人"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"时间",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"时间"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"药品名称",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"数量",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"数量"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"批次",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"效期",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"库位",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":120000,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"库位"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Parameter":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"startDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime",
 | 
				
			||||||
 | 
								"Format":"yyyy-MM-dd hh:mm:ss",
 | 
				
			||||||
 | 
								"Value":"2023/1/1"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"endDate",
 | 
				
			||||||
 | 
								"DataType":"DateTime",
 | 
				
			||||||
 | 
								"Format":"yyyy-MM-dd hh:mm:ss",
 | 
				
			||||||
 | 
								"Value":"2023/4/28 23:59:59"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"machine_id",
 | 
				
			||||||
 | 
								"Value":"DM1"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
 | 
						"ReportHeader":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"ReportHeader1",
 | 
				
			||||||
 | 
								"Height":1.79917,
 | 
				
			||||||
 | 
								"Control":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Type":"MemoBox",
 | 
				
			||||||
 | 
										"Name":"MemoBox2",
 | 
				
			||||||
 | 
										"Left":7.59354,
 | 
				
			||||||
 | 
										"Top":0.211667,
 | 
				
			||||||
 | 
										"Width":5.60917,
 | 
				
			||||||
 | 
										"Height":1.19063,
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":217500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"出库记录"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
								"RepeatOnPage":true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,345 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						"Version":"6.3.0.1",
 | 
				
			||||||
 | 
						"Font":{
 | 
				
			||||||
 | 
							"Name":"宋体",
 | 
				
			||||||
 | 
							"Size":105000,
 | 
				
			||||||
 | 
							"Weight":400,
 | 
				
			||||||
 | 
							"Charset":134
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Printer":{
 | 
				
			||||||
 | 
							"Oriention":"Landscape"
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"DetailGrid":{
 | 
				
			||||||
 | 
							"CenterView":true,
 | 
				
			||||||
 | 
							"PrintAdaptMethod":"ResizeToFit",
 | 
				
			||||||
 | 
							"Recordset":{
 | 
				
			||||||
 | 
								"QuerySQL":"SELECT \r\n  cl.`row_no` AS drawerNo,\r\n  cl.`col_no` AS colNo,\r\n  cl.`quantity` AS quantity,\r\n  cl.`manu_no` AS manuNo,\r\n  cl.`eff_date` AS effDate,\r\n  di.`drug_name` AS drugName,\r\n  di.`drug_spec` AS drugSpec,\r\n  di.`pack_unit` AS packUnit,\r\n  di.`manufactory` AS manuFactory,\r\n  di.`max_stock` AS baseQuantity,\r\n  cl.`drug_id` AS drugId\r\nFROM\r\n  channel_stock cl\r\nINNER JOIN drug_info di ON di.`drug_id` = cl.`drug_id`\r\nWHERE cl.`machine_id` =  :machine_id\r\n AND cl.`drawer_type` = 1\r\n ORDER BY cl.`drug_id`",
 | 
				
			||||||
 | 
								"Field":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drugSpec"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"manuFactory"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"quantityCount"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"quantity",
 | 
				
			||||||
 | 
										"Type":"Integer",
 | 
				
			||||||
 | 
										"Format":"0"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drawerNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"drugId"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Name":"baseQuantity",
 | 
				
			||||||
 | 
										"Type":"Integer"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Column":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"drugName",
 | 
				
			||||||
 | 
									"Width":5.37104
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"drugSpec"
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"manuFactory",
 | 
				
			||||||
 | 
									"Width":4.60375
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Column1"
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"quantityCount",
 | 
				
			||||||
 | 
									"Width":2.59292
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"manuNo"
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"effDate"
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"quantity",
 | 
				
			||||||
 | 
									"Width":2.43417
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							"ColumnContent":{
 | 
				
			||||||
 | 
								"Height":0.79375,
 | 
				
			||||||
 | 
								"ColumnContentCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"drugName",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"drugName"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"drugSpec",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"drugSpec"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"manuFactory",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"manuFactory"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"Column1",
 | 
				
			||||||
 | 
										"FreeCell":true
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"quantityCount",
 | 
				
			||||||
 | 
										"FreeCell":true
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"manuNo",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"manuNo"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"effDate",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"effDate"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Column":"quantity",
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"DataField":"quantity"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"ColumnTitle":{
 | 
				
			||||||
 | 
								"Height":1.19063,
 | 
				
			||||||
 | 
								"RepeatStyle":"OnPage",
 | 
				
			||||||
 | 
								"ColumnTitleCell":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"drugName",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"药品名称"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"drugSpec",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"规格"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"manuFactory",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"厂家"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"Column1",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"基数"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"quantityCount",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"总库存"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"manuNo",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"批次"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"effDate",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"效期"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"GroupTitle":false,
 | 
				
			||||||
 | 
										"Column":"quantity",
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":142500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"数量"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"Group":[
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"drugId",
 | 
				
			||||||
 | 
									"ByFields":"drugId",
 | 
				
			||||||
 | 
									"GroupHeader":{
 | 
				
			||||||
 | 
										"Visible":false,
 | 
				
			||||||
 | 
										"Height":0.79375,
 | 
				
			||||||
 | 
										"RepeatOnPage":true,
 | 
				
			||||||
 | 
										"OccupyColumn":true,
 | 
				
			||||||
 | 
										"IncludeFooter":true,
 | 
				
			||||||
 | 
										"OccupiedColumns":"drugName;drugSpec;manuFactory;quantityCount;Column1",
 | 
				
			||||||
 | 
										"VAlign":"Middle"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									"GroupFooter":{
 | 
				
			||||||
 | 
										"Visible":false,
 | 
				
			||||||
 | 
										"Height":0.396875
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"Name":"Group1",
 | 
				
			||||||
 | 
									"ByFields":"drugId",
 | 
				
			||||||
 | 
									"GroupHeader":{
 | 
				
			||||||
 | 
										"Control":[
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox3",
 | 
				
			||||||
 | 
												"AlignColumn":"drugName",
 | 
				
			||||||
 | 
												"Width":5.3975,
 | 
				
			||||||
 | 
												"Height":1.19063,
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"Text":"[#drugName#]"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox4",
 | 
				
			||||||
 | 
												"AlignColumn":"drugSpec",
 | 
				
			||||||
 | 
												"Left":5.37104,
 | 
				
			||||||
 | 
												"Width":3.01625,
 | 
				
			||||||
 | 
												"Height":1.19063,
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"Text":"[#drugSpec#]"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox5",
 | 
				
			||||||
 | 
												"AlignColumn":"manuFactory",
 | 
				
			||||||
 | 
												"Left":8.36083,
 | 
				
			||||||
 | 
												"Width":4.63021,
 | 
				
			||||||
 | 
												"Height":1.19063,
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"Text":"[#manuFactory#]"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"MemoBox",
 | 
				
			||||||
 | 
												"Name":"MemoBox6",
 | 
				
			||||||
 | 
												"AlignColumn":"Column1",
 | 
				
			||||||
 | 
												"Left":12.9646,
 | 
				
			||||||
 | 
												"Width":3.01625,
 | 
				
			||||||
 | 
												"Height":1.19063,
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"Text":"[#baseQuantity#]"
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{
 | 
				
			||||||
 | 
												"Type":"SummaryBox",
 | 
				
			||||||
 | 
												"Name":"SummaryBox1",
 | 
				
			||||||
 | 
												"AlignColumn":"quantityCount",
 | 
				
			||||||
 | 
												"Left":15.9544,
 | 
				
			||||||
 | 
												"Width":2.61938,
 | 
				
			||||||
 | 
												"Height":1.19063,
 | 
				
			||||||
 | 
												"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
												"DataField":"quantity",
 | 
				
			||||||
 | 
												"Format":"0"
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										],
 | 
				
			||||||
 | 
										"OccupyColumn":true,
 | 
				
			||||||
 | 
										"SameAsColumn":false,
 | 
				
			||||||
 | 
										"OccupiedColumns":"Column1;drugName;drugSpec;manuFactory;quantityCount",
 | 
				
			||||||
 | 
										"VAlign":"Middle"
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									"GroupFooter":{
 | 
				
			||||||
 | 
										"Visible":false
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							]
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						"Parameter":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"machine_id",
 | 
				
			||||||
 | 
								"Value":"DM1"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
 | 
						"ReportHeader":[
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"Name":"ReportHeader1",
 | 
				
			||||||
 | 
								"Height":2.40771,
 | 
				
			||||||
 | 
								"Control":[
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"Type":"StaticBox",
 | 
				
			||||||
 | 
										"Name":"StaticBox1",
 | 
				
			||||||
 | 
										"Center":"Horizontal",
 | 
				
			||||||
 | 
										"Left":8.89,
 | 
				
			||||||
 | 
										"Top":0.608542,
 | 
				
			||||||
 | 
										"Width":9.18104,
 | 
				
			||||||
 | 
										"Height":1.21708,
 | 
				
			||||||
 | 
										"Font":{
 | 
				
			||||||
 | 
											"Name":"宋体",
 | 
				
			||||||
 | 
											"Size":217500,
 | 
				
			||||||
 | 
											"Bold":true,
 | 
				
			||||||
 | 
											"Charset":134
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										"TextAlign":"MiddleCenter",
 | 
				
			||||||
 | 
										"Text":"毒麻药品库存信息"
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
								"RepeatOnPage":true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,37 @@
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					using DM_Weight.util;
 | 
				
			||||||
 | 
					using SqlSugar;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Configuration;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Services
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class ChannelStockService
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ////private SqlSugarScope SqlSugarHelper.Db;
 | 
				
			||||||
 | 
					        //public ChannelStockService(SqlSugarScope sqlSugarScope)
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    //this.SqlSugarHelper.Db = sqlSugarScope;
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					        public List<ChannelStockCount> GetAll()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					            string SQL = $@"SELECT CS.drug_id as DrugId,CS.manu_no as ManuNo,sum(quantity) as Quantity,CS.eff_date as EffDate,DI.drug_name as DrugName,
 | 
				
			||||||
 | 
					                          DI.drug_spec as DrugSpec,DI.dosage as Dosage,DI.manufactory as ManuFactory,DI.small_unit as SmallUnit,DI.pack_unit as PackUnit,
 | 
				
			||||||
 | 
					                          CS.machine_id as MachineId FROM channel_stock CS 
 | 
				
			||||||
 | 
					                          INNER JOIN drug_info DI ON CS.drug_id=DI.drug_id where CS.machine_id='{p_machine_id}'  AND quantity>0 GROUP BY CS.drug_id";//,CS.manu_no ";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            List<ChannelStockCount> accountList = SqlSugarHelper.Db.SqlQueryable<ChannelStockCount>(SQL).ToList();
 | 
				
			||||||
 | 
					            //List<ChannelStock> accountList = SqlSugarHelper.Db.Queryable<ChannelStock>().Includes<DrugInfo>(cs=>cs.DrugInfo)
 | 
				
			||||||
 | 
					            //    .GroupBy(cs=>new { cs.DrugId, cs.ManuNo })
 | 
				
			||||||
 | 
					            //    .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"]??"DM1"))
 | 
				
			||||||
 | 
					            //    .Where(cs=>cs.Quantity>0)
 | 
				
			||||||
 | 
					            //    .ToList();
 | 
				
			||||||
 | 
					            return accountList;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,25 @@
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					using DM_Weight.util;
 | 
				
			||||||
 | 
					using SqlSugar;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Services
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class CommonService
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //获取抽屉数量
 | 
				
			||||||
 | 
					        //public bool FindDrawerCount()
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					            //int count = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cs => cs.DrawerType != 3)
 | 
				
			||||||
 | 
					            //    .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).GroupBy(cs => cs.DrawerNo).Select(cs => SqlFunc.AggregateCount(cs.DrawerNo)).Count();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //return count == 16;
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,79 @@
 | 
				
			||||||
 | 
					using DM_Weight.Models;
 | 
				
			||||||
 | 
					using DM_Weight.util;
 | 
				
			||||||
 | 
					using DM_Weight.Views.Dialog;
 | 
				
			||||||
 | 
					using gregn6Lib;
 | 
				
			||||||
 | 
					using SqlSugar;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Configuration;
 | 
				
			||||||
 | 
					using System.IO;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Services
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 账册服务类
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public class MachineRecordService
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ////private SqlSugarScope SqlSugarHelper.Db;
 | 
				
			||||||
 | 
					        public MachineRecordService()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            ////this.SqlSugarHelper.Db = sqlSugarScope;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        public List<AccountModel> ReportAccountBook(DateTime? startDate, DateTime? endDate,int type, string drug_id="")
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
 | 
				
			||||||
 | 
					            DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
 | 
				
			||||||
 | 
					            string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
 | 
					            string SQL = $@"SELECT TYPE, stockQuantity,inQuantity,outQuantity,operationTime,invoiceId,drugName,drugId,drugSpec,packUnit,dosage,manufactory,manuNo,effDate,
 | 
				
			||||||
 | 
					                        operatorName,reviewerName,supplierDept,receiveDept FROM
 | 
				
			||||||
 | 
					                        (SELECT   mr.type,mr.`stock_quantity` AS `stockQuantity`, IF(mr.`type` IN (1, 31), mr.`quantity`, IF(mr.`type` = 4 AND mr.`quantity` > 0, mr.`quantity`, IF(mr.`type` = 5,mr.return_quantity1,0))) 
 | 
				
			||||||
 | 
					                        AS `inQuantity`, IF(mr.`type` = 2, mr.`quantity`, IF(mr.`type` = 4 AND mr.`quantity` < 0, (0 - mr.`quantity`), IF(mr.`type` = 5,mr.return_quantity2,0))) AS `outQuantity`,
 | 
				
			||||||
 | 
					                         DATE_FORMAT(mr.`operation_time`,'%m/%d')  AS `operationTime`,IF(mr.`type`=1||mr.type=5,mr.`invoice_id`,NULL) AS `invoiceId`, di.`drug_name` AS `drugName`, di.`drug_id` AS `drugId`,
 | 
				
			||||||
 | 
					                         di.`drug_spec` AS `drugSpec`, di.`pack_unit` AS `packUnit`, di.`dosage` AS `dosage`, di.`manufactory` AS `manufactory`,
 | 
				
			||||||
 | 
					                        mr.`manu_no` AS `manuNo`, DATE_FORMAT(mr.`eff_date`,'%y/%m/%d') AS `effDate`, u1.`user_name` AS `operatorName`, u2.`user_name` AS `reviewerName`,mr.supplierDept,mr.receiveDept FROM 
 | 
				
			||||||
 | 
					                        dm_machine_record mr  LEFT JOIN drug_info di ON mr.`drug_id` = di.`drug_id`  LEFT JOIN user_list u1 ON mr.`operator` = u1.`id`  
 | 
				
			||||||
 | 
					                        LEFT JOIN user_list u2 ON mr.`reviewer` = u2.`id` WHERE mr.`machine_id` = '{p_machine_id}' AND mr.`operation_time` > '{p_startDate}'
 | 
				
			||||||
 | 
					                        AND mr.`operation_time` < '{p_endDate}'  and IF(mr.`type` = 4 AND mr.`quantity` = 0, 99999, mr.`quantity`) <>99999 ";
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(drug_id))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                SQL += " AND mr.drug_id='" + drug_id + "' ";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            SQL += " ORDER BY mr.`drug_id`, mr.`operation_time`, mr.`id`) AS T";
 | 
				
			||||||
 | 
					            if(type>0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if(type==1)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    SQL += " WHERE inQuantity>0 ";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if(type==2)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    SQL += " WHERE outQuantity>0 ";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if(type==5)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    SQL += " WHERE type=5 ";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //ChannelStocks = q.Select(it => { it.CheckQuantity = it.Quantity; return it; }).ToList();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            List<AccountModel> accountList = SqlSugarHelper.Db.SqlQueryable<AccountModel>(SQL)
 | 
				
			||||||
 | 
					                                                                         .AddParameters(new
 | 
				
			||||||
 | 
					                                                                         {
 | 
				
			||||||
 | 
					                                                                             machineId = ConfigurationManager.AppSettings["machineId"] ?? "DM1"
 | 
				
			||||||
 | 
					                                                                         })
 | 
				
			||||||
 | 
					                                                                        //.Select(it => new { o = new AccountModel(), i = new DrugInfo() })
 | 
				
			||||||
 | 
					                                                                        //.Select(it=>new AccountModel())
 | 
				
			||||||
 | 
					                                                                        //.Select("*") //让上面一行不生成sql
 | 
				
			||||||
 | 
					                                                                       .ToList();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //List<AccountModel> accountList=new List<AccountModel>();
 | 
				
			||||||
 | 
					            return accountList;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,163 @@
 | 
				
			||||||
 | 
					using log4net;
 | 
				
			||||||
 | 
					using MySqlConnector;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Configuration;
 | 
				
			||||||
 | 
					using System.Data;
 | 
				
			||||||
 | 
					using System.Drawing;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.Services
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class SqlHelper<T> where T :new()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        //private readonly ILog logger = LogManager.GetLogger(typeof(SqlHelperService));
 | 
				
			||||||
 | 
					        //public static string connStr = ConfigurationManager.ConnectionStrings["database"].ToString();
 | 
				
			||||||
 | 
					        ////public bool IsConnected()
 | 
				
			||||||
 | 
					        ////{
 | 
				
			||||||
 | 
					        ////    bool ret=false;
 | 
				
			||||||
 | 
					        ////    using (MySqlConnection conn = new MySqlConnection(connStr))
 | 
				
			||||||
 | 
					        ////    {
 | 
				
			||||||
 | 
					        ////        try
 | 
				
			||||||
 | 
					        ////        {
 | 
				
			||||||
 | 
					        ////            conn.Open();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ////            ret= true;
 | 
				
			||||||
 | 
					        ////        }
 | 
				
			||||||
 | 
					        ////        catch (Exception ex)
 | 
				
			||||||
 | 
					        ////        {
 | 
				
			||||||
 | 
					        ////            //throw ex;
 | 
				
			||||||
 | 
					        ////            ret= false;
 | 
				
			||||||
 | 
					        ////        }
 | 
				
			||||||
 | 
					        ////        logger.Info($"数据库连接状态{conn.State}");
 | 
				
			||||||
 | 
					        ////    }
 | 
				
			||||||
 | 
					        ////    return ret;
 | 
				
			||||||
 | 
					        ////}
 | 
				
			||||||
 | 
					        //public T ExecuteQuery(string sql, params MySqlParameter[] param)
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    T t=new T();
 | 
				
			||||||
 | 
					        //    DataSet ds = new DataSet();
 | 
				
			||||||
 | 
					        //    using (MySqlConnection conn = new MySqlConnection(ConfigurationManager.ConnectionStrings["dbConnect"].ConnectionString))
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        try
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            conn.Open();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //            using (MySqlCommand cmd = new MySqlCommand(sql, conn))
 | 
				
			||||||
 | 
					        //            {
 | 
				
			||||||
 | 
					        //                if (param != null)
 | 
				
			||||||
 | 
					        //                    cmd.Parameters.AddRange(param);
 | 
				
			||||||
 | 
					        //                MySqlDataAdapter da = new MySqlDataAdapter(cmd);
 | 
				
			||||||
 | 
					        //                da.Fill(ds);
 | 
				
			||||||
 | 
					        //                if (param != null)
 | 
				
			||||||
 | 
					        //                    cmd.Parameters.Clear();
 | 
				
			||||||
 | 
					                        
 | 
				
			||||||
 | 
					        //            }
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //        catch (Exception ex)
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            throw ex;
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //    return t;
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ///// <summary>
 | 
				
			||||||
 | 
					        ///// 执行增、删、改的方法
 | 
				
			||||||
 | 
					        ///// </summary>
 | 
				
			||||||
 | 
					        ///// <param name="sql">预计执行的非SELECT查询语句</param>
 | 
				
			||||||
 | 
					        ///// <param name="param">SQL语句中的可变参数</param>
 | 
				
			||||||
 | 
					        ///// <returns>返回受影响的行数</returns>
 | 
				
			||||||
 | 
					        //public int ExecuteNonQuery(string sql, params MySqlParameter[] param)
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    using (MySqlConnection conn = new MySqlConnection(ConfigurationManager.ConnectionStrings["dbConnect"].ConnectionString))
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        try
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            conn.Open();
 | 
				
			||||||
 | 
					        //            MySqlCommand cmd = new MySqlCommand(sql, conn);
 | 
				
			||||||
 | 
					        //            if (param != null)
 | 
				
			||||||
 | 
					        //                cmd.Parameters.AddRange(param);
 | 
				
			||||||
 | 
					        //            int affectCount = cmd.ExecuteNonQuery();
 | 
				
			||||||
 | 
					        //            if (param != null)
 | 
				
			||||||
 | 
					        //                cmd.Parameters.Clear();//添加这一句即可解决此问题
 | 
				
			||||||
 | 
					        //            return affectCount;
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //        catch (Exception ex)
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            throw ex;
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //public long ExecuteNonQueryAndGetLastInsertedId(string sql, params MySqlParameter[] param)
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    using (MySqlConnection conn = new MySqlConnection(ConfigurationManager.ConnectionStrings["dbConnect"].ConnectionString))
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        try
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            conn.Open();
 | 
				
			||||||
 | 
					        //            MySqlCommand cmd = new MySqlCommand(sql, conn);
 | 
				
			||||||
 | 
					        //            if (param != null)
 | 
				
			||||||
 | 
					        //                cmd.Parameters.AddRange(param);
 | 
				
			||||||
 | 
					        //            int affectCount = cmd.ExecuteNonQuery();
 | 
				
			||||||
 | 
					        //            if (param != null)
 | 
				
			||||||
 | 
					        //                cmd.Parameters.Clear();
 | 
				
			||||||
 | 
					        //            return cmd.LastInsertedId;
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //        catch (Exception ex)
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            throw ex;
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //public static bool ExecuteNonQueryList(List<string> sqlList, List<MySqlParameter[]> paramList)
 | 
				
			||||||
 | 
					        //{
 | 
				
			||||||
 | 
					        //    using (MySqlConnection conn = new MySqlConnection(ConfigurationManager.ConnectionStrings["dbConnect"].ConnectionString))
 | 
				
			||||||
 | 
					        //    {
 | 
				
			||||||
 | 
					        //        try
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            conn.Open();
 | 
				
			||||||
 | 
					        //            MySqlTransaction transaction = conn.BeginTransaction();
 | 
				
			||||||
 | 
					        //            MySqlCommand cmd = conn.CreateCommand();
 | 
				
			||||||
 | 
					        //            cmd.Transaction = transaction;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //            try
 | 
				
			||||||
 | 
					        //            {
 | 
				
			||||||
 | 
					        //                for (int i = 0; i < sqlList.Count; i++)
 | 
				
			||||||
 | 
					        //                {
 | 
				
			||||||
 | 
					        //                    cmd.CommandText = sqlList[i];
 | 
				
			||||||
 | 
					        //                    cmd.Parameters.AddRange(paramList[i]);
 | 
				
			||||||
 | 
					        //                    cmd.ExecuteNonQuery();
 | 
				
			||||||
 | 
					        //                    cmd.Parameters.Clear();//添加这一句即可解决此问题
 | 
				
			||||||
 | 
					        //                }
 | 
				
			||||||
 | 
					        //                transaction.Commit();
 | 
				
			||||||
 | 
					        //                return true;
 | 
				
			||||||
 | 
					        //            }
 | 
				
			||||||
 | 
					        //            catch (Exception ex)
 | 
				
			||||||
 | 
					        //            {
 | 
				
			||||||
 | 
					        //                //logs.Log.WriteLine("错误原因:" + ex.Message);
 | 
				
			||||||
 | 
					        //                try
 | 
				
			||||||
 | 
					        //                {
 | 
				
			||||||
 | 
					        //                    //logs.Log.WriteLine("事物回滚");
 | 
				
			||||||
 | 
					        //                    transaction.Rollback();//出现错误就回滚...
 | 
				
			||||||
 | 
					        //                }
 | 
				
			||||||
 | 
					        //                catch (Exception ex1)
 | 
				
			||||||
 | 
					        //                {
 | 
				
			||||||
 | 
					        //                    throw ex1;
 | 
				
			||||||
 | 
					        //                }
 | 
				
			||||||
 | 
					        //                throw ex;
 | 
				
			||||||
 | 
					        //            }
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //        catch (Exception ex)
 | 
				
			||||||
 | 
					        //        {
 | 
				
			||||||
 | 
					        //            throw ex;
 | 
				
			||||||
 | 
					        //        }
 | 
				
			||||||
 | 
					        //    }
 | 
				
			||||||
 | 
					        //}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||