zhengly преди 2 години
родител
ревизия
95e57b2ec6

+ 0 - 6
MicroServices/Business/Business.Application.Contracts/Business.Application.Contracts.csproj

@@ -19,12 +19,6 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <Compile Remove="MES\**" />
-    <EmbeddedResource Remove="MES\**" />
-    <None Remove="MES\**" />
-  </ItemGroup>
-
-  <ItemGroup>
     <None Remove="Localization\Business\cs.json" />
     <None Remove="Localization\Business\en.json" />
     <None Remove="Localization\Business\zh-Hans.json" />

+ 15 - 0
MicroServices/Business/Business.Application.Contracts/MES/ISyncMESAppService.cs

@@ -0,0 +1,15 @@
+using Business.Dto;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+
+namespace Business.MES
+{
+    public interface ISyncMESAppService : IApplicationService
+    {
+       
+    }
+}

+ 0 - 3
MicroServices/Business/Business.Application/Business.Application.csproj

@@ -10,11 +10,8 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <Compile Remove="MES\**" />
     <Compile Remove="QMS\**" />
-    <EmbeddedResource Remove="MES\**" />
     <EmbeddedResource Remove="QMS\**" />
-    <None Remove="MES\**" />
     <None Remove="QMS\**" />
   </ItemGroup>
 

+ 60 - 0
MicroServices/Business/Business.Application/MES/SyncMESAppService.cs

@@ -0,0 +1,60 @@
+using Business.Core.Utilities;
+using Business.Dto;
+using Business.StructuredDB.MES;
+using Business.StructuredDB.SaleFcst;
+using Business.StructuredDB.WMS;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.Uow;
+using IUnitOfWorkManager = Volo.Abp.Uow.IUnitOfWorkManager;
+
+namespace Business.MES
+{
+    //DOP
+    public class SyncMESAppService : ApplicationService, ISyncMESAppService, ITransientDependency
+    {
+        #region 服务
+        /// <summary>
+        /// 生产日计划
+        /// </summary>
+        private readonly IRepository<mes_producedailyplan, long> _producedailyplan;
+        /// <summary>
+        ///  雪花算法
+        /// </summary>
+        SnowFlake snowFlake = new SnowFlake();
+        /// <summary>
+        /// 事务
+        /// </summary>
+        private readonly IUnitOfWorkManager _unitOfWorkManager;
+        #endregion
+        #region 构造函数
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        public SyncMESAppService(
+            IRepository<mes_producedailyplan, long> mes_producedailyplan,
+            IUnitOfWorkManager unitOfWorkManager,
+        ICurrentTenant currentTenant
+            )
+        {
+            _producedailyplan = mes_producedailyplan;
+            _unitOfWorkManager = unitOfWorkManager;
+        }
+        #endregion
+        /// <summary>
+        /// 生成日计划
+        /// </summary>
+        /// <param name="crm_Weekplans"></param>
+        public void SavaProducedailyplanData()
+        {
+           
+        }
+    }
+}

+ 121 - 0
MicroServices/Business/Business.Domain/StructuredDB/MES/mes_producedailyplan.cs

@@ -0,0 +1,121 @@
+using Business.Core.Attributes;
+using Business.Domain;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Business.StructuredDB.MES
+{
+
+    /// <summary>
+    ///  生产日计划表    
+    /// </summary>
+    [CollectionName("dopbase", "mes_moentry")]
+    [Comment("生产日计划表")]
+    public class mes_producedailyplan : BaseEntity
+    {
+        ///// <summary>
+        ///// 无    
+        ///// </summary>
+        //public long Id { get; set; }
+
+        /// <summary>
+        /// 产品线   
+        /// </summary>
+        [Comment("产品线")]
+        [StringLength(128)]
+        public string Line { get; set; }
+
+        /// <summary>
+        /// 生产周次  
+        /// </summary>
+        [Comment("生产周次")]
+        [StringLength(128)]
+        public string StartWeeks { get; set; }
+
+        /// <summary>
+        /// 生产指令单
+        /// </summary>
+        [Comment("生产指令单")]
+        [StringLength(128)]
+        public string ProductionOrder { get; set; }
+
+        /// <summary>
+        /// 生产批号
+        /// </summary>
+        [Comment("生产批号")]
+        [StringLength(128)]
+        public string ProduceNumber { get; set; }
+
+        /// <summary>
+        /// 料号   
+        /// </summary>
+        [Comment("料号")]
+        [StringLength(128)]
+        public string ItemNum { get; set; }
+
+        /// <summary>
+        /// 规格型号    
+        /// </summary>
+        [Comment("规格型号")]
+        [StringLength(128)]
+        public string Model { get; set; }
+
+        /// <summary>
+        /// 语种  
+        /// </summary>
+        [Comment("语种")]
+        [StringLength(50)]
+        public string Languages { get; set; }
+
+        /// <summary>
+        /// 是否打二维码
+        /// </summary>
+        [Comment("是否打二维码")]
+        public bool? IsQRCode { get; set; }
+
+        /// <summary>
+        /// 计划数量  
+        /// </summary>
+        [Comment("计划数量")]
+        [Precision(18, 5)]
+        public decimal? QtyOrded { get; set; }
+
+        /// <summary>
+        /// 计划开始时间  
+        /// </summary>
+        [Comment("计划开始时间")]
+        public DateTime? OrdDate { get; set; }
+
+        /// <summary>
+        /// 计划结束时间
+        /// </summary>
+        [Comment("计划结束时间")]
+        public DateTime? DueDate { get; set; }
+
+        /// <summary>
+        /// 工单状态
+        /// </summary>
+        [Comment("工单状态")]
+        [StringLength(50)]
+        public string Status { get; set; }
+
+        /// <summary>
+        /// 物料情况  
+        /// </summary>
+        [Comment("物料情况")]
+        [StringLength(50)]
+        public string MaterialSituation { get; set; }
+
+        /// <summary>
+        /// 灭菌日期
+        /// </summary>
+        [Comment("灭菌日期")]
+        public DateTime? SterilizationDate { get; set; }
+
+    }
+}

+ 67 - 0
MicroServices/Business/Business.Domain/StructuredDB/SaleFcst/crm_weekplan.cs

@@ -0,0 +1,67 @@
+using Business.Domain;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Business.StructuredDB.SaleFcst
+{
+
+    /// <summary>
+    ///  crm_weekplan    
+    /// </summary>
+    public class crm_weekplan : BaseEntity
+    {
+        /// <summary>
+        /// 无    
+        /// </summary>
+       // public long Id { get; set; }
+
+        /// <summary>
+        /// 订单号    
+        /// </summary>
+        public string OrderNo { get; set; }
+
+        /// <summary>
+        /// 规格型号    
+        /// </summary>
+        public string Model { get; set; }
+
+        /// <summary>
+        /// 生产线    
+        /// </summary>
+        public string ProdLine { get; set; }
+
+        /// <summary>
+        /// 产品类型    
+        /// </summary>
+        public string ProdType { get; set; }
+
+        /// <summary>
+        /// 计划数量    
+        /// </summary>
+        public decimal Qty { get; set; }
+
+        /// <summary>
+        /// 优先级    
+        /// </summary>
+        public string Priority { get; set; }
+
+        /// <summary>
+        /// 是否调整生产顺序    
+        /// </summary>
+        public string IsAdjust { get; set; }
+
+        /// <summary>
+        /// 开工周次    
+        /// </summary>
+        public string StartWeeks { get; set; }
+
+        /// <summary>
+        /// 预计结束周    
+        /// </summary>
+        public string EndWeeks { get; set; }
+
+    }
+}

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

@@ -1,4 +1,5 @@
 using Business.Domain;
+using Business.StructuredDB.MES;
 using Business.StructuredDB.WMS;
 using Microsoft.EntityFrameworkCore;
 using Volo.Abp.Data;
@@ -23,6 +24,10 @@ namespace Business.EntityFrameworkCore
         public DbSet<ic_substitute_group_detail> ic_substitute_group_detail { get; set; }
 
         public DbSet<b_bom_pretreatment> b_bom_pretreatment { get; set; }
+
+        #endregion
+        #region MES
+        public DbSet<mes_producedailyplan> mes_Producedailyplans { get; set; }
         #endregion
 
         #region Production