示例#1
0
 /// <summary>
 /// 根据加锁表,和轨迹表生成的轨迹字段,合成加锁历史表
 /// </summary>
 /// <param name="js"></param>
 /// <param name="gjStr"></param>
 /// <returns></returns>
 public void Insert(JS js, string gjStr)
 {
     try
     {
         string sql = string.Format("insert into FDSGLXT_JSJLLSB t(JLH,QSCZID,ZDCZID,JIARYYHM,JIERYYHM,SH,SJH,CH,JSSJ,CSSJ,HPH,LSGJ,SBBH,CZID,ZTBJ,HYZRID,HQHYYID,PM,YJSPCH) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}',to_date('{8}','yyyy/mm/dd hh24:mi:ss'),to_date('{9}','yyyy/mm/dd hh24:mi:ss'),'{10}',{11},'{12}','{13}','{14}','{15}','{16}','{17}','{18}')",
                 Guid.NewGuid().ToString(),
                 js.QSCZID,
                 js.ZDCZID,
                 js.JIARYYHM,
                 js.JIERYYHM,
                 js.SH,
                 js.SJH,
                 js.CH,
                 js.JSSJ,
                 js.ZXSJ, //拆锁时间为最新的时间...
                 js.HPH,
                 ":context",  //历史轨迹...
                 js.SBBH,
                 js.HQHYYID,
                 js.ZTBJ,
                 js.HYZRID,
                 js.HQHYYID,
                 js.PM,
                 js.YJSPCH
             );
         jslsDal.Insert(sql, gjStr);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
示例#2
0
 private JS LoadEntity(DataRow dr)
 {
     JS js = new JS();
     js.CH = dr["CH"].ToString();
     js.SH = dr["SH"].ToString();
     js.CSSJ = dr["CSSJ"].ToString();
     js.HPH = dr["HPH"].ToString();
     js.JIARYYHM = dr["JIARYYHM"].ToString();
     js.JIERYYHM = dr["JIERYYHM"].ToString();
     js.JSSJ = dr["JSSJ"].ToString();
     js.QSCZID = dr["QSCZID"].ToString();
     js.SH = dr["SH"].ToString();
     js.SJH = dr["SJH"].ToString();
     js.ZDCZID = dr["ZDCZID"].ToString();
     js.ZTBJ = dr["ZTBJ"].ToString();
     js.CZID = dr["CZID"].ToString();
     js.HYZRID = dr["HYZRID"].ToString();
     js.HQHYYID = dr["HQHYYID"].ToString();
     js.SBBH = dr["SBBH"].ToString();
     js.ZXJD = dr["ZXJD"].ToString();
     js.ZXWD = dr["ZXWD"].ToString();
     js.ZXDD = dr["ZXDD"].ToString();
     js.ZXSJ = dr["ZXSJ"].ToString();
     js.ZXDY = dr["ZXDY"].ToString();
     js.PM = dr["PM"].ToString();
     js.ZXDDID = dr["ZXDDID"].ToString();
     return js;
 }
示例#3
0
        /// <summary>
        /// 拿最新轨迹点去更新加锁表(注意预加锁状态不更新状态...),根据锁号来查询的
        /// </summary>
        /// <param name="gj"></param>
        /// <returns></returns>
        public void UpdateByGJAndGetJS2(GJ gj, ref string preZTBJ, ref JS js)
        {
            /*
            zxjd jd
            zxwd wd
            zxsj dwsj
            zxdy dy
            zxdd dwdd
            ztbj dwzt
             */
            try
            {
                js = SelectBySBBH(gj.SBBH);

                preZTBJ = js.ZTBJ;

                #region 如果处于预加锁状态,不更新状态
                string jsState;
                if (preZTBJ == JS.yjs)
                {
                    jsState = preZTBJ;
                }
                else
                {
                    jsState = GJStateToJSState(gj.DWZT);
                }
                #endregion

                string sql = string.Format("update FDSGLXT_JSJLB set zxjd='{0}',zxwd='{1}',zxsj=to_date('{2}','yyyy/mm/dd hh24:mi:ss'),zxdd='{3}',zxddid='{4}',ztbj='{5}',zxdy='{6}' where sbbh='{7}'",
                    gj.JD, gj.WD, gj.DWSJ, gj.DWDD, gj.DWDDID, jsState, gj.DY, gj.SBBH);

                jsDal.Update(sql);

                //更新js状态
                js.ZTBJ = jsState;
                js.ZXJD = gj.JD;
                js.ZXWD = gj.WD;
                js.ZXSJ = gj.DWSJ;
                js.ZXDD = gj.DWDD;
                js.ZXDDID = gj.DWDDID;
                js.ZXDY = gj.DY;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
示例#4
0
 private JS YJSQRLoadJSEntity(string date)
 {
     JS js = new JS();
     string[] strs = date.Split('|');
     js.JLH = strs[0];
     js.ZTBJ = strs[1];
     js.JIARYYHM = strs[2];
     js.JSSJ = strs[3];
     return js;
 }
示例#5
0
 private JS YJSLoadJSEntity(string date)
 {
     JS js = new JS();
     string[] strs = date.Split('|');
     js.JLH = strs[0];
     js.QSCZID = strs[1];
     js.ZDCZID = strs[2];
     js.JIARYYHM = strs[3];
     js.SH = strs[4];
     js.SJH = strs[5];
     js.CH = strs[6];
     js.JSSJ = strs[7];
     js.ZTBJ = strs[8];
     js.YJSPCH = strs[9];
     js.HQHYYID = strs[10];
     js.SBBH = strs[11];
     js.CZID = strs[12];
     js.HYZRID = strs[13];
     return js;
 }
示例#6
0
        private JS BFLoadJSEntity(string date)
        {
            JS js = new JS();
            string[] strs = date.Split('|');
            js.JLH = strs[0];
            js.SH = strs[1];
            js.JIARYYHM = strs[2];
            js.JSSJ = strs[3];
            js.ZTBJ = strs[4];
            js.SBBH = strs[5];
            js.SJH = strs[6];
            js.HQHYYID = strs[7];

            return js;
        }