From 9d260f6be552da50c846c7abf97f804c13f512e0 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 12 5月 2025 13:55:02 +0800
Subject: [PATCH] 22
---
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs
index 738d1b9..b56150f 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs
@@ -15,6 +15,7 @@
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;
@@ -33,9 +34,11 @@
/// <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("杈撳叆鍙傛暟涓嶈兘涓虹┖");
@@ -62,6 +65,7 @@
var orderManager = _serviceProvider.GetRequiredService<IOrderManager>();
var productProvider = _serviceProvider.GetRequiredService<IProductProvider>();
var formulaProvider = _serviceProvider.GetRequiredService<IFormulaProvider>();
+
List<OrderModel> orderModels = new List<OrderModel>();
#region 浜嬪姟
@@ -111,7 +115,8 @@
var order = await orderManager.GetByCodeAsync(prodOrderNo);
if (order != null)
{
- throw new UserFriendlyException($"鐢熶骇宸ュ崟[{prodOrderNo}]宸插瓨鍦�");
+ //throw new UserFriendlyException($"鐢熶骇宸ュ崟[{prodOrderNo}]宸插瓨鍦�");
+ continue;
}
OrderModel orderModelForCut = new OrderModel()
@@ -184,7 +189,7 @@
-
+ //throw new UserFriendlyException($"涓诲姩瑙﹀彂澶辫触");
//淇濆瓨鍒� scms_workplans 琛ㄤ腑
foreach (var item in input)
{
@@ -193,6 +198,8 @@
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);
}
@@ -296,10 +303,10 @@
}
// 楠岃瘉鐘舵��
- //if (callMaterialOrder.CallMaterialStatus != Domain.Shared.Enums.CallMaterialStatusEnum.鏈墽琛�)
- //{
- // throw new UserFriendlyException($"鍘熸枡鏍囪瘑涓� '{callMaterialOrder.DataIdentifier}' 鐨勫彨鏂欒褰曠姸鎬佷负 '{callMaterialOrder.CallMaterialStatus}'锛屼笉鍏佽鍙枡");
- //}
+ if (callMaterialOrder.CallMaterialStatus != Domain.Shared.Enums.CallMaterialStatusEnum.鏈墽琛�)
+ {
+ throw new UserFriendlyException($"鍘熸枡鏍囪瘑涓� '{callMaterialOrder.DataIdentifier}' 鐨勫彨鏂欒褰曠姸鎬佷负 '{callMaterialOrder.CallMaterialStatus}'锛屼笉鍏佽鍙枡");
+ }
// 鏇存柊鏁版嵁
callMaterialOrder.WmsRetResult = "鎴愬姛";
--
Gitblit v1.9.3