zongzhibin
2024-11-23 52ea328589f08585046bd519e4c57e5dce24e1dd
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -234,7 +234,7 @@
        }
        public bool InboundFinishConfirm(string stationCode, out string msg)
        public bool InboundFinishConfirm(string stationCode, bool value, out string msg)
        {
            try
            {
@@ -242,10 +242,10 @@
                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_InboundFinishConfirm, true, view_stationObj.W_DataFinish);
                MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_InboundFinishConfirm, value, view_stationObj.W_DataFinish);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0}  入库完成确认 写  " + true + "失败,返回结果:" + b2.resMsg,
                    msg = string.Format("向Station地址{0}  入库完成确认 写  " + value + "失败,返回结果:" + b2.resMsg,
                        stationObj.W_InboundFinishConfirm);
                    return false;
                }
@@ -262,7 +262,7 @@
            }
        }
        public bool OutboundFinishConfirm(string stationCode, out string msg)
        public bool OutboundFinishConfirm(string stationCode, bool value, out string msg)
        {
            try
            {
@@ -270,10 +270,10 @@
                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);
                MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_OutboundFinishConfirm, value, view_stationObj.W_OutboundFinishConfirm);
                if (!b2.result)
                {
                    msg = string.Format("向Station 出库任务完成确认 地址{0} 写  " + true + "失败,返回结果:" + b2.resMsg,
                    msg = string.Format("向Station 出库任务完成确认 地址{0} 写  " + value + "失败,返回结果:" + b2.resMsg,
                        stationObj.W_OutboundFinishConfirm);
                    return false;
                }
@@ -298,16 +298,8 @@
                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_DataFinish, true, view_stationObj.W_DataFinish);
                if (!b2.result)
                {
                    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);
                MessageModel 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,
@@ -345,6 +337,16 @@
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} 写 读码解析完成 " + true + "失败,返回结果:" + b2.resMsg,
                       stationObj.W_DataFinish);
                    return false;
                }
                return true;
            }
            catch (Exception ex)