|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using DocumentFormat.OpenXml.Office2010.Drawing;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
using Volo.Abp.Application.Dtos;
|
|
|
|
using Volo.Abp.Application.Services;
|
|
|
|
using Volo.Abp.Caching;
|
|
|
|
using Volo.Abp.DependencyInjection;
|
|
|
|
using Volo.Abp.Domain.Repositories;
|
|
|
|
using Win_in.Sfs.Basedata.Application.Contracts;
|
|
|
|
using Win_in.Sfs.Basedata.Domain;
|
|
|
|
using Win_in.Sfs.Basedata.Domain.Caches;
|
|
|
|
using Win_in.Sfs.Basedata.Domain.Shared;
|
|
|
|
using Win_in.Sfs.Basedata.tests;
|
|
|
|
|
|
|
|
namespace Win_in.Sfs.Basedata.Application;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 接口模拟测试
|
|
|
|
/// </summary>
|
|
|
|
[AllowAnonymous]
|
|
|
|
[Route($"CargoState")]
|
|
|
|
public class TestService:ApplicationService
|
|
|
|
{
|
|
|
|
private readonly IServiceProvider _serviceProvider;
|
|
|
|
private readonly IOptions<CycleOptions> _options;
|
|
|
|
public TestService(IServiceProvider serviceProvider, IOptions<CycleOptions> options)
|
|
|
|
{
|
|
|
|
_serviceProvider = serviceProvider;
|
|
|
|
_options = options;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 生命周期操作
|
|
|
|
/// </summary>
|
|
|
|
[HttpPost("GetMacStatic")]
|
|
|
|
public async Task<int> GetMacStatic()
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost("GetCargoStatic")]
|
|
|
|
/// <summary>
|
|
|
|
/// 异步开始生命周期操作不能堵塞
|
|
|
|
/// </summary>
|
|
|
|
public async Task<List<ResponCargoItem>> GetCargoStatic(string p_AreaID)
|
|
|
|
{
|
|
|
|
|
|
|
|
List<ResponCargoItem> result = new List<ResponCargoItem>();
|
|
|
|
|
|
|
|
result.Add(new ResponCargoItem() { AreaID = "1", CargoID = "PTXB1", PartCode = "TMDLYA0A071AB", Flag = 0 });
|
|
|
|
result.Add(new ResponCargoItem() { AreaID = "1", CargoID = "PTXB2", PartCode = "TMDLYA0A061AB", Flag = 0 });
|
|
|
|
result.Add(new ResponCargoItem() { AreaID = "2", CargoID = "ZSXB2", PartCode = "TMDLYD0ABM5A", Flag = 0 });
|
|
|
|
|
|
|
|
result = result.Where(p => p.AreaID == p_AreaID).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|