Example #1
0
 private void btnPC_Click(object sender, EventArgs e)
 {
     try
     {
         JhAmbulanceinfo jh = new JhAmbulanceinfo()
         {
             Zldbh     = txtZLDBH.Text,
             Jhccph    = cphDictionary[int.Parse(cmbCL.Text)],
             Ssjg      = "南京市急救指挥中心",
             Lxdh      = "13333333333",
             Jsyxm     = "赵四",
             Ysxm      = "徐某",
             Ysdh      = "13344444444",
             Gpsstatus = "1",
             Ext1      = "0"
         };
         Client.SendMsg(StringHelper.CombinMsg <JhAmbulanceinfo>("5215", jh), true);
         btnPC.Enabled = false;
         btnCC.Enabled = true;
         MessageBox.Show("派车成功");
     }
     catch (Exception ex)
     {
     }
 }
Example #2
0
        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");
            }
        }
Example #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");
        }
Example #4
0
 /// <summary>
 /// 更新或插入救护车的派车信息
 /// </summary>
 /// <param name="ambulanceinfo"></param>
 /// <returns></returns>
 public static bool Update_AMBULANCEINFO(JhAmbulanceinfo ambulanceinfo)
 {
     return(InfoDal.Update_AMBULANCEINFO(ambulanceinfo));
 }
Example #5
0
        public static bool Update_AMBULANCEINFO(JhAmbulanceinfo obj)
        {
            bool            blnSuccess = false;
            OracleParameter param1     = new OracleParameter("vc_ZLDBH", OracleType.VarChar)
            {
                Value = obj.Zldbh
            };
            OracleParameter param2 = new OracleParameter("vc_JHCCPH", OracleType.VarChar)
            {
                Value = obj.Jhccph
            };
            OracleParameter param3 = new OracleParameter("vc_SSJG", OracleType.VarChar)
            {
                Value = obj.Ssjg
            };
            OracleParameter param4 = new OracleParameter("vc_LXDH", OracleType.VarChar)
            {
                Value = obj.Lxdh
            };
            OracleParameter param5 = new OracleParameter("vc_JSYXM", OracleType.VarChar)
            {
                Value = obj.Jsyxm
            };
            OracleParameter param6 = new OracleParameter("vc_YSXM", OracleType.VarChar)
            {
                Value = obj.Ysxm
            };
            OracleParameter param7 = new OracleParameter("vc_YSDH", OracleType.VarChar)
            {
                Value = obj.Ysdh
            };
            OracleParameter param8 = new OracleParameter("vc_GPSSTATUS", OracleType.VarChar)
            {
                Value = obj.Gpsstatus
            };
            OracleParameter param9 = new OracleParameter("vc_EXT1", OracleType.VarChar)
            {
                Value = obj.Ext1
            };
            OracleParameter param10 = new OracleParameter("vc_EXT2", OracleType.VarChar)
            {
                Value = obj.Ext2
            };
            OracleParameter param11 = new OracleParameter("vc_EXT3", OracleType.VarChar)
            {
                Value = obj.Ext3
            };
            OracleParameter param12 = new OracleParameter("vc_EXT4", OracleType.VarChar)
            {
                Value = obj.Ext4
            };
            OracleParameter param13 = new OracleParameter("vc_EXT5", OracleType.VarChar)
            {
                Value = obj.Ext5
            };
            OracleParameter param14 = new OracleParameter("nFLAG", OracleType.Number)
            {
                Value = 0, Direction = ParameterDirection.Output
            };
            OracleParameter param15 = 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, param15
            };
            int rows = OracleHelper.ExecuteNonQuery("ZIT_ITFC.SP_Update_AMBULANCEINFO", CommandType.StoredProcedure, param);

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