现场流程测试修改
This commit is contained in:
1 parent
2610605aa6
commit
277442158f
4 files changed
+33
-23
No files matched your search
Binary file not shown.
@@ -28,8 +28,8 @@
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Foreground ="Black" Width="*" Header="名称" Binding="{Binding read.Name}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Foreground ="Black" Width="*" Header="操作模式" Binding="{Binding read.SRM_Mode,Converter={StaticResource SrmModeConverter}}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Foreground ="Black" Width="*" Header="当前层" Binding="{Binding read.AxisZ_NO}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Foreground ="Black" Width="*" Header="当前列" Binding="{Binding read.AxisY_NO}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Foreground ="Black" Width="*" Header="当前层" Binding="{Binding read.AxisY_NO}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Foreground ="Black" Width="*" Header="当前列" Binding="{Binding read.AxisX_NO}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Foreground ="Black" Width="*" Header="条码" Binding="{Binding read.Fork1_Code}" IsReadOnly="True" />
|
||||
<!--<DataGridTextColumn Width="*" Header="站台占用" Binding="{Binding read.Status_Port_OutStation,Converter={StaticResource SrmLimitConverter}}" IsReadOnly="True" />-->
|
||||
<DataGridTextColumn Foreground ="Black" Width="*" Header="货叉状态" Binding="{Binding read.Fork1_State,Converter={StaticResource SrmForkStateConverter}}" IsReadOnly="True" />
|
||||
@@ -39,8 +39,8 @@
|
||||
<DataGridCheckBoxColumn Width="*" Header="货叉故障" Binding="{Binding read.Fork1Error}" IsReadOnly="True" />
|
||||
<DataGridCheckBoxColumn Width="*" Header="满入故障" Binding="{Binding read.Fork1_FullIn}" IsReadOnly="True" />
|
||||
<DataGridCheckBoxColumn Width="*" Header="空出故障" Binding="{Binding read.Fork1_EmptyOut}" IsReadOnly="True" />
|
||||
<!--<DataGridCheckBoxColumn Width="*" Header="取货错故障" Binding="{Binding read.Fork1_PickError}" IsReadOnly="True" />
|
||||
<DataGridCheckBoxColumn Width="*" Header="放货错故障" Binding="{Binding read.Fork1_Allow}" IsReadOnly="True" />-->
|
||||
<DataGridCheckBoxColumn Width="*" Header="取货错故障" Binding="{Binding read.Fork1_PickError}" IsReadOnly="True" />
|
||||
<DataGridCheckBoxColumn Width="*" Header="放货错故障" Binding="{Binding read.Fork1_Allow}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Foreground ="Black" Width="*" Header="更新时间" Binding="{Binding read.LatTime, StringFormat={}{0:HH:mm:ss}}" IsReadOnly="True" />
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.Resources>
|
||||
@@ -54,12 +54,12 @@
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_TaskNo,StringFormat=任务号: {0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1TaskType_1,StringFormat=货叉任务类型:{0},Converter={StaticResource SrmTaskTypeConverter}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Code,StringFormat=条码:{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Pick_AxisX_NO,StringFormat=取货(排):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Pick_AxisY_NO,StringFormat=取货(列):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Pick_AxisZ_NO,StringFormat=取货(层):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Release_AxisX_NO,StringFormat=放货(排):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Release_AxisY_NO,StringFormat=放货(列):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Release_AxisZ_NO,StringFormat=放货(层):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Pick_AxisZ_NO,StringFormat=取货(排):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Pick_AxisX_NO,StringFormat=取货(列):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Pick_AxisY_NO,StringFormat=取货(层):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Release_AxisZ_NO,StringFormat=放货(排):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Release_AxisX_NO,StringFormat=放货(列):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Release_AxisY_NO,StringFormat=放货(层):{0}}" LineHeight="26" Foreground="White" />
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding write.Fork1_Size,StringFormat=货物大小:{0}}" LineHeight="26" Foreground="White" />
|
||||
|
||||
<!-- <TextBlock TextWrapping="Wrap" Text="{Binding write.IsFinish,StringFormat=任务完成:{0}}" LineHeight="26" Foreground="White" />-->
|
||||
|
||||
@@ -69,35 +69,44 @@ namespace WCS_YongFeng
|
||||
Height = vM_StationDR.Height
|
||||
};
|
||||
|
||||
var interfaceresult = WcsWebApiClient.FinishTask(reqTaskFinish);
|
||||
if (!interfaceresult.Success)
|
||||
{
|
||||
LogExecute.logNet.WriteError($"请求仓位时调用WMS接口失败,任务号{taskresur.tNo},高度{vM_StationDR.Height},错误原因{interfaceresult.Msg}");
|
||||
return BllResult.Error(); ;
|
||||
}
|
||||
//var interfaceresult = WcsWebApiClient.FinishTask(reqTaskFinish);
|
||||
//if (!interfaceresult.Success)
|
||||
//{
|
||||
// LogExecute.logNet.WriteError($"请求仓位时调用WMS接口失败,任务号{taskresur.tNo},高度{vM_StationDR.Height},错误原因{interfaceresult.Msg}");
|
||||
// return BllResult.Error(); ;
|
||||
//}
|
||||
BaseDal<I_Task> _baseDal = new BaseDal<I_Task>();
|
||||
Dictionary<string, object> lstColumnValues = new Dictionary<string, object>();
|
||||
lstColumnValues.Add("ExitPlace", interfaceresult.Data.LocationCode);
|
||||
//lstColumnValues.Add("ExitPlace", interfaceresult.Data.LocationCode);
|
||||
lstColumnValues.Add("ExitPlace", "L-01-04-03-01");
|
||||
var updatewarecell = _baseDal.Update(lstColumnValues, a => a.tNo == taskresur.tNo);
|
||||
if (updatewarecell.Success)
|
||||
if (!updatewarecell.Success)
|
||||
{
|
||||
LogExecute.logNet.WriteError($"请求仓位时更新数据库失败,任务号{taskresur.tNo},高度{vM_StationDR.Height},错误原因{updatewarecell.Msg}");
|
||||
return BllResult.Error(); ;
|
||||
}
|
||||
taskresur.ExitPlace = interfaceresult.Data.LocationCode;
|
||||
//taskresur.ExitPlace = interfaceresult.Data.LocationCode;
|
||||
taskresur.ExitPlace = "L-01-04-03-01";
|
||||
}
|
||||
|
||||
var pose = App.poseList.FirstOrDefault(a => a.Station == device.Point);
|
||||
if (pose == null)
|
||||
{
|
||||
LogExecute.logNet.WriteError($"响应{device.Name}站台地址请求失败,未找站台对应的坐标");
|
||||
return BllResult.Sucess();
|
||||
}
|
||||
|
||||
BaseDal<I_Task> baseDal = new BaseDal<I_Task>();
|
||||
baseDal.BeginTran();
|
||||
|
||||
var updateresult = _bll.NextStateChange(taskresur, baseDal);
|
||||
var updateresult = _bll.NextStateChange2(taskresur, pose.wcName, baseDal);
|
||||
if (updateresult.Success)
|
||||
{
|
||||
var sendtask_send = this.PutWriteAddress();
|
||||
if (sendtask_send.Success)
|
||||
{
|
||||
baseDal.CommitTran();
|
||||
_bll.NextStateChangeCache(taskresur);
|
||||
_bll.NextStateChangeCache2(taskresur, pose.wcName);
|
||||
LogExecute.logNet.WriteDebug($"响应{device.Name}站台地址请求成功,托盘号{vM_StationDR.PalletID},目的地{vM_StationDACK.DeStation}");
|
||||
return BllResult.Sucess();
|
||||
}
|
||||
@@ -118,7 +127,7 @@ namespace WCS_YongFeng
|
||||
}
|
||||
else if (device.Type == "OutStation")
|
||||
{
|
||||
var taskresur = App.taskList.FirstOrDefault(a => a.Type == E_TaskType.出库.GetIndexString() && a.NextState == E_TaskState.中间站台地址请求.GetIndexInt() && a.PalletOrBoxNo == pallet);
|
||||
var taskresur = App.taskList.FirstOrDefault(a => (a.Type == E_TaskType.出库.GetIndexString() || a.Type == E_TaskType.出库1.GetIndexString()) && a.NextState == E_TaskState.中间站台地址请求.GetIndexInt() && a.PalletOrBoxNo == pallet);
|
||||
if (taskresur != null)
|
||||
{
|
||||
//var topose = App.poseList.FirstOrDefault(a => a.wcName == taskresur.ToPlace);
|
||||
|
||||
@@ -64,7 +64,8 @@ namespace WCS_YongFeng
|
||||
}
|
||||
else if (device.Type == "Exit")
|
||||
{
|
||||
var _taskresur = App.taskList.ToList().FindAll(a => a.PalletOrBoxNo == vM_StationPR.PalletID && a.Type == E_TaskType.出库.GetIndexString() && a.NextState == E_TaskState.出入口地址到达.GetIndexInt()).OrderBy(a => a.Task_StartTime).ToList();
|
||||
var _taskresur = App.taskList.ToList().FindAll(a => a.PalletOrBoxNo == vM_StationPR.PalletID && (a.Type == E_TaskType.出库.GetIndexString()
|
||||
|| a.Type == E_TaskType.出库1.GetIndexString()) && a.NextState == E_TaskState.出入口地址到达.GetIndexInt()).OrderBy(a => a.Task_StartTime).ToList();
|
||||
if (_taskresur != null && _taskresur.Count > 0)
|
||||
{
|
||||
var taskresur = _taskresur[0];
|
||||
|
||||
Reference in new issue
Block a user