You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
3.3 KiB
138 lines
3.3 KiB
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<ResultJson> GetMacStatic()
|
|
{
|
|
|
|
|
|
|
|
return new ResultJson() { Code = 200, Msg = "SUCESS", Value = 1 , Valuestr = "", Result = ""};
|
|
}
|
|
|
|
|
|
|
|
[HttpGet("GetCargoStatic")]
|
|
/// <summary>
|
|
/// 异步开始生命周期操作不能堵塞
|
|
/// </summary>
|
|
public async Task<ResponCargos> GetCargoStatic(string 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 == AreaID).ToList();
|
|
|
|
|
|
|
|
var t = new ResponCargos();
|
|
t.Code = 200;
|
|
t.Msg = "Success";
|
|
t.Datalist = result;
|
|
|
|
|
|
return t;
|
|
|
|
}
|
|
//[HttpPost("SyncIssueJobStereo")]
|
|
|
|
//public virtual async Task<ReusltObject> SyncIssueJobStereoAsync(IssueJobToRestoDTO input)
|
|
//{
|
|
|
|
// ReusltObject reuslt=new ReusltObject();
|
|
// reuslt.Code = "1";
|
|
// reuslt.Message = "操作成功";
|
|
// reuslt.OperateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
// return reuslt;
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
/// <summary>
|
|
/// 发给立体库主表
|
|
/// </summary>
|
|
public class IssueJobToRestoDetailDTO
|
|
{
|
|
public string WorkNo { set; get; }
|
|
public string TaskNo { set; get; }
|
|
public string NeedSite { set; get; }
|
|
public string ProductNo { set; get; }
|
|
public decimal Count { set; get; }
|
|
}
|
|
/// <summary>
|
|
/// 发给立体库子表
|
|
/// </summary>
|
|
public class IssueJobToRestoDTO
|
|
{
|
|
public Guid UUID { set; get; }
|
|
public string OperatorName { set; get; }
|
|
public List<IssueJobToRestoDetailDTO> Details { set; get; }
|
|
}
|
|
/// <summary>
|
|
/// 返回结果
|
|
/// </summary>
|
|
public class ReusltObject
|
|
{
|
|
public string Code { set; get; }
|
|
public string Message { set; get; }
|
|
public string OperateTime { set; get; }
|
|
}
|
|
|
|
|
|
|
|
|