Commit fda93fd3 LN

1,出料机构的料架rfid上传到环形线。

2,环形线增加夹爪忽略的料号配置,此类料盘夹爪不检测是否有料
1 个父辈 01e1274f
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
<add key="ShowIOForm" value="0" /> <add key="ShowIOForm" value="0" />
<add key="RfidServer_Port" value="12001" /> <add key="RfidServer_Port" value="12001" />
<add key ="TrayHeightList" value ="8;12;16;20;24;28;36;48"/> <add key ="TrayHeightList" value ="8;12;16;20;24;28;36;48"/>
<!--夹爪夹紧时忽略的料号列表,多个用#分割-->
<add key ="PNList" value ="3402021720#"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -769,21 +769,21 @@ namespace OnlineStore.AssemblyLine ...@@ -769,21 +769,21 @@ namespace OnlineStore.AssemblyLine
private void btnOutStore_Click(object sender, EventArgs e) private void btnOutStore_Click(object sender, EventArgs e)
{ {
//模拟出库测试 ////模拟出库测试
if (equipBean.runStatus > LineRunStatus.Wait && equipBean.MoveInfo.MoveType.Equals(LineMoveType.None)) //if (equipBean.runStatus > LineRunStatus.Wait && equipBean.MoveInfo.MoveType.Equals(LineMoveType.None))
{ //{
InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, true); // InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, true);
LogUtil.info(equipBase.Name + "点击出库测试:" + param.ToShortStr()); // LogUtil.info(equipBase.Name + "点击出库测试:" + param.ToShortStr());
bool result = equipBean.StartTrayOut(param); // bool result = equipBean.StartTrayOut(param);
if (!result) // if (!result)
{ // {
MessageBox.Show("出库测试失败,详情请查看日志!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); // MessageBox.Show("出库测试失败,详情请查看日志!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
} // }
} //}
else //else
{ //{
MessageBox.Show("未启动或不在空闲中,出库测试失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); // MessageBox.Show("未启动或不在空闲中,出库测试失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
} //}
} }
private int TargetP3 = 0; private int TargetP3 = 0;
private bool StartTest = false ; private bool StartTest = false ;
......
...@@ -144,10 +144,14 @@ namespace OnlineStore.AssemblyLine ...@@ -144,10 +144,14 @@ namespace OnlineStore.AssemblyLine
if (box != null) if (box != null)
{ {
string posId = ""; string posId = "";
if (!String.IsNullOrEmpty(box.CurrPosId)) if (!String.IsNullOrEmpty(box.rfids))
{ {
posId = "[" + box.CurrPosId + "]"; posId = "[" + box.rfids + "]";
} }
if (!String.IsNullOrEmpty(box.CurrPosId))
{
posId += "[" + box.CurrPosId + "]";
}
if ((DateTime.Now - box.LastMsgTime).TotalSeconds < LineServer.ClientKeepSecond) if ((DateTime.Now - box.LastMsgTime).TotalSeconds < LineServer.ClientKeepSecond)
{ {
online = "✔"; online = "✔";
......
...@@ -103,5 +103,7 @@ namespace OnlineStore.Common ...@@ -103,5 +103,7 @@ namespace OnlineStore.Common
public static string TrayHeightList = "TrayHeightList"; public static string TrayHeightList = "TrayHeightList";
public static string PNList = "PNList";
} }
} }
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="agvClient\AgvClient.cs" /> <Compile Include="agvClient\AgvClient.cs" />
<Compile Include="assemblyLine\FeedingEquip_OutStore.cs" />
<Compile Include="assemblyLine\HY\HYEquipBase.cs" /> <Compile Include="assemblyLine\HY\HYEquipBase.cs" />
<Compile Include="assemblyLine\HY\HY_C1_SLStation.cs" /> <Compile Include="assemblyLine\HY\HY_C1_SLStation.cs" />
<Compile Include="assemblymanager\ALineManager.cs" /> <Compile Include="assemblymanager\ALineManager.cs" />
......
...@@ -111,16 +111,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -111,16 +111,16 @@ namespace OnlineStore.DeviceLibrary
private void StartReset() private void StartReset()
{ {
if (OutStoreHeight > 0) //if (OutStoreHeight > 0)
{ //{
LogInfo("复位前,清理出库高度:" + OutStoreHeight); // LogInfo("复位前,清理出库高度:" + OutStoreHeight);
} //}
ClampJwa.Reset(); ClampJwa.Reset();
//复位时设置状态为none //复位时设置状态为none
AgvClient.SetStatus(Config.AgvInName); AgvClient.SetStatus(Config.AgvInName);
AgvClient.SetStatus(Config.AgvOutName); AgvClient.SetStatus(Config.AgvOutName);
OutStoreHeight = -1; //OutStoreHeight = -1;
//OutStoreCount = 0; //OutStoreCount = 0;
BatchAxisStopCheck(); BatchAxisStopCheck();
ResetClearData(); ResetClearData();
...@@ -425,10 +425,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -425,10 +425,10 @@ namespace OnlineStore.DeviceLibrary
{ {
StartInStoreP(); StartInStoreP();
} }
else //else
{ //{
StartOutStoreP(); // StartOutStoreP();
} //}
} }
AgvStatusPro(); AgvStatusPro();
...@@ -1146,15 +1146,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -1146,15 +1146,15 @@ namespace OnlineStore.DeviceLibrary
string msg = ""; string msg = "";
int tLength = 15; int tLength = 15;
string leftTask = ""; string leftTask = "";
if (taskData != null) //if (taskData != null)
{ //{
leftTask = "剩余任务:" + taskData.ToStr(); // leftTask = "剩余任务:" + taskData.ToStr();
} //}
msg += "料架:" + CurrShelfId + " "+leftTask + "\r\n"; msg += "料架:" + CurrShelfId + " "+leftTask + "\r\n";
if (LastOutParam.rfid != "") //if (LastOutParam.rfid != "")
{ //{
msg += "出库信息:" + LastOutParam.ToShortStr() + "\r\n"; // msg += "出库信息:" + LastOutParam.ToShortStr() + "\r\n";
} //}
msg += "当前托盘:" + currTrayNum + " 上个托盘:" + preTrayNum + "\n"; msg += "当前托盘:" + currTrayNum + " 上个托盘:" + preTrayNum + "\n";
msg += "runS: " + runStatus + "\n"; msg += "runS: " + runStatus + "\n";
......
...@@ -377,7 +377,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -377,7 +377,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_23_CylinderTighten); MoveInfo.NextMoveStep(LineMoveStep.FI_23_CylinderTighten);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移机构夹紧"); InLog("料盘移栽" + MoveInfo.SLog + ":上料横移机构夹紧");
ClampJwa.Push(MoveInfo); ClampJwa.Push(MoveInfo,true,lastcode);
} }
else if (MoveInfo.IsStep(LineMoveStep.FI_23_CylinderTighten)) else if (MoveInfo.IsStep(LineMoveStep.FI_23_CylinderTighten))
{ {
...@@ -390,9 +390,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -390,9 +390,16 @@ namespace OnlineStore.DeviceLibrary
if (UpdownIsInP1()) if (UpdownIsInP1())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_25_CheckTray); MoveInfo.NextMoveStep(LineMoveStep.FI_25_CheckTray);
InLog("料盘移栽" + MoveInfo.SLog + ":等待 SL_AxisLocationCheck=LOW 且夹爪有料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_AxisLocationCheck, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_AxisLocationCheck, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel()); if (LineManager.NeedWaitHassReel(lastcode))
{
InLog("料盘移栽" + MoveInfo.SLog + ":等待 SL_AxisLocationCheck=LOW 且夹爪有料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel());
}
else
{
InLog("料盘移栽" + MoveInfo.SLog + ":等待 SL_AxisLocationCheck=LOW 不需要验证夹爪有料");
}
} }
else else
{ {
...@@ -937,6 +944,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -937,6 +944,8 @@ namespace OnlineStore.DeviceLibrary
LastCodeList = new List<string>(NextCodeList); LastCodeList = new List<string>(NextCodeList);
NextCodeList = new List<string>(); NextCodeList = new List<string>();
MoveInfo.NextMoveStep(LineMoveStep.FI_20_CylinderTake); MoveInfo.NextMoveStep(LineMoveStep.FI_20_CylinderTake);
lastcode = CodeManager.ProcessCode(LastCodeList);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移取料端"); InLog("料盘移栽" + MoveInfo.SLog + ":上料横移取料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
} }
...@@ -955,7 +964,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -955,7 +964,8 @@ namespace OnlineStore.DeviceLibrary
if (!hasRightCode) if (!hasRightCode)
{ {
LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name, false, 3000); LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name, false, 3000);
} }
lastcode = CodeManager.ProcessCode(LastCodeList);
return LastCodeList; return LastCodeList;
}); });
} }
...@@ -1126,51 +1136,51 @@ namespace OnlineStore.DeviceLibrary ...@@ -1126,51 +1136,51 @@ namespace OnlineStore.DeviceLibrary
//是出料的模块 //是出料的模块
if (Config.IsCanOut.Equals(1)) if (Config.IsCanOut.Equals(1))
{ {
//此托盘是紧急出料盘,需要通过料架出库 ////此托盘是紧急出料盘,需要通过料架出库
bool debugNeed = (runStatus >= LineRunStatus.Runing) && info.IsFull && info.InOrOutStore.Equals(2); //bool debugNeed = (runStatus >= LineRunStatus.Runing) && info.IsFull && info.InOrOutStore.Equals(2);
debugNeed = false; //debugNeed = false;
bool isJinji = (param.cutReel||param.urgentReel) && info.InOrOutStore.Equals(2) && info.IsFull && runStatus >= LineRunStatus.Runing; //bool isJinji = (param.cutReel||param.urgentReel) && info.InOrOutStore.Equals(2) && info.IsFull && runStatus >= LineRunStatus.Runing;
//bool isJinji = (param.urgentReel || param.cutReel) && info.InOrOutStore.Equals(2) && info.IsFull && runStatus >= LineRunStatus.Runing; ////bool isJinji = (param.urgentReel || param.cutReel) && info.InOrOutStore.Equals(2) && info.IsFull && runStatus >= LineRunStatus.Runing;
if (debugNeed || isJinji) //if (debugNeed || isJinji)
{ //{
//判断是否有料架,是否可以出库 // //判断是否有料架,是否可以出库
if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.LOW)) // if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.LOW))
{ // {
LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,定位工位无料架,暂不处理", DeviceID * 1000 + 16); // LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,定位工位无料架,暂不处理", DeviceID * 1000 + 16);
return false; // return false;
} // }
else if (OutStoreHeight < 0) // else if (OutStoreHeight < 0)
{ // {
LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,料架未准备好,暂不处理", DeviceID * 1000 + 17); // LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,料架未准备好,暂不处理", DeviceID * 1000 + 17);
return false; // return false;
} // }
//如果已经开始送出料架,暂不处理 // //如果已经开始送出料架,暂不处理
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && MoveInfo.MoveStep >= LineMoveStep.FO_51_BatchAxisToP2) // if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && MoveInfo.MoveStep >= LineMoveStep.FO_51_BatchAxisToP2)
{ // {
LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,正在送出料架,暂不处理", DeviceID * 1000 + 18); // LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,正在送出料架,暂不处理", DeviceID * 1000 + 18);
return false; // return false;
} // }
string lastXuniRfid = LastOutParam.rfid; // string lastXuniRfid = LastOutParam.rfid;
if (String.IsNullOrEmpty(lastXuniRfid).Equals(false) && (!lastXuniRfid.Equals(param.rfid))) // if (String.IsNullOrEmpty(lastXuniRfid).Equals(false) && (!lastXuniRfid.Equals(param.rfid)))
{ // {
//如果流水线还有次料架的任务,暂不送出 // //如果流水线还有次料架的任务,暂不送出
int count = TrayManager.GetOutTaskByRfid(lastXuniRfid); // int count = TrayManager.GetOutTaskByRfid(lastXuniRfid);
if (count > 0) // if (count > 0)
{ // {
LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,料架号不一致[" + lastXuniRfid + "][" + param.rfid + "],当前料架还有【" + count + "】个任务,托盘先离开", DeviceID * 1000 + 19); // LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,料架号不一致[" + lastXuniRfid + "][" + param.rfid + "],当前料架还有【" + count + "】个任务,托盘先离开", DeviceID * 1000 + 19);
return false; // return false;
} // }
} // }
//if (NeedSaveParam) // //if (NeedSaveParam)
//{ // //{
// LogInfo(" 【" + info.ToStr() + "】需要出库 ,拦截托盘 "); // // LogInfo(" 【" + info.ToStr() + "】需要出库 ,拦截托盘 ");
//} // //}
return true; // return true;
} //}
} }
else if (!info.IsFull) else if (!info.IsFull)
...@@ -1243,7 +1253,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -1243,7 +1253,17 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
public override bool StartOutStoreMove(InOutParam param)
{
return false;
}
protected override void OutStoreProcess()
{
}
#endregion #endregion
} }
......
...@@ -353,23 +353,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -353,23 +353,23 @@ namespace OnlineStore.DeviceLibrary
FeedingEquip feed = LineManager.Line.FeedingEquipMap[Config.WorkDeviceId]; FeedingEquip feed = LineManager.Line.FeedingEquipMap[Config.WorkDeviceId];
if (feed.Config.IsCanOut.Equals(1)) if (feed.Config.IsCanOut.Equals(1))
{ {
TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum); //TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum);
//紧急出料 ////紧急出料
if (feed.StartTrayOut(trayInfo.InoutPar)) //if (feed.StartTrayOut(trayInfo.InoutPar))
{ //{
MoveInfo.NextMoveStep(LineMoveStep.HY08_SL_WaitProcessReel); // MoveInfo.NextMoveStep(LineMoveStep.HY08_SL_WaitProcessReel);
CheckLog("托盘阻挡" + MoveInfo.SLog + " " + feed.Name + "始抓料,等待料盘放入或料盘离开 "); // CheckLog("托盘阻挡" + MoveInfo.SLog + " " + feed.Name + "始抓料,等待料盘放入或料盘离开 ");
} //}
else if (MoveInfo.IsTimeOut(30)) //else if (MoveInfo.IsTimeOut(30))
{ //{
MoveTimeOut(MoveInfo, "等待" + feed.Name + "开始出库超时"); // MoveTimeOut(MoveInfo, "等待" + feed.Name + "开始出库超时");
//如果当前无料串,或者料串已离开,直接放行 托盘 // //如果当前无料串,或者料串已离开,直接放行 托盘
TrayCanLeave(); // TrayCanLeave();
} //}
else if (MoveInfo.IsTimeOut(20)) //else if (MoveInfo.IsTimeOut(20))
{ //{
MoveTimeOut(MoveInfo, "等待" + feed.Name + "开始出库超时"); // MoveTimeOut(MoveInfo, "等待" + feed.Name + "开始出库超时");
} //}
} }
else else
{ {
......
...@@ -310,7 +310,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -310,7 +310,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MO_54_CylinderOpen); MoveInfo.NextMoveStep(LineMoveStep.MO_54_CylinderOpen);
ClampEmptyMove = false; ClampEmptyMove = false;
ClampJwa.Push(MoveInfo); ClampJwa.Push(MoveInfo,true,MoveInfo.MoveParam.WareCode);
if (ClampCount <= 0) if (ClampCount <= 0)
{ {
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸夹紧,更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【MOVING】【" + DeviceID + "】"); OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸夹紧,更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【MOVING】【" + DeviceID + "】");
...@@ -341,7 +341,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -341,7 +341,7 @@ namespace OnlineStore.DeviceLibrary
if (UpdownIsUp()) if (UpdownIsUp())
{ {
//if (IOValue(IO_Type.ClampCylinder_Check).Equals(IO_VALUE.HIGH)) //if (IOValue(IO_Type.ClampCylinder_Check).Equals(IO_VALUE.HIGH))
if (ClampJwa.HasReel()) if (ClampJwa.HasReel() || (!LineManager.NeedWaitHassReel(MoveInfo.MoveParam.WareCode)))
{ {
if (IsBigStore()) if (IsBigStore())
{ {
...@@ -576,7 +576,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -576,7 +576,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_05_CylinderOpen); MoveInfo.NextMoveStep(LineMoveStep.MI_05_CylinderOpen);
InLog("入库 " + MoveInfo.SLog + ": 夹料气缸夹紧"); InLog("入库 " + MoveInfo.SLog + ": 夹料气缸夹紧");
ClampEmptyMove = false; ClampEmptyMove = false;
ClampJwa.Push(MoveInfo); ClampJwa.Push(MoveInfo, true, MoveInfo.MoveParam.WareCode);
EDataManager.UpdateParam(DeviceID, 1, MoveInfo.MoveParam); EDataManager.UpdateParam(DeviceID, 1, MoveInfo.MoveParam);
} }
else if (MoveInfo.IsStep(LineMoveStep.MI_05_CylinderOpen)) else if (MoveInfo.IsStep(LineMoveStep.MI_05_CylinderOpen))
...@@ -588,9 +588,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -588,9 +588,9 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(LineMoveStep.MI_06_CylinderUp)) else if (MoveInfo.IsStep(LineMoveStep.MI_06_CylinderUp))
{ {
if (ClampJwa.HasReel()) if (ClampJwa.HasReel() || (!LineManager.NeedWaitHassReel(MoveInfo.MoveParam.WareCode)))
{ {
MI_08_WaitBox(); MI_08_WaitBox();
} }
else else
{ {
......
...@@ -282,5 +282,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -282,5 +282,37 @@ namespace OnlineStore.DeviceLibrary
} }
return trayHeightList; return trayHeightList;
} }
private static List<string> PnList = null;
public static List<string> GetPnList()
{
if (PnList == null)
{
string config = ConfigAppSettings.GetValue(Setting_Init.PNList);
string[] array = config.Split('#');
foreach (string s in array)
{
if (!String.IsNullOrEmpty(s))
{
PnList.Add(s);
}
}
}
return PnList;
}
public static bool NeedWaitHassReel(string code)
{
List<string> list = GetPnList();
foreach(string pn in list)
{
if (code.Contains(pn))
{
return false;
}
}
return true;
}
} }
} }
...@@ -49,7 +49,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -49,7 +49,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
public void Push(LineMoveInfo moveInfo = null, bool checkHasReel = true) public void Push(LineMoveInfo moveInfo = null, bool checkHasReel = true, string code = "")
{ {
if (rmaxis != null && rmaxis.IsPortOpen) if (rmaxis != null && rmaxis.IsPortOpen)
{ {
...@@ -58,7 +58,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -58,7 +58,7 @@ namespace OnlineStore.DeviceLibrary
if (moveInfo != null) if (moveInfo != null)
{ {
moveInfo.WaitList.Add(WaitResultInfo.WaitClampReached((int)config.Distance)); moveInfo.WaitList.Add(WaitResultInfo.WaitClampReached((int)config.Distance));
if (checkHasReel) if (checkHasReel && LineManager.NeedWaitHassReel(code))
{ {
moveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel()); moveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel());
//有一个到位就算到位 //有一个到位就算到位
......
...@@ -18,7 +18,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -18,7 +18,7 @@ namespace OnlineStore.DeviceLibrary
CurrPosId = ""; CurrPosId = "";
} }
public BoxInfo(int id,string cid,int seq,int ss,int runs,int hasTray,int alarmType,List<string> inList,string currPosId) public BoxInfo(int id,string cid,int seq,int ss,int runs,int hasTray,int alarmType,List<string> inList,string currPosId,string rfids)
{ {
this.ID = id; this.ID = id;
CId = cid; CId = cid;
...@@ -30,6 +30,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -30,6 +30,7 @@ namespace OnlineStore.DeviceLibrary
this.HasTray = hasTray; this.HasTray = hasTray;
this.WaitInStoreList = inList; this.WaitInStoreList = inList;
this.CurrPosId = currPosId; this.CurrPosId = currPosId;
this.rfids = rfids;
} }
public string ToShowStr() public string ToShowStr()
...@@ -79,5 +80,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -79,5 +80,10 @@ namespace OnlineStore.DeviceLibrary
/// 当前出入库的库位号 /// 当前出入库的库位号
/// </summary> /// </summary>
public string CurrPosId = ""; public string CurrPosId = "";
/// <summary>
/// 出料机构料架号
/// </summary>
public string rfids = "";
} }
} }
...@@ -444,36 +444,36 @@ namespace OnlineStore.DeviceLibrary ...@@ -444,36 +444,36 @@ namespace OnlineStore.DeviceLibrary
// string[] msgArray = msg.Split(cmd_spilt); // string[] msgArray = msg.Split(cmd_spilt);
msg = msg.Replace("\r", ""); msg = msg.Replace("\r", "");
// LogUtil.debug("收到【" + client.AddStr + "】的消息【" + msg + "】"); // LogUtil.debug("收到【" + client.AddStr + "】的消息【" + msg + "】");
StoreSendBean storeSMsg = JsonHelper.DeserializeJsonToObject<StoreSendBean>(msg); StoreSendBean sMsg = JsonHelper.DeserializeJsonToObject<StoreSendBean>(msg);
if (storeSMsg == null) if (sMsg == null)
{ {
LogUtil.error("收到【" + client.AddStr + "】的消息【" + msg + "】,解析失败"); LogUtil.error("收到【" + client.AddStr + "】的消息【" + msg + "】,解析失败");
} }
else else
{ {
int id = storeSMsg.StoreId; int id = sMsg.StoreId;
BoxInfo box = new BoxInfo(storeSMsg.StoreId, storeSMsg.Cid, storeSMsg.Seq, storeSMsg.SStatus, storeSMsg.SRunStatus, storeSMsg.DoorHasTray, storeSMsg.AlarmType, storeSMsg.WaitInStoreList,storeSMsg.CurrPosId); BoxInfo box = new BoxInfo(sMsg.StoreId, sMsg.Cid, sMsg.Seq, sMsg.SStatus, sMsg.SRunStatus, sMsg.DoorHasTray, sMsg.AlarmType, sMsg.WaitInStoreList,sMsg.CurrPosId,sMsg.rfids);
SaveBoxClient(id, box, client ); SaveBoxClient(id, box, client );
string cmd = storeSMsg.Cmd; string cmd = sMsg.Cmd;
if (cmd.StartsWith(cmd_heart)) if (cmd.StartsWith(cmd_heart))
{ {
} }
else if (cmd.StartsWith(cmd_outend)) else if (cmd.StartsWith(cmd_outend))
{ {
if (storeSMsg.data == null) if (sMsg.data == null)
{ {
LogUtil.info("收到【" + client.AddStr + "】的出库完成消息【" + msg + "】出库信息为空,不处理"); LogUtil.info("收到【" + client.AddStr + "】的出库完成消息【" + msg + "】出库信息为空,不处理");
} }
else else
{ {
LogUtil.info("收到【" + client.AddStr + "】的出库完成消息【" + msg + "】"); LogUtil.info("收到【" + client.AddStr + "】的出库完成消息【" + msg + "】");
string posId = storeSMsg.data.posId; string posId = sMsg.data.posId;
int plateH = Convert.ToInt32(storeSMsg.data.plateH.Trim()); int plateH = Convert.ToInt32(sMsg.data.plateH.Trim());
int plateW = Convert.ToInt32(storeSMsg.data.plateW.Trim()); int plateW = Convert.ToInt32(sMsg.data.plateW.Trim());
InOutParam param = new InOutParam(0, storeSMsg.data.barcode, posId, plateH, plateW,false, InOutParam param = new InOutParam(0, sMsg.data.barcode, posId, plateH, plateW,false,
storeSMsg.data.urgentReel,storeSMsg.data.cutReel,storeSMsg.data.smallReel,storeSMsg.data.rfid,storeSMsg.data.rfidLoc); sMsg.data.urgentReel,sMsg.data.cutReel,sMsg.data.smallReel,sMsg.data.rfid,sMsg.data.rfidLoc);
LineManager.Line.boxBean_OutStoreEnd(id, param); LineManager.Line.boxBean_OutStoreEnd(id, param);
} }
} }
...@@ -514,19 +514,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -514,19 +514,19 @@ namespace OnlineStore.DeviceLibrary
public static string S_NG = "IsNg"; public static string S_NG = "IsNg";
} }
public class StoreReviceBean //public class StoreReviceBean
{ //{
public string Cmd = ""; // public string Cmd = "";
public int CanOutStore = 0; // public int CanOutStore = 0;
public string PosId = ""; // public string PosId = "";
public string PlateH = "0"; // public string PlateH = "0";
public string PlateW = "0"; // public string PlateW = "0";
public string WareCode = ""; // public string WareCode = "";
public int IsDebug = 0; // public int IsDebug = 0;
} //}
public class StoreSendBean public class StoreSendBean
{ {
public StoreSendBean(int id, string cid, int ss, int runs, int doorHasTray, int alarmType) public StoreSendBean(int id, string cid, int ss, int runs, int doorHasTray, int alarmType,string rfids)
{ {
this.StoreId = id; this.StoreId = id;
this.Cid = cid; this.Cid = cid;
...@@ -534,7 +534,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -534,7 +534,7 @@ namespace OnlineStore.DeviceLibrary
this.SRunStatus = runs; this.SRunStatus = runs;
this.DoorHasTray = doorHasTray; this.DoorHasTray = doorHasTray;
this.AlarmType = alarmType; this.AlarmType = alarmType;
this.rfids = rfids;
} }
public string Cmd = ""; public string Cmd = "";
public int StoreId = 0; public int StoreId = 0;
...@@ -544,17 +544,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -544,17 +544,12 @@ namespace OnlineStore.DeviceLibrary
public int SRunStatus = 0; public int SRunStatus = 0;
public int DoorHasTray = 0; public int DoorHasTray = 0;
public int AlarmType = 0; public int AlarmType = 0;
//public string PosId = "";
//public string PlateH = "0";
//public string PlateW = "0";
///// <summary>
///// 目标料架
///// </summary>
//public string tShelfI = "";
public List<string> WaitInStoreList = new List<string>(); public List<string> WaitInStoreList = new List<string>();
public InOutData data = null; public InOutData data = null;
public string CurrPosId = ""; public string CurrPosId = "";
public string rfids = "";
} }
public class InOutData public class InOutData
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!