AdoS5IqcSqeDisposition.cs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. using Admin.NET.Core;
  2. namespace Admin.NET.Plugin.AiDOP.Entity;
  3. /// <summary>
  4. /// S5 来料检验 SQE 处置记录。
  5. ///
  6. /// 不合格来料检验单(qms_qcp_inspbill.pd=1)经检验主管通过后进入 N3_SQE_DISPOSITION,
  7. /// SQE 提交处置方案落此表。disposition_type 复用 clfs 编码(0 让步接收 / 1 挑选 / 2 报废),
  8. /// 不覆盖 qms_qcp_inspbill.clfs。本批不做仓储确认/库存/入库/附件上传(attachment_json 预留)。
  9. /// 一单一有效处置由 service 校验(status=1 且未软删)。
  10. /// </summary>
  11. [SugarTable("ado_s5_iqc_sqe_disposition", "S5 来料检验SQE处置")]
  12. [SugarIndex("idx_s5_sqe_disp_inspbill", nameof(InspbillId), OrderByType.Asc)]
  13. [SugarIndex("idx_s5_sqe_disp_flow", nameof(FlowInstanceId), OrderByType.Asc)]
  14. [SugarIndex("uk_s5_sqe_disp_no", nameof(DispositionNo), OrderByType.Asc, true)]
  15. [SugarIndex("idx_s5_sqe_disp_status", nameof(Status), OrderByType.Asc)]
  16. public class AdoS5IqcSqeDisposition : EntityBaseDel, ITenantIdFilter
  17. {
  18. /// <summary>租户</summary>
  19. [SugarColumn(ColumnName = "tenant_id", ColumnDescription = "租户", IsNullable = true)]
  20. public long? TenantId { get; set; }
  21. /// <summary>工厂/组织</summary>
  22. [SugarColumn(ColumnName = "org_id", ColumnDescription = "工厂/组织", IsNullable = true)]
  23. public long? OrgId { get; set; }
  24. /// <summary>检验单 id(qms_qcp_inspbill.id)</summary>
  25. [SugarColumn(ColumnName = "inspbill_id", ColumnDescription = "检验单id")]
  26. public long InspbillId { get; set; }
  27. /// <summary>检验单号(FBILLNO)</summary>
  28. [SugarColumn(ColumnName = "inspbill_no", ColumnDescription = "检验单号", Length = 80)]
  29. public string InspbillNo { get; set; } = string.Empty;
  30. /// <summary>来源单号(lydjbh)</summary>
  31. [SugarColumn(ColumnName = "source_bill_no", ColumnDescription = "来源单号", Length = 255, IsNullable = true)]
  32. public string? SourceBillNo { get; set; }
  33. /// <summary>业务类型</summary>
  34. [SugarColumn(ColumnName = "biz_type", ColumnDescription = "业务类型", Length = 80, IsNullable = true)]
  35. public string? BizType { get; set; } = "S5_IQC_INSPBILL";
  36. /// <summary>流程实例 id</summary>
  37. [SugarColumn(ColumnName = "flow_instance_id", ColumnDescription = "流程实例id", IsNullable = true)]
  38. public long? FlowInstanceId { get; set; }
  39. /// <summary>处置单号(唯一)</summary>
  40. [SugarColumn(ColumnName = "disposition_no", ColumnDescription = "处置单号", Length = 80)]
  41. public string DispositionNo { get; set; } = string.Empty;
  42. /// <summary>处置方式:0 让步接收 / 1 挑选 / 2 报废</summary>
  43. [SugarColumn(ColumnName = "disposition_type", ColumnDescription = "处置方式")]
  44. public int DispositionType { get; set; }
  45. /// <summary>处置数量</summary>
  46. [SugarColumn(ColumnName = "disposition_qty", ColumnDescription = "处置数量", Length = 18, DecimalDigits = 6, IsNullable = true)]
  47. public decimal? DispositionQty { get; set; }
  48. /// <summary>让步接收数量</summary>
  49. [SugarColumn(ColumnName = "concession_qty", ColumnDescription = "让步接收数量", Length = 18, DecimalDigits = 6, IsNullable = true)]
  50. public decimal? ConcessionQty { get; set; }
  51. /// <summary>挑选数量</summary>
  52. [SugarColumn(ColumnName = "selection_qty", ColumnDescription = "挑选数量", Length = 18, DecimalDigits = 6, IsNullable = true)]
  53. public decimal? SelectionQty { get; set; }
  54. /// <summary>报废数量</summary>
  55. [SugarColumn(ColumnName = "scrap_qty", ColumnDescription = "报废数量", Length = 18, DecimalDigits = 6, IsNullable = true)]
  56. public decimal? ScrapQty { get; set; }
  57. /// <summary>供应商回复</summary>
  58. [SugarColumn(ColumnName = "supplier_response", ColumnDescription = "供应商回复", Length = 500, IsNullable = true)]
  59. public string? SupplierResponse { get; set; }
  60. /// <summary>处置意见</summary>
  61. [SugarColumn(ColumnName = "disposition_opinion", ColumnDescription = "处置意见", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
  62. public string? DispositionOpinion { get; set; }
  63. /// <summary>附件 JSON(预留)</summary>
  64. [SugarColumn(ColumnName = "attachment_json", ColumnDescription = "附件JSON", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
  65. public string? AttachmentJson { get; set; }
  66. /// <summary>SQE 处理人 id</summary>
  67. [SugarColumn(ColumnName = "sqe_user_id", ColumnDescription = "SQE处理人id", IsNullable = true)]
  68. public long? SqeUserId { get; set; }
  69. /// <summary>SQE 处理人名</summary>
  70. [SugarColumn(ColumnName = "sqe_user_name", ColumnDescription = "SQE处理人名", Length = 100, IsNullable = true)]
  71. public string? SqeUserName { get; set; }
  72. /// <summary>状态:1 已提交(本批最小)</summary>
  73. [SugarColumn(ColumnName = "status", ColumnDescription = "状态")]
  74. public int Status { get; set; }
  75. /// <summary>提交时间</summary>
  76. [SugarColumn(ColumnName = "submitted_at", ColumnDescription = "提交时间", IsNullable = true)]
  77. public DateTime? SubmittedAt { get; set; }
  78. /// <summary>确认人(预留)</summary>
  79. [SugarColumn(ColumnName = "confirmed_by", ColumnDescription = "确认人", IsNullable = true)]
  80. public long? ConfirmedBy { get; set; }
  81. /// <summary>确认时间(预留)</summary>
  82. [SugarColumn(ColumnName = "confirmed_at", ColumnDescription = "确认时间", IsNullable = true)]
  83. public DateTime? ConfirmedAt { get; set; }
  84. }