From b7a82bbc4b305f0323be93030842c1b82c824337 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 09 5月 2025 10:06:36 +0800
Subject: [PATCH] 优化查询列
---
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/MesAppService.cs | 32 +++++++++++++++++++-------------
1 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/MesAppService.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/MesAppService.cs
index edb8a13..5c02bf7 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/MesAppService.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/MesAppService.cs
@@ -1,36 +1,31 @@
using CMS.Plugin.FormulaManagement.Abstractions;
-using CMS.Plugin.MesSuite.Abstractions.Events;
+using CMS.Plugin.OrderManagement.Abstractions;
using CMS.Plugin.OrderManagement.Abstractions.Enums;
using CMS.Plugin.OrderManagement.Abstractions.Models;
-using CMS.Plugin.OrderManagement.Abstractions;
-using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.MyTestEntityNames;
+using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan;
using CMS.Plugin.PipeLineLems.Application.Contracts.Services;
-using CMS.Plugin.PipeLineLems.Domain.MyTestEntityNames;
-using CMS.Plugin.PipeLineLems.Domain.Shared;
-using CMS.Plugin.PipeLineLems.Domain.Shared.MyTestEntityNames;
+using CMS.Plugin.PipeLineLems.Domain.WorkPlan;
using CMS.Plugin.ProductManagement.Abstractions;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Data;
-using Volo.Abp.ObjectExtending;
-using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan;
-using Volo.Abp.EventBus;
namespace CMS.Plugin.PipeLineLems.Application.Implements;
-public class MesAppService : IMesAppService
+public class MesAppService : CMSPluginAppService, IMesAppService
{
private readonly IServiceProvider _serviceProvider;
+ private readonly IWorkPlanAppService _workPlanAppService;
//private readonly IEventBus _eventBus;
public MesAppService(IServiceProvider serviceProvider
+ , IWorkPlanAppService workPlanAppService
//, IEventBus eventBus
)
{
_serviceProvider = serviceProvider;
// _eventBus = eventBus;
+ _workPlanAppService = workPlanAppService;
}
public async Task<MesOrderResponse> CreateAsync(List<WorkPlanInput> input)
@@ -57,7 +52,7 @@
var order = await orderManager.GetByCodeAsync(taskCode);
if (order != null)
{
- throw new UserFriendlyException($"宸ュ崟[{taskCode}]宸插瓨鍦�");
+ throw new UserFriendlyException($"浠诲姟缂栧彿[{taskCode}]宸插瓨鍦�");
}
@@ -141,6 +136,17 @@
}
+
+ //淇濆瓨鍒拌〃涓�
+ foreach (var item in input)
+ {
+ var insertObj = ObjectMapper.Map<WorkPlanInput, WorkPlanCreateDto>(item);
+ insertObj.OrgMaterialCode = "1111";
+ insertObj.Sort = 1;
+ await _workPlanAppService.CreateAsync(insertObj);
+ }
+
+
// 鍙戝竷浜嬩欢
//await _eventBus.PublishAsync(new EntityChangedEto("MESCREATE", input, null, EntityChangeType.Add, true));
--
Gitblit v1.9.3