1.解决TCP添加失败问题
2.所有搜索记录倒叙排 3.优化:出入记录、库存记录增加货架类型分类查询 4.权限 5.优化下载app二维码
This commit is contained in:
31
WCS.WebApi/Controllers/DIYController.cs
Normal file
31
WCS.WebApi/Controllers/DIYController.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.BLL.Services.Service;
|
||||
using WCS.Model;
|
||||
using WCS.Model.ApiModel;
|
||||
using WCS.Model.ApiModel.Stocktaking;
|
||||
using WCS.Model.ApiModel.User;
|
||||
using WCS.Model.WebSocketModel;
|
||||
|
||||
namespace WCS.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 本地化Controller
|
||||
/// </summary>
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class DIYController : ControllerBase
|
||||
{
|
||||
public DIYController()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[Route("getStockTakingOrders")]
|
||||
[HttpPost(Name = "getStockTakingOrders")]
|
||||
public async Task<ResponseBase> getStockTakingOrders(GetStockTakingOrdersRequest request)
|
||||
{
|
||||
return await _stockTakingService.getStockTakingOrders(request);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using SqlSugar;
|
||||
using WCS.BLL.DbModels;
|
||||
using WCS.BLL.HardWare;
|
||||
@ -8,6 +9,7 @@ using WCS.BLL.Services.Service;
|
||||
using WCS.DAL.Db;
|
||||
using WCS.Model;
|
||||
using WCS.Model.ApiModel.Home;
|
||||
using Mode = WCS.BLL.HardWare.Mode;
|
||||
|
||||
namespace WCS.WebApi.Controllers
|
||||
{
|
||||
@ -97,6 +99,65 @@ namespace WCS.WebApi.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
[Route("getShelfStatusDetails")]
|
||||
[HttpPost(Name = "getShelfStatusDetails")]
|
||||
public async Task<ResponseBase> getShelfStatusDetails(GetShelfStatusRequest request)
|
||||
{
|
||||
try
|
||||
{
|
||||
var shelfs = ShelfManager.Shelves
|
||||
.WhereIF(request.GroupNames?.Count > 0, t => request.GroupNames!.Contains(t.GroupName))
|
||||
.ToList();
|
||||
//直接返回当前内存中缓存的货架和状态
|
||||
return new ResponseBase<object>()
|
||||
{
|
||||
Code = 200,
|
||||
Message = "success",
|
||||
Data = shelfs,
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ResponseBase()
|
||||
{
|
||||
Code = 300,
|
||||
Message = "获取失败:" + ex.Message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
[Route("getTCPClientsDetails")]
|
||||
[HttpPost(Name = "getTCPClientsDetails")]
|
||||
public async Task<ResponseBase> getTCPClientsDetails(GetShelfStatusRequest request)
|
||||
{
|
||||
try
|
||||
{
|
||||
var tcpClients = TCPClientManager.TCPClients.Select(t => new
|
||||
{
|
||||
RemoteIPHost = t.RemoteIPHost,
|
||||
IsOnline = t.IsOnline,
|
||||
IsFirstConnected = t.IsFirstConnected,
|
||||
tcpClientIsNull = t.tcpClient == null,
|
||||
tcpClientIsOnLine = t.tcpClient?.Online,
|
||||
|
||||
}).ToList();
|
||||
//直接返回当前内存中缓存的货架和状态
|
||||
return new ResponseBase<object>()
|
||||
{
|
||||
Code = 200,
|
||||
Message = $"success!连接数量:{tcpClients.Count}",
|
||||
Data = tcpClients,
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ResponseBase()
|
||||
{
|
||||
Code = 300,
|
||||
Message = "获取失败:" + ex.Message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
[Route("shelfCheckAll")]
|
||||
[HttpPost(Name = "shelfCheckAll")]
|
||||
|
Reference in New Issue
Block a user