| | |
| | | using Volo.Abp.ObjectExtending; |
| | | using Volo.Abp.ObjectMapping; |
| | | using Volo.Abp.Users; |
| | | using CmsQueryExtensions.Entitys; |
| | | |
| | | namespace CMS.Plugin.PipeLineLems.Application.Implements; |
| | | |
| | |
| | | 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> |
| | | /// 分页获取作业计划表 |
| | |
| | | updateObj.ProductCode = input.ProductCode; |
| | | updateObj.WorkstationCode = input.WorkstationCode; |
| | | updateObj.EquipmentCode = input.EquipmentCode; |
| | | |
| | | |
| | | updateObj.ProcessName = input.ProcessName; |
| | | updateObj.PipeFittingCode = input.PipeFittingCode; |
| | | updateObj.PreSerialNumber = input.PreSerialNumber; |
| | |
| | | /// <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)>(); |