Преглед на файлове

添加产能分析接口框架

heteng преди 2 години
родител
ревизия
76219e2a4e

+ 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);
+        }
+    }
+}

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

@@ -0,0 +1,78 @@
+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.Model.Production
+{
+    /// <summary>
+    /// 整体需求计划明细表
+    /// </summary>
+    [Comment("整体需求计划明细表")]
+    public class OverallDemandPlanDtl
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        [Key]
+        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>
+        /// 计划月份: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; }
+    }
+}

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

@@ -0,0 +1,78 @@
+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.Model.Production
+{
+    /// <summary>
+    /// 整体需求计划主表
+    /// </summary>
+    [Comment("整体需求计划主表")]
+    public class OverallDemandPlanMain
+    {
+        /// <summary>
+        /// 主键
+        /// </summary>
+        [Comment("主键")]
+        [Key]
+        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; }
+    }
+}