Browse Source

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

tangdi 2 years ago
parent
commit
867f88eaf0

+ 39 - 0
MicroServices/Business/Business.Application.Contracts/Dto/InputDto.cs

@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Business.Dto
+{
+    /// <summary>
+    /// 产能分析入参Dto
+    /// </summary>
+    public class InputDto
+    {
+        /// <summary>
+        /// 年
+        /// </summary>
+        public int year { get; set; }
+
+        // <summary>
+        /// 月
+        /// </summary>
+        public int month { get; set; }
+
+        // <summary>
+        /// 版本号
+        /// </summary>
+        public string version { get; set; }
+
+        // <summary>
+        /// 集团id
+        /// </summary>
+        public long tenant_id { get; set; }
+
+        // <summary>
+        /// 工厂id
+        /// </summary>
+        public long factory_id { get; set; }
+    }
+}

+ 23 - 0
MicroServices/Business/Business.Application.Contracts/SaleForecast/IMonthlyCapacityLoadAppService.cs

@@ -0,0 +1,23 @@
+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.SaleForecast
+{
+    /// <summary>
+    /// 产能分析接口
+    /// </summary>
+    public interface IMonthlyCapacityLoadAppService: IApplicationService
+    {
+        /// <summary>
+        /// 产能分析
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        Task<string> CapacityAnalysis(InputDto input);
+    }
+}

+ 30 - 0
MicroServices/Business/Business.Application/SaleForecastManagement/MonthlyCapacityLoadAppService.cs

@@ -0,0 +1,30 @@
+using Abp.Application.Services;
+using Business.Dto;
+using Business.ResourceExamineManagement;
+using Business.SaleForecast;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.DependencyInjection;
+
+namespace Business.SaleForecastManagement
+{
+    /// <summary>
+    /// 产能分析
+    /// </summary>
+    public class MonthlyCapacityLoadAppService : ApplicationService, IMonthlyCapacityLoadAppService, ITransientDependency
+    {
+        /// <summary>
+        /// 产能分析
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        /// <exception cref="NotImplementedException"></exception>
+        public async Task<string> CapacityAnalysis(InputDto input)
+        {
+            return "ok";
+        }
+    }
+}

+ 49 - 0
MicroServices/Business/Business.HttpApi/Controllers/MonthlyCapacityLoadController.cs

@@ -0,0 +1,49 @@
+using Business.Dto;
+using Business.ResourceExamineManagement;
+using Business.SaleForecast;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.AspNetCore.Mvc;
+
+namespace Business.Controllers
+{
+    /// <summary>
+    /// 月度产能分析接口
+    /// </summary>
+    [RemoteService]
+    [Area("Business")]
+    [Route("api/business/monthly_capacity_load")]
+    public class MonthlyCapacityLoadController:AbpController
+    {
+        /// <summary>
+        /// 产能分析接口
+        /// </summary>
+        private readonly IMonthlyCapacityLoadAppService _MonthlyCapacityLoadAppService;
+
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        /// <param name="MonthlyCapacityLoadAppService"></param>
+        public MonthlyCapacityLoadController(IMonthlyCapacityLoadAppService MonthlyCapacityLoadAppService)
+        {
+            _MonthlyCapacityLoadAppService = MonthlyCapacityLoadAppService;
+        }
+
+        /// <summary>
+        /// 产能分析
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("capacityanalysis")]
+        public Task<string> CapacityAnalysis(InputDto input)
+        {
+            return _MonthlyCapacityLoadAppService.CapacityAnalysis(input);
+        }
+    }
+}

+ 111 - 0
MicroServices/Business/Bussiness.Model/Production/MonthlyProdCapacityDtl.cs

@@ -0,0 +1,111 @@
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Business.Model.Production
+{
+    /// <summary>
+    /// 月度产能共识明细表
+    /// </summary>
+    [Comment("月度产能共识主表")]
+    [Index(nameof(Year), nameof(Month), nameof(ProdLine), nameof(tenant_id), nameof(factory_id), IsUnique = true)]
+    public class MonthlyProdCapacityDtl
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        [Key]
+        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+        public long Id { get; set; }
+
+        /// <summary>
+        /// 年
+        /// </summary>
+        [Comment("年")]
+        public int? Year { get; set; }
+
+        /// <summary>
+        /// 月
+        /// </summary>
+        [Comment("月")]
+        public int? Month { get; set; }
+
+        /// <summary>
+        /// 生产线
+        /// </summary>
+        [Comment("生产线")]
+        public string? ProdLine { get; set; }
+
+        /// <summary>
+        /// 日工作时间(小时)
+        /// </summary>
+        [Comment("日工作时间(小时)")]
+        public decimal? DailyWorks { get; set; }
+
+        /// <summary>
+        /// 月工作天数(天)
+        /// </summary>
+        [Comment("月工作天数(天)")]
+        public decimal? YearWorks { get; set; }
+
+        /// <summary>
+        /// 班次数
+        /// </summary>
+        [Comment("班次数")]
+        public int? FlightQty { get; set; }
+
+        /// <summary>
+        /// 月度可利用工作时间(小时)
+        /// </summary>
+        [Comment("月度可利用工作时间(小时)")]
+        public decimal? AvailableTimes { get; set; }
+
+        /// <summary>
+        /// 月度需求工作时间(小时)
+        /// </summary>
+        [Comment("月度需求工作时间(小时)")]
+        public decimal? NeedWorks { get; set; }
+
+        /// <summary>
+        /// 排产效率
+        /// </summary>
+        [Comment("排产效率")]
+        public decimal? ProdRate { get; set; }
+
+        /// <summary>
+        /// 产线标准产能符合率
+        /// </summary>
+        [Comment("产线标准产能符合率")]
+        public decimal? Rate { get; set; }
+
+        /// <summary>
+        /// 是否加班:是,否
+        /// </summary>
+        [Comment("是否加班")]
+        public string? IsOverTime { get; set; }
+
+        /// <summary>
+        /// 加班工时
+        /// </summary>
+        [Comment("加班工时")]
+        public decimal? OverTimes { get; set; }
+
+        /// <summary>
+        /// 集团id
+        /// </summary>
+        [Comment("集团id")]
+        public long? tenant_id { get; set; }
+
+        /// <summary>
+        /// 工厂id
+        /// </summary>
+        [Comment("工厂id")]
+        public long? factory_id { get; set; }
+    }
+}

+ 81 - 0
MicroServices/Business/Bussiness.Model/Production/MonthlyProdCapacityMain.cs

@@ -0,0 +1,81 @@
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Business.Model.Production
+{
+    /// <summary>
+    /// 月度产能共识主表
+    /// </summary>
+    [Comment("月度产能共识主表")]
+    [Index(nameof(Year), nameof(Month), nameof(ProdRange), nameof(Model),nameof(ProdLine),nameof(tenant_id), nameof(factory_id), IsUnique = true)]
+    public class MonthlyProdCapacityMain
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        [Key]
+        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+        public long Id { get; set; }
+
+        /// <summary>
+        /// 年
+        /// </summary>
+        [Comment("年")]
+        public int? Year { get; set; }
+
+        /// <summary>
+        /// 月
+        /// </summary>
+        [Comment("月")]
+        public int? Month { get; set; }
+
+        /// <summary>
+        /// 产品系列
+        /// </summary>
+        [Comment("产品系列")]
+        public string? ProdRange { get; set; }
+
+        /// <summary>
+        /// 规格型号
+        /// </summary>
+        [Comment("规格型号")]
+        public string? Model { get; set; }
+
+        /// <summary>
+        /// 产品数量
+        /// </summary>
+        [Comment("产品数量")]
+        public decimal? ProdQty { get; set; }
+
+        /// <summary>
+        /// 生产线
+        /// </summary>
+        [Comment("生产线")]
+        public string? ProdLine { get; set; }
+
+        /// <summary>
+        /// 产线生产数量
+        /// </summary>
+        [Comment("产线生产数量")]
+        public decimal? Qty { get; set; }
+
+        /// <summary>
+        /// 集团id
+        /// </summary>
+        [Comment("集团id")]
+        public long? tenant_id { get; set; }
+
+        /// <summary>
+        /// 工厂id
+        /// </summary>
+        [Comment("工厂id")]
+        public long? factory_id { get; set; }
+    }
+}

+ 87 - 0
MicroServices/Business/Bussiness.Model/Production/OverallDemandPlanDtl.cs

@@ -0,0 +1,87 @@
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Business.Model.Production
+{
+    /// <summary>
+    /// 整体需求计划明细表
+    /// </summary>
+    [Comment("整体需求计划明细表")]
+    [Index(nameof(Version),nameof(ProdRange),nameof(Model),nameof(PlanDate), nameof(tenant_id), nameof(factory_id), IsUnique = true)]
+    public class OverallDemandPlanDtl
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        [Key]
+        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+        public long Id { get; set; }
+
+        /// <summary>
+        /// 年
+        /// </summary>
+        [Comment("年")]
+        public int? Year { get; set; }
+
+        /// <summary>
+        /// 月
+        /// </summary>
+        [Comment("月")]
+        public int? Month { get; set; }
+
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        [Comment("版本号")]
+        public string? Version { get; set; }
+
+        /// <summary>
+        /// 产品线
+        /// </summary>
+        [Comment("产品线")]
+        public string? ProdLine { get; set; }
+
+        /// <summary>
+        /// 产品系列
+        /// </summary>
+        [Comment("产品系列")]
+        public string? ProdRange { get; set; }
+
+        /// <summary>
+        /// 规格型号
+        /// </summary>
+        [Comment("规格型号")]
+        public string? Model { get; set; }
+
+        /// <summary>
+        /// 计划月份:M0,M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11
+        /// </summary>
+        [Comment("计划月份")]
+        public string? PlanDate { get; set; }
+
+        /// <summary>
+        /// 计划数量
+        /// </summary>
+        [Comment("计划数量")]
+        public decimal? Qty{ get; set; }
+
+        /// <summary>
+        /// 集团id
+        /// </summary>
+        [Comment("集团id")]
+        public long? tenant_id { get; set; }
+
+        /// <summary>
+        /// 工厂id
+        /// </summary>
+        [Comment("工厂id")]
+        public long? factory_id { get; set; }
+    }
+}

+ 81 - 0
MicroServices/Business/Bussiness.Model/Production/OverallDemandPlanMain.cs

@@ -0,0 +1,81 @@
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Business.Model.Production
+{
+    /// <summary>
+    /// 整体需求计划主表
+    /// </summary>
+    [Comment("整体需求计划主表")]
+    [Index(nameof(Version),nameof(tenant_id),nameof(factory_id),IsUnique = true)]
+    public class OverallDemandPlanMain
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        [Key]
+        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+        public long Id { get; set; }
+
+        /// <summary>
+        /// 年
+        /// </summary>
+        [Comment("年")]
+        public int? Year { get; set; }
+
+        /// <summary>
+        /// 月
+        /// </summary>
+        [Comment("月")]
+        public int? Month { get; set; }
+
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        [Comment("版本号")]
+        public string? Version { get; set; }
+
+        /// <summary>
+        /// 操作人
+        /// </summary>
+        [Comment("操作人")]
+        public string? UserName { get; set; }
+
+        /// <summary>
+        /// 操作人工号
+        /// </summary>
+        [Comment("操作人工号")]
+        public string? Account { get; set; }
+
+        /// <summary>
+        /// 操作时间
+        /// </summary>
+        [Comment("操作时间")]
+        public DateTime? ImportDate { get; set; }
+
+        /// <summary>
+        /// 流水号
+        /// </summary>
+        [Comment("流水号")]
+        public int? SerialNum{ get; set; }
+
+        /// <summary>
+        /// 集团id
+        /// </summary>
+        [Comment("集团id")]
+        public long? tenant_id { get; set; }
+
+        /// <summary>
+        /// 工厂id
+        /// </summary>
+        [Comment("工厂id")]
+        public long? factory_id { get; set; }
+    }
+}