文件名从 WMS/server/src/CMS.Plugin.HIAWms/ProjectService/HIAWmsProjectService.cs 修改 |
| | |
| | | using CMS.Plugin.FlowManagement.Abstractions.FlowBusiness; |
| | | using CMS.Plugin.HIAWms.Apis; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | using CMS.Plugin.HIAWms.Domain.WmsPlaces; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using CMS.Plugin.HIAWms.Jobs; |
| | | using CMS.Project; |
| | | using CMS.Project.Abstractions; |
| | |
| | | using var scope = _serviceProvider.CreateScope(); |
| | | var unitOfWorkManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
| | | using var uow = unitOfWorkManager.Begin(requiresNew: true); |
| | | var wmsplaceRepository = scope.ServiceProvider.GetRequiredService<IWmsPlaceRepository>(); |
| | | var count = await wmsplaceRepository.GetCountAsync(); |
| | | var wmscontainerRepository = scope.ServiceProvider.GetRequiredService<IWmsContainerRepository>(); |
| | | var count = await wmscontainerRepository.GetCountAsync(); |
| | | |
| | | // 濡傛灉鏈夋洿鏂版暟鎹簱鎿嶄綔锛岄渶鎻愪氦淇濆瓨 |
| | | // await uow.SaveChangesAsync(); |
| | |
| | | /// </summary> |
| | | private async Task ExecuteExternalApiAsync() |
| | | { |
| | | |
| | | try |
| | | { |
| | | await _serviceProvider.GetRequiredService<IHIAWmsExternalApi>().CreateAsync(new WmsContainerCreateDto |
| | | { |
| | | Name = "WmsContainer_Name", |
| | | Code = "WmsContainer_Code", |
| | | }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | _logger.LogException(e); |
| | | } |
| | | } |
| | | } |
| | | } |