销售出库与拣货接口以及部分问题修复
This commit is contained in:
@@ -826,12 +826,13 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
// 找到AGV已到货,没有机械臂确认的数据
|
||||
ISugarQueryable<WmsMechanicalArmH> WmsMechanicalArmHsuagar = db.Queryable<WmsMechanicalArmH>()
|
||||
.Where(r => r.agvconfirm == 1 && r.mechanicalconfirm == 0 && configs_upMachine.Contains(r.name));
|
||||
LoggerFloor2UpDownMachine.LogInformation($@"【检查机械臂料架区信号_下升降机满托1送到】 {WmsMechanicalArmHsuagar.Count()}");
|
||||
|
||||
foreach (WmsMechanicalArmH wmsMechanicalArmH in WmsMechanicalArmHsuagar.ToList())
|
||||
{
|
||||
// 尝试写入满托送到信号
|
||||
bool result上升降机空托送到 = await Floor2UpDownMachinecode_SetTag($"下升降机满托{wmsMechanicalArmH.stackingposition}送到", "true");
|
||||
LoggerFloor2UpDownMachine.LogInformation($@"【送满托到上升降区】回写 下升降机满托{wmsMechanicalArmH.stackingposition}送到 结果为{result上升降机空托送到}");
|
||||
LoggerFloor2UpDownMachine.LogInformation($@"【送满托到下升降区】回写 下升降机满托{wmsMechanicalArmH.stackingposition}送到 结果为{result上升降机空托送到}");
|
||||
if (!result上升降机空托送到)
|
||||
{
|
||||
return false;
|
||||
@@ -840,10 +841,10 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
int LXCount = db.Queryable<WmsCarryD>() .Where(a => a.carry_id == wmsMechanicalArmH.rackid).Count();
|
||||
|
||||
bool result = await Floor2UpDownMachinecode_SetTag($"下升降机满托{wmsMechanicalArmH.stackingposition}数量", LXCount.ToString());
|
||||
LoggerFloor2UpDownMachine.LogInformation($@"【送满托到上升降区】设定下升降机满托{wmsMechanicalArmH.stackingposition}满托数量为 {LXCount} 结果为 {result}");
|
||||
LoggerFloor2UpDownMachine.LogInformation($@"【送满托到下升降区】设定下升降机满托{wmsMechanicalArmH.stackingposition}满托数量为 {LXCount} 结果为 {result}");
|
||||
if (!result)
|
||||
{
|
||||
throw new Exception($@"【送满托到上升降区】设定升降机满托{wmsMechanicalArmH.stackingposition}满托数量为 {LXCount} 结果为 {result}");
|
||||
throw new Exception($@"【送满托到下升降区】设定升降机满托{wmsMechanicalArmH.stackingposition}满托数量为 {LXCount} 结果为 {result}");
|
||||
}
|
||||
|
||||
// 绑定料架
|
||||
@@ -1113,8 +1114,8 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
string[] configs_upMachine = new string[2] { "二楼上升降机机械臂左", "二楼上升降机机械臂右" };
|
||||
// 读取上升降机的左右料架区配置
|
||||
|
||||
List<WmsMechanicalArmH> WmsMechanicalArmHs = _repository.AsSugarClient().Queryable<WmsMechanicalArmH>().Where(r => r.stackingcount == r.maxnum && r.maxnum != 0 && !string.IsNullOrEmpty(r.rackcode) && r.iscreatepretask == 0 && configs_upMachine.Contains(r.name)).ToList();
|
||||
|
||||
List<WmsMechanicalArmH> WmsMechanicalArmHs = _repository.AsSugarClient().Queryable<WmsMechanicalArmH>().Where(r => r.stackingcount == r.maxnum && r.maxnum != 0 && !string.IsNullOrEmpty(r.rackcode) && r.iscreatepretask == 0 && configs_upMachine.Contains(r.name) && r.mechanicalconfirm == 1).ToList();
|
||||
|
||||
foreach (WmsMechanicalArmH wmsMechanicalArmH in WmsMechanicalArmHs)
|
||||
{
|
||||
await s_taskExecuteRackDelivery.WaitAsync();
|
||||
@@ -1123,9 +1124,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
{
|
||||
// 判断是否 上升降机请求取满托
|
||||
bool 上升降机请求取满托 = (bool)Floor2UpDownMachinecode_GetTag<bool>($"上升降机请求取满托{wmsMechanicalArmH.stackingposition}");
|
||||
LoggerFloor2RackDelivery.LogError($"【移走上升降区满托的料架】上升降机请求取满托{wmsMechanicalArmH.stackingposition} {上升降机请求取满托}");
|
||||
if (!上升降机请求取满托)
|
||||
{
|
||||
LoggerFloor2RackDelivery.LogError($"【移走上升降区满托的料架】上升降机请求取满托{wmsMechanicalArmH.stackingposition} {上升降机请求取满托}");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1197,6 +1198,10 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
LoggerFloor2RackDelivery.LogError(ex.ToString());
|
||||
LoggerFloor2RackDelivery.LogError(ex.StackTrace);
|
||||
}
|
||||
finally
|
||||
{
|
||||
s_taskExecuteRackDelivery.Release();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1222,9 +1227,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
{
|
||||
// 判断是否 上升降机请求取满托
|
||||
bool 下升降机请求取空托 = (bool)Floor2UpDownMachinecode_GetTag<bool>($"下升降机请求取空托{wmsMechanicalArmH.stackingposition}");
|
||||
LoggerFloor2RackDelivery.LogError($"【移走下升降区空托的料架】下升降机请求取空托{wmsMechanicalArmH.stackingposition} {下升降机请求取空托}" );
|
||||
if (!下升降机请求取空托)
|
||||
{
|
||||
LoggerFloor2RackDelivery.LogError($"【移走下升降区空托的料架】下升降机请求取空托{wmsMechanicalArmH.stackingposition}");
|
||||
return false;
|
||||
}
|
||||
LoggerFloor2RackDelivery.LogInformation($"【移走下升降区空托的料架】 开始执行预任务生成 {wmsMechanicalArmH.point_code} {wmsMechanicalArmH.outbill} {wmsMechanicalArmH.barcodes}");
|
||||
@@ -1436,7 +1441,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
["Value"] = value,
|
||||
};
|
||||
string result = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand);
|
||||
// TODO 测试
|
||||
// 测试
|
||||
|
||||
//JObject valueJson = new JObject();
|
||||
//valueJson["Value"] = value;
|
||||
@@ -1451,17 +1456,17 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
//Readtimer = new Timer(GetRedisData, null, TimeSpan.Zero, TimeSpan.FromSeconds(300));
|
||||
//CheckGettimer = new Timer(CheckGet, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
|
||||
//Scantimer = new Timer(ScanInStock, null, TimeSpan.Zero, TimeSpan.FromSeconds(60));
|
||||
//SSXcodetimer = new Timer(SSXcode, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
|
||||
Readtimer = new Timer(GetRedisData, null, TimeSpan.Zero, TimeSpan.FromSeconds(300));
|
||||
CheckGettimer = new Timer(CheckGet, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
|
||||
Scantimer = new Timer(ScanInStock, null, TimeSpan.Zero, TimeSpan.FromSeconds(60));
|
||||
SSXcodetimer = new Timer(SSXcode, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
|
||||
|
||||
//// 二楼上升降机
|
||||
//Floor2UpMachinecodetimer = new Timer(Floor2UpMachinecode, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
|
||||
//// 二楼下升降机
|
||||
////Floor2DownMachinecodetimer = new Timer(Floor2DownMachinecode, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
|
||||
//// 二楼料架配送
|
||||
//Floor2RackDeliverytimer = new Timer(Floor2RackDelivery, null, TimeSpan.Zero, TimeSpan.FromSeconds(60));
|
||||
// 二楼上升降机
|
||||
Floor2UpMachinecodetimer = new Timer(Floor2UpMachinecode, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
|
||||
// 二楼下升降机
|
||||
//Floor2DownMachinecodetimer = new Timer(Floor2DownMachinecode, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
|
||||
// 二楼料架配送
|
||||
Floor2RackDeliverytimer = new Timer(Floor2RackDelivery, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user