zs
2025-05-16 a2448a582f2baeabf32c4f8dd8ab447feb2538e6
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs
@@ -11,6 +11,7 @@
using Volo.Abp.ObjectExtending;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Users;
using CmsQueryExtensions.Entitys;
namespace CMS.Plugin.PipeLineLems.Application.Implements;
@@ -43,16 +44,6 @@
        return ObjectMapper.Map<WorkPlan, WorkPlanDto>(await _workPlanRepository.GetAsync(id));
    }
    /// <summary>
    /// 按照 原料标记 查找作业计划表
    /// </summary>
    /// <param name="name"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    public virtual async Task<List<WorkPlan>> FindByDataIdentifierAsync(string dataIdentifier)
    {
        return await _workPlanRepository.FindByDataIdentifierAsync(dataIdentifier);
    }
    /// <summary> 
    /// 分页获取作业计划表 
@@ -179,7 +170,7 @@
        updateObj.ProductCode = input.ProductCode;
        updateObj.WorkstationCode = input.WorkstationCode;
        updateObj.EquipmentCode = input.EquipmentCode;
        updateObj.ProcessName = input.ProcessName;
        updateObj.PipeFittingCode = input.PipeFittingCode;
        updateObj.PreSerialNumber = input.PreSerialNumber;
@@ -308,13 +299,13 @@
    /// <param name="input"></param> 
    /// <returns></returns> 
    /// <exception cref="UserFriendlyException"></exception> 
    public async Task ImportAsync(WorkPlansImportModel input, string userId, string userAccount)
    public async Task ImportAsync(WorkPlansImportModel input, MyCurrentUser myCurrentUser)
    {
        //转换数据
        var result = ObjectMapper.Map<List<WorkPlansImportModel.WorkPlanImportModel>, List<WorkPlanInput>>(input.WorkPlans);
        //await CreatebyApsAsync(result);
        await _sharedService.CommonCreatebyApsAsync(result, _serviceProvider, this, userId, userAccount);
        await _sharedService.CommonCreatebyApsAsync(result, _serviceProvider, this, myCurrentUser.UserId, myCurrentUser.UserAccount);
        //        Check.NotNull(input, nameof(input)); 
        //        var workPlanCreateDtos = new List<(int RowIndex, WorkPlanCreateDto Item)>();