| | |
| | | using System.Text; |
| | | using CMS.Plugin.PipeLineLems.Domain.WorkPlan; |
| | | using CMS.Plugin.PipeLineLems.Domain.CallMaterialOrderRecord; |
| | | using Volo.Abp.Users; |
| | | |
| | | namespace CMS.Plugin.PipeLineLems.Application.Implements; |
| | | |
| | |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | |
| | | public async Task<MesOrderResponse> CommonCreatebyApsAsync(List<WorkPlanInput> input, IServiceProvider _serviceProvider, |
| | | WorkPlanAppService workPlanAppService |
| | | WorkPlanAppService workPlanAppService, |
| | | string userId, string userAccount |
| | | ) |
| | | { |
| | | |
| | | if (input == null) |
| | | { |
| | | throw new UserFriendlyException("输入参数不能为空"); |
| | |
| | | var orderManager = _serviceProvider.GetRequiredService<IOrderManager>(); |
| | | var productProvider = _serviceProvider.GetRequiredService<IProductProvider>(); |
| | | var formulaProvider = _serviceProvider.GetRequiredService<IFormulaProvider>(); |
| | | |
| | | List<OrderModel> orderModels = new List<OrderModel>(); |
| | | |
| | | #region 事务 |
| | |
| | | |
| | | |
| | | |
| | | |
| | | //throw new UserFriendlyException($"主动触发失败"); |
| | | //保存到 scms_workplans 表中 |
| | | foreach (var item in input) |
| | | { |
| | |
| | | insertObj.CallMaterialStatus = Domain.Shared.Enums.CallMaterialStatusEnum.未执行; |
| | | insertObj.WorkPlanStatus = Domain.Shared.Enums.WorkPlanStatusEnum.未生产; |
| | | insertObj.Sort = 1; |
| | | insertObj.CreatorId = userId; |
| | | insertObj.CreatorName = userAccount; |
| | | await workPlanAppService.CreateAsync(insertObj); |
| | | } |
| | | |