public Response icar_SetCaptureEx(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, CaptureEx captureEx_0) { Response response = new Response(); base.logMsg.FunctionName = "icar_SetCaptureEx"; base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1; string str = string.Concat(new object[] { "是否多帧-", captureEx_0.IsMulitFramebool, ",拍摄类型:", captureEx_0.Type, ",监控次数-", captureEx_0.Times, ",间隔时间-", captureEx_0.Interval * 0.1, ",图像质量-", captureEx_0.Quality, ",图像亮度-", captureEx_0.Brightness, ",图像对比度-", captureEx_0.Contrast, ",图像饱和度-", captureEx_0.Saturation, ",图像色度", captureEx_0.Chroma, ",停车是否拍照-", captureEx_0.IsCapWhenStop, ",图像分辨率-", captureEx_0.PSize }); if (!string.IsNullOrEmpty(captureEx_0.BeginTime) && !string.IsNullOrEmpty(captureEx_0.EndTime)) { string str5 = str; str = str5 + ",时间段拍照启始时间-" + captureEx_0.BeginTime + ",时间段拍照结束时间-" + captureEx_0.EndTime; } 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 (captureEx_0.CheckData(out strErrorMsg) != 0) { response.ErrorMsg = strErrorMsg; return response; } if (base.isStartCommon()) { foreach (Bussiness.CarInfo info in base.carInfoList) { try { int newOrderId = SendBase.CarCmdSend.GetNewOrderId(); base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";"); string orderIDParam = response.OrderIDParam; response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";"; base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", captureEx_0.OrderCode.ToString(), "等待", "", str); if ((info.ProtocolName == SendBase.m_ProtocolName) && (captureEx_0.protocolType == CarProtocolType.交通厅)) { string conntent = ""; captureEx_0.TransformCode = CmdParam.TrafficProtocolCodeExchange2((int) captureEx_0.OrderCode); if (captureEx_0.Quality == 0) { captureEx_0.Quality = 1; } if (captureEx_0.CaptureCache == 1) { captureEx_0.CaptureCache = -1; } string str4 = captureEx_0.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SetCapture", ref conntent); response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, captureEx_0.TransformCode, (int) commMode_0, str4); } else { captureEx_0.Quality = byte.Parse(((10 - captureEx_0.Quality) / 2).ToString()); captureEx_0.CaptureCache = 0; if (!string.IsNullOrEmpty(captureEx_0.BeginTime) && !string.IsNullOrEmpty(captureEx_0.EndTime)) { response.ResultCode = SendBase.CarCmdSend.icar_SetCaptureExWithTime(base.WorkId, newOrderId, info.SimNum, captureEx_0.IsMultiFrame, captureEx_0.CamerasID, captureEx_0.CaptureFlag, captureEx_0.CaptureCache, captureEx_0.Times, captureEx_0.Interval, captureEx_0.Quality, captureEx_0.Brightness, captureEx_0.Contrast, captureEx_0.Saturation, captureEx_0.Chroma, captureEx_0.CapWhenStop, captureEx_0.BeginTime, captureEx_0.EndTime); } else { response.ResultCode = SendBase.CarCmdSend.icar_SetCaptureEx(base.WorkId, newOrderId, info.SimNum, captureEx_0.IsMultiFrame, captureEx_0.CamerasID, captureEx_0.CaptureFlag, captureEx_0.CaptureCache, captureEx_0.Times, captureEx_0.Interval, captureEx_0.Quality, captureEx_0.Brightness, captureEx_0.Contrast, captureEx_0.Saturation, captureEx_0.Chroma, captureEx_0.CapWhenStop); } } if (response.ResultCode != 0L) { base.alarmMsg.FunctionName = "icar_SetCaptureEx"; base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", captureEx_0.OrderCode }); base.alarmMsg.Code = response.ResultCode.ToString(); base.log.WriteAlarm(base.alarmMsg); } else { new Car().InsertIntoCaptureParam(info.CarId, captureEx_0); } 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 static Response SetCarPicTimeParam(string sCarSimNum, CaptureEx m_CaptureEx, string sPicTime) { Response response; try { response = RemotingClient.app.Car_SetCarPicTimeParam(sCarSimNum, m_CaptureEx, sPicTime); } catch (SocketException socketException) { Record.execFileRecord("设置定时抓拍图像监控", socketException.Message); response = null; } catch (Exception exception) { Record.execFileRecord("设置定时抓拍图像监控", exception.ToString()); response = null; } return response; }
public long icar_SetCaptureEx(CmdParam.ParamType ParamType, string SimNum, string CarPw, CmdParam.CommMode CommMode, CaptureEx captureEx, string PicTime, string CarID) { long num = (long)0; this.logMsg.FunctionName = "icar_SetCaptureEx"; this.logMsg.Msg = string.Concat("发送:类型-", ParamType.ToString(), ",车辆-", SimNum); object[] picTime = new object[] { "抓拍时间-", PicTime, ",是否多帧-", captureEx.IsMulitFramebool, ",监控次数-", captureEx.Times, ",间隔时间-", (double)captureEx.Interval * 0.1, ",图像质量-", captureEx.Quality, ",图像亮度-", captureEx.Brightness, ",图像对比度-", captureEx.Contrast, ",图像饱和度-", captureEx.Saturation, ",图像色度", captureEx.Chroma, ",停车是否拍照-", captureEx.IsCapWhenStop }; string str = string.Concat(picTime); LogMsg logMsg = this.logMsg; logMsg.Msg = string.Concat(logMsg.Msg, ",", str); this.log.WriteLog(this.logMsg); if (!this.isStartCommon()) { num = (long)-1; } else { try { if (captureEx.ProtocolName == "JTBGPS") { int newOrderId = DownData.CarCmdSend.GetNewOrderId(); string str1 = ""; captureEx.TransformCode = CmdParam.TrafficProtocolCodeExchange2((int)captureEx.OrderCode); if (captureEx.Quality == 0) { captureEx.Quality = 1; } if (captureEx.CaptureCache == 1) { captureEx.CaptureCache = -1; } string xmlString = captureEx.ToXmlString(this.CalOrderId(this.WorkId, newOrderId), SimNum, captureEx.ProtocolName, (int)CommMode, "SetCapture", ref str1); num = DownData.CarCmdSend.icar_SendCmdXML(this.WorkId, newOrderId, SimNum, captureEx.ProtocolName, captureEx.TransformCode, (int)CommMode, xmlString); } else { int newOrderId = DownData.CarCmdSend.GetNewOrderId(); num = DownData.CarCmdSend.icar_SetCaptureEx(this.WorkId, newOrderId, SimNum, captureEx.IsMultiFrame, captureEx.CamerasID, captureEx.CaptureFlag, captureEx.CaptureCache, captureEx.Times, captureEx.Interval, captureEx.Quality, captureEx.Brightness, captureEx.Contrast, captureEx.Saturation, captureEx.Chroma, captureEx.CapWhenStop); } if (num == (long)0) { ReadDataFromDB.execSaveGpsLogTable(this.WorkId, DownData.CarCmdSend.OrderId, CarID, 18, "定时拍照"); } else { AlarmMsg alarmMsg = new AlarmMsg() { ClassName = "GpsPicDownData", FunctionName = "icar_SetCaptureEx" }; object[] workId = new object[] { "workid-", this.WorkId, ",simNum-", SimNum, ",OrderCode-", captureEx.OrderCode }; alarmMsg.AlarmText = string.Concat(workId); alarmMsg.Code = num.ToString(); this.log.WriteAlarm(alarmMsg); } } catch (Exception exception1) { Exception exception = exception1; ErrorMsg errorMsg = new ErrorMsg() { ClassName = "GpsPicDownData", ErrorText = "下发消息指令时发生错误!" }; this.log.WriteError(errorMsg, exception); num = (long)-1; } } return num; }
public static Response DownData_SetCaptureEx(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, CaptureEx captureEx) { Response response; if (RemotingClient.app == null) { return RemotingClient.reResult; } try { response = RemotingClient.app.DownData_SetCaptureEx(ParamType, CarValues, CarPw, CommMode, captureEx); } catch (Exception exception) { Record.execFileRecord("实时图像监控和多种条件图像监控", exception.Message); response = RemotingClient.reResult; } return response; }
public int setCarPicTimeParam(string string_0, CaptureEx captureEx_0, string string_1) { SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@SimNum", string_0), new SqlParameter("@IsMultiFrame", captureEx_0.IsMultiFrame), new SqlParameter("@CamerasID", captureEx_0.CamerasID), new SqlParameter("@CaptureFlag", captureEx_0.CaptureFlag), new SqlParameter("@CapTureMask", captureEx_0.CaptureCache), new SqlParameter("@Times", captureEx_0.Times), new SqlParameter("@CatchInterval", captureEx_0.Interval), new SqlParameter("@Quality", captureEx_0.Quality), new SqlParameter("@Brightness", captureEx_0.Brightness), new SqlParameter("@Contrast", captureEx_0.Contrast), new SqlParameter("@Saturation", captureEx_0.Saturation), new SqlParameter("@Chroma", captureEx_0.Chroma), new SqlParameter("@capWhenStop", captureEx_0.CapWhenStop), new SqlParameter("@PicTime", string_1) }; SqlDataAccess access = new SqlDataAccess(); return access.insertBySp("WebGpsClient_UpdateCarPicParam", parameterArray); }
public int InsertIntoCaptureParam(string string_0, CaptureEx captureEx_0) { SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@CarId", string_0), new SqlParameter("@IsMultiFrame ", captureEx_0.IsMultiFrame), new SqlParameter("@CamerasID ", captureEx_0.CamerasID), new SqlParameter("@CaptureFlag ", captureEx_0.CaptureFlag), new SqlParameter("@CapTureMask ", captureEx_0.CaptureCache), new SqlParameter("@Times ", captureEx_0.Times), new SqlParameter("@CatchInterval ", captureEx_0.Interval), new SqlParameter("@Quality ", captureEx_0.Quality), new SqlParameter("@Brightness ", captureEx_0.Brightness), new SqlParameter("@Contrast ", captureEx_0.Contrast), new SqlParameter("@Saturation ", captureEx_0.Saturation), new SqlParameter("@Chroma ", captureEx_0.Chroma), new SqlParameter("@capWhenStop ", captureEx_0.CapWhenStop) }; string str = "WebGpsClient_UpdateImageControl"; SqlDataAccess access = new SqlDataAccess(); return access.updateBySp(str, parameterArray); }
public Response DownData_SetCaptureEx(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, CaptureEx captureEx) { try { return this.myDownData.icar_SetCaptureEx(ParamType, CarValues, CarPw, CommMode, captureEx); } catch (Exception exception) { this.m_LogHelper.WriteError(new ErrorMsg("RemotingServer", "DownData_SetCaptureEx", exception.ToString())); return new Response(); } }
public Response Car_SetCarPicTimeParam(string sSimNum, CaptureEx m_CaptureEx, string sPicTime) { Response response = new Response(); try { if (this.myCar.setCarPicTimeParam(sSimNum, m_CaptureEx, sPicTime) > 0) { response.ResultCode = 0L; } } catch (Exception exception) { ErrorMsg msg = new ErrorMsg("RemotingServer", "Car_SetCarPicTimeParam", exception.Message); this.m_LogHelper.WriteError(msg); response.ErrorMsg = exception.Message; } return response; }