public static StatusReport SetWatchResult(WatchResult result) { string sqlString = "insert into 基础_微信巡更 (当前组织ID,工作日期,班次ID,巡更点ID,到达经度,到达纬度,到达时间,巡更序次,单次实际时长_分)" + "select @当前组织ID,@工作日期,@班次ID,@巡更点ID,@到达经度,@到达纬度,@到达时间,@巡更序次,@单次实际时长_分"; StatusReport sr = SqlHelper.Insert(sqlString, new SqlParameter("@当前组织ID", result.OfficeId), new SqlParameter("@工作日期", GetDBValue(result.WorkDate)), new SqlParameter("@班次ID", result.FrequencyId), new SqlParameter("@巡更点ID", result.PointId), new SqlParameter("@到达经度", result.arriveLa), new SqlParameter("@到达纬度", result.arriveLo), new SqlParameter("@到达时间", GetDBValue(result.arriveTime)), new SqlParameter("@巡更序次", result.watchTimes), new SqlParameter("@单次实际时长_分", result.usedTime) ); if (sr.status == "Success") { int id = SqlHelper.ExecuteScalar("select max(ID) from 基础_微信巡更"); sr.data = id.ToString(); } sr.parameters = JsonConvert.SerializeObject(result); return(sr); }
internal Task Watch(string pipeCode, PipeType pipeType, WatchActionType actionType, object para, WatchResult res) { if (WatchProxy != null) { return(WatchProxy.Watch(new WatchDataItem() { PipeCode = pipeCode, PipeType = pipeType, ActionType = actionType, Para = para, Result = res })); } return(Task.CompletedTask); }
protected void Page_Load(object sender, EventArgs e) { WatchResult wr = new WatchResult() { OfficeId = Convert.ToInt32(Request["officeId"]), //管理处Id FrequencyId = Convert.ToInt32(Request["frequencyId"]), //班次Id PointId = Convert.ToInt32(Request["pointId"]), //巡更点Id WorkDate = Request["workDate"], //工作日期 watchTimes = Convert.ToInt32(Request["watchTimes"]), //当次序次 usedTime = Convert.ToInt32(Request["usedTime"]), //已用时间 arriveLa = Convert.ToDouble(Request["arriveLa"]), //扫码时经度 arriveLo = Convert.ToDouble(Request["arriveLo"]), //扫码时纬度 arriveTime = Request["arriveTime"] //到达时间 }; StatusReport sr = WatchResultDal.SetWatchResult(wr); string srString = JsonConvert.SerializeObject(sr); Response.Write(srString); }
public Task Blocked(string pipeCode, PipeType pipeType, object input, WatchResult watchResult) { LogHelper.Info($"管道 {pipeCode} 阻塞,阻塞发生管道{watchResult.blocked_pipe_code}", "PipeBlocked", "PipelineWatcher"); return(Task.CompletedTask); }
public Task Executed(string pipeCode, PipeType pipeType, object input, WatchResult watchResult) { LogHelper.Info($"管道 {pipeCode} 执行结束,结束信号:{watchResult.signal}", "PipeExecuted", "PipelineWatcher"); return(Task.CompletedTask); }
public ValueTask UnwatchAsync(WatchResult watchResult, CancellationToken cancellationToken) => throw new NotImplementedException();