private void Handle5217Message(string message) { JhAmbulancestatus obj = GetModelFromMsg <JhAmbulancestatus>(message); if (obj.Status == "任务完成" || obj.Status == "任务终止") { Core.GetInstance().BussMap.TryGetValue(obj.Zldbh, out Business bus); if (bus != null) { bus.VehList.RemoveAll(p => p == obj.Jhccph); if (bus.VehList.Count == 0) { JhFeedback jhFeedback = new JhFeedback() { Zldbh = obj.Zldbh, Fkr = "系统", Fkdbh = (Core.GetInstance().BussMap.ContainsKey(obj.Zldbh) && !string.IsNullOrEmpty(Core.GetInstance().BussMap[obj.Zldbh].Lsh)) ? Core.GetInstance().BussMap[obj.Zldbh].Lsh : "", Fksj = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Fknr = obj.Status, Fkdw = "南京市急救指挥中心", Fkjqlb = "结果反馈", Ext1 = "0", Ext2 = "", Ext3 = "", Ext4 = "", Ext5 = "" }; InfoBll.Update_FEEDBACK(jhFeedback); Core.GetInstance().BussMap.TryRemove(obj.Zldbh, out Business _bus); InfoBll.Update_WORKORDER(obj.Zldbh, "50"); } } } if (InfoBll.Update_AMBULANCESTATUS(obj)) { LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入车辆节点信息成功,编号:{obj.Zldbh},车辆编号:{obj.Jhccph}", new RunningPlace("HandleMessage", "Handle5217Message"), "Running"); } else { LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入车辆节点信息失败,编号:{obj.Zldbh},车辆编号:{obj.Jhccph}", new RunningPlace("HandleMessage", "Handle5217Message"), "Running"); } }
private void Handle5212Message(string message) { JhChargeback obj = GetModelFromMsg <JhChargeback>(message); if (InfoBll.Update_CHARGEBACK(obj)) { Core.GetInstance().Bs.SendMsg(StringHelper.CombinMsg <ResultInfo>("5218", new ResultInfo() { Result = 1, Reason = "插入退单信息成功", Type = MsgType.JhChargeback })); LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入退单信息成功,编号:{obj.Zldbh}", new RunningPlace("HandleMessage", "Handle5212Message"), "Running"); //退单成功,更正状态21 Core.GetInstance().BussMap.TryGetValue(obj.Zldbh, out Business bus); if (bus != null) { bus.Zt = "21"; Core.GetInstance().BussMap.TryUpdate(obj.Zldbh, bus, bus); InfoBll.Update_WORKORDER(obj.Zldbh, "21"); } } else { Core.GetInstance().Bs.SendMsg(StringHelper.CombinMsg <ResultInfo>("5218", new ResultInfo() { Result = 0, Reason = "插入退单信息失败", Type = MsgType.JhChargeback })); LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入退单信息失败,编号:{obj.Zldbh}", new RunningPlace("HandleMessage", "Handle5212Message"), "Running"); } }
private void Handle5215Message(string message) { JhAmbulanceinfo obj = GetModelFromMsg <JhAmbulanceinfo>(message); if (InfoBll.Update_AMBULANCEINFO(obj)) { Core.GetInstance().Bs.SendMsg(StringHelper.CombinMsg <ResultInfo>("5218", new ResultInfo() { Result = 1, Reason = "插入派车信息成功", Type = MsgType.JhAmbulanceinfo })); LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入派车信息成功,编号:{obj.Zldbh},车辆编号:{obj.Jhccph}", new RunningPlace("HandleMessage", "Handle5215Message"), "Running"); //派车信息成功,更正状态40,同时增加车辆 Core.GetInstance().BussMap.TryGetValue(obj.Zldbh, out Business bus); if (bus != null) { bus.Zt = "40"; bus.VehList.Add(obj.Jhccph); Core.GetInstance().BussMap.TryUpdate(obj.Zldbh, bus, bus); InfoBll.Update_WORKORDER(obj.Zldbh, "40"); } else { } } else { Core.GetInstance().Bs.SendMsg(StringHelper.CombinMsg <ResultInfo>("5218", new ResultInfo() { Result = 0, Reason = "插入派车信息成功", Type = MsgType.JhAmbulanceinfo })); LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入派车信息失败,编号:{obj.Zldbh},车辆编号:{obj.Jhccph}", new RunningPlace("HandleMessage", "Handle5215Message"), "Running"); } }
private void Get_JHInfo(object state) { while (true) { if (blnConnnect) { try { List <JhWorkorder> lst1 = (List <JhWorkorder>)InfoBll.Get_WORKORDER(); foreach (var item in lst1) { if (Core.GetInstance().Bs.SendMsg(StringHelper.CombinMsg <JhWorkorder>("5210", item))) { LogUtility.DataLog.WriteLog(LogLevel.Info, $"发送工单信息成功,编号:{item.Zldbh}", new RunningPlace("DataAnalysis", "Get_JHInfo"), "Running"); InfoBll.Update_WORKORDER(item.Zldbh, "10"); //创建一个新的业务 if (!Core.GetInstance().BussMap.ContainsKey(item.Zldbh)) { Core.GetInstance().BussMap.AddOrUpdate(item.Zldbh, new Business(item.Zldbh, DateTime.Now), (k, v) => v); } } else { LogUtility.DataLog.WriteLog(LogLevel.Info, $"发送工单信息失败,编号:{item.Zldbh}", new RunningPlace("DataAnalysis", "Get_JHInfo"), "Running"); } } List <JhChargebackresult> lst2 = (List <JhChargebackresult>)InfoBll.Get_CHARGEBACKRESULT(); foreach (var item in lst2) { if (Core.GetInstance().Bs.SendMsg(StringHelper.CombinMsg <JhChargebackresult>("5213", item))) { LogUtility.DataLog.WriteLog(LogLevel.Info, $"发送退单反馈意见信息成功,编号:{item.Zldbh}", new RunningPlace("DataAnalysis", "Get_JHInfo"), "Running"); InfoBll.Update_CHARGEBACKRESULT(item.Zldbh); if (item.Tdjg == "0") { InfoBll.Update_WORKORDER(item.Zldbh, "50"); //退单成功,结束一个业务 Core.GetInstance().BussMap.TryRemove(item.Zldbh, out Business bus); } } else { LogUtility.DataLog.WriteLog(LogLevel.Info, $"发送退单反馈意见信息失败,编号:{item.Zldbh}", new RunningPlace("DataAnalysis", "Get_JHInfo"), "Running"); } } } catch (Exception e) { LogUtility.DataLog.WriteLog(LogLevel.Info, e.Message, new RunningPlace("DataAnalysis", "Get_JHInfo"), "DBErr"); } } Thread.Sleep(SysParameters.QueryInterval * 1000); } }
private void Handle5216Message(string message) { JhAmbulanceposition obj = GetModelFromMsg <JhAmbulanceposition>(message); if (Core.GetInstance().BussMap.Where(p => p.Value.VehList.Contains(obj.Jhccph)).ToList().Count > 0) { if (InfoBll.Update_AMBULANCEPOSITION(obj)) { LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入车辆定位信息成功,编号:{obj.Zldbh},车辆编号:{obj.Jhccph}", new RunningPlace("HandleMessage", "Handle5216Message"), "Running"); } else { LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入车辆定位信息失败,编号:{obj.Zldbh},车辆编号:{obj.Jhccph}", new RunningPlace("HandleMessage", "Handle5216Message"), "Running"); } } }
protected void btnSave_Click(object sender, EventArgs e) { int infoId = Convert.ToInt32(Request.QueryString["id"]); string detail = fck_detail.Value; try { InfoBll.UpdateDetail(infoId, detail); BindData(); MessageBox.Alert("保存成功!", Page); } catch (Exception ex) { MessageBox.Alert("错误:" + ex, Page); /*throw;*/ } }
public void BindData() { if (Request.QueryString["id"] != "" && Request.QueryString["id"] != null) { int infoId = Convert.ToInt32(Request.QueryString["id"]); List <Model.Info> list = InfoBll.GetInfobyId(infoId); if (list.Count > 0) { ltlTitle.Text = list[0].TypeName; fck_detail.Value = list[0].Details; } else { MessageBox.AlertAndRedirect("您查找的内容不存在!", "right.aspx", Page); } } }
private void Handle5214Message(string message) { JhFeedback obj = GetModelFromMsg <JhFeedback>(message); if (InfoBll.Update_FEEDBACK(obj)) { Core.GetInstance().Bs.SendMsg(StringHelper.CombinMsg <ResultInfo>("5218", new ResultInfo() { Result = 1, Reason = "插入工单处置信息成功", Type = MsgType.JhFeedback })); LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入工单处置信息成功,编号:{obj.Zldbh}", new RunningPlace("HandleMessage", "Handle5214Message"), "Running"); //工单处置信息成功,更正状态30 if (obj.Fkjqlb == "过程反馈") { Core.GetInstance().BussMap.TryGetValue(obj.Zldbh, out Business bus); if (bus != null) { bus.Zt = "30"; bus.Lsh = obj.Fkdbh; Core.GetInstance().BussMap.TryUpdate(obj.Zldbh, bus, bus); InfoBll.Update_WORKORDER(obj.Zldbh, "30"); } } else if (obj.Fkjqlb == "结果反馈") { Core.GetInstance().BussMap.TryRemove(obj.Zldbh, out Business bus); InfoBll.Update_WORKORDER(obj.Zldbh, "52"); } } else { Core.GetInstance().Bs.SendMsg(StringHelper.CombinMsg <ResultInfo>("5218", new ResultInfo() { Result = 0, Reason = "插入工单处置信息失败", Type = MsgType.JhFeedback })); LogUtility.DataLog.WriteLog(LogLevel.Info, $"插入工单处置信息失败,编号:{obj.Zldbh}", new RunningPlace("HandleMessage", "Handle5214Message"), "Running"); } }
private void ConTest(object state) { while (Core.Flag) { if (InfoBll.ConnectTest()) { if (!blnConnnect) { RaiseConnected(); blnConnnect = true; } } else { if (blnConnnect) { RaiseDisConnected("连接数据库失败"); blnConnnect = false; } } Thread.Sleep(60 * 1000); } }