HKC_Blazor/MasaBlazorApp3/Pojo/MachineRecord.cs

150 lines
4.1 KiB
C#
Raw Permalink Normal View History

2025-04-18 11:01:56 +08:00
using LinqToDB.Mapping;
using MasaBlazorApp3.Pojo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
namespace MasaBlazorApp3.Pojo
{
[Table("dm_machine_record")]
public class MachineRecord
{
/// <summary>
/// 主键
///</summary>
[Column("id", IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
/// <summary>
/// 设备id
///</summary>
[Column("machine_id")]
public string MachineId { get; set; }
/// <summary>
/// 药品id
///</summary>
[Column("drug_id")]
public string DrugId { get; set; }
[Association(ThisKey = nameof(DrugId), OtherKey = nameof(DrugInfo.DrugId))]
public DrugInfo Drug { get; set; }
/// <summary>
/// 数量
///</summary>
[Column("quantity")]
public int Quantity { get; set; }
/// <summary>
/// 批号
///</summary>
[Column("manu_no")]
public string ManuNo { get; set; }
/// <summary>
/// 操作人id
///</summary>
[Column("operator")]
public int? Operator { get; set; }
[Association(ThisKey = nameof(Operator), OtherKey = nameof(User.Id))]
public User OperatorUser { get; set; }
/// <summary>
/// 审核人id
///</summary>
[Column("reviewer")]
public int? Reviewer { get; set; }
[Association(ThisKey = nameof(Reviewer), OtherKey = nameof(User.Id))]
public User ReviewerUser { get; set; }
/// <summary>
/// 操作时间
/// 默认值: CURRENT_TIMESTAMP
///</summary>
[Column("operation_time")]
public DateTime OperationTime { get; set; }
/// <summary>
/// 效期
///</summary>
[Column("eff_date")]
public DateTime? EffDate { get; set; }
/// <summary>
2025-07-28 15:07:58 +08:00
/// 出库入库类型(1入库2出库4盘点31还药32还空瓶,21药箱移出移入69药箱药品替换55药箱套餐绑定解绑)
2025-04-18 11:01:56 +08:00
///</summary>
[Column("type")]
public int Type { get; set; }
/// <summary>
/// 出入库调拨单id
///</summary>
[Column("invoice_id")]
public string InvoiceId { get; set; }
/// <summary>
/// 列号
///</summary>
[Column("col_no")]
public int ColNo { get; set; }
/// <summary>
/// 抽屉号
///</summary>
[Column("drawer_no")]
public int DrawerNo { get; set; }
/// <summary>
/// 取药科室
///</summary>
[Column("department_id")]
public string DepartmentId { get; set; }
/// <summary>
/// 是否已经退药(0:没有1:还了部分2:完成)
/// 默认值: 0
///</summary>
[Column("status")]
public int Status { get; set; }
/// <summary>
/// 退药量
/// 默认值: 0
///</summary>
[Column("return_quantity1")]
public int ReturnQuantity1 { get; set; }
/// <summary>
/// 退空瓶量
/// 默认值: 0
///</summary>
[Column("return_quantity2")]
public int ReturnQuantity2 { get; set; }
[Column(IsColumn = false)]
public int CurrentReturnQuantity { get; set; }
/// <summary>
/// 取药记录id
///</summary>
[Column("get_id")]
public int? GetId { get; set; }
/// <summary>
/// 是否已经销毁
/// 默认值: 0
///</summary>
[Column("is_destroy")]
public int? IsDestroy { get; set; }
[Column(IsColumn = false)]
public int CanReturnQuantity
{
get => Quantity - ReturnQuantity1 - ReturnQuantity2;
}
//是否选中
[Column(IsColumn = false)]
public bool IsSelected { get; set; }
[Column(IsColumn =false)]
public string Location
{
get => DrawerNo + "-" + ColNo;
}
}
}