Sfoglia il codice sorgente

Merge branch 'dev' of http://123.60.180.165:4647/ZZYDOP/DOPCore into dev

Murphy 3 anni fa
parent
commit
3360e2e461

+ 1 - 0
.gitignore

@@ -2013,3 +2013,4 @@ MicroServices/Procurement/.vs/Procurement/FileContentIndex/316493c3-bf00-46cd-9f
 MicroServices/Procurement/.vs/Procurement/FileContentIndex/8b5dac13-26c6-45da-a584-20c12fb7234d.vsidx
 MicroServices/Procurement/.vs/ProjectEvaluation/procurement.metadata.v5.2
 MicroServices/Procurement/.vs/ProjectEvaluation/procurement.projects.v5.2
+MicroServices/Business/Bussiness.MongoModel/bin/Debug/net6.0/Bussiness.MongoModel.deps.json

+ 24 - 0
MicroServices/Business/Business.Application.Contracts/Dto/InventoryDto.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Business.Business.Dto
+{
+    /// <summary>
+    /// 库存占用Dto
+    /// </summary>
+    public class InventoryDto
+    {
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        public string ItemNum { get; set; }
+
+        /// <summary>
+        /// 占用数量
+        /// </summary>
+        public decimal OccupyQty { get; set; }
+    }
+}

+ 125 - 0
MicroServices/Business/Business.Application/Quartz/ProductionScheduleAppService.cs

@@ -0,0 +1,125 @@
+using Business.Business.Dto;
+using Bussiness.Model.MES.IC;
+using Bussiness.Model.Production;
+using Bussiness.Model.SRM;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Validation.Localization;
+
+namespace Business.Quartz
+{
+    /// <summary>
+    /// 生产排产服务
+    /// </summary>
+    public class ProductionScheduleAppService : ApplicationService
+    {
+        /// <summary>
+        /// 物料
+        /// </summary>
+        private IRepository<ItemMaster, long> _itemMaster;
+
+        /// <summary>
+        /// 工单
+        /// </summary>
+        private IRepository<WorkOrdMaster, long> _workOrdMaster;
+
+        /// <summary>
+        /// 工单物料明细
+        /// </summary>
+        private IRepository<WorkOrdDetail, long> _workOrdDetail;
+
+        /// <summary>
+        /// 工单工艺路线明细
+        /// </summary>
+        private IRepository<WorkOrdRouting, long> _workOrdRouting;
+
+        /// <summary>
+        /// 库存主数据
+        /// </summary>
+        private IRepository<InvMaster, long> _invMaster;
+
+        /// <summary>
+        /// 生产线明细
+        /// </summary>
+        private IRepository<ProdLineDetail, long> _prodLineDetail;
+
+        /// <summary>
+        /// 生产周期明细
+        /// </summary>
+        private IRepository<PeriodSequenceDet, long> _periodSequenceDet;
+
+        /// <summary>
+        /// 排产结果明细
+        /// </summary>
+        private IRepository<ScheduleResultOpMaster, long> _scheduleResultOpMaster;
+
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        public ProductionScheduleAppService(
+            IRepository<ItemMaster, long> itemMaster,
+            IRepository<WorkOrdMaster, long> workOrdMaster,
+            IRepository<WorkOrdDetail, long> workOrdDetail,
+            IRepository<WorkOrdRouting, long> workOrdRouting,
+            IRepository<ProdLineDetail, long> prodLineDetail,
+            IRepository<PeriodSequenceDet, long> periodSequenceDet,
+            IRepository<ScheduleResultOpMaster, long> scheduleResultOpMaster,
+            IRepository<InvMaster, long> invMaster
+            )
+        { 
+            _itemMaster= itemMaster;
+            _workOrdMaster= workOrdMaster;
+            _workOrdDetail= workOrdDetail;
+            _workOrdRouting= workOrdRouting;
+            _prodLineDetail = prodLineDetail;
+            _periodSequenceDet = periodSequenceDet;
+            _scheduleResultOpMaster= scheduleResultOpMaster;
+            _invMaster= invMaster;
+        }
+
+        /// <summary>
+        /// 执行生产排产
+        /// </summary>
+        public async void DoExt()
+        {
+            await DoProductShcedule();
+        }
+
+        /// <summary>
+        /// 生产排产
+        /// </summary>
+        public async Task DoProductShcedule()
+        {
+            //1、获取需要排产的工单:Status为空且IsActive==1
+            List<WorkOrdMaster> workOrds = _workOrdMaster.GetListAsync(p => string.IsNullOrEmpty(p.Status) && p.IsActive ==1).Result;
+            if (workOrds.Count == 0)
+            {
+                return;
+            }
+            //2、获取数据
+            //获取工单工艺路径数据
+            List<WorkOrdRouting> workOrdRoutings = _workOrdRouting.GetListAsync(p => workOrds.Select(m=>m.WorkOrd).Contains(p.WorkOrd) && p.Domain == "1001" && p.Status != "C" && p.IsActive == 1).Result;
+            //获取物料对应的生产线信息:物料、工序对应的生产线
+            List<ProdLineDetail> prodLineDetails = _prodLineDetail.GetListAsync(p => workOrds.Select(m => m.ItemNum).Contains(p.Part) && p.Domain == "1001" && p.Status != "C" && p.IsActive == 1).Result;
+            //获取当前日期往后的排产记录数据
+            List<ScheduleResultOpMaster> schedules = _scheduleResultOpMaster.GetListAsync(p=>workOrds.Select(m=>m.ItemNum).Contains(p.ItemNum) && p.Domain == "1001").Result;
+
+            //3、排产
+            //排产结果(记录所有工序的排产情况)
+            List<ScheduleResultOpMaster> scheduleResults = new List<ScheduleResultOpMaster>();
+            //生产周期(记录最后一个工序的排产情况)
+            List<PeriodSequenceDet> periodsDet = new List<PeriodSequenceDet>();
+            foreach (var item in workOrds)
+            {
+
+            }
+        
+        }
+
+    }
+}

+ 38 - 0
MicroServices/Business/Business.Application/Quartz/ProductionScheduleJob.cs

@@ -0,0 +1,38 @@
+using Quartz;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Business.Quartz
+{
+    /// <summary>
+    /// 排产定时任务
+    /// </summary>
+    public class ProductionScheduleJob : IJob
+    {
+        public readonly ProductionScheduleAppService _appService;
+
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        public ProductionScheduleJob(ProductionScheduleAppService appService)
+        {
+            _appService = appService;
+        }
+
+        /// <summary>
+        /// 执行
+        /// </summary>
+        /// <param name="context"></param>
+        /// <returns></returns>
+        /// <exception cref="NotImplementedException"></exception>
+        public Task Execute(IJobExecutionContext context)
+        {
+            _appService.DoExt();
+
+            return Task.CompletedTask;
+        }
+    }
+}

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

@@ -127,6 +127,56 @@ namespace Business.EntityFrameworkCore
         public DbSet<mes_workshop> mes_workshop { get; set; }
         public DbSet<mes_workshop_shelf> mes_workshop_shelf { get; set; }
         #endregion
+
+        #region ProductionSchedule
+
+        /// <summary>
+        /// 膠죕깊
+        /// </summary>
+        public DbSet<ItemMaster> ItemMaster { get; set; }
+
+        /// <summary>
+        /// 膠죕데앴깊
+        /// </summary>
+        public DbSet<NbrMaster> NbrMaster { get; set; }
+
+        /// <summary>
+        /// 膠죕데앴츠玖깊
+        /// </summary>
+        public DbSet<NbrDetail> NbrDetail { get; set; }
+
+        /// <summary>
+        /// �끓鷺퍅깊
+        /// </summary>
+        public DbSet<PeriodSequenceDet> PeriodSequenceDet { get; set; }
+
+        /// <summary>
+        /// �끓窟츠玖깊
+        /// </summary>
+        public DbSet<ProdLineDetail> ProdLineDetail { get; set; }
+
+        /// <summary>
+        /// 묏데탤끓션쩌깊
+        /// </summary>
+        public DbSet<ScheduleResultOpMaster> ScheduleResultOpMaster { get; set; }
+
+        /// <summary>
+        /// 묏데膠죕츠玖깊
+        /// </summary>
+        public DbSet<WorkOrdDetail> WorkOrdDetail { get; set; }
+
+        /// <summary>
+        /// 묏데寮깊
+        /// </summary>
+        public DbSet<WorkOrdMaster> WorkOrdMaster { get; set; }
+
+        /// <summary>
+        /// 묏데묏論쨌窟깊
+        /// </summary>
+        public DbSet<WorkOrdRouting> WorkOrdRouting { get; set; }
+
+        #endregion
+
         //Code generation...
         public BusinessDbContext(DbContextOptions<BusinessDbContext> options)
             : base(options)

+ 9 - 0
MicroServices/Business/Business.Host/BusinessHostModule.cs

@@ -133,6 +133,15 @@ namespace Business
                     .WithIdentity("ExtJob-trigger")
                     .WithCronSchedule("0 01 01 * * ?")
                     .WithDescription("定时处理金蝶同步到Ext数据库的数据"));
+
+                //var ProductionScheduleJobKey = new JobKey("ProductionScheduleJob");
+                //q.AddJob<ProductionScheduleJob>(opts => opts.WithIdentity(ProductionScheduleJobKey));
+
+                //q.AddTrigger(opts => opts
+                //    .ForJob(ProductionScheduleJobKey)
+                //    .WithIdentity("ProductionScheduleJob-trigger")
+                //    .WithCronSchedule("0 01 01 * * ?")
+                //    .WithDescription("定时排产任务"));
             });
             context.Services.AddQuartzServer(options =>
             {

+ 53 - 0
MicroServices/Business/Bussiness.Model/MES/IC/InvMaster.cs

@@ -0,0 +1,53 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.MES.IC
+{
+    /// <summary>
+    /// 库存主数据表
+    /// </summary>
+    [Comment("库存主数据表")]
+    public class InvMaster : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 库位
+        /// </summary>
+        [Comment("库位")]
+        public string? Location { get; set; }
+
+        /// <summary>
+        /// 物料编号
+        /// </summary>
+        [Comment("物料编号")]
+        public string? ItemNum { get; set; }
+
+        /// <summary>
+        /// 库存数量
+        /// </summary>
+        [Comment("库存数量")]
+        public decimal? QtyOnHand { get; set; }
+
+        /// <summary>
+        /// 是否有效:1-有效;0-无效
+        /// </summary>
+        [Comment("是否有效")]
+        public int? IsActive { get; set; }
+    }
+}

+ 61 - 0
MicroServices/Business/Bussiness.Model/MES/IC/ItemMaster.cs

@@ -0,0 +1,61 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.MES.IC
+{
+    /// <summary>
+    /// 物料主表
+    /// </summary>
+    [Comment("物料主表")]
+    public class ItemMaster : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 物料编号
+        /// </summary>
+        [Comment("物料编号")]
+        public string? ItemNum { get; set; }
+
+        /// <summary>
+        /// 单位
+        /// </summary>
+        [Comment("单位")]
+        public string? UM { get; set; }
+
+        /// <summary>
+        /// 安全库存
+        /// </summary>
+        [Comment("安全库存")]
+        public decimal? SafetyStk { get; set; }
+
+        /// <summary>
+        /// 状态:C为不可用状态
+        /// </summary>
+        [Comment("状态")]
+        public string? Status { get; set; }
+
+        /// <summary>
+        /// 是否有效:1-有效;0-无效
+        /// </summary>
+        [Comment("是否有效")]
+        public int? IsActive { get; set; }
+
+    }
+}

+ 77 - 0
MicroServices/Business/Bussiness.Model/MES/IC/NbrDetail.cs

@@ -0,0 +1,77 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.MES.IC
+{
+    /// <summary>
+    /// 物料单据明细表
+    /// </summary>
+    [Comment("物料单据明细表")]
+    public class NbrDetail : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 类型
+        /// </summary>
+        [Comment("类型")]
+        public string? Type { get; set; }
+
+        /// <summary>
+        /// 单据编号
+        /// </summary>
+        [Comment("单据编号")]
+        public string? Nbr { get; set; }
+
+        /// <summary>
+        /// 物料编号
+        /// </summary>
+        [Comment("物料编号")]
+        public string? ItemNum { get; set; }
+
+        /// <summary>
+        /// 转出数量
+        /// </summary>
+        [Comment("转出数量")]
+        public decimal? QtyFrom { get; set; }
+
+        /// <summary>
+        /// 转入数量
+        /// </summary>
+        [Comment("转入数量")]
+        public decimal? QtyTo { get; set; }
+
+        /// <summary>
+        /// 工单
+        /// </summary>
+        [Comment("工单")]
+        public string? WorkOrd { get; set; }
+
+        /// <summary>
+        /// 订单数量
+        /// </summary>
+        [Comment("订单数量")]
+        public decimal? QtyOrd { get; set; }
+
+        /// <summary>
+        /// 是否有效:1-有效;0-无效
+        /// </summary>
+        [Comment("是否有效")]
+        public int? IsActive { get; set; }
+    }
+}

+ 78 - 0
MicroServices/Business/Bussiness.Model/MES/IC/NbrMaster.cs

@@ -0,0 +1,78 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.MES.IC
+{
+    /// <summary>
+    /// 物料单据表
+    /// </summary>
+    [Comment("物料单据表")]
+    public class NbrMaster : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 类型
+        /// </summary>
+        [Comment("类型")]
+        public string? Type { get; set; }
+
+        /// <summary>
+        /// 单据编号
+        /// </summary>
+        [Comment("单据编号")]
+        public string? Nbr { get; set; }
+
+        /// <summary>
+        /// 备注
+        /// </summary>
+        [Comment("备注")]
+        public string? Remark { get; set; }
+
+        /// <summary>
+        /// 日期
+        /// </summary>
+        [Comment("日期")]
+        public DateTime? Date { get; set; }
+
+        /// <summary>
+        /// 状态:C为不可用状态
+        /// </summary>
+        [Comment("状态")]
+        public string? Status { get; set; }
+
+        /// <summary>
+        /// 工单
+        /// </summary>
+        [Comment("工单")]
+        public string? WorkOrd { get; set; }
+
+        /// <summary>
+        /// 订单数量
+        /// </summary>
+        [Comment("订单数量")]
+        public decimal QtyOrd { get; set; }
+
+        /// <summary>
+        /// 是否有效:1-有效;0-无效
+        /// </summary>
+        [Comment("是否有效")]
+        public int IsActive { get; set; }
+    }
+}

+ 71 - 0
MicroServices/Business/Bussiness.Model/Production/PeriodSequenceDet.cs

@@ -0,0 +1,71 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.Production
+{
+    /// <summary>
+    /// 生产周期表
+    /// </summary>
+    [Comment("生产周期表")]
+    public class PeriodSequenceDet : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 生产线
+        /// </summary>
+        [Comment("生产线")]
+        public string? Line { get; set; }
+
+        /// <summary>
+        /// 物料编号
+        /// </summary>
+        [Comment("物料编号")]
+        public string? ItemNum { get; set; }
+
+        /// <summary>
+        /// 计划日期
+        /// </summary>
+        [Comment("计划日期")]
+        public DateTime? PlanDate { get; set; }
+
+        /// <summary>
+        /// 班次
+        /// </summary>
+        [Comment("班次")]
+        public int? Period { get; set; }
+
+        /// <summary>
+        /// 订单数量
+        /// </summary>
+        [Comment("订单数量")]
+        public decimal? OrdQty { get; set; }
+
+        /// <summary>
+        /// 工单
+        /// </summary>
+        [Comment("工单")]
+        public string? WorkOrds { get; set; }
+
+        /// <summary>
+        /// 是否有效:1-有效;0-无效
+        /// </summary>
+        [Comment("是否有效")]
+        public int? IsActive { get; set; }
+    }
+}

+ 65 - 0
MicroServices/Business/Bussiness.Model/Production/ProdLineDetail.cs

@@ -0,0 +1,65 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.Production
+{
+    /// <summary>
+    /// 生产线明细表
+    /// </summary>
+    [Comment("生产线明细表")]
+    public class ProdLineDetail : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 生产线
+        /// </summary>
+        [Comment("生产线")]
+        public string? Line { get; set; }
+
+        /// <summary>
+        /// 物料编号
+        /// </summary>
+        [Comment("物料编号")]
+        public string? Part { get; set; }
+
+        /// <summary>
+        /// 单位标准产能=Uph
+        /// </summary>
+        [Comment("单位标准产能")]
+        public decimal? Rate { get; set; }
+
+        /// <summary>
+        /// 工序
+        /// </summary>
+        [Comment("工序")]
+        public int? Op { get; set; }
+
+        /// <summary>
+        /// 状态:C为不可用状态
+        /// </summary>
+        [Comment("状态")]
+        public string? Status { get; set; }
+
+        /// <summary>
+        /// 是否有效:1-有效;0-无效
+        /// </summary>
+        [Comment("是否有效")]
+        public int? IsActive { get; set; }
+    }
+}

+ 90 - 0
MicroServices/Business/Bussiness.Model/Production/ScheduleResultOpMaster.cs

@@ -0,0 +1,90 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.Production
+{
+    /// <summary>
+    /// 工单排产记录表
+    /// </summary>
+    [Comment("工单排产记录表")]
+    public class ScheduleResultOpMaster : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 工单
+        /// </summary>
+        [Comment("工单")]
+        public string? WorkOrd { get; set; }
+
+        /// <summary>
+        /// 生产线
+        /// </summary>
+        [Comment("生产线")]
+        public string? Line { get; set; }
+
+        /// <summary>
+        /// 物料编号
+        /// </summary>
+        [Comment("物料编号")]
+        public string? ItemNum { get; set; }
+
+        /// <summary>
+        /// 工序
+        /// </summary>
+        [Comment("工序")]
+        public int? Op { get; set; }
+
+        /// <summary>
+        /// 计划日期
+        /// </summary>
+        [Comment("计划日期")]
+        public DateTime? WorkDate { get; set; }
+
+        /// <summary>
+        /// 计划数量
+        /// </summary>
+        [Comment("计划数量")]
+        public decimal? WorkQty { get; set; }
+
+        /// <summary>
+        /// 换型开始时间
+        /// </summary>
+        [Comment("换型开始时间")]
+        public DateTime? SetupStartTime { get; set; }
+
+        /// <summary>
+        /// 换型结束时间
+        /// </summary>
+        [Comment("换型结束时间")]
+        public DateTime? SetupEndTime { get; set; }
+
+        /// <summary>
+        /// 开工时间
+        /// </summary>
+        [Comment("开工时间")]
+        public DateTime? WorkStartTime { get; set; }
+
+        /// <summary>
+        /// 结束时间
+        /// </summary>
+        [Comment("结束时间")]
+        public DateTime? WorkEndTime { get; set; }
+
+    }
+}

+ 77 - 0
MicroServices/Business/Bussiness.Model/Production/WorkOrdDetail.cs

@@ -0,0 +1,77 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.Production
+{
+    /// <summary>
+    /// 工单物料明细表
+    /// </summary>
+    [Comment("工单物料明细表")]
+    public class WorkOrdDetail : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 工单
+        /// </summary>
+        [Comment("工单")]
+        public string? WorkOrd { get; set; }
+
+        /// <summary>
+        /// 工序
+        /// </summary>
+        [Comment("工序")]
+        public int? Op { get; set; }
+
+        /// <summary>
+        /// 物料编号
+        /// </summary>
+        [Comment("物料编号")]
+        public string? ItemNum { get; set; }
+
+        /// <summary>
+        /// 需求数量
+        /// </summary>
+        [Comment("需求数量")]
+        public decimal? QtyRequired { get; set; }
+
+        /// <summary>
+        /// 发布数量
+        /// </summary>
+        [Comment("发布数量")]
+        public decimal? QtyPosted { get; set; }
+
+        /// <summary>
+        /// 退回数量
+        /// </summary>
+        [Comment("退回数量")]
+        public decimal? QtyReturned { get; set; }
+
+        /// <summary>
+        /// 状态:C为不可用状态
+        /// </summary>
+        [Comment("状态")]
+        public string? Status { get; set; }
+
+        /// <summary>
+        /// 是否有效:1-有效;0-无效
+        /// </summary>
+        [Comment("是否有效")]
+        public int? IsActive { get; set; }
+    }
+}

+ 89 - 0
MicroServices/Business/Bussiness.Model/Production/WorkOrdMaster.cs

@@ -0,0 +1,89 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.Production
+{
+    /// <summary>
+    /// 工单主表
+    /// </summary>
+    [Comment("工单主表")]
+    public class WorkOrdMaster : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 计划开始日期
+        /// </summary>
+        [Comment("计划开始日期")]
+        public DateTime? OrdDate { get; set; }
+
+        /// <summary>
+        /// 下达日期
+        /// </summary>
+        [Comment("下达日期")]
+        public DateTime? ReleaseDate { get; set; }
+
+        /// <summary>
+        /// 工单
+        /// </summary>
+        [Comment("工单")]
+        public string? WorkOrd { get; set; }
+
+        /// <summary>
+        /// 订单日期
+        /// </summary>
+        [Comment("订单日期")]
+        public DateTime? OrdDate { get; set; }
+
+        /// <summary>
+        /// 物料编号
+        /// </summary>
+        [Comment("物料编号")]
+        public string? ItemNum { get; set; }
+
+        /// <summary>
+        /// 订单数量
+        /// </summary>
+        [Comment("订单数量")]
+        public decimal? QtyOrded { get; set; }
+
+        /// <summary>
+        /// 工艺路线编码
+        /// </summary>
+        [Comment("工艺路线编码")]
+        public string? RoutingCode { get; set; }
+
+        /// <summary>
+        /// 优先级
+        /// </summary>
+        [Comment("优先级")]
+        public decimal? Priority { get; set; }
+
+        /// <summary>
+        /// 状态:C为不可用状态
+        /// </summary>
+        [Comment("状态")]
+        public string? Status { get; set; }
+
+        /// <summary>
+        /// 是否有效:1-有效;0-无效
+        /// </summary>
+        [Comment("是否有效")]
+        public int? IsActive { get; set; }
+    }
+}

+ 95 - 0
MicroServices/Business/Bussiness.Model/Production/WorkOrdRouting.cs

@@ -0,0 +1,95 @@
+using Business.Model;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bussiness.Model.Production
+{
+    /// <summary>
+    /// 工单工艺流程表
+    /// </summary>
+    [Comment("工单工艺流程表")]
+    public class WorkOrdRouting : BaseEntity
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        public int? RecID { get; set; }
+
+        /// <summary>
+        /// 域名
+        /// </summary>
+        [Comment("域名")]
+        public string? Domain { get; set; }
+
+        /// <summary>
+        /// 描述
+        /// </summary>
+        [Comment("描述")]
+        public string? Descr { get; set; }
+
+        /// <summary>
+        /// 到期日期
+        /// </summary>
+        [Comment("到期日期")]
+        public DateTime? DueDate { get; set; }
+
+        /// <summary>
+        /// 关键工序(需要报工的工序)
+        /// </summary>
+        [Comment("关键工序")]
+        public int? MilestoneOp { get; set; }
+
+        /// <summary>
+        /// 工单
+        /// </summary>
+        [Comment("工单")]
+        public string? WorkOrd { get; set; }
+
+        /// <summary>
+        /// 工序
+        /// </summary>
+        [Comment("工序")]
+        public int? OP { get; set; }
+
+        /// <summary>
+        /// 父级工序
+        /// </summary>
+        [Comment("父级工序")]
+        public int? ParentOp { get; set; }
+
+        /// <summary>
+        /// 物料编号
+        /// </summary>
+        [Comment("物料编号")]
+        public string? ItemNum { get; set; }
+
+        /// <summary>
+        /// 订单数量
+        /// </summary>
+        [Comment("订单数量")]
+        public decimal? QtyOrded { get; set; }
+
+        /// <summary>
+        /// 平行加工件数,下序开工前置数量
+        /// </summary>
+        [Comment("平行加工件数")]
+        public int? OverlapUnits { get; set; }
+
+        /// <summary>
+        /// 状态:C为不可用状态
+        /// </summary>
+        [Comment("状态")]
+        public string? Status { get; set; }
+
+        /// <summary>
+        /// 是否有效:1-有效;0-无效
+        /// </summary>
+        [Comment("是否有效")]
+        public int? IsActive { get; set; }
+    }
+}