示例#1
0
 private void btnFK_Click(object sender, EventArgs e)
 {
     try
     {
         JhFeedback jh = new JhFeedback()
         {
             Zldbh  = txtZLDBH.Text,
             Fkdbh  = "120" + txtZLDBH.Text,
             Fkdw   = "南京市急救指挥中心",
             Fkr    = "张三",
             Fksj   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
             Fknr   = txtFK.Text,
             Fkjqlb = "过程反馈",
             Ext1   = "0"
         };
         Client.SendMsg(StringHelper.CombinMsg <JhFeedback>("5214", jh), true);
         btnFK.Enabled       = false;
         btnPC.Enabled       = true;
         cmbCL.SelectedIndex = 0;
         MessageBox.Show("反馈成功");
     }
     catch (Exception ex)
     {
     }
 }
示例#2
0
        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");
            }
        }
示例#3
0
        public static void test()
        {
            JhSigninfo jhSigninfo = new JhSigninfo()
            {
                Zldbh = "2017121900001", Qsdw = "南京市120", Qsr = "李四", Qssj = DateTime.Now.ToString(CultureInfo.InvariantCulture), Ext1 = "0"
            };
            JhChargeback jhChargeback = new JhChargeback()
            {
                Zldbh = "2017121900001", Tdbh = "201712190002", Tddw = "南京市120", Tdr = "李四", Tdsj = DateTime.Now.ToString(CultureInfo.InvariantCulture), Tdyy = "假警", Ext1 = "0"
            };
            JhFeedback jhFeedback = new JhFeedback()
            {
                Zldbh  = "2017121900001",
                Fkdbh  = "201712190002",
                Fkdw   = "南京市120",
                Fkr    = "李四",
                Fksj   = DateTime.Now.ToString(CultureInfo.InvariantCulture),
                Fknr   = "这是反馈内容",
                Fkjqlb = "过程反馈",
                Ext1   = "0"
            };
            JhAmbulanceinfo jhAmbulanceinfo = new JhAmbulanceinfo()
            {
                Zldbh = "2017121900001", Jhccph = "苏A88888", Ssjg = "南京市120", Lxdh = "13333333333", Jsyxm = "赵四", Ysxm = "徐某", Ysdh = "13344444444", Gpsstatus = "1", Ext1 = "0"
            };
            JhAmbulancestatus jhAmbulancestatus = new JhAmbulancestatus()
            {
                Zldbh = "2017121900001", Jhccph = "苏A88888", Status = "出车", Checi = "01", Time = DateTime.Now.ToString(CultureInfo.InvariantCulture), Ext1 = "0"
            };

            LogUtility.DataLog.WriteLog(LogLevel.Info, StringHelper.CombinMsg <JhSigninfo>("5211", jhSigninfo), new RunningPlace("", ""), "Test");
            LogUtility.DataLog.WriteLog(LogLevel.Info, StringHelper.CombinMsg <JhChargeback>("5212", jhChargeback), new RunningPlace("", ""), "Test");
            LogUtility.DataLog.WriteLog(LogLevel.Info, StringHelper.CombinMsg <JhFeedback>("5214", jhFeedback), new RunningPlace("", ""), "Test");
            LogUtility.DataLog.WriteLog(LogLevel.Info, StringHelper.CombinMsg <JhAmbulanceinfo>("5215", jhAmbulanceinfo), new RunningPlace("", ""), "Test");
            LogUtility.DataLog.WriteLog(LogLevel.Info, StringHelper.CombinMsg <JhAmbulancestatus>("5217", jhAmbulancestatus), new RunningPlace("", ""), "Test");
            StringBuilder st = new StringBuilder("\r\n");

            foreach (var item in Core.GetInstance().BussMap.ToList())
            {
                st.Append($"指令单编号:{item.Value.Zldbh}\r\n");
                foreach (var Veh in item.Value.VehList)
                {
                    st.Append($"    车牌号:{Veh}\r\n");
                }
            }
            LogUtility.DataLog.WriteLog(LogLevel.Info, st.ToString(), new RunningPlace("", ""), "BussMap");
        }
示例#4
0
        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");
            }
        }
示例#5
0
 /// <summary>
 /// 更新或插入工单处置回复信息
 /// </summary>
 /// <param name="feedback"></param>
 /// <returns></returns>
 public static bool Update_FEEDBACK(JhFeedback feedback)
 {
     return(InfoDal.Update_FEEDBACK(feedback));
 }
示例#6
0
        public static bool Update_FEEDBACK(JhFeedback obj)
        {
            bool            blnSuccess = false;
            OracleParameter param1     = new OracleParameter("vc_ZLDBH", OracleType.VarChar)
            {
                Value = obj.Zldbh
            };
            OracleParameter param2 = new OracleParameter("vc_FKDBH", OracleType.VarChar)
            {
                Value = obj.Fkdbh
            };
            OracleParameter param3 = new OracleParameter("vc_FKDW", OracleType.VarChar)
            {
                Value = obj.Fkdw
            };
            OracleParameter param4 = new OracleParameter("vc_FKR", OracleType.VarChar)
            {
                Value = obj.Fkr
            };
            OracleParameter param5 = new OracleParameter("vc_FKSJ", OracleType.VarChar)
            {
                Value = obj.Fksj
            };
            OracleParameter param6 = new OracleParameter("vc_FKNR", OracleType.VarChar)
            {
                Value = obj.Fknr
            };
            OracleParameter param7 = new OracleParameter("vc_FKJQLB", OracleType.VarChar)
            {
                Value = obj.Fkjqlb
            };
            OracleParameter param8 = new OracleParameter("vc_EXT1", OracleType.VarChar)
            {
                Value = obj.Ext1
            };
            OracleParameter param9 = new OracleParameter("vc_EXT2", OracleType.VarChar)
            {
                Value = obj.Ext2
            };
            OracleParameter param10 = new OracleParameter("vc_EXT3", OracleType.VarChar)
            {
                Value = obj.Ext3
            };
            OracleParameter param11 = new OracleParameter("vc_EXT4", OracleType.VarChar)
            {
                Value = obj.Ext4
            };
            OracleParameter param12 = new OracleParameter("vc_EXT5", OracleType.VarChar)
            {
                Value = obj.Ext5
            };
            OracleParameter param13 = new OracleParameter("nFLAG", OracleType.Number)
            {
                Value = 0, Direction = ParameterDirection.Output
            };
            OracleParameter param14 = new OracleParameter("errMSG", OracleType.VarChar, 4000)
            {
                Value = "", Direction = ParameterDirection.Output
            };

            OracleParameter[] param =
            {
                param1,  param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12,
                param13, param14
            };
            int rows = OracleHelper.ExecuteNonQuery("ZIT_ITFC.SP_Update_FEEDBACK", CommandType.StoredProcedure, param);

            WriteDbExecuteLog(param[12].Value.ToString(), param[13].Value.ToString(), GetMethodName());
            if (rows > 0 && int.Parse(param[12].Value.ToString()) == 1)
            {
                blnSuccess = true;
            }
            return(blnSuccess);
        }