Commit d404a67a 几米阳光

增加出库判断报警

1 个父辈 5653af1d
此文件类型无法预览
...@@ -59,9 +59,12 @@ ...@@ -59,9 +59,12 @@
2.出库增加缓存功能,若出库失败也放入缓存。 2.出库增加缓存功能,若出库失败也放入缓存。
3.客户端启动时默认状态为回原点 3.客户端启动时默认状态为回原点
20190315
盘点功能修改:
1.出库服务器发送增加参数:
statusBean.addServerData("needInAfterOut",needInAfterOut);
为true时,盘点出库后需要接着扫码入库
2.Data中增加数据:"inTimeout","alarm" 盘点入库超时报警
......
...@@ -205,5 +205,17 @@ namespace OnlineStore.Common ...@@ -205,5 +205,17 @@ namespace OnlineStore.Common
/// 门口料盘检测信号,1=有信号 /// 门口料盘检测信号,1=有信号
/// </summary> /// </summary>
public static string tarycheck_door = "tarycheck_door"; public static string tarycheck_door = "tarycheck_door";
/// <summary>
/// 为true时,盘点出库后需要接着扫码入库
/// </summary>
public static string needInAfterOut = "needInAfterOut";
/// <summary>
/// "inTimeout","alarm" 盘点入库超时报警
/// </summary>
public static string inTimeout = "inTimeout";
} }
} }
...@@ -1917,6 +1917,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -1917,6 +1917,22 @@ namespace OnlineStore.DeviceLibrary
string server = ConfigAppSettings.GetValue(Setting_Init.http_server); string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
Operation resultOperation = HttpHelper.Post(StoreManager.GetPostApi(server), lineOperation, false); Operation resultOperation = HttpHelper.Post(StoreManager.GetPostApi(server), lineOperation, false);
//增加报警处理
if (resultOperation.data != null && resultOperation.data.ContainsKey(ParamDefine.inTimeout)&&resultOperation.data[ParamDefine.inTimeout].ToLower().Equals("alarm"))
{
WarnMsg = "盘点入库超时报警";
LogUtil.error("收到服务器端报警:盘点入库超时报警");
Alarm(StoreAlarmType.CheckInStoreTimeOut, StoreAlarmType.CheckInStoreTimeOut.ToString(), WarnMsg, StoreMoveType.None);
}
else
{
if (alarmType.Equals(StoreAlarmType.CheckInStoreTimeOut))
{
LogUtil.error("之前有报警:盘点入库超时报警,现在已经无报警,清理盘点入库报警");
WarnMsg = "";
alarmType = StoreAlarmType.None;
}
}
//发送状态信息到服务器 //发送状态信息到服务器
if (resultOperation == null || (resultOperation.op != 2)) if (resultOperation == null || (resultOperation.op != 2))
{ {
...@@ -1931,8 +1947,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -1931,8 +1947,12 @@ namespace OnlineStore.DeviceLibrary
string posIdStr = data[ParamDefine.posId]; string posIdStr = data[ParamDefine.posId];
string plateWStr = data[ParamDefine.plateW]; string plateWStr = data[ParamDefine.plateW];
string plateHStr = data[ParamDefine.plateH]; string plateHStr = data[ParamDefine.plateH];
bool needInAfterOut = false;
LogUtil.info(LOGGER, "收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr); if (data.ContainsKey(ParamDefine.needInAfterOut))
{
needInAfterOut = data[ParamDefine.needInAfterOut].ToLower().Equals("true");
}
LogUtil.info(LOGGER, "收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr+ ",needInAfterOut="+needInAfterOut);
char splitChar = '|'; char splitChar = '|';
string[] posIdArray = posIdStr.Split(splitChar); string[] posIdArray = posIdStr.Split(splitChar);
string[] plateWArray = plateWStr.Split(splitChar); string[] plateWArray = plateWStr.Split(splitChar);
...@@ -1963,10 +1983,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -1963,10 +1983,10 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
FixtureCodeInfo currInOutFixture = new FixtureCodeInfo(0, "", posId, plateW, plateH); FixtureCodeInfo currInOutFixture = new FixtureCodeInfo(0, "", posId, plateW, plateH,needInAfterOut);
if (CanStarInOut()) if (CanStarInOut())
{ {
bool result = StartOutStoreMove(new InOutStoreParam("", posId, position)); bool result = StartOutStoreMove(new InOutStoreParam("", posId, position,needInAfterOut));
if (!result) if (!result)
{ {
LogUtil.info(LOGGER, StoreName + " 执行出库【" + currInOutFixture.ToStr() + "】失败,加入等待队列"); LogUtil.info(LOGGER, StoreName + " 执行出库【" + currInOutFixture.ToStr() + "】失败,加入等待队列");
......
...@@ -726,18 +726,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -726,18 +726,26 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_13_GoBack) else if (StoreMove.MoveStep == StoreMoveStep.SO_13_GoBack)
{ {
int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds); StoreMove.NextMoveStep(StoreMoveStep.SO_14_WaitTake);
if (OutStoreWaitSeconds <= 0) if (StoreMove.MoveParam.needInAfterOut)
{ {
OutStoreWaitSeconds = 600; OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,出库完成需要入库, 不需要等待 ");
}
else
{
int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds);
if (OutStoreWaitSeconds <= 0)
{
OutStoreWaitSeconds = 600;
}
int ms = OutStoreWaitSeconds * 1000;
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove.OneWaitCanEndStep = true;
} }
int ms = OutStoreWaitSeconds * 1000;
StoreMove.NextMoveStep(StoreMoveStep.SO_14_WaitTake);
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待"+OutStoreWaitSeconds+"秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove.OneWaitCanEndStep = true;
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_14_WaitTake) else if (StoreMove.MoveStep == StoreMoveStep.SO_14_WaitTake)
{ {
......
...@@ -20,7 +20,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -20,7 +20,8 @@ namespace OnlineStore.DeviceLibrary
{ {
ACStoreP = null; ACStoreP = null;
this.WareNumber = ""; this.WareNumber = "";
MoveP = null; MoveP = null;
needInAfterOut = false;
} }
/// <summary> /// <summary>
/// 新建一个对象 /// 新建一个对象
...@@ -34,6 +35,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -34,6 +35,7 @@ namespace OnlineStore.DeviceLibrary
PositionNum = posId; PositionNum = posId;
MoveP = null; MoveP = null;
IsSolderPaste = false; IsSolderPaste = false;
needInAfterOut = false;
} }
public InOutStoreParam(string wareNo, string posId,string plateH,string plateW) public InOutStoreParam(string wareNo, string posId,string plateH,string plateW)
{ {
...@@ -44,6 +46,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -44,6 +46,7 @@ namespace OnlineStore.DeviceLibrary
this.PlagtW = plateW; this.PlagtW = plateW;
this.PlateH = plateH; this.PlateH = plateH;
IsSolderPaste = false; IsSolderPaste = false;
needInAfterOut = false;
} }
public InOutStoreParam(string wareNo, string posId, string plateH, string plateW,int trayCode) public InOutStoreParam(string wareNo, string posId, string plateH, string plateW,int trayCode)
{ {
...@@ -55,6 +58,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -55,6 +58,7 @@ namespace OnlineStore.DeviceLibrary
this.PlateH = plateH; this.PlateH = plateH;
this.TrayCode = trayCode; this.TrayCode = trayCode;
IsSolderPaste = false; IsSolderPaste = false;
needInAfterOut = false;
} }
public InOutStoreParam(string wareNo, string posId, LineMoveP linePosition) public InOutStoreParam(string wareNo, string posId, LineMoveP linePosition)
...@@ -64,14 +68,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -64,14 +68,16 @@ namespace OnlineStore.DeviceLibrary
PositionNum = posId; PositionNum = posId;
MoveP = linePosition; MoveP = linePosition;
IsSolderPaste = false; IsSolderPaste = false;
needInAfterOut = false;
} }
public InOutStoreParam(string wareNo, string posId, ACStorePosition movep) public InOutStoreParam(string wareNo, string posId, ACStorePosition movep,bool needInAfterOut)
{ {
ACStoreP = movep; ACStoreP = movep;
WareNumber = wareNo; WareNumber = wareNo;
PositionNum = posId; PositionNum = posId;
MoveP = null; MoveP = null;
IsSolderPaste = false; IsSolderPaste = false;
needInAfterOut = needInAfterOut;
} }
private ACStorePosition ACStoreP = null; private ACStorePosition ACStoreP = null;
...@@ -118,7 +124,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -118,7 +124,10 @@ namespace OnlineStore.DeviceLibrary
/// 是否是放入锡膏(在线料仓才需要此字段) /// 是否是放入锡膏(在线料仓才需要此字段)
/// </summary> /// </summary>
public bool IsSolderPaste { get; set; } public bool IsSolderPaste { get; set; }
/// <summary>
/// 出库完成是否需要马上入库
/// </summary>
public bool needInAfterOut { get; set; }
} }
} }
...@@ -801,5 +801,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -801,5 +801,9 @@ namespace OnlineStore.DeviceLibrary
/// 电钢报警 /// 电钢报警
/// </summary> /// </summary>
StellAlarm=50, StellAlarm=50,
/// <summary>
/// 盘点入库超时报警
/// </summary>
CheckInStoreTimeOut = 100,
} }
} }
...@@ -19,9 +19,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -19,9 +19,11 @@ namespace OnlineStore.DeviceLibrary
this.PosId = posId; this.PosId = posId;
this.plateH = ""; this.plateH = "";
this.plateW = ""; this.plateW = "";
this.needInAfterOut = false;
} }
public FixtureCodeInfo(int trayCode, string wareNum, string posId,string platew,string plateh) public FixtureCodeInfo(int trayCode, string wareNum, string posId,string platew,string plateh,bool needInAfterOut)
{ {
this.needInAfterOut = needInAfterOut;
this.TrayCode = trayCode; this.TrayCode = trayCode;
this.WareNum = wareNum; this.WareNum = wareNum;
this.PosId = posId; this.PosId = posId;
...@@ -48,7 +50,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -48,7 +50,10 @@ namespace OnlineStore.DeviceLibrary
/// 料盘高 /// 料盘高
/// </summary> /// </summary>
public string plateH { get; set; } public string plateH { get; set; }
/// <summary>
/// 出库完成是否需要马上入库
/// </summary>
public bool needInAfterOut { get; set; }
public string ToStr() public string ToStr()
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!