using Business.Domain; using Business.Dto; using Business.ReplenishmentManagement; using Business.ResourceExamineManagement; using Business.ResourceExamineManagement.Dto; using Microsoft.AspNetCore.Mvc; using MongoDB.Bson.IO; using Newtonsoft.Json; using Org.BouncyCastle.Asn1.Ocsp; using System; using System.Collections.Generic; using System.ComponentModel.Design; using System.Linq; using System.Text; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.AspNetCore.Mvc; namespace Business.Controllers { /// /// 补货模型 /// [RemoteService] [Area("Business")] [Route("api/business/replenishment")] public class ReplenishmentController : AbpController { private readonly IReplenishmentAppService _ReplenishmentAppService; public ReplenishmentController(IReplenishmentAppService ReplenishmentAppService) { _ReplenishmentAppService = ReplenishmentAppService; } /// /// 刷新年度销售预测 /// /// /// [HttpGet] [Route("demandanalysis")] public Task DemandAnalysis(InputDto input) { return _ReplenishmentAppService.DemandAnalysis(input); } /// /// 年度生产大纲 /// /// /// [HttpGet] [Route("SaveAnnualProductionOutline")] public Task SaveAnnualProductionOutline(InputDto input) { return _ReplenishmentAppService.SaveAnnualProductionOutline(input); } /// /// 调整ROP和最高库存水位 /// /// /// [HttpGet] [Route("calcrop")] public Task CalcROP(InputDto input) { return _ReplenishmentAppService.CalcROP(input); } /// /// 生产周计划 /// /// /// [HttpGet] [Route("calcweekplan")] public Task CalcWeekPlan(InputDto input) { return _ReplenishmentAppService.CalcWeekPlan(input); } /// /// 生产周计划测试 /// /// /// [HttpGet] [Route("calctempweekplan")] public Task CalcTempWeekPlan(InputDto input) { return _ReplenishmentAppService.CalcTempWeekPlan(input); } /// /// 计算工单优先级 /// /// /// [HttpGet] [Route("calcpriority")] public List CalcPriority(List workOrdMasters, string domain) { return _ReplenishmentAppService.CalcPriority(workOrdMasters,domain); } /// /// 调整工单优先级 /// /// /// [HttpGet] [Route("changepriority")] public Task ChangePriority(string weekplanid, string tenant_id, string factory_id,string company_id, string itemNumber, string qty,string instockdate,string priority) { return _ReplenishmentAppService.ChangePriority( weekplanid,tenant_id,factory_id, company_id,itemNumber, qty,instockdate, priority); } /// /// 调整生产工单优先级 /// /// /// [HttpGet] [Route("WorkOrdCheckChangePriority")] public Task WorkOrdCheckChangePriority(string WorkOrd, string tenant_id, string factory_id, string company_id, string itemNumber, string qty, string LotSerial, string priority,string UserNO) { return _ReplenishmentAppService.WorkOrdCheckChangePriority(WorkOrd, tenant_id, factory_id, company_id, itemNumber, qty, LotSerial, priority, UserNO); } /// /// 发布周计划 /// /// /// [HttpGet] [Route("publishweekplan")] public Task PublishWeekPlan(InputDto input) { return _ReplenishmentAppService.PublishWeekPlan(input); } /// /// 勾选发布周计划 /// /// /// [HttpPost] [Route("selectpublishweekplan")] public Task ReceiveResult(string ids,string factoryid) { return _ReplenishmentAppService.SelectPublishWeekPlan(ids,factoryid); } /// /// 定时任务长周期物料 /// /// /// [HttpGet] [Route("calclongperioditempr")] public Task CalcLongPeriodItemPR(InputDto input) { return _ReplenishmentAppService.CalcLongPeriodItemPR(input); } /// /// 定时任务每天补货 /// /// /// [HttpGet] [Route("calcdayplan")] public Task CalcDayPlan(InputDto input) { return _ReplenishmentAppService.CalcDayPlan(input); } /// /// 删除周计划 /// /// /// [HttpGet] [Route("deleteweekplan")] public Task DeleteWeekPlan(long weekplanid, string productorder, long factory_id) { return _ReplenishmentAppService.DeleteWeekPlan( weekplanid,productorder,factory_id); } /// /// 生成交货计划 /// /// /// /// [HttpPost] [Route("CreateDeliverySchedule")] public Task CreateDeliverySchedule(string domain,string user) { return _ReplenishmentAppService.CreateDeliverySchedule(domain, user); } } }