/// <summary> /// 添加 /// </summary> /// <param name="m"></param> /// <returns></returns> public static Message Add(JC_FIRE_REPORT_SW m) { StringBuilder sb = new StringBuilder(); sb.AppendFormat(" INSERT INTO JC_FIRE_REPORT ( OWERJCFID, FILENAME, FILESIZE, FILEURL, UPLOADTIME,UPLOADUSERID,UPLOADORGNO)"); sb.AppendFormat("VALUES("); sb.AppendFormat("'{0}',", ClsSql.EncodeSql(m.OWERJCFID)); sb.AppendFormat("'{0}',", ClsSql.EncodeSql(m.FILENAME)); sb.AppendFormat("'{0}',", ClsSql.EncodeSql(m.FILESIZE)); sb.AppendFormat("'{0}',", ClsSql.EncodeSql(m.FILEURL)); sb.AppendFormat("'{0}',", ClsSql.EncodeSql(ClsSwitch.SwitTM(m.UPLOADTIME))); sb.AppendFormat("'{0}',", ClsSql.EncodeSql(m.UPLOADUSERID)); sb.AppendFormat("'{0}'", ClsSql.EncodeSql(m.UPLOADORGNO)); sb.AppendFormat(")"); bool bln = DataBaseClass.ExeSql(sb.ToString()); if (bln == true) { return(new Message(true, "添加成功!", "")); } else { logs.Error(sb.ToString()); return(new Message(false, "添加失败!", "")); } }
/// <summary> /// 根据ID获取明细 /// </summary> /// <param name="sw">sw.REPORTID</param> /// <returns>参见模型</returns> public static IEnumerable <T_IPSRPT_REPORT_Model> getDetailModelList(T_IPSRPT_REPORT_SW sw) { var result = new List <T_IPSRPT_REPORT_Model>(); DataTable dt = BaseDT.T_IPSRPT_REPORT.getDetailDT(new T_IPSRPT_REPORT_SW { REPORTID = sw.REPORTID }); for (int i = 0; i < dt.Rows.Count; i++) { T_IPSRPT_REPORT_Model m = new T_IPSRPT_REPORT_Model(); m.REPORTDETAILID = dt.Rows[i]["REPORTDETAILID"].ToString(); m.REPORTID = dt.Rows[i]["REPORTID"].ToString(); m.LONGITUDE = dt.Rows[i]["LONGITUDE"].ToString(); m.LATITUDE = dt.Rows[i]["LATITUDE"].ToString(); //******************计算坐标偏移量 string[] arr = PublicCls.switJWD(m.LATITUDE, m.LONGITUDE); m.LATITUDE = arr[0]; m.LONGITUDE = arr[1]; //******************计算坐标偏移量 End m.HEIGHT = dt.Rows[i]["HEIGHT"].ToString(); m.DIRECTION = dt.Rows[i]["DIRECTION"].ToString(); m.SBTIME = ClsSwitch.SwitTM(dt.Rows[i]["SBTIME"].ToString()); result.Add(m); } dt.Clear(); dt.Dispose(); return(result); }
/// <summary> /// 获取火险等级列表 /// </summary> /// <param name="sw"></param> /// <returns></returns> public static IEnumerable <YJ_DANGERCLASS_Model> getListModel(YJ_DANGERCLASS_SW sw) { DataTable dt = BaseDT.YJ_DANGERCLASS.getDT(sw);//列表 var result = new List <YJ_DANGERCLASS_Model>(); for (int i = 0; i < dt.Rows.Count; i++) { YJ_DANGERCLASS_Model m = new YJ_DANGERCLASS_Model(); m.DANGERID = dt.Rows[i]["DANGERID"].ToString(); m.DCDATE = ClsSwitch.SwitTM(dt.Rows[i]["DCDATE"].ToString()); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.TOWNNAME = dt.Rows[i]["TOWNNAME"].ToString(); m.JD = dt.Rows[i]["JD"].ToString(); m.WD = dt.Rows[i]["WD"].ToString(); m.DANGERCLASS = dt.Rows[i]["DANGERCLASS"].ToString(); m.TOPTOWNNAME = dt.Rows[i]["TOPTOWNNAME"].ToString(); m.WEATHER = dt.Rows[i]["WEATHER"].ToString(); m.TEMPREATURE = dt.Rows[i]["TEMPREATURE"].ToString(); m.WINDYSPEED = dt.Rows[i]["WINDYSPEED"].ToString(); result.Add(m); } dt.Clear(); dt.Dispose(); return(result); }
/// <summary> /// 获取火险等级模型列表 /// </summary> /// <returns></returns> private IEnumerable <YJJCFireLevelModel> GetModelList() { var result = new List <YJJCFireLevelModel>(); var list = YJ_DANGERCLASSCls.getListModelTop(new YJ_DANGERCLASS_SW() { }); if (list.Any()) { foreach (var item in list.OrderByDescending(p => p.DANGERCLASS)) { var model = new YJJCFireLevelModel(); if (!string.IsNullOrEmpty(item.TOPTOWNNAME)) { model.AreaName = item.TOPTOWNNAME + "==>"; } model.AreaName += item.TOWNNAME; //区域 model.FireLevel = item.DANGERCLASS; //等级 model.LevelDate = ClsSwitch.SwitDate(item.DCDATE); //等级时间; model.SourceForm = "人工导入"; result.Add(model); } } return(result); }
/// <summary> /// 获取反馈信息模型 /// </summary> /// <param name="sw"></param> /// <returns></returns> public static IEnumerable <JC_FIRETICKLING_Model> GetModelList(JC_FIRETICKLING_SW sw) { var result = new List <JC_FIRETICKLING_Model>(); DataTable dt = BaseDT.JC_FIRETICKLING.GetDT(sw);//获取反馈信息记录 for (int i = 0; i < dt.Rows.Count; i++) { var model = new JC_FIRETICKLING_Model(); model.FKID = dt.Rows[i]["FKID"].ToString(); model.JCFID = dt.Rows[i]["JCFID"].ToString(); model.DL = dt.Rows[i]["DL"].ToString(); model.FORESTNAME = dt.Rows[i]["FORESTNAME"].ToString(); model.FORESTFIRETYPE = dt.Rows[i]["FORESTFIRETYPE"].ToString(); model.FUELTYPE = dt.Rows[i]["FUELTYPE"].ToString(); model.HOTTYPE = dt.Rows[i]["HOTTYPE"].ToString(); model.CHECKTIME = dt.Rows[i]["CHECKTIME"] == null ? "" : ClsSwitch.SwitTM(dt.Rows[i]["CHECKTIME"].ToString()); model.YY = dt.Rows[i]["YY"].ToString(); model.JXHQSJ = dt.Rows[i]["JXHQSJ"].ToString(); model.FIREBEGINTIME = dt.Rows[i]["FIREBEGINTIME"] == null ? "" : ClsSwitch.SwitTM(dt.Rows[i]["FIREBEGINTIME"].ToString()); model.FIREENDTIME = dt.Rows[i]["FIREENDTIME"] == null ? "" : ClsSwitch.SwitTM(dt.Rows[i]["FIREENDTIME"].ToString()); model.ISOUTFIRE = dt.Rows[i]["ISOUTFIRE"].ToString(); model.BURNEDAREA = dt.Rows[i]["BURNEDAREA"].ToString(); model.OVERDOAREA = dt.Rows[i]["OVERDOAREA"].ToString(); model.LOSTFORESTAREA = dt.Rows[i]["LOSTFORESTAREA"].ToString(); model.ELSELOSSINTRO = dt.Rows[i]["ELSELOSSINTRO"].ToString(); model.FIREINTRO = dt.Rows[i]["FIREINTRO"].ToString(); model.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); model.MANUSERID = dt.Rows[i]["MANUSERID"].ToString(); model.MANTIME = dt.Rows[i]["MANTIME"].ToString(); model.MANSTATE = dt.Rows[i]["MANSTATE"].ToString(); result.Add(model); } return(result); }
/// <summary> /// 获取列表 /// </summary> /// <param name="sw"></param> /// <returns></returns> public static IEnumerable <JC_FIRE_REPORT_Model> getModelList(JC_FIRE_REPORT_SW sw) { var result = new List <JC_FIRE_REPORT_Model>(); DataTable dt = BaseDT.JC_FIRE_REPORT.getDT(sw);//列表 DataTable dtORG = BaseDT.T_SYS_ORG.getDT(new T_SYS_ORGSW { SYSFLAG = ConfigCls.getSystemFlag() }); //获取单位 for (int i = 0; i < dt.Rows.Count; i++) { JC_FIRE_REPORT_Model m = new JC_FIRE_REPORT_Model(); m.ID = dt.Rows[i]["ID"].ToString(); m.OWERJCFID = dt.Rows[i]["OWERJCFID"].ToString(); m.FILENAME = dt.Rows[i]["FILENAME"].ToString(); m.FILESIZE = dt.Rows[i]["FILESIZE"].ToString(); m.FILEURL = dt.Rows[i]["FILEURL"].ToString(); //m.UPLOADTIME = dt.Rows[i]["UPLOADTIME"].ToString(); m.UPLOADTIME = ClsSwitch.SwitTM(dt.Rows[i]["UPLOADTIME"].ToString()); m.UPLOADUSERID = dt.Rows[i]["UPLOADUSERID"].ToString(); m.UPLOADORGNO = dt.Rows[i]["UPLOADORGNO"].ToString(); m.UPLOANAME = T_SYSSEC_IPSUSERCls.getModel(new T_SYSSEC_IPSUSER_SW() { USERID = m.UPLOADUSERID }).USERNAME; m.UPLOADORGNAME = BaseDT.T_SYS_ORG.getName(dtORG, m.UPLOADORGNO); result.Add(m); } dt.Clear(); dt.Dispose(); dtORG.Clear(); dtORG.Dispose(); return(result); }
/// <summary> /// 获取分页 /// </summary> /// <param name="sw">参见模型</param> /// <param name="total">记录总数</param> /// <returns>参见模型</returns> public static IEnumerable <JC_FIRE_Model> getModelList(JC_FIRE_SW sw, out int total) { var result = new List <JC_FIRE_Model>(); DataTable dtprop = BaseDT.JC_FIRE_PROP.getDT(new JC_FIRE_PROP_SW { }); DataTable dt = BaseDT.JC_FIRE.GetDCDT(sw, out total);//列表 DataTable dtUser = BaseDT.T_SYSSEC_USER.getDT(new T_SYSSEC_IPSUSER_SW { }); DataTable dtORG = BaseDT.T_SYS_ORG.getDT(new T_SYS_ORGSW { SYSFLAG = ConfigCls.getSystemFlag() }); //获取单位 DataTable dt99 = BaseDT.T_SYS_DICT.getDT(new T_SYS_DICTSW { DICTTYPEID = "99" }); //火情来源 for (int i = 0; i < dt.Rows.Count; i++) { JC_FIRE_Model m = new JC_FIRE_Model(); m.JCFID = dt.Rows[i]["JCFID"].ToString(); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.FIRENAME = dt.Rows[i]["FIRENAME"].ToString(); m.FIRELEVEL = BaseDT.JC_FIRE_PROP.getfirelevel(dtprop, dt.Rows[i]["JCFID"].ToString()); m.FIREFROM = dt.Rows[i]["FIREFROM"].ToString(); //火情来源 m.FIREFROMName = BaseDT.T_SYS_DICT.getName(dt99, m.FIREFROM); //火情来源名称 m.FIREFROMID = dt.Rows[i]["FIREFROMID"].ToString(); //原始记录序号 m.FIRETIME = ClsSwitch.SwitTM(dt.Rows[i]["FIRETIME"].ToString()); //起火时间 m.MARK = dt.Rows[i]["MARK"].ToString(); m.JD = dt.Rows[i]["JD"].ToString(); m.WD = dt.Rows[i]["WD"].ToString(); m.ZQWZ = dt.Rows[i]["ZQWZ"].ToString(); m.WXBH = dt.Rows[i]["WXBH"].ToString(); m.DQRDBH = dt.Rows[i]["DQRDBH"].ToString(); m.RSMJ = dt.Rows[i]["RSMJ"].ToString(); m.DL = dt.Rows[i]["DL"].ToString(); m.YY = dt.Rows[i]["YY"].ToString(); m.ISOUTFIRE = dt.Rows[i]["ISOUTFIRE"].ToString(); m.JXHQSJ = dt.Rows[i]["JXHQSJ"].ToString(); m.RECEIVETIME = ClsSwitch.SwitTM(dt.Rows[i]["RECEIVETIME"].ToString()); m.FIREENDTIME = ClsSwitch.SwitTM(dt.Rows[i]["FIREENDTIME"].ToString()); m.ISSUEDTIME = ClsSwitch.SwitTM(dt.Rows[i]["ISSUEDTIME"].ToString()); m.MANSTATE = dt.Rows[i]["MANSTATE"].ToString(); //m.ISSUEDTIME = ClsSwitch.SwitTM(dt.Rows[i]["LASTPROCESSTIME"].ToString()); //m.FIRELEVEL = dt.Rows[i]["FIRELEVEL"].ToString(); m.ORGNAME = BaseDT.T_SYS_ORG.getName(dtORG, m.BYORGNO); m.PFUSERID = dt.Rows[i]["PFUSERID"].ToString(); m.PFNAME = BaseDT.T_SYSSEC_USER.getName(dtUser, m.PFUSERID); m.FirePropModel = null;//需要再扩充 m.HOTTYPE = dt.Rows[i]["HOTTYPE"].ToString(); result.Add(m); } dt.Clear(); dt.Dispose(); dtUser.Clear(); dtUser.Dispose(); dtORG.Clear(); dtORG.Dispose(); dt99.Clear(); dt99.Dispose(); return(result); }
/// <summary> /// 获取单条数据 /// </summary> /// <param name="sw">参见模型</param> /// <returns>参见模型</returns> public static FIRERECORD_FIREINFO_Model getModel(FIRERECORD_FIREINFO_SW sw) { DataTable dt = BaseDT.FIRERECORD_FIREINFO.getDT2(sw); FIRERECORD_FIREINFO_Model m = new FIRERECORD_FIREINFO_Model(); DataTable dtORG = BaseDT.T_SYS_ORG.getDT(new T_SYS_ORGSW { SYSFLAG = ConfigCls.getSystemFlag() }); //获取单位 if (dt != null && dt.Rows.Count > 0) { int i = 0; m.FRFIID = dt.Rows[i]["FRFIID"].ToString(); m.JCFID = dt.Rows[i]["JCFID"].ToString(); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.FIRECODE = dt.Rows[i]["FIRECODE"].ToString(); m.FIREADDRESSCOUNTY = dt.Rows[i]["FIREADDRESSCOUNTY"].ToString(); m.FIREADDRESSTOWNS = dt.Rows[i]["FIREADDRESSTOWNS"].ToString(); m.ORGNAME = BaseDT.T_SYS_ORG.getName(dtORG, m.FIREADDRESSTOWNS); m.FIREADDRESSVILLAGES = dt.Rows[i]["FIREADDRESSVILLAGES"].ToString(); m.FIRETIME = ClsSwitch.SwitTM(dt.Rows[i]["FIRETIME"].ToString()); m.FIREENDTIME = ClsSwitch.SwitTM(dt.Rows[i]["FIREENDTIME"].ToString()); m.FIREADDRESS = dt.Rows[i]["FIREADDRESS"].ToString(); m.FIRERECINFO000 = dt.Rows[i]["FIRERECINFO000"].ToString(); m.FIRERECINFO001 = dt.Rows[i]["FIRERECINFO001"].ToString(); m.FIRERECINFO020 = dt.Rows[i]["FIRERECINFO020"].ToString(); m.FIRERECINFO021 = dt.Rows[i]["FIRERECINFO021"].ToString(); m.FIRERECINFO030 = dt.Rows[i]["FIRERECINFO030"].ToString(); m.FIRERECINFO031 = dt.Rows[i]["FIRERECINFO031"].ToString(); m.FIRERECINFO032 = dt.Rows[i]["FIRERECINFO032"].ToString(); m.FIRERECINFO040 = dt.Rows[i]["FIRERECINFO040"].ToString(); m.FIRERECINFO041 = dt.Rows[i]["FIRERECINFO041"].ToString(); m.FIRERECINFO050 = dt.Rows[i]["FIRERECINFO050"].ToString(); m.FIRERECINFO051 = dt.Rows[i]["FIRERECINFO051"].ToString(); m.FIRERECINFO060 = dt.Rows[i]["FIRERECINFO060"].ToString(); m.FIRERECINFO061 = dt.Rows[i]["FIRERECINFO061"].ToString(); m.FIRERECINFO070 = dt.Rows[i]["FIRERECINFO070"].ToString(); m.FIRERECINFO071 = dt.Rows[i]["FIRERECINFO071"].ToString(); m.FIRERECINFO072 = dt.Rows[i]["FIRERECINFO072"].ToString(); m.FIRERECINFO080 = dt.Rows[i]["FIRERECINFO080"].ToString(); m.FIRERECINFO081 = dt.Rows[i]["FIRERECINFO081"].ToString(); m.FIRERECINFO082 = dt.Rows[i]["FIRERECINFO082"].ToString(); m.FIRERECINFO090 = dt.Rows[i]["FIRERECINFO090"].ToString(); m.FIRERECINFO100 = dt.Rows[i]["FIRERECINFO100"].ToString(); m.FIRERECINFO110 = dt.Rows[i]["FIRERECINFO110"].ToString(); m.FIRERECINFO111 = dt.Rows[i]["FIRERECINFO111"].ToString(); m.FIRERECINFO120 = dt.Rows[i]["FIRERECINFO120"].ToString(); m.FIRERECINFO130 = dt.Rows[i]["FIRERECINFO130"].ToString(); m.FIRERECINFO140 = dt.Rows[i]["FIRERECINFO140"].ToString(); m.FIRERECINFO150 = dt.Rows[i]["FIRERECINFO150"].ToString(); m.FIRERECINFO160 = dt.Rows[i]["FIRERECINFO160"].ToString(); m.FIRELOSEAREA = dt.Rows[i]["FIRELOSEAREA"].ToString(); //m.JD = dt.Rows[i]["JD"].ToString(); //m.WD = dt.Rows[i]["WD"].ToString(); } dt.Clear(); dt.Dispose(); dtORG.Clear(); dtORG.Dispose(); return(m); }
/// <summary> /// 获取数量列表 /// </summary> /// <param name="sw"></param> /// <returns></returns> public static IEnumerable <WILD_BOTANYFILE_Model> getModelList(WILD_BOTANYFILE_SW sw) { var result = new List <WILD_BOTANYFILE_Model>(); DataTable dt = BaseDT.WILD_BOTANYFILE.getDT(sw);//列表 DataTable dtBiolo = BaseDT.T_SYS_BIOLOGICALTYPE.getDT(new T_SYS_BIOLOGICALTYPE_SW()); for (int i = 0; i < dt.Rows.Count; i++) { WILD_BOTANYFILE_Model m = new WILD_BOTANYFILE_Model(); m.PESTFILEID = dt.Rows[i]["PESTFILEID"].ToString(); m.BIOLOGICALTYPECODE = dt.Rows[i]["BIOLOGICALTYPECODE"].ToString(); m.BIOLOGICALTYPENAME = BaseDT.T_SYS_BIOLOGICALTYPE.getName(dtBiolo, m.BIOLOGICALTYPECODE); m.PESTFILETITLE = dt.Rows[i]["PESTFILETITLE"].ToString(); m.PESTFILETYPE = dt.Rows[i]["PESTFILETYPE"].ToString(); m.PESTFILENAME = dt.Rows[i]["PESTFILENAME"].ToString(); m.UPLOADTIME = ClsSwitch.SwitTM(dt.Rows[i]["UPLOADTIME"].ToString()); m.UID = dt.Rows[i]["UID"].ToString(); result.Add(m); } dt.Clear(); dt.Dispose(); dtBiolo.Clear(); dtBiolo.Dispose(); return(result); }
/// <summary> /// 获取单条数据 /// </summary> /// <param name="sw">参见模型</param> /// <returns>参见模型</returns> public static PEST_REMOTEDIAGN_Model getModel(PEST_REMOTEDIAGN_SW sw) { DataTable dt = BaseDT.PEST_REMOTEDIAGN.getDT(sw);//列表 DataTable dt122 = BaseDT.T_SYS_DICT.getDT(new T_SYS_DICTSW { DICTTYPEID = "122" }); //诊断状态 PEST_REMOTEDIAGN_Model m = new PEST_REMOTEDIAGN_Model(); if (dt.Rows.Count > 0) { int i = 0; m.PEST_REMOTEDIAGNID = dt.Rows[i]["PEST_REMOTEDIAGNID"].ToString(); m.DIAGNTITLE = dt.Rows[i]["DIAGNTITLE"].ToString(); m.DIAGNCONTENT = dt.Rows[i]["DIAGNCONTENT"].ToString(); m.DIAGNTIME = ClsSwitch.SwitMN(dt.Rows[i]["DIAGNTIME"].ToString()); m.DIAGNEXPERTS = dt.Rows[i]["DIAGNEXPERTS"].ToString(); m.DIAGNSTATUS = dt.Rows[i]["DIAGNSTATUS"].ToString(); m.DIAGNSTATUSName = BaseDT.T_SYS_DICT.getName(dt122, m.DIAGNSTATUS); m.DIAGNRESULT = dt.Rows[i]["DIAGNRESULT"].ToString(); m.DIAGNSPONSERUID = dt.Rows[i]["DIAGNSPONSERUID"].ToString(); if (!string.IsNullOrEmpty(m.DIAGNSPONSERUID)) { m.DIAGNSPONSERNAME = T_SYSSEC_IPSUSERCls.getname(m.DIAGNSPONSERUID); } m.DIAGNSPONSERTIME = ClsSwitch.SwitMN(dt.Rows[i]["DIAGNSPONSERTIME"].ToString()); } dt.Clear(); dt.Dispose(); dt122.Clear(); dt122.Dispose(); return(m); }
/// <summary> /// 获取列表 /// </summary> /// <param name="sw">参见模型</param> /// <returns>参见模型</returns> public static IEnumerable <YJ_WEATHER_Model> getNewListModel(YJ_WEATHER_SW sw) { DataTable dt = BaseDT.YJ_WEATHER.getNewDT(sw);//列表 var result = new List <YJ_WEATHER_Model>(); for (int i = 0; i < dt.Rows.Count; i++) { YJ_WEATHER_Model m = new YJ_WEATHER_Model(); m.WEATHERID = dt.Rows[i]["WEATHERID"].ToString(); m.WEATHERDATE = ClsSwitch.SwitTM(dt.Rows[i]["WEATHERDATE"].ToString()); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.TOWNNAME = dt.Rows[i]["TOWNNAME"].ToString(); m.JD = dt.Rows[i]["JD"].ToString(); m.WD = dt.Rows[i]["WD"].ToString(); m.P = dt.Rows[i]["P"].ToString(); m.T = dt.Rows[i]["T"].ToString(); m.W = dt.Rows[i]["W"].ToString(); m.F = dt.Rows[i]["F"].ToString(); m.TCUR = dt.Rows[i]["TCUR"].ToString(); m.THIGH = dt.Rows[i]["THIGH"].ToString(); m.TLOWER = dt.Rows[i]["TLOWER"].ToString(); result.Add(m); } dt.Clear(); dt.Dispose(); return(result); }
/// <summary> /// 获取列表 /// </summary> /// <param name="sw"></param> /// <returns></returns> public static IEnumerable <E_RECEIVE_Model> getListModel(E_RECEIVE_SW sw) { DataTable dt = BaseDT.E_RECEIVE.getDT(sw);//列表 var result = new List <E_RECEIVE_Model>(); for (int i = 0; i < dt.Rows.Count; i++) { E_RECEIVE_Model m = new E_RECEIVE_Model(); m.ERID = dt.Rows[i]["ERID"].ToString(); m.BYEMAILID = dt.Rows[i]["BYEMAILID"].ToString(); m.RECEIVETYPE = dt.Rows[i]["RECEIVETYPE"].ToString(); m.EMAILRECEIVESTATUS = dt.Rows[i]["EMAILRECEIVESTATUS"].ToString(); m.EMAILSENDTIME = ClsSwitch.SwitTM(dt.Rows[i]["EMAILSENDTIME"].ToString()); m.EMAILRECEIVETIME = ClsSwitch.SwitTM(dt.Rows[i]["EMAILRECEIVETIME"].ToString()); m.SubjectModel = E_SUBJECTCls.getModel(new E_SUBJECT_SW { EMAILID = m.BYEMAILID }); m.FileModel = E_FILECls.getListModel(new E_File_SW { BYEMAILID = m.BYEMAILID }); if (m.EMAILRECEIVESTATUS == "0")//未读 { BaseDT.E_RECEIVE.Mdy(new E_RECEIVE_Model { EMAILRECEIVESTATUS = "1", EMAILRECEIVETIME = ClsSwitch.SwitTM(DateTime.Now), ERID = m.ERID }); } result.Add(m); } dt.Clear(); dt.Dispose(); return(result); }
/// <summary> /// 管理 /// </summary> /// <param name="m">参见模型</param> /// <returns>参见模型</returns> public static Message Man(JC_PERALARM_Model m) { if (string.IsNullOrEmpty(m.MANTIME)) { m.MANTIME = ClsSwitch.SwitTM(DateTime.Now); } StringBuilder sb = new StringBuilder(); sb.AppendFormat("UPDATE JC_PERALARM"); sb.AppendFormat(" set "); sb.AppendFormat("MANSTATE='{0}'", ClsSql.EncodeSql(m.MANSTATE)); sb.AppendFormat(",MANRESULT='{0}'", ClsSql.EncodeSql(m.MANRESULT)); sb.AppendFormat(",MANTIME='{0}'", ClsSql.EncodeSql(m.MANTIME)); sb.AppendFormat(",MANUSERID='{0}'", ClsSql.EncodeSql(m.MANUSERID)); sb.AppendFormat(" where PERALARMID= '{0}'", ClsSql.EncodeSql(m.PERALARMID)); bool bln = DataBaseClass.ExeSql(sb.ToString()); if (bln == true) { return(new Message(true, "修改成功!", "")); } else { return(new Message(false, "修改失败,请检查各输入框是否正确!", "")); } }
/// <summary> /// 获取数据列表 /// </summary> /// <param name="sw"></param> /// <param name="total"></param> /// <returns></returns> public static IEnumerable <PEST_REMOTEDIAGN_Model> getListModel(PEST_REMOTEDIAGN_SW sw, out int total) { var result = new List <PEST_REMOTEDIAGN_Model>(); DataTable dt = BaseDT.PEST_REMOTEDIAGN.getDT(sw, out total);//列表 DataTable dt122 = BaseDT.T_SYS_DICT.getDT(new T_SYS_DICTSW { DICTTYPEID = "122" }); //诊断状态 for (int i = 0; i < dt.Rows.Count; i++) { PEST_REMOTEDIAGN_Model m = new PEST_REMOTEDIAGN_Model(); m.PEST_REMOTEDIAGNID = dt.Rows[i]["PEST_REMOTEDIAGNID"].ToString(); m.DIAGNTITLE = dt.Rows[i]["DIAGNTITLE"].ToString(); m.DIAGNCONTENT = dt.Rows[i]["DIAGNCONTENT"].ToString(); m.DIAGNTIME = ClsSwitch.SwitMN(dt.Rows[i]["DIAGNTIME"].ToString()); m.DIAGNEXPERTS = dt.Rows[i]["DIAGNEXPERTS"].ToString(); m.DIAGNSTATUS = dt.Rows[i]["DIAGNSTATUS"].ToString(); m.DIAGNSTATUSName = BaseDT.T_SYS_DICT.getName(dt122, m.DIAGNSTATUS); m.DIAGNRESULT = dt.Rows[i]["DIAGNRESULT"].ToString(); m.DIAGNSPONSERUID = dt.Rows[i]["DIAGNSPONSERUID"].ToString(); if (!string.IsNullOrEmpty(m.DIAGNSPONSERUID)) { m.DIAGNSPONSERNAME = T_SYSSEC_IPSUSERCls.getname(m.DIAGNSPONSERUID); } m.DIAGNSPONSERTIME = ClsSwitch.SwitMN(dt.Rows[i]["DIAGNSPONSERTIME"].ToString()); result.Add(m); } dt.Clear(); dt.Dispose(); dt122.Clear(); dt122.Dispose(); return(result); }
/// <summary> /// 查看某一邮件信息 /// </summary> /// <param name="sw"></param> /// <returns></returns> public static E_RECEIVE_Model getModel(E_RECEIVE_SW sw) { DataTable dt = BaseDT.E_RECEIVE.getDT(sw);//列表 E_RECEIVE_Model m = new E_RECEIVE_Model(); if (dt.Rows.Count > 0) { int i = 0; m.ERID = dt.Rows[i]["ERID"].ToString(); m.BYEMAILID = dt.Rows[i]["BYEMAILID"].ToString(); m.RECEIVETYPE = dt.Rows[i]["RECEIVETYPE"].ToString(); m.EMAILRECEIVESTATUS = dt.Rows[i]["EMAILRECEIVESTATUS"].ToString(); m.EMAILSENDTIME = ClsSwitch.SwitTM(dt.Rows[i]["EMAILSENDTIME"].ToString()); m.EMAILRECEIVETIME = ClsSwitch.SwitTM(dt.Rows[i]["EMAILRECEIVETIME"].ToString()); m.SubjectModel = E_SUBJECTCls.getModel(new E_SUBJECT_SW { EMAILID = m.BYEMAILID }); m.FileModel = E_FILECls.getListModel(new E_File_SW { BYEMAILID = m.BYEMAILID }); if (m.EMAILRECEIVESTATUS == "0")//未读 { BaseDT.E_RECEIVE.Mdy(new E_RECEIVE_Model { EMAILRECEIVESTATUS = "1", EMAILRECEIVETIME = ClsSwitch.SwitTM(DateTime.Now), ERID = m.ERID }); } } dt.Clear(); dt.Dispose(); return(m); }
/// <summary> /// 获取列表 /// </summary> /// <param name="sw">参见模型</param> /// <returns>参见模型</returns> public static YJ_WEATHER_Model getModel(YJ_WEATHER_SW sw) { DataTable dt = BaseDT.YJ_WEATHER.getDT(sw);//列表 DataTable dtOrg = BaseDT.T_SYS_ORG.getDT(new T_SYS_ORGSW { }); YJ_WEATHER_Model m = new YJ_WEATHER_Model(); if (dt.Rows.Count > 0) { int i = 0; m.WEATHERID = dt.Rows[i]["WEATHERID"].ToString(); m.WEATHERDATE = ClsSwitch.SwitTM(dt.Rows[i]["WEATHERDATE"].ToString()); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.TOWNNAME = dt.Rows[i]["TOWNNAME"].ToString(); m.JD = dt.Rows[i]["JD"].ToString(); m.WD = dt.Rows[i]["WD"].ToString(); m.P = dt.Rows[i]["P"].ToString(); m.T = dt.Rows[i]["T"].ToString(); m.W = dt.Rows[i]["W"].ToString(); m.F = dt.Rows[i]["F"].ToString(); m.TCUR = dt.Rows[i]["TCUR"].ToString(); m.THIGH = dt.Rows[i]["THIGH"].ToString(); m.TLOWER = dt.Rows[i]["TLOWER"].ToString(); m.orgName = BaseDT.T_SYS_ORG.getName(dtOrg, m.BYORGNO); } dt.Clear(); dt.Dispose(); dtOrg.Clear(); dtOrg.Dispose(); return(m); }
/// <summary> /// 获取一条数据 /// </summary> /// <returns></returns> public static IEnumerable <OD_ODTYPE_Model> GetOneData() { //var result = new List<O_ODUSER_Model>(); //var dt = BaseDT.O_OD_USER.GetModelList(od); //for (int i = 0; i < dt.Rows.Count; i++) //{ // O_ODUSER_Model ood = new O_ODUSER_Model(); // ood.BYORGNO = BaseDT.T_SYS_ORG.getName(dt, dt.Rows[i]["ORGNO"].ToString()); // ood.ONDUTYUSERTYPE = dt.Rows[i]["ONDUTYUSERTYPE"].ToString(); // ood.USERNAME = dt.Rows[i]["username"].ToString(); // ood.ISATTENDED = dt.Rows[i]["ISATTENDED"].ToString(); // ood.ONDUTYDATE = ClsSwitch.SwitDate(dt.Rows[i]["ONDUTYDATE"].ToString()); // result.Add(ood); //} //dt.Clear(); //dt.Dispose(); //return result; var result = new List <OD_ODTYPE_Model>(); var dt = BaseDT.OD_TYPE.GetOneData(); for (int i = 0; i < dt.Rows.Count; i++) { OD_ODTYPE_Model om = new OD_ODTYPE_Model(); om.OD_TYPEID = dt.Rows[i]["OD_TYPEID"].ToString(); om.OD_TYPENAME = dt.Rows[i]["OD_TYPENAME"].ToString(); om.OD_DATEBEGIN = ClsSwitch.SwitDate(dt.Rows[i]["OD_DATEBEGIN"].ToString()); om.OD_DATEEND = ClsSwitch.SwitDate(dt.Rows[i]["OD_DATEEND"].ToString()); result.Add(om); } dt.Clear(); dt.Dispose(); return(result); }
/// <summary> /// 获取公益林模型 /// </summary> /// <param name="dt"></param> /// <param name="i"></param> /// <returns></returns> private static JC_FIRE_Model GetModel(DataTable dt, int i) { JC_FIRE_Model m = new JC_FIRE_Model(); m.JCFID = dt.Rows[i]["JCFID"].ToString(); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.FIRENAME = dt.Rows[i]["FIRENAME"].ToString(); m.FIREFROM = dt.Rows[i]["FIREFROM"].ToString();//火情来源 if (m.FIREFROM == "1") { m.FIREFROMName = "红外相机"; } if (m.FIREFROM == "2") { m.FIREFROMName = "电话报警"; } if (m.FIREFROM == "3") { m.FIREFROMName = "卫星热点"; } if (m.FIREFROM == "4") { m.FIREFROMName = "电子报警"; } if (m.FIREFROM == "5") { m.FIREFROMName = "护林员火情"; } if (m.FIREFROM == "6") { m.FIREFROMName = "飞机巡护"; } m.FIREFROMID = dt.Rows[i]["FIREFROMID"].ToString(); //原始记录序号 m.FIRETIME = ClsSwitch.SwitTM(dt.Rows[i]["FIRETIME"].ToString()); //起火时间 m.MARK = dt.Rows[i]["MARK"].ToString(); m.JD = dt.Rows[i]["JD"].ToString(); m.WD = dt.Rows[i]["WD"].ToString(); m.ZQWZ = dt.Rows[i]["ZQWZ"].ToString(); m.WXBH = dt.Rows[i]["WXBH"].ToString(); m.DQRDBH = dt.Rows[i]["DQRDBH"].ToString(); m.RSMJ = dt.Rows[i]["RSMJ"].ToString(); m.DL = dt.Rows[i]["DL"].ToString(); m.YY = dt.Rows[i]["YY"].ToString(); m.JXHQSJ = dt.Rows[i]["JXHQSJ"].ToString(); m.ISOUTFIRE = dt.Rows[i]["ISOUTFIRE"].ToString(); m.RECEIVETIME = ClsSwitch.SwitTM(dt.Rows[i]["RECEIVETIME"].ToString()); m.ISSUEDTIME = ClsSwitch.SwitTM(dt.Rows[i]["ISSUEDTIME"].ToString()); m.PFUSERID = dt.Rows[i]["PFUSERID"].ToString(); //m.FIRELEVEL = dt.Rows[i]["FIRELEVEL"].ToString(); m.MANSTATE = dt.Rows[i]["MANSTATE"].ToString(); m.FIREENDTIME = ClsSwitch.SwitTM(dt.Rows[i]["FIREENDTIME"].ToString()); // m.PFNAME = BaseDT.T_SYSSEC_USER.getName(dtUser, m.PFUSERID); m.PFORGNO = dt.Rows[i]["PFORGNO"].ToString(); // m.PFORGNOName = BaseDT.T_SYS_ORG.getName(dtORG, dt.Rows[i]["PFORGNO"].ToString()); //m.ORGNAME = BaseDT.T_SYS_ORG.getName(dtORG, m.BYORGNO); m.FirePropModel = null;//需要再扩充 return(m); }
/// <summary> /// 获取数据列表 /// </summary> /// <param name="sw">参见模型FIRERECORD_FIREINFO_Model</param> /// <returns>参见模型FIRERECORD_FIREINFO_Model</returns> public static IEnumerable <FIRERECORD_FIREINFO_Model> getListModel(FIRERECORD_FIREINFO_SW sw) { var result = new List <FIRERECORD_FIREINFO_Model>(); DataTable dt = BaseDT.FIRERECORD_FIREINFO.getDT(sw); for (int i = 0; i < dt.Rows.Count; i++) { FIRERECORD_FIREINFO_Model m = new FIRERECORD_FIREINFO_Model(); m.FRFIID = dt.Rows[i]["FRFIID"].ToString(); m.JCFID = dt.Rows[i]["JCFID"].ToString(); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.FIRECODE = dt.Rows[i]["FIRECODE"].ToString(); m.FIREADDRESSCOUNTY = dt.Rows[i]["FIREADDRESSCOUNTY"].ToString(); m.FIREADDRESSTOWNS = dt.Rows[i]["FIREADDRESSTOWNS"].ToString(); m.FIREADDRESSVILLAGES = dt.Rows[i]["FIREADDRESSVILLAGES"].ToString(); m.FIRETIME = ClsSwitch.SwitTM(dt.Rows[i]["FIRETIME"].ToString()); m.FIREENDTIME = ClsSwitch.SwitTM(dt.Rows[i]["FIREENDTIME"].ToString()); m.FIREADDRESS = dt.Rows[i]["FIREADDRESS"].ToString(); m.FIRERECINFO000 = dt.Rows[i]["FIRERECINFO000"].ToString(); m.FIRERECINFO001 = dt.Rows[i]["FIRERECINFO001"].ToString(); m.FIRERECINFO020 = dt.Rows[i]["FIRERECINFO020"].ToString(); m.FIRERECINFO021 = dt.Rows[i]["FIRERECINFO021"].ToString(); m.FIRERECINFO030 = dt.Rows[i]["FIRERECINFO030"].ToString(); m.FIRERECINFO031 = dt.Rows[i]["FIRERECINFO031"].ToString(); m.FIRERECINFO032 = dt.Rows[i]["FIRERECINFO032"].ToString(); m.FIRERECINFO040 = dt.Rows[i]["FIRERECINFO040"].ToString(); m.FIRERECINFO041 = dt.Rows[i]["FIRERECINFO041"].ToString(); m.FIRERECINFO050 = dt.Rows[i]["FIRERECINFO050"].ToString(); m.FIRERECINFO051 = dt.Rows[i]["FIRERECINFO051"].ToString(); m.FIRERECINFO060 = dt.Rows[i]["FIRERECINFO060"].ToString(); m.FIRERECINFO061 = dt.Rows[i]["FIRERECINFO061"].ToString(); m.FIRERECINFO070 = dt.Rows[i]["FIRERECINFO070"].ToString(); m.FIRERECINFO071 = dt.Rows[i]["FIRERECINFO071"].ToString(); m.FIRERECINFO072 = dt.Rows[i]["FIRERECINFO072"].ToString(); m.FIRERECINFO080 = dt.Rows[i]["FIRERECINFO080"].ToString(); m.FIRERECINFO081 = dt.Rows[i]["FIRERECINFO081"].ToString(); m.FIRERECINFO082 = dt.Rows[i]["FIRERECINFO082"].ToString(); m.FIRERECINFO090 = dt.Rows[i]["FIRERECINFO090"].ToString(); m.FIRERECINFO100 = dt.Rows[i]["FIRERECINFO100"].ToString(); m.FIRERECINFO110 = dt.Rows[i]["FIRERECINFO110"].ToString(); m.FIRERECINFO111 = dt.Rows[i]["FIRERECINFO111"].ToString(); m.FIRERECINFO120 = dt.Rows[i]["FIRERECINFO120"].ToString(); m.FIRERECINFO130 = dt.Rows[i]["FIRERECINFO130"].ToString(); m.FIRERECINFO140 = dt.Rows[i]["FIRERECINFO140"].ToString(); m.FIRERECINFO150 = dt.Rows[i]["FIRERECINFO150"].ToString(); m.FIRERECINFO160 = dt.Rows[i]["FIRERECINFO160"].ToString(); m.FIRELOSEAREA = dt.Rows[i]["FIRELOSEAREA"].ToString(); //m.JD = dt.Rows[i]["JD"].ToString(); //m.WD = dt.Rows[i]["WD"].ToString(); result.Add(m); } dt.Clear(); dt.Dispose(); return(result); }
/// <summary> /// 获取用户列表(分页) /// </summary> /// <param name="sw">参见模型</param> /// <param name="total">记录总数</param> /// <returns>参见模型</returns> public static IEnumerable <JC_PERALARM_Model> getListModelPager(JC_PERALARM_SW sw, out int total) { var result = new List <JC_PERALARM_Model>(); DataTable dt = BaseDT.JC_PERALARM.getDT(sw, out total);//用户列表 DataTable dtUser = BaseDT.T_SYSSEC_USER.getDT(new T_SYSSEC_IPSUSER_SW { }); DataTable dtORG = BaseDT.T_SYS_ORG.getDT(new T_SYS_ORGSW { SYSFLAG = ConfigCls.getSystemFlag() }); //获取单位 for (int i = 0; i < dt.Rows.Count; i++) { JC_PERALARM_Model m = new JC_PERALARM_Model(); m.PERALARMID = dt.Rows[i]["PERALARMID"].ToString(); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.FIRENAME = dt.Rows[i]["FIRENAME"].ToString(); m.PERALARMPHONE = dt.Rows[i]["PERALARMPHONE"].ToString(); m.PERALARMNAME = dt.Rows[i]["PERALARMNAME"].ToString(); m.PERALARMTIME = ClsSwitch.SwitTM(dt.Rows[i]["PERALARMTIME"].ToString()); m.PERALARMADDRESS = dt.Rows[i]["PERALARMADDRESS"].ToString(); m.PERALARMCONTENT = dt.Rows[i]["PERALARMCONTENT"].ToString(); m.MANSTATE = dt.Rows[i]["MANSTATE"].ToString(); m.MANRESULT = dt.Rows[i]["MANRESULT"].ToString(); m.MANTIME = ClsSwitch.SwitTM(dt.Rows[i]["MANTIME"].ToString()); m.MANUSERID = dt.Rows[i]["MANUSERID"].ToString(); m.JD = dt.Rows[i]["JD"].ToString(); m.WD = dt.Rows[i]["WD"].ToString(); m.PEARLARMPRE = dt.Rows[i]["PEARLARMPRE"].ToString(); m.PEARLARMISSUED = dt.Rows[i]["PEARLARMISSUED"].ToString(); if (!string.IsNullOrEmpty(m.MANUSERID)) { DataRow[] drUser = dtUser.Select("USERID='" + m.MANUSERID + "'"); if (drUser.Length > 0) { m.ManUserName = drUser[0]["USERNAME"].ToString(); } } m.ORGNAME = BaseDT.T_SYS_ORG.getName(dtORG, m.BYORGNO); result.Add(m); } dtORG.Clear(); dtORG.Dispose(); dtUser.Clear(); dtUser.Dispose(); dt.Clear(); dt.Dispose(); return(result); }
/// <summary> /// 根据查询条件获取某一条信息记录 /// </summary> /// <param name="sw">参见模型</param> /// <returns>参见模型</returns> public static JC_PERALARM_Model getModel(JC_PERALARM_SW sw) { DataTable dt = BaseDT.JC_PERALARM.getDT(sw); JC_PERALARM_Model m = new JC_PERALARM_Model(); DataTable dtORG = BaseDT.T_SYS_ORG.getDT(new T_SYS_ORGSW { SYSFLAG = ConfigCls.getSystemFlag() }); //获取单位 if (dt.Rows.Count > 0) { int i = 0; m.PERALARMID = dt.Rows[i]["PERALARMID"].ToString(); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.FIRENAME = dt.Rows[i]["FIRENAME"].ToString(); m.PERALARMPHONE = dt.Rows[i]["PERALARMPHONE"].ToString(); m.PERALARMNAME = dt.Rows[i]["PERALARMNAME"].ToString(); m.PERALARMTIME = ClsSwitch.SwitTM(dt.Rows[i]["PERALARMTIME"].ToString()); m.PERALARMADDRESS = dt.Rows[i]["PERALARMADDRESS"].ToString(); m.PERALARMCONTENT = dt.Rows[i]["PERALARMCONTENT"].ToString(); m.MANSTATE = dt.Rows[i]["MANSTATE"].ToString(); m.MANRESULT = dt.Rows[i]["MANRESULT"].ToString(); m.MANTIME = ClsSwitch.SwitTM(dt.Rows[i]["MANTIME"].ToString()); m.MANUSERID = dt.Rows[i]["MANUSERID"].ToString(); m.JD = dt.Rows[i]["JD"].ToString(); m.WD = dt.Rows[i]["WD"].ToString(); m.PEARLARMPRE = dt.Rows[i]["PEARLARMPRE"].ToString(); m.PEARLARMISSUED = dt.Rows[i]["PEARLARMISSUED"].ToString(); if (!string.IsNullOrEmpty(m.MANUSERID)) { DataTable dtUser = BaseDT.T_SYSSEC_USER.getDT(new T_SYSSEC_IPSUSER_SW { USERID = m.MANUSERID }); DataRow[] drUser = dtUser.Select("USERID='" + m.MANUSERID + "'"); if (drUser.Length > 0) { m.ManUserName = drUser[0]["USERNAME"].ToString(); } dtUser.Clear(); dtUser.Dispose(); } m.ORGNAME = BaseDT.T_SYS_ORG.getName(dtORG, m.BYORGNO); } dtORG.Clear(); dtORG.Dispose(); dt.Clear(); dt.Dispose(); return(m); }
/// <summary> /// 根据ID获取采集数据 /// </summary> /// <example> /// sw.MANSTATE 处理状态 0未处理1已处理 /// sw.DateBegin 开始日期 /// sw.DateEnd 结束日期 /// </example> /// <param name="sw">参见条件模型T_IPSCOL_COLLECT_SW</param> /// <returns>参见模型T_IPSCOL_COLLECT_Model</returns> public static T_IPSCOL_COLLECT_Model getModel(T_IPSCOL_COLLECT_SW sw) { DataTable dt = BaseDT.T_IPSCOL_COLLECT.getDT(sw); T_IPSCOL_COLLECT_Model m = new T_IPSCOL_COLLECT_Model(); if (dt.Rows.Count > 0) { int i = 0; m.COLLECTID = dt.Rows[i]["COLLECTID"].ToString(); m.HID = dt.Rows[i]["HID"].ToString(); m.SYSTYPEVALUE = dt.Rows[i]["SYSTYPEVALUE"].ToString(); m.ADDRESS = dt.Rows[i]["ADDRESS"].ToString(); m.COLLECTTIME = ClsSwitch.SwitTM(dt.Rows[i]["COLLECTTIME"].ToString()); m.COLLECTNAME = dt.Rows[i]["COLLECTNAME"].ToString(); m.MANSTATE = dt.Rows[i]["MANSTATE"].ToString(); m.MANRESULT = dt.Rows[i]["MANRESULT"].ToString(); m.MANTIME = ClsSwitch.SwitTM(dt.Rows[i]["MANTIME"].ToString()); m.MANUSERID = dt.Rows[i]["MANUSERID"].ToString(); DataTable dtHRUser = BaseDT.T_IPSFR_USER.getDT(new T_IPSFR_USER_SW { HID = m.HID }); if (dtHRUser.Rows.Count > 0) { m.HName = dtHRUser.Rows[0]["HNAME"].ToString(); m.Phone = dtHRUser.Rows[0]["PHONE"].ToString(); } dtHRUser.Clear(); dtHRUser.Dispose(); if (!string.IsNullOrEmpty(m.MANUSERID)) { DataTable dtUser = BaseDT.T_SYSSEC_USER.getDT(new T_SYSSEC_IPSUSER_SW { USERID = m.MANUSERID }); DataRow[] drUser = dtUser.Select("USERID='" + m.MANUSERID + "'"); if (drUser.Length > 0) { m.ManUserName = drUser[0]["USERNAME"].ToString(); } dtUser.Clear(); dtUser.Dispose(); } } dt.Clear(); dt.Dispose(); return(m); }
/// <summary> /// 获取监测火情信息 /// </summary> /// <param name="sw"></param> /// <returns></returns> public static IEnumerable <JC_FIRE_Model> GetListModel(JC_FIRE_SW sw) { DataTable dt = BaseDT.JC_FIRE.GetDT(sw);//列表 var result = new List <JC_FIRE_Model>(); DataTable dtORG = BaseDT.T_SYS_ORG.getDT(new T_SYS_ORGSW { SYSFLAG = ConfigCls.getSystemFlag() }); //获取单位 for (int i = 0; i < dt.Rows.Count; i++) { JC_FIRE_Model m = new JC_FIRE_Model(); m.JCFID = dt.Rows[i]["JCFID"].ToString(); m.BYORGNO = dt.Rows[i]["BYORGNO"].ToString(); m.FIRENAME = dt.Rows[i]["FIRENAME"].ToString(); m.FIREFROM = dt.Rows[i]["FIREFROM"].ToString(); //火情来源 m.FIREFROMID = dt.Rows[i]["FIREFROMID"].ToString(); //原始记录序号 m.FIRETIME = ClsSwitch.SwitTM(dt.Rows[i]["FIRETIME"].ToString()); //起火时间 m.FIREENDTIME = ClsSwitch.SwitTM(dt.Rows[i]["FIREENDTIME"].ToString()); //起火结束时间 m.ISOUTFIRE = dt.Rows[i]["ISOUTFIRE"].ToString(); //是否已灭 m.MARK = dt.Rows[i]["MARK"].ToString(); m.JD = dt.Rows[i]["JD"].ToString(); m.WD = dt.Rows[i]["WD"].ToString(); m.ZQWZ = dt.Rows[i]["ZQWZ"].ToString(); m.WXBH = dt.Rows[i]["WXBH"].ToString(); m.DQRDBH = dt.Rows[i]["DQRDBH"].ToString(); m.RSMJ = dt.Rows[i]["RSMJ"].ToString(); m.DL = dt.Rows[i]["DL"].ToString(); m.YY = dt.Rows[i]["YY"].ToString(); m.JXHQSJ = dt.Rows[i]["JXHQSJ"].ToString(); m.OWERJCFID = dt.Rows[i]["OWERJCFID"].ToString(); //所属主火情id m.PFUSERID = dt.Rows[i]["PFUSERID"].ToString(); //派发人 m.PFORGNO = dt.Rows[i]["PFORGNO"].ToString(); // 派发单位 m.PFTIME = dt.Rows[i]["PFTIME"].ToString(); // 派发时间 m.RECEIVETIME = ClsSwitch.SwitTM(dt.Rows[i]["RECEIVETIME"].ToString()); m.PFFLAG = dt.Rows[i]["PFFLAG"].ToString(); // 派发标志 1 为市局单位处理 2 为县 3 为乡镇 0 非本单位处理 m.ISSUEDTIME = ClsSwitch.SwitTM(dt.Rows[i]["ISSUEDTIME"].ToString()); m.MANSTATE = dt.Rows[i]["MANSTATE"].ToString(); m.ISSUEDTIME = ClsSwitch.SwitTM(dt.Rows[i]["LASTPROCESSTIME"].ToString()); m.FIREFROMWEATHER = dt.Rows[i]["FIREFROMWEATHER"] == null ? "" : dt.Rows[i]["FIREFROMWEATHER"].ToString();// 来源 m.ORGNAME = BaseDT.T_SYS_ORG.getName(dtORG, m.BYORGNO); result.Add(m); } dt.Clear(); dt.Dispose(); return(result); }
public string GetFireLevelHtml(YJ_DANGERCLASS_SW sw) { StringBuilder sb = new StringBuilder(); sb.Append("<table cellpadding=\"0\" cellspacing=\"0\" >"); sb.Append(" <thead>"); sb.Append("<tr><th>区域</th><th>等级</th><th>时间</th></tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); var list = new List <YJ_DANGERCLASS_Model>(); if (string.IsNullOrEmpty(sw.DCDATE)) { list = YJ_DANGERCLASSCls.getListModelTop(new YJ_DANGERCLASS_SW() { }).ToList(); if (!string.IsNullOrEmpty(sw.DANGERCLASS) && sw.DANGERCLASS != "0") { list = list.Where(p => p.DANGERCLASS == sw.DANGERCLASS).ToList(); } } else { list = YJ_DANGERCLASSCls.getListModel(sw).ToList(); } if (list.Any()) { foreach (var item in list) { sb.Append("<tr>"); sb.AppendFormat("<td class=\"center\">{0}</td>", item.TOPTOWNNAME + "==>" + item.TOWNNAME); sb.AppendFormat("<td class=\"center\">{0}</td>", item.DANGERCLASS); sb.AppendFormat("<td class=\"center\">{0}</td>", ClsSwitch.SwitDate(item.DCDATE)); sb.Append("</tr>"); } } else { sb.Append("<tr>"); sb.Append("<td colspan=\"3\"><em>暂未查询到记录!</em></td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); return(sb.ToString()); }
/// <summary> /// 获取值班人的userID /// </summary> /// <param name="ondutyTime">日期</param> /// <param name="byorgon">组织机构编码(多个以,号分开)</param> /// <returns></returns> public static DataTable GetOndutyUserid(string ondutyTime, string byorgon) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("select ou.DUTYUSERID from DUTY_USER as ou where 1=1"); if (!string.IsNullOrEmpty(ondutyTime)) { sb.AppendFormat(" and ou.DUTYDATE='{0}'", ClsSwitch.SwitDate(ondutyTime)); } if (!string.IsNullOrEmpty(byorgon)) { sb.AppendFormat(" and ou.BYORGNO in({0})", ClsSql.EncodeSql(byorgon)); } DataSet ds = DataBaseClass.FullDataSet(sb.ToString()); return(ds.Tables[0]); }
/// <summary> /// 获取列表分页 /// </summary> /// <param name="sw"></param> /// <param name="total"></param> /// <returns></returns> public static IEnumerable <DC_DETAILS_Model> getModelPager(DC_DETAILS_SW sw, out int total) { var result = new List <DC_DETAILS_Model>(); DataTable dtUser = BaseDT.T_SYSSEC_USER.getDT(new T_SYSSEC_IPSUSER_SW { }); DataTable dt = BaseDT.DC_DETAILS.getDT(sw, out total);//列表 for (int i = 0; i < dt.Rows.Count; i++) { DC_DETAILS_Model m = new DC_DETAILS_Model(); m.DCDETAILSID = dt.Rows[i]["DCDETAILSID"].ToString(); m.SUPID = dt.Rows[i]["SUPID"].ToString(); m.SUPNAME = DC_SUPPLIESPROPCls.getsupname(m.SUPID); m.DCSUPPROPMODEL = BaseDT.DC_SUPPLIESPROP.getmodel(new DC_SUPPLIESPROP_SW { DC_SUPPLIESPROP_ID = m.SUPID }); m.DCSUPPROPUNIT = BaseDT.DC_SUPPLIESPROP.getunit(new DC_SUPPLIESPROP_SW { DC_SUPPLIESPROP_ID = m.SUPID }); m.REPID = dt.Rows[i]["REPID"].ToString(); m.DPNAME = DC_REPOSITORYCls.getdepotname(m.REPID); m.DCREPTIME = ClsSwitch.SwitDate(dt.Rows[i]["DCREPTIME"].ToString());; m.DCREPFLAG = dt.Rows[i]["DCREPFLAG"].ToString(); m.DCREPSUPCOUNT = dt.Rows[i]["DCREPSUPCOUNT"].ToString(); m.DCENTYMANID = dt.Rows[i]["DCENTYMANID"].ToString(); m.DCUSERID = dt.Rows[i]["DCUSERID"].ToString(); m.DCCUSTODIANID = dt.Rows[i]["DCCUSTODIANID"].ToString(); m.DCUSERORG = dt.Rows[i]["DCUSERORG"].ToString(); m.PRICE = dt.Rows[i]["PRICE"].ToString(); m.MARK = dt.Rows[i]["MARK"].ToString(); m.REPERTORYCOUNT = dt.Rows[i]["REPERTORYCOUNT"].ToString(); m.DCFAFANGREN = dt.Rows[i]["DCFAFANGREN"].ToString(); m.DCZHIBIAOREN = dt.Rows[i]["DCZHIBIAOREN"].ToString(); //m.DCENTYMANNAME = BaseDT.T_SYSSEC_USER.getNameByUserList(dtUser, m.DCENTYMANID); //m.DCUSERNAME = BaseDT.T_SYSSEC_USER.getNameByUserList(dtUser, m.DCUSERID); //m.DCCUSTODIANNAME = BaseDT.T_SYSSEC_USER.getNameByUserList(dtUser, m.DCCUSTODIANID); m.NUMBER = dt.Rows[i]["NUMBER"].ToString(); m.SUM = (float.Parse(m.DCREPSUPCOUNT) * float.Parse(m.PRICE)).ToString("F2"); result.Add(m); } dt.Clear(); dt.Dispose(); dtUser.Clear(); dtUser.Dispose(); return(result); }
/// <summary> /// 根据查询条件获取某一条信息记录 /// </summary> /// <param name="sw">参见模型</param> /// <returns>参见模型</returns> public static YJ_SATELLITECLOUD_Model getModel(YJ_SATELLITECLOUD_SW sw) { DataTable dt = BaseDT.YJ_SATELLITECLOUD.getDT(sw); YJ_SATELLITECLOUD_Model m = new YJ_SATELLITECLOUD_Model(); if (dt.Rows.Count > 0) { int i = 0; m.CLOUDID = dt.Rows[i]["CLOUDID"].ToString(); m.CLOUDTIME = ClsSwitch.SwitTM(dt.Rows[i]["CLOUDTIME"].ToString()); m.CLOUDNAME = dt.Rows[i]["CLOUDNAME"].ToString(); m.CLOUDFILENAME = dt.Rows[i]["CLOUDFILENAME"].ToString(); } dt.Clear(); dt.Dispose(); return(m); }
/// <summary> /// 获取列表 /// </summary> /// <param name="sw">参见模型</param> /// <returns>参见模型</returns> public static IEnumerable <YJ_SATELLITECLOUD_Model> getListModel(YJ_SATELLITECLOUD_SW sw) { DataTable dt = BaseDT.YJ_SATELLITECLOUD.getDT(sw);//列表 var result = new List <YJ_SATELLITECLOUD_Model>(); for (int i = 0; i < dt.Rows.Count; i++) { YJ_SATELLITECLOUD_Model m = new YJ_SATELLITECLOUD_Model(); m.CLOUDID = dt.Rows[i]["CLOUDID"].ToString(); m.CLOUDTIME = ClsSwitch.SwitTM(dt.Rows[i]["CLOUDTIME"].ToString()); m.CLOUDNAME = dt.Rows[i]["CLOUDNAME"].ToString(); m.CLOUDFILENAME = dt.Rows[i]["CLOUDFILENAME"].ToString(); result.Add(m); } dt.Clear(); dt.Dispose(); return(result); }
/// <summary> /// 获取数据集合 /// </summary> /// <param name="o"></param> /// <returns></returns> public static IEnumerable <OD_ODTYPE_Model> GetModelList(OD_ODTYPE_Model o) { var result = new List <OD_ODTYPE_Model>(); var dt = BaseDT.OD_TYPE.GetModelList(o); for (int i = 0; i < dt.Rows.Count; i++) { OD_ODTYPE_Model om = new OD_ODTYPE_Model(); om.OD_TYPEID = dt.Rows[i]["OD_TYPEID"].ToString(); om.OD_TYPENAME = dt.Rows[i]["OD_TYPENAME"].ToString(); om.OD_DATEBEGIN = ClsSwitch.SwitDate(dt.Rows[i]["OD_DATEBEGIN"].ToString()); om.OD_DATEEND = ClsSwitch.SwitDate(dt.Rows[i]["OD_DATEEND"].ToString()); result.Add(om); } dt.Clear(); dt.Dispose(); return(result); }
/// <summary> /// 火险等级 List转为Datable /// </summary> /// <param name="tasks"></param> /// <returns></returns> private DataTable ConvertToDataTableLevelList(List <YJ_DANGERCLASS_Model> tasks) { DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("ContyName")); dt.Columns.Add(new DataColumn("Level")); dt.Columns.Add(new DataColumn("LevelDate")); foreach (var task in tasks) { var dr = dt.NewRow(); dr["ContyName"] = task.TOWNNAME; dr["Level"] = task.DANGERCLASS; dr["LevelDate"] = ClsSwitch.SwitDate(task.DCDATE); dt.Rows.Add(dr); } tasks.Clear(); return(dt); }