public static Response icar_SetPlatformAlarmCmd(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, TrafficSimpleCmd trafficSimpleCmd) { Response response; if (RemotingClient.app == null) { return RemotingClient.reResult; } try { response = RemotingClient.app.icar_SetPlatformAlarmCmd(ParamType, CarValues, CarPw, CommMode, trafficSimpleCmd); } catch (SocketException socketException) { Record.execFileRecord("交通部协议平台报警接口", socketException.Message); response = RemotingClient.reResult; } catch (RemotingException remotingException) { Record.execFileRecord("交通部协议平台报警接口", remotingException.Message); response = RemotingClient.reResult; } catch (Exception exception) { Record.execFileRecord("交通部协议平台报警接口", exception.ToString()); response = RemotingClient.reResult; } return response; }
public Response icar_SetCommonCmdTraffic(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, TrafficSimpleCmd trafficSimpleCmd_0) { Response response = new Response(); if (!base.CheckCar(paramType_0, string_1, string_2)) { response.ErrorMsg = base.ErrorMsg; return response; } if (!base.isStartCommon()) { response.ErrorMsg = base.ErrorMsg; return response; } int newOrderId = -1; foreach (Bussiness.CarInfo info in base.carInfoList) { try { newOrderId = SendBase.CarCmdSend.GetNewOrderId(); if (!string.IsNullOrEmpty(trafficSimpleCmd_0.m_Params)) { base.m_Params1 = trafficSimpleCmd_0.m_Params; } if (!string.IsNullOrEmpty(trafficSimpleCmd_0.m_ParamsReport)) { base.m_Params2 = trafficSimpleCmd_0.m_ParamsReport; } base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";"); string orderIDParam = response.OrderIDParam; response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";"; if (info.ProtocolName == SendBase.m_ProtocolName) { string conntent = ""; string str2 = trafficSimpleCmd_0.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SimpleCmd", ref conntent); base.WriteLog(paramType_0.ToString(), string_1 + "," + conntent); base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", trafficSimpleCmd_0.OrderCode.ToString(), "等待", "", conntent); response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, (int) trafficSimpleCmd_0.OrderCode, (int) commMode_0, str2); } else { base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", trafficSimpleCmd_0.OrderCode.ToString(), "失败", "", "终端不支持该命令"); response.ErrorMsg = "终端不支持该命令"; } } catch (Exception exception) { response.ErrorMsg = "下发消息指令时发生错误,错误详细信息:" + exception.Message; base.log.WriteError(base.errMsg, exception); } } return response; }
public Response icar_SetPlatformAlarmCmd(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, TrafficSimpleCmd trafficSimpleCmd_0) { Response response = new Response(); if (!base.CheckCar(paramType_0, string_1, string_2)) { response.ErrorMsg = base.ErrorMsg; return response; } if (!base.isStartCommon()) { response.ErrorMsg = base.ErrorMsg; return response; } int newOrderId = -1; foreach (Bussiness.CarInfo info in base.carInfoList) { try { newOrderId = SendBase.CarCmdSend.GetNewOrderId(); base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";"); string orderIDParam = response.OrderIDParam; response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";"; string str = "平台报警"; base.WriteLog(paramType_0.ToString(), string_1 + "," + str); base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", trafficSimpleCmd_0.OrderCode.ToString(), "等待", "GPRS/CDMA", str); if (trafficSimpleCmd_0.OrderCode == CmdParam.OrderCode.设置偏移路线报警) { if (new Car().SetCarPathAlarm_Platform(info.CarId, trafficSimpleCmd_0.CommonArgs as DataTable) != 0) { response.ResultCode = -1L; response.ErrorMsg = "参数保存失败"; } else { response.ResultCode = 0L; } } else if (trafficSimpleCmd_0.OrderCode == CmdParam.OrderCode.设置区域报警) { response.ResultCode = new Car().SetCarRegionAlarm_Platform(info.CarId, trafficSimpleCmd_0.CommonArgs as DataTable); } else if (trafficSimpleCmd_0.OrderCode == CmdParam.OrderCode.设置分路段超速报警) { response.ResultCode = new Car().SetCarPathSegmentAlarm_Platform(info.CarId, trafficSimpleCmd_0.CommonArgs); } if (response.ResultCode == 0L) { base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", trafficSimpleCmd_0.OrderCode.ToString(), "成功", "GPRS/CDMA", str); } else { base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", trafficSimpleCmd_0.OrderCode.ToString(), "失败", "GPRS/CDMA", str); } } catch (Exception exception) { response.ErrorMsg = "下发消息指令时发生错误,错误详细信息:" + exception.Message; base.log.WriteError(base.errMsg, exception); base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", trafficSimpleCmd_0.OrderCode.ToString(), "失败", "GPRS/CDMA", ""); } } return response; }
public Response icar_SetPlatformAlarmCmd(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, TrafficSimpleCmd trafficSimpleCmd) { try { return this.myDownDataYD.icar_SetPlatformAlarmCmd(ParamType, CarValues, CarPw, CommMode, trafficSimpleCmd); } catch (Exception exception) { this.m_LogHelper.WriteError(new ErrorMsg("RemotingServer", "icar_SetPlatformAlarmCmd", exception.ToString())); return new Response(); } }