Commit 82bb776a LN

送出料架时没发MayLeave

1 个父辈 134a19b4
......@@ -1570,11 +1570,11 @@
// lblMoveEquipInfo
//
this.lblMoveEquipInfo.AutoSize = true;
this.lblMoveEquipInfo.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveEquipInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveEquipInfo.ForeColor = System.Drawing.Color.Blue;
this.lblMoveEquipInfo.Location = new System.Drawing.Point(13, 39);
this.lblMoveEquipInfo.Name = "lblMoveEquipInfo";
this.lblMoveEquipInfo.Size = new System.Drawing.Size(65, 19);
this.lblMoveEquipInfo.Size = new System.Drawing.Size(56, 17);
this.lblMoveEquipInfo.TabIndex = 272;
this.lblMoveEquipInfo.Text = "移栽状态";
//
......
......@@ -121,14 +121,31 @@ agv到达时,根据rfid判断是否有料架
出库时未读到料架号,直接送出料架
紧急料分盘料料架送出逻辑修改。
分盘料/紧急料放上料串或料架时调用

/rest/api/qisda/device/afterPutCut

参数:
cid: 料仓cid,流水线可传入空
barcode : 条码
rfid : RFID
rfidLoc: 料架位置,流水线可传-1

> 返回: 
>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
>>
>> - code: 0为正常,其他为异常, 
>> - msg:消息, 
>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识,value为空闲仓位)
>> - cutPackageTask: 表示当前包装仓的分盘任务数
>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
>> - cutTask: 表示流水线分盘任务数
>> - urgentTask: 表示流水线紧急料任务数
分盘料/紧急料放上料串或料架时调用
/rest/api/qisda/device/afterPutCut
参数:
cid: 料仓cid,流水线可传入空
barcode : 条码
rfid : RFID
rfidLoc: 料架位置,流水线可传-1
> 返回:
>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
>>
>> - code: 0为正常,其他为异常,
>> - msg:消息,
>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识,value为空闲仓位)
>> - cutPackageTask: 表示当前包装仓的分盘任务数
>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
>> - cutTask: 表示流水线分盘任务数
>> - urgentTask: 表示流水线紧急料任务数
......
......@@ -18,34 +18,34 @@ namespace OnlineStore.Common
{
public class HttpHelper
{
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static string Post(string url, string paramData)
{
return Post(url, paramData, Encoding.UTF8);
}
public static bool PingURLIP(string url, int ms=100)
{
string[] urlArray = url.Split('/');
if (urlArray.Length > 3)
{
string ip = urlArray[2];
//public static bool PingURLIP(string url, int ms=100)
//{
// string[] urlArray = url.Split('/');
// if (urlArray.Length > 3)
// {
// string ip = urlArray[2];
// Ping pingSender = new Ping();
// PingReply reply = pingSender.Send(ip, ms);//第一个参数为ip地址,第二个参数为ping的时间
// if (reply.Status == IPStatus.Success)
// {
// //通
// return true;
// }
// else
// {
// //不通
// return false;
// }
// }
// return true;
//}
Ping pingSender = new Ping();
PingReply reply = pingSender.Send(ip, ms);//第一个参数为ip地址,第二个参数为ping的时间
if (reply.Status == IPStatus.Success)
{
//通
return true;
}
else
{
//不通
return false;
}
}
return true;
}
/// <summary>
///
/// </summary>
......@@ -56,14 +56,15 @@ namespace OnlineStore.Common
public static Operation Post(string url, Operation operation, bool simulate)
{
try
{ //如果Op=0或者Op=5,先拼Ip,不通不发送
if (operation.op < 0 || operation.op.Equals(5))
{
if (PingURLIP(url, 100).Equals(false))
{
return null;
}
}
{
////如果Op=0或者Op=5,先拼Ip,不通不发送
//if (operation.op < 0 || operation.op.Equals(5))
//{
// if (PingURLIP(url, 100).Equals(false))
// {
// return null;
// }
//}
if (simulate)
{//模拟服务器返回
......@@ -76,7 +77,7 @@ namespace OnlineStore.Common
{//入库或出库
string json = JsonHelper.SerializeObject(operation);
LogUtil.error( "模拟HTTP服务器返回出库入库信息:" + json);
LogUtil.error("模拟HTTP服务器返回出库入库信息:" + json);
return operation;
}
}
......@@ -114,11 +115,11 @@ namespace OnlineStore.Common
private static int isLog = ConfigAppSettings.GetIntValue(Setting_Init.Server_Log_Open);
public static string LastServerMsg = "";
public static string Post(string url, string paramData, Encoding encoding)
{
if (PingURLIP(url, 100).Equals(false))
{
return null;
}
{
//if (PingURLIP(url, 100).Equals(false))
//{
// return null;
//}
if (isLog == 1)
{
......@@ -158,9 +159,9 @@ namespace OnlineStore.Common
{
LogUtil.info("收到服务器数据【" + result + "】");
}
LastServerMsg =DateTime.Now.ToLongTimeString()+ " URL:"+url+"\r\n"
+ "发送:" + paramData + "\r\n"
+"接收:" + result + "\r\n"
LastServerMsg = DateTime.Now.ToLongTimeString() + " URL:" + url + "\r\n"
+ "发送:" + paramData + "\r\n"
+ "接收:" + result + "\r\n"
;
return result;
......@@ -175,19 +176,19 @@ namespace OnlineStore.Common
{
try
{
LogUtil.info( "HTTP GET FROM: " + url);
LogUtil.info("HTTP GET FROM: " + url);
var wc = new WebClient { Encoding = encoding };
var readStream = wc.OpenRead(url);
using (var sr = new StreamReader(readStream, encoding))
{
var result = sr.ReadToEnd();
LogUtil.info( "receive << " + result);
LogUtil.info("receive << " + result);
return result;
}
}
catch (Exception e)
{
LogUtil.error( "HTTP GET ERROR:" + e.Message, 2);
LogUtil.error("HTTP GET ERROR:" + e.Message, 2);
}
return "";
}
......
......@@ -941,7 +941,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_ToShelf)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_12_PutReel);
InOutStoreLog("出库 " + MoveInfo.SLog + ":放下物品,压紧轴到P1,升降轴至P101,清空serverShelfData=null ");
InOutStoreLog("出库 " + MoveInfo.SLog + ":放下物品,压紧轴到P1,升降轴至P101,清空 taskData=null ");
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
......
......@@ -393,23 +393,23 @@ namespace OnlineStore.DeviceLibrary
DoorBean.StartOpen(MoveInfo);
return true;
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitEmptyAgv))
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitEmptyAgv))
{
if (!rfid.Equals(""))
{
if (!rfid.Equals(""))
{
string mark = GetMarkInfo();
LogUtil.error(Name + logN + " 当前出库中 BS_03_WaitEmptyAgv,RFID[" + rfid + "]不是空车,不处理agv,重发 NeedLeave [" + mark + "][" + CurrShelfID + "]");
AgvClient.SetStatus(Config.AgvNodeName, mark, CurrShelfID, ClientAction.NeedLeave, ClientLevel.High, true);
return false;
}
//等待空车到达
LogUtil.info(Name + logN + ",当前出库中 BS_03_WaitEmptyAgv,正在等待料架到达");
MoveInfo.NextMoveStep(StoreMoveStep.BS_04_DoorOpen);
InOutStoreLog("送出料架等待空车" + MoveInfo.SLog + ":agv到达,打开入料口移门");
DoorBean.StartOpen(MoveInfo);
return true;
string mark = GetMarkInfo();
LogUtil.error(Name + logN + " 当前 BS_03_WaitEmptyAgv,RFID[" + rfid + "]不是空车,不处理agv,重发 NeedLeave [" + mark + "][" + CurrShelfID + "]");
AgvClient.SetStatus(Config.AgvNodeName, mark, CurrShelfID, ClientAction.NeedLeave, ClientLevel.High, true);
return false;
}
//等待空车到达
LogUtil.info(Name + logN + ",当前 BS_03_WaitEmptyAgv,正在等待料架到达");
MoveInfo.NextMoveStep(StoreMoveStep.BS_04_DoorOpen);
InOutStoreLog("送出料架等待空车" + MoveInfo.SLog + ":agv到达,打开入料口移门");
DoorBean.StartOpen(MoveInfo);
return true;
}
else if (storeRunStatus.Equals(StoreRunStatus.Runing) &&
MoveInfo.MoveType.Equals(StoreMoveType.None) &&
......@@ -435,28 +435,38 @@ namespace OnlineStore.DeviceLibrary
private string CodeMsg = "";
private bool isInProcess = false;
private DateTime lastConTime = DateTime.Now;
public void server_connect_timer_Tick(object sender, EventArgs e)
{
if (isInProcess)
{
return;
TimeSpan span = DateTime.Now - lastConTime;
if (span.TotalSeconds < 60)
{
return;
}
}
isInProcess = true;
//HumitureController.QueryData();
humBean.HumidityProcess(this);
if (StoreManager.IsConnectServer)
lastConTime = DateTime.Now;
try
{
try
//HumitureController.QueryData();
humBean.HumidityProcess(this);
if (StoreManager.IsConnectServer)
{
SendLineStatus();
}
catch (Exception ex)
{
LogUtil.error(Name + "定时SendLineStatus出错:" + ex.ToString());
}
}
isInProcess = false;
catch (Exception ex)
{
LogUtil.error(Name + "定时SendLineStatus出错:" + ex.ToString());
}
finally
{
isInProcess = false;
}
}
/// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!