public static Response DownData_SetPhone(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, SetPhone setPhone) { Response response; if (RemotingClient.app == null) { return RemotingClient.reResult; } try { response = RemotingClient.app.DownData_SetPhone(ParamType, CarValues, CarPw, CommMode, setPhone); } catch (Exception exception) { Record.execFileRecord("设置车台号码", exception.Message); response = RemotingClient.reResult; } return response; }
public Response icar_SetPhone(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, SetPhone phone) { Response response = new Response(); base.logMsg.FunctionName = "icar_SetPhone"; base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1; string str = "电话类型-" + phone.PhoneType.ToString() + ",电话号码-" + phone.strPhone; base.logMsg.Msg = base.logMsg.Msg + "," + str; base.log.WriteLog(base.logMsg); if (!base.CheckCar(paramType_0, string_1, string_2)) { response.ErrorMsg = base.alarmMsg.AlarmText = base.ErrorMsg; base.log.WriteAlarm(base.alarmMsg); return response; } string strErrorMsg = string.Empty; if (phone.CheckData(out strErrorMsg) != 0) { response.ErrorMsg = strErrorMsg; return response; } if (base.isStartCommon()) { foreach (Bussiness.CarInfo info in base.carInfoList) { try { base.m_OrderCode = "255"; int newOrderId = SendBase.CarCmdSend.GetNewOrderId(); base.SaveCommandParameterToGpsLogTable(newOrderId.ToString() + "|" + info.CarId.ToString() + ";", Convert.ToInt32(phone.OrderCode).ToString()); string orderIDParam = response.OrderIDParam; response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";"; base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", phone.OrderCode.ToString(), "等待", "", str); new Car().InsertPhonesIntoGisCar(phone.PhoneType, info.CarId, base.WorkId.ToString(), newOrderId.ToString(), phone.strPhone); if (info.ProtocolName == SendBase.m_ProtocolName) { phone.TransformCode = CmdParam.TrafficProtocolCodeExchange((int) phone.PhoneType); string conntent = ""; string str4 = phone.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SetPhone", ref conntent); response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, phone.TransformCode, (int) commMode_0, str4); } else { response.ResultCode = SendBase.CarCmdSend.icar_SetPhone(base.WorkId, newOrderId, info.SimNum, phone.PhoneType, phone.strPhone); } if (response.ResultCode != 0L) { base.alarmMsg.FunctionName = "icar_SetPhone"; base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", phone.OrderCode }); base.alarmMsg.Code = response.ResultCode.ToString(); base.log.WriteAlarm(base.alarmMsg); } response.ResultCode = 0L; } catch (Exception exception) { base.errMsg.ErrorText = "下发消息指令时发生错误!"; response.ErrorMsg = base.ErrorMsg = base.errMsg.ErrorText; base.log.WriteError(base.errMsg, exception); } } return response; } response.ErrorMsg = base.ErrorMsg; return response; }
public Response DownData_SetPhone(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, SetPhone setPhone) { try { return this.myDownData.icar_SetPhone(ParamType, CarValues, CarPw, CommMode, setPhone); } catch (Exception exception) { this.m_LogHelper.WriteError(new ErrorMsg("RemotingServer", "DownData_SetPhone", exception.ToString())); return new Response(); } }