zhengly 3 anni fa
parent
commit
9ea7baac0a

+ 8 - 1
MicroServices/Business/Business.Application/ResourceExamineManagement/ResourceExamineAppService.cs

@@ -48,6 +48,10 @@ namespace Business.ResourceExamineManagement
         /// 物料BOM明细
         /// </summary>
         private readonly IMongoDB<ic_bom_child> _ic_bom_child;
+        /// <summary>
+        /// 生产工单主表
+        /// </summary>
+        private readonly IMongoDB<mes_morder> _mes_morder;
         #endregion
 
         /// <summary>
@@ -59,13 +63,15 @@ namespace Business.ResourceExamineManagement
             IMongoDB<mes_technique> mes_technique,
             IMongoDB<ic_item> ic_item,
             IMongoDB<ic_bom> ic_bom,
-            IMongoDB<ic_bom_child> ic_bom_child
+            IMongoDB<ic_bom_child> ic_bom_child,
+            IMongoDB<mes_morder> mes_morder
             )
         {
             _mes_technique = mes_technique;
             _ic_item = ic_item;
             _ic_bom = ic_bom;
             _ic_bom_child = ic_bom_child;
+            _mes_morder = mes_morder;
         }
 
         /// <summary>
@@ -110,6 +116,7 @@ namespace Business.ResourceExamineManagement
                 //TODO:入参异常;
                 //throw new NotImplementedException();
             }
+            //var morderList = _mes_morder.(a => a.Id == ObjectId.Parse(id)).ToList().FirstOrDefault();
             //查询生产工单类型为计划工单并且工单类型为备库工单 并且BOM编码一致数据
             // 订单状态为 初始或下达工单
             // List =>数量满足Quantity && 生成工单结束日期最早

+ 13 - 5
MicroServices/Business/Bussiness.Model/Production/mes_morder.cs

@@ -69,7 +69,7 @@ namespace Bussiness.Model.Production
         /// 生产工单日期
         /// </summary>
         [Description("生产工单日期")]
-        public  DateTime? morder_date { get; set; }
+        public DateTime? morder_date { get; set; }
         /// <summary>
         /// 生产工单状态(订单状态:初始,下达,暂停、完成)
         /// </summary>
@@ -193,7 +193,9 @@ namespace Bussiness.Model.Production
         /// <summary>
         /// 单位
         /// </summary>
-       // public string unit { get; set; }
+        [StringLength(80)]
+        [Description("单位")]
+        public string? unit { get; set; }
         /// <summary>
         /// 工单进度
         /// </summary>
@@ -209,15 +211,21 @@ namespace Bussiness.Model.Production
         /// <summary>
         /// 工单生产数量(计划数量)
         /// </summary>
-       // public decimal? morder_production_number { get; set; }
+        [Precision(20, 8)]
+        [Description("工单生产数量(计划数量)")]
+        public decimal? morder_production_number { get; set; }
         /// <summary>
         /// 需求数量
         /// </summary>
-      //  public decimal? need_number { get; set; }
+        [Precision(20, 8)]
+        [Description("需求数量")]
+        public decimal? need_number { get; set; }
         /// <summary>
         /// 剩余可用数量
         /// </summary>
-      //  public decimal? remaining_number { get; set; }
+        [Precision(20, 8)]
+        [Description("剩余可用数量")]
+        public decimal? remaining_number { get; set; }
         /// <summary>
         /// 报工数量
         /// </summary>