From cf008dbb6059fe42a384e8ab35e90c4d295b9dc7 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周日, 18 5月 2025 10:16:29 +0800 Subject: [PATCH] 获取 对象 --- PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 50 insertions(+), 2 deletions(-) diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs index 354df06..0ad0a16 100644 --- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs +++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs @@ -1,6 +1,9 @@ using CMS.Extensions.Abp.AspNetCore.Mvc.Filters; +using CMS.Framework.AspNetCore.Users; using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan; using CMS.Plugin.PipeLineLems.Application.Contracts.Services; +using CmsQueryExtensions.Entitys; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Reflection; @@ -19,13 +22,21 @@ { private readonly IMesAppService _mesAppService; + private readonly ICurrentUser _currentUser; + private readonly Application.Implements.SharedService sharedService; + private IServiceProvider _serviceProvider; + /// <summary> /// Initializes a new instance of the <see cref="TestEntityNameController"/> class. /// </summary> /// <param name="testentitynameAppService">The testentityname application service.</param> - public WorkPlanPublicController(IMesAppService mesAppService) + public WorkPlanPublicController(IMesAppService mesAppService, ICurrentUser currentUser, Application.Implements.SharedService _sharedService, + IServiceProvider serviceProvider) { _mesAppService = mesAppService; + _currentUser = currentUser; + sharedService = _sharedService; + _serviceProvider = serviceProvider; } /// <summary> @@ -36,7 +47,44 @@ [HttpPost] public virtual async Task<MesOrderResponse> GetWorkPlanAsync([FromBody] List<WorkPlanInput> input) { - return await _mesAppService.CreateAsync(input); + return await _mesAppService.CreateAsync(input, "", ""); + } + + /// <summary> + /// 鍒嗘嫞 + /// </summary> + /// <param name="input">鏍囪瘑绗�.</param> + /// <returns></returns> + [Authorize] + [HttpPost] + [Route("Pick")] + public virtual async Task<MesOrderResponse> Pick([FromBody] PickInput input) + { + MyCurrentUser myCurrentUser = new MyCurrentUser() + { + UserAccount = _currentUser.UserAccount, + UserId = _currentUser.UserId + }; + return await sharedService.CommonPick(_serviceProvider, input, myCurrentUser); + } + + + /// <summary> + /// 鍙枡 + /// </summary> + /// <param name="input">鏍囪瘑绗�.</param> + /// <returns></returns> + [Authorize] + [HttpPost] + [Route("CallMaterial")] + public virtual async Task<MesOrderResponse> CallMaterial([FromBody] CallMaterialByDataIdentifierInput input) + { + MyCurrentUser myCurrentUser = new MyCurrentUser() + { + UserAccount = _currentUser.UserAccount, + UserId = _currentUser.UserId + }; + return await sharedService.CallMaterial(input, _serviceProvider, myCurrentUser); } -- Gitblit v1.9.3