Browse Source

添加生成交货单接口

heteng 2 years ago
parent
commit
f402209828

+ 6 - 0
MicroServices/Business/Business.Application.Contracts/ReplenishmentManagement/IReplenishmentAppService.cs

@@ -95,5 +95,11 @@ namespace Business.ReplenishmentManagement
         /// <param name="companyId">工厂id</param>
         /// <returns></returns>
         Task<string> ChangePriority(string weekplanid, string tenant_id, string factory_id, string company_id, string itemNumber, string qty, string instockdate, string priority);
+
+        /// <summary>
+        /// 生成交货单
+        /// </summary>
+        /// <returns></returns>
+        Task<string> CreateDeliverySchedule(string domain);
     }
 }

+ 18 - 0
MicroServices/Business/Business.Application/ReplenishmentManagement/ReplenishmentAppService.cs

@@ -5961,5 +5961,23 @@ namespace Business.Replenishment
                 }
             }
         }
+
+        /// <summary>
+        /// 生成交货单
+        /// </summary>
+        /// <param name="domain"></param>
+        /// <returns></returns>
+        public async Task<string> CreateDeliverySchedule(string domain)
+        {
+            string Msg = "OK|交货单生成成功";
+            //获取已发布的交货计划数据
+            //获取货源清单数据
+
+            
+
+
+
+            return Msg;
+        }
     }
 }

+ 161 - 0
MicroServices/Business/Business.Domain/StructuredDB/MES/IC/srm_polist_ds.cs

@@ -0,0 +1,161 @@
+using Business.Core.Attributes;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Business.Domain
+{
+    /// <summary>
+    /// 交货单表
+    /// </summary>
+    [Comment("交货单表")]
+    public class srm_polist_ds
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        [Key]
+        public long Id { get; set; }
+
+        /// <summary>
+        /// 工厂编码
+        /// </summary>
+        [Comment("工厂编码")]
+        public string domain { get; set; }
+
+        /// <summary>
+        /// 交货计划id
+        /// </summary>
+        [Comment("交货计划id")]
+        public long icdsid { get; set; }
+
+        /// <summary>
+        /// 交货单号
+        /// </summary>
+        [Comment("交货单号")]
+        public string dsnum { get; set; }
+
+        /// <summary>
+        /// 状态:N-初始,P-已发布,C-关闭
+        /// </summary>
+        [Comment("状态")]
+        public string status { get; set; }
+
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        [Comment("物料编码")]
+        public string itemnum { get; set; }
+
+        /// <summary>
+        /// 单位
+        /// </summary>
+        [Comment("单位")]
+        public string um { get; set; }
+
+        /// <summary>
+        /// 采购组
+        /// </summary>
+        [Comment("采购组")]
+        public string purgroup { get; set; }
+
+        /// <summary>
+        /// 供应商编码
+        /// </summary>
+        [Comment("供应商编码")]
+        public string suppliercode { get; set; }
+
+        /// <summary>
+        /// 供应商
+        /// </summary>
+        [Comment("供应商")]
+        public string supplier { get; set; }
+
+        /// <summary>
+        /// 发布日期
+        /// </summary>
+        [Comment("发布日期")]
+        public DateTime? submitdate { get; set; }
+
+        /// <summary>
+        /// 交货日期
+        /// </summary>
+        [Comment("交货日期")]
+        public DateTime? requestdate { get; set; }
+
+        /// <summary>
+        /// 需求日期
+        /// </summary>
+        [Comment("需求日期")]
+        public DateTime? needdate { get; set; }
+
+        /// <summary>
+        /// 采购单号
+        /// </summary>
+        [Comment("采购单号")]
+        public string ponumber { get; set; }
+
+        /// <summary>
+        /// 采购单行号
+        /// </summary>
+        [Comment("采购单行号")]
+        public int poline { get; set; }
+
+
+        /// <summary>
+        /// 需求数量
+        /// </summary>
+        [Comment("需求数量")]
+        public decimal schedqty { get; set; }
+
+        /// <summary>
+        /// 最近交货日期
+        /// </summary>
+        [Comment("最近交货日期")]
+        public DateTime? lastsentdate { get; set; }
+
+        /// <summary>
+        /// 最近交货数量
+        /// </summary>
+        [Comment("最近交货数量")]
+        public decimal lastsentqty { get; set; }
+
+        /// <summary>
+        /// 已交货数量
+        /// </summary>
+        [Comment("已交货数量")]
+        public decimal sentqty { get; set; }
+
+        /// <summary>
+        /// 剩余采购数量
+        /// </summary>
+        [Comment("剩余采购数量")]
+        public decimal restqty { get; set; }
+
+        /// <summary>
+        /// 创建人
+        /// </summary>
+        [Comment("创建人")]
+        public string createuser { get; set; }
+
+        /// <summary>
+        /// 修改人
+        /// </summary>
+        [Comment("修改人")]
+        public string updateuser { get; set; }
+
+        /// <summary>
+        /// 创建时间
+        /// </summary>
+        [Comment("创建时间")]
+        public DateTime? createtime { get; set; }
+
+        /// <summary>
+        /// 修改时间
+        /// </summary>
+        [Comment("修改时间")]
+        public DateTime? updatetime { get; set; }
+    }
+}

+ 5 - 0
MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/DOP/BusinessDbContext.cs

@@ -32,6 +32,11 @@ namespace Business.EntityFrameworkCore
 
         public DbSet<GetNbr> GetNbr { get; set; }
 
+        /// <summary>
+        /// ½»»õµ¥
+        /// </summary>
+        public DbSet<srm_polist_ds> srm_polist_ds { get; set; }
+
         #endregion
         #region MES
         public DbSet<mes_producedailyplan> mes_Producedailyplans { get; set; }

+ 12 - 0
MicroServices/Business/Business.HttpApi/Controllers/ReplenishmentController.cs

@@ -165,5 +165,17 @@ namespace Business.Controllers
         {
             return _ReplenishmentAppService.DeleteWeekPlan( weekplanid,productorder,factory_id);
         }
+
+        /// <summary>
+        /// 生成交货计划
+        /// </summary>
+        /// <param name="domain"></param>
+        /// <returns></returns>
+        [HttpGet]
+        [Route("CreateDeliverySchedule")]
+        public Task<string> CreateDeliverySchedule(string domain)
+        {
+            return _ReplenishmentAppService.CreateDeliverySchedule(domain);
+        }
     }
 }