1.记录日志优化 清空日志间隔调整为10日 减小日志存储内容
2.发送任务限制优化 工位上小车已送走后允许重新发送任务
This commit is contained in:
@ -27,7 +27,7 @@ namespace WCS.BLL.Manager
|
||||
while (true)
|
||||
{
|
||||
|
||||
//每5秒同步一次
|
||||
//每3秒同步一次
|
||||
Thread.Sleep(3000);
|
||||
try
|
||||
{
|
||||
@ -49,7 +49,7 @@ namespace WCS.BLL.Manager
|
||||
var data = new AGVQueryTaskStatusRequest();
|
||||
data.taskCodes.Add(tasks[i].TaskCode);
|
||||
|
||||
var result = ApiHelp.GetDataFromHttp<AGVQueryTaskStatusResponse>(url, data, "POST", true);
|
||||
var result = ApiHelp.GetDataFromHttp<AGVQueryTaskStatusResponse>(url, data, "POST", false);
|
||||
if (result != null && result.code == "0" && result.data != null && result.data.Count > 0)
|
||||
{
|
||||
var isUpdate = false;
|
||||
@ -102,6 +102,7 @@ namespace WCS.BLL.Manager
|
||||
}
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
Logs.Write("【定时任务】获取任务状态 结束", LogsType.Tasks);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -126,7 +127,7 @@ namespace WCS.BLL.Manager
|
||||
{
|
||||
var url = @"http://192.168.18.150:8181/rcms/services/rest/hikRpcService/syncMapDatas";
|
||||
var data = new AGVSyncMapDatasRequest();
|
||||
var result = ApiHelp.GetDataFromHttp<AGVSyncMapDatasResponse>(url, data, "POST", true);
|
||||
var result = ApiHelp.GetDataFromHttp<AGVSyncMapDatasResponse>(url, data, "POST", false);
|
||||
if (result != null && result.data != null && result.data.Count > 0)
|
||||
{
|
||||
//获取RCS地图上所有的货架
|
||||
@ -258,11 +259,18 @@ namespace WCS.BLL.Manager
|
||||
//校验起点
|
||||
if (tasks.Where(t => t.StratLocationId == startLocation.Id).Any())
|
||||
{
|
||||
return new AGVResponseModel()
|
||||
//相同货架
|
||||
var isSameShelf = tasks.Where(t => t.StratLocationId == startLocation.Id && t.ShelfCode == shelfCode)
|
||||
.Any();
|
||||
if (isSameShelf)
|
||||
{
|
||||
code = "-999",
|
||||
message = $"工位[{startLocation.LocationCode}]作为起点已有执行中的任务!",
|
||||
};
|
||||
//获取对应任务
|
||||
return new AGVResponseModel()
|
||||
{
|
||||
code = "-999",
|
||||
message = $"工位[{startLocation.LocationCode}]作为起点已有执行中的任务!",
|
||||
};
|
||||
}
|
||||
}
|
||||
//校验终点
|
||||
if (tasks.Where(t => t.EndLocationId == endLocation.Id).Any())
|
||||
@ -336,11 +344,18 @@ namespace WCS.BLL.Manager
|
||||
//校验起点
|
||||
if (tasks.Where(t => t.StratLocationId == startLocation.Id).Any())
|
||||
{
|
||||
return new AGVResponseModel()
|
||||
//相同货架
|
||||
var isSameShelf = tasks.Where(t => t.StratLocationId == startLocation.Id && t.ShelfCode == shelfCode)
|
||||
.Any();
|
||||
if (isSameShelf)
|
||||
{
|
||||
code = "-999",
|
||||
message = $"工位[{startLocation.LocationCode}]作为起点已有执行中的任务!",
|
||||
};
|
||||
//获取对应任务
|
||||
return new AGVResponseModel()
|
||||
{
|
||||
code = "-999",
|
||||
message = $"工位[{startLocation.LocationCode}]作为起点已有执行中的任务!",
|
||||
};
|
||||
}
|
||||
}
|
||||
//校验终点
|
||||
if (tasks.Where(t => t.EndLocationId == endLocation.Id).Any())
|
||||
|
@ -10,6 +10,7 @@ using WCS.BLL.DbModels;
|
||||
using WCS.BLL.Manager;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.BLL.Services.Service;
|
||||
using WCS.DAL.Db;
|
||||
using WCS.WebApi;
|
||||
using WCS.WebApi.Controllers;
|
||||
|
||||
@ -52,7 +53,13 @@ namespace WebApi
|
||||
try
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>־
|
||||
WCS.BLL.Logs.Clear(TimeSpan.FromDays(92));
|
||||
WCS.BLL.Logs.Clear(TimeSpan.FromDays(10));
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD>ǰ<EFBFBD>Ľӿ<C4BD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־
|
||||
DbHelp.dbLog.Deleteable<SystemApiLogRecord>()
|
||||
.Where(t => t.ResponseTime < DateTime.Now.AddMonths(-1))
|
||||
.ExecuteCommand();
|
||||
|
||||
//ÿһ<C3BF><D2BB>ִ<EFBFBD><D6B4>һ<EFBFBD><D2BB>
|
||||
await Task.Delay(1000 * 60 * 60 * 24);
|
||||
}
|
||||
@ -85,7 +92,7 @@ namespace WebApi
|
||||
builder.Services.AddScoped<IInOutRecordService, InOutRecordService>();
|
||||
builder.Services.AddScoped<IUploadService, UploadService>();
|
||||
builder.Services.AddScoped<ILocationInfoService, LocationInfoService>();
|
||||
builder.Services.AddScoped<IMatDetailCurrentInfoService,MatDetailCurrentInfoService>();
|
||||
builder.Services.AddScoped<IMatDetailCurrentInfoService, MatDetailCurrentInfoService>();
|
||||
builder.Services.AddScoped<IBatchBindMatDetailService, BatchBindMatDetailService>();
|
||||
builder.Services.AddScoped<IPDAShelfLocationBindUnbindService, PDAShelfLocationBindUnbindService>();
|
||||
|
||||
|
Reference in New Issue
Block a user