| | |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_InboundFinishConfirm, true, view_stationObj.W_DataFinish); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 " + true + "失败,返回结果:" + b2.resMsg, |
| | | msg = string.Format("向Station地址{0} 入库完成确认 写 " + true + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_InboundFinishConfirm); |
| | | return false; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public bool WriteInStoreTaskInfo(string stationCode, string toPlaceNo, short length, short width, short height, out string msg) |
| | | public bool OutboundFinishConfirm(string stationCode, out string msg) |
| | | { |
| | | try |
| | | { |
| | | msg = ""; |
| | | var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | |
| | | var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_OutboundFinishConfirm, true, view_stationObj.W_OutboundFinishConfirm); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station 出库任务完成确认 地址{0} 写 " + true + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_OutboundFinishConfirm); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | msg = ex.Message; |
| | | var logcontext = string.Format("向Statio 出库任务完成确认 出现异常:" + JsonConvert.SerializeObject(ex), |
| | | ""); |
| | | Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, logcontext, ex); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public bool WriteInStoreTaskInfo(string stationCode, string toPlaceNo, short length, short width, short height, out string msg, int inbound_TaskID) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 读码解析完成 " + true + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_DataFinish); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_Inbound_TaskID, inbound_TaskID, view_stationObj.W_Inbound_TaskID); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 入库任务号 " + inbound_TaskID + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_Inbound_TaskID); |
| | | return false; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public bool WriteOutStoreTaskInfo(string stationCode, string sourcePlaceNo, out string msg, int outbound_TaskID) |
| | | { |
| | | try |
| | | { |
| | | msg = ""; |
| | | var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | |
| | | var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, true, view_stationObj.W_Outbound_TaskID); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 出库任务号 " + true + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_Outbound_TaskID); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, true, view_stationObj.W_ReqOut); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 请求出库 " + true + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_ReqOut); |
| | | return false; |
| | | } |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_Destination_Out, Convert.ToInt32(sourcePlaceNo), view_stationObj.W_Destination_Out); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 库位号 " + sourcePlaceNo + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_Destination_Out); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | msg = ex.Message; |
| | | var logcontext = string.Format("WriteOutStoreTaskInfo 出现异常:" + JsonConvert.SerializeObject(ex), |
| | | ""); |
| | | Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, logcontext, ex); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// Station的任务完成ACK赋值 |
| | | /// </summary> |