Пример #1
0
    /// <summary>
    /// 获取评价标准列表数据
    /// </summary>
    /// <returns></returns>
    private string GetEvaluData()
    {
        string result        = "";
        int    intTotalCount = 0;
        //页数
        int pageIndex = Int32.Parse(Request.Params["page"].ToString());
        //分页数
        int       pageSize = Int32.Parse(Request.Params["pagesize"].ToString());
        DataTable dtEval   = new DataTable();
        //评价标准对象
        TBaseEvaluationInfoVo objEval = new TBaseEvaluationInfoVo();

        //获取评价标准数据,无限定条件
        //dtEval = new TBaseEvaluationInfoLogic().SelectByTable(objEval);
        //创建标准JSON数据
        objEval.SORT_FIELD = Request.Params["sortname"];
        objEval.SORT_TYPE  = Request.Params["sortorder"];
        objEval.IS_DEL     = "0";
        //查询使用
        objEval.STANDARD_CODE = !String.IsNullOrEmpty(Request.Params["srhStandard_Code"]) ? Request.Params["srhStandard_Code"].ToString() : "";
        objEval.STANDARD_NAME = !String.IsNullOrEmpty(Request.Params["srhStandard_Name"]) ? Request.Params["srhStandard_Name"].ToString() : "";
        objEval.STANDARD_TYPE = !String.IsNullOrEmpty(Request.Params["srhStandard_Type"]) ? Request.Params["srhStandard_Type"].ToString() : "";
        objEval.MONITOR_ID    = !String.IsNullOrEmpty(Request.Params["srhMonitor_Id"]) ? Request.Params["srhMonitor_Id"].ToString() : "";
        intTotalCount         = new TBaseEvaluationInfoLogic().GetSelecDefinedtResultCount(objEval);
        dtEval = new TBaseEvaluationInfoLogic().SelectDefinedTadble(objEval, pageIndex, pageSize);

        result = LigerGridDataToJson(dtEval, intTotalCount);
        return(result);
    }
Пример #2
0
    /// <summary>
    /// 获取评价标准列表数据
    /// </summary>
    /// <returns></returns>
    private string GetEvaluData()
    {
        string    result        = "";
        int       intTotalCount = 0;
        DataTable dtEval        = new DataTable();
        //评价标准对象
        TBaseEvaluationInfoVo objEval = new TBaseEvaluationInfoVo();

        //获取评价标准数据,无限定条件
        //dtEval = new TBaseEvaluationInfoLogic().SelectByTable(objEval);
        //创建标准JSON数据
        objEval.SORT_FIELD = strSortname;
        objEval.SORT_TYPE  = strSortorder;
        objEval.IS_DEL     = "0";
        //自定义查询使用
        if (!String.IsNullOrEmpty(srhStandard_Code) || !String.IsNullOrEmpty(srhStandard_Name) || !String.IsNullOrEmpty(srhStandard_Type) || !String.IsNullOrEmpty(srhMonitor_Id))
        {
            objEval.STANDARD_CODE = srhStandard_Code;
            objEval.STANDARD_NAME = srhStandard_Name;
            objEval.STANDARD_TYPE = srhStandard_Type;
            objEval.MONITOR_ID    = srhMonitor_Id;
            intTotalCount         = new TBaseEvaluationInfoLogic().GetSelecDefinedtResultCount(objEval);
            dtEval = new TBaseEvaluationInfoLogic().SelectDefinedTadble(objEval, intPageIndex, intPageSize);
        }
        //无条件首次加载用
        else
        {
            dtEval        = new TBaseEvaluationInfoLogic().SelectByTable(objEval, intPageIndex, intPageSize);
            intTotalCount = new TBaseEvaluationInfoLogic().GetSelectResultCount(objEval);
        }
        result = LigerGridDataToJson(dtEval, intTotalCount);
        return(result);
    }
Пример #3
0
    public static string DelEvaluData(string strID)
    {
        string result = "false";

        string[] EvaluId      = strID.Split(',');
        bool     success      = false;
        int      successCount = 0;
        int      DelCount     = EvaluId.Length;

        foreach (string strid in EvaluId)
        {
            TBaseEvaluationInfoVo objeil = new TBaseEvaluationInfoVo();
            objeil.ID     = strid;
            objeil.IS_DEL = "1";
            success       = new TBaseEvaluationInfoLogic().Edit(objeil);
            if (success == true)
            {
                successCount++;
            }
        }

        if (success == true && (successCount == DelCount))
        {
            result = "true";

            string strMessage = new PageBase().LogInfo.UserInfo.USER_NAME + "删除评价标准成功";
            new PageBase().WriteLog(i3.ValueObject.ObjectBase.LogType.AddEvaluationInfo, "", strMessage);
        }
        return(result);
    }
Пример #4
0
    /// <summary>
    /// 获取评价标准
    /// </summary>
    /// <returns></returns>
    public string GetStandardConInfor()
    {
        string                reslut = "";
        DataTable             dtSt   = new DataTable();
        TBaseEvaluationInfoVo objtd  = new TBaseEvaluationInfoVo();

        dtSt   = new TBaseEvaluationInfoLogic().SelectByTable(objtd);
        reslut = DataTableToJson(dtSt);
        return(reslut);
    }
    /// <summary>
    /// 获得评价标准信息
    /// </summary>
    /// <param name="strStandardID">评价标准ID</param>
    /// <returns></returns>
    protected string getStandardInfo(string strStandardID)
    {
        //读取评价标准详细
        TBaseEvaluationInfoVo objEval = new TBaseEvaluationInfoLogic().Details(strStandardID);

        //定义标准类别名称
        objEval.REMARK1 = new TSysDictLogic().GetDictNameByDictCodeAndType(objEval.STANDARD_TYPE, "STANDARD_TYPE");
        //定义监测类别名称
        objEval.REMARK2 = new TBaseMonitorTypeInfoLogic().Details(objEval.MONITOR_ID).MONITOR_TYPE_NAME;
        return(ToJson(objEval).Replace("\\r\\n", ""));
    }
    /// <summary>
    /// 绑定职位树,获取json数据
    /// </summary>
    private void BindTree(string strStType, string strMonitor)
    {
        TBaseEvaluationInfoVo objStVo = new TBaseEvaluationInfoVo();

        objStVo.IS_DEL        = "0";
        objStVo.STANDARD_TYPE = strStType;
        objStVo.MONITOR_ID    = strMonitor;
        DataTable dt = new TBaseEvaluationInfoLogic().SelectByTable(objStVo);

        if (dt.Rows.Count < 1)
        {
            return;
        }

        BindTreeRoot(dt, "0", 1);// 绑定根节点,获取json数据
    }
Пример #7
0
    //获取数据
    private void GetData(string strID)
    {
        TBaseCompanyPointVo objPoint = new TBaseCompanyPointLogic().Details(strID);

        TBaseEvaluationConInfoLogic logicCon = new TBaseEvaluationConInfoLogic();
        TBaseEvaluationInfoLogic    logicSt  = new TBaseEvaluationInfoLogic();

        //按行、地、国标优先顺序进行标准的选定
        //国标条件项
        if (objPoint.NATIONAL_ST_CONDITION_ID.Length > 0)
        {
            TBaseEvaluationConInfoVo objCon = logicCon.Details(objPoint.NATIONAL_ST_CONDITION_ID);
            TBaseEvaluationInfoVo    objSt  = logicSt.Details(objCon.STANDARD_ID);

            objPoint.NATIONAL_ST_CONDITION_ID = objSt.STANDARD_CODE + "" + objSt.STANDARD_NAME;
            objPoint.hidNATIONAL_ST_CON       = objCon.ID;
        }
        //地标条件项
        if (objPoint.LOCAL_ST_CONDITION_ID.Length > 0)
        {
            TBaseEvaluationConInfoVo objCon = logicCon.Details(objPoint.LOCAL_ST_CONDITION_ID);
            TBaseEvaluationInfoVo    objSt  = logicSt.Details(objCon.STANDARD_ID);

            objPoint.LOCAL_ST_CONDITION_ID = objSt.STANDARD_CODE + "" + objSt.STANDARD_NAME;
            objPoint.hidLOCAL_ST_CON       = objCon.ID;
        }
        //行标条件项
        if (objPoint.INDUSTRY_ST_CONDITION_ID.Length > 0)
        {
            TBaseEvaluationConInfoVo objCon = logicCon.Details(objPoint.INDUSTRY_ST_CONDITION_ID);
            TBaseEvaluationInfoVo    objSt  = logicSt.Details(objCon.STANDARD_ID);

            objPoint.INDUSTRY_ST_CONDITION_ID = objSt.STANDARD_CODE + "" + objSt.STANDARD_NAME;
            objPoint.hidINDUSTRY_ST_CON       = objCon.ID;
        }

        string strJson = ToJson(objPoint);

        Response.Write(strJson);
        Response.End();
    }
Пример #8
0
    public static string EditEvaluData(string strID, string strSTANDARD_CODE, string strSTANDARD_NAME, string strSTANDARD_TYPE, string strMONITOR_ID)
    {
        string result  = "";
        bool   success = false;
        TBaseEvaluationInfoVo objtev = new TBaseEvaluationInfoVo();

        objtev.ID            = strID;
        objtev.STANDARD_CODE = strSTANDARD_CODE;
        objtev.STANDARD_NAME = strSTANDARD_NAME;
        objtev.STANDARD_TYPE = strSTANDARD_TYPE;
        objtev.MONITOR_ID    = strMONITOR_ID;
        success = new TBaseEvaluationInfoLogic().Edit(objtev);

        if (success)
        {
            result = "true";
            string strMessage = new PageBase().LogInfo.UserInfo.USER_NAME + "编辑评价标准" + objtev.ID + "成功";
            new PageBase().WriteLog(i3.ValueObject.ObjectBase.LogType.EditEvaluationInfo, "", strMessage);
        }
        return(result);
    }
    //获取数据
    private void GetData(string strID)
    {
        TBaseCompanyPointVo objPoint = new TBaseCompanyPointLogic().Details(strID);

        TBaseEvaluationConInfoLogic logicCon = new TBaseEvaluationConInfoLogic();
        TBaseEvaluationInfoLogic    logicSt  = new TBaseEvaluationInfoLogic();

        if (objPoint.NATIONAL_ST_CONDITION_ID.Length > 0)
        {
            TBaseEvaluationConInfoVo objCon = logicCon.Details(objPoint.NATIONAL_ST_CONDITION_ID);
            TBaseEvaluationInfoVo    objSt  = logicSt.Details(objCon.STANDARD_ID);

            objPoint.NATIONAL_ST_CONDITION_ID = objSt.STANDARD_CODE + "" + objSt.STANDARD_NAME;
            objPoint.hidNATIONAL_ST_CON       = objCon.ID;
        }

        if (objPoint.LOCAL_ST_CONDITION_ID.Length > 0)
        {
            TBaseEvaluationConInfoVo objCon = logicCon.Details(objPoint.LOCAL_ST_CONDITION_ID);
            TBaseEvaluationInfoVo    objSt  = logicSt.Details(objCon.STANDARD_ID);

            objPoint.LOCAL_ST_CONDITION_ID = objSt.STANDARD_CODE + "" + objSt.STANDARD_NAME;
            objPoint.hidLOCAL_ST_CON       = objCon.ID;
        }

        if (objPoint.INDUSTRY_ST_CONDITION_ID.Length > 0)
        {
            TBaseEvaluationConInfoVo objCon = logicCon.Details(objPoint.INDUSTRY_ST_CONDITION_ID);
            TBaseEvaluationInfoVo    objSt  = logicSt.Details(objCon.STANDARD_ID);

            objPoint.INDUSTRY_ST_CONDITION_ID = objSt.STANDARD_CODE + "" + objSt.STANDARD_NAME;
            objPoint.hidINDUSTRY_ST_CON       = objCon.ID;
        }
        objPoint.CREATE_DATE = objPoint.CREATE_DATE.Replace(" 0:00:00", "");

        string strJson = ToJson(objPoint);

        Response.Write(strJson);
        Response.End();
    }
Пример #10
0
    //获取数据
    private void GetData(string strID)
    {
        TMisMonitorTaskPointVo objPoint = new TMisMonitorTaskPointLogic().Details(strID);

        TBaseEvaluationConInfoLogic logicCon = new TBaseEvaluationConInfoLogic();
        TBaseEvaluationInfoLogic    logicSt  = new TBaseEvaluationInfoLogic();

        if (objPoint.NATIONAL_ST_CONDITION_ID.Length > 0)
        {
            TBaseEvaluationConInfoVo objCon = logicCon.Details(objPoint.NATIONAL_ST_CONDITION_ID);
            TBaseEvaluationInfoVo    objSt  = logicSt.Details(objCon.STANDARD_ID);

            objPoint.NATIONAL_ST_CONDITION_ID = objSt.STANDARD_CODE + "" + objSt.STANDARD_NAME;
            objPoint.hidNATIONAL_ST_CON       = objCon.ID;
        }

        if (objPoint.LOCAL_ST_CONDITION_ID.Length > 0)
        {
            TBaseEvaluationConInfoVo objCon = logicCon.Details(objPoint.LOCAL_ST_CONDITION_ID);
            TBaseEvaluationInfoVo    objSt  = logicSt.Details(objCon.STANDARD_ID);

            objPoint.LOCAL_ST_CONDITION_ID = objSt.STANDARD_CODE + "" + objSt.STANDARD_NAME;
            objPoint.hidLOCAL_ST_CON       = objCon.ID;
        }

        if (objPoint.INDUSTRY_ST_CONDITION_ID.Length > 0)
        {
            TBaseEvaluationConInfoVo objCon = logicCon.Details(objPoint.INDUSTRY_ST_CONDITION_ID);
            TBaseEvaluationInfoVo    objSt  = logicSt.Details(objCon.STANDARD_ID);

            objPoint.INDUSTRY_ST_CONDITION_ID = objSt.STANDARD_CODE + "" + objSt.STANDARD_NAME;
            objPoint.hidINDUSTRY_ST_CON       = objCon.ID;
        }

        string strJson = ToJson(objPoint);

        Response.Write(strJson);
        Response.End();
    }
Пример #11
0
    public static string AddEvaluData(string strSTANDARD_CODE, string strSTANDARD_NAME, string strSTANDARD_TYPE, string strMONITOR_ID)
    {
        string result  = "";
        bool   success = false;
        TBaseEvaluationInfoVo objtev = new TBaseEvaluationInfoVo();

        objtev.ID             = GetSerialNumber("t_base_evaluation_type_info_id");
        objtev.STANDARD_CODE  = strSTANDARD_CODE;
        objtev.STANDARD_NAME  = strSTANDARD_NAME;
        objtev.STANDARD_TYPE  = strSTANDARD_TYPE;
        objtev.MONITOR_ID     = strMONITOR_ID;
        objtev.EFFECTIVE_DATE = DateTime.Now.ToString();
        objtev.IS_DEL         = "0";
        success = new TBaseEvaluationInfoLogic().Create(objtev);

        if (success)
        {
            result = "true";
            string strMessage = new PageBase().LogInfo.UserInfo.USER_NAME + "新增评价标准" + objtev.ID + "成功";
            new PageBase().WriteLog(i3.ValueObject.ObjectBase.LogType.DelEvaluationInfo, "", strMessage);
        }
        return(result);
    }
    /// <summary>
    /// 获取标准、依据名称
    /// </summary>
    /// <param name="strEvaluationID">条件项ID</param>
    /// <returns></returns>
    protected string getStandardName(string strEvaluationID)
    {
        string strStId    = ""; //标准ID
        string strConText = ""; //所有节点名称
        //获得条件项信息
        TBaseEvaluationConInfoVo objEvaluationCon = new TBaseEvaluationConInfoVo();

        objEvaluationCon.IS_DEL = "0";
        objEvaluationCon.ID     = strEvaluationID;
        objEvaluationCon        = new TBaseEvaluationConInfoLogic().Details(objEvaluationCon);
        //遍历条件项,构造所有条件项名称
        while (objEvaluationCon.PARENT_ID.Length > 0 && objEvaluationCon.PARENT_ID != "0")
        {
            strConText       = objEvaluationCon.CONDITION_NAME + strConText;
            objEvaluationCon = new TBaseEvaluationConInfoLogic().Details(objEvaluationCon.PARENT_ID);
            strStId          = objEvaluationCon.STANDARD_ID;
        }
        //获得评价标准名称和编码
        TBaseEvaluationInfoVo objStandard = new TBaseEvaluationInfoLogic().Details(strStId);

        strConText = "根据《" + objStandard.STANDARD_NAME + "》(" + objStandard.STANDARD_CODE + ")中" + strConText + ",";

        return(strConText);
    }
Пример #13
0
    /// <summary>
    /// 获取采用的标准项的上下限
    /// </summary>
    /// <param name="strItemID">项目ID</param>
    /// <param name="strConditionID">条件项ID</param>
    /// <param name="strUp">上限</param>
    /// <param name="strLow">下限</param>
    protected void getStandardValue(string strItemID, string strConditionID, ref string strUp, ref string strLow, ref string strConditionType)
    {
        TBaseEvaluationConItemVo objConItemVo = new TBaseEvaluationConItemVo();

        objConItemVo.ITEM_ID      = strItemID;
        objConItemVo.CONDITION_ID = strConditionID;
        objConItemVo.IS_DEL       = "0";
        objConItemVo = new TBaseEvaluationConItemLogic().Details(objConItemVo);
        //上限处理
        if (objConItemVo.DISCHARGE_UPPER.Length > 0)
        {
            //上限单位
            string strUnit = new TSysDictLogic().GetDictNameByDictCodeAndType(objConItemVo.UPPER_OPERATOR, "logic_operator");
            if (strUnit.Length > 0)
            {
                if (strUnit.IndexOf("≤") >= 0)
                {
                    strUnit = "<=";
                }
                else if (strUnit.IndexOf("≥") >= 0)
                {
                    strUnit = ">=";
                }
            }
            if (objConItemVo.DISCHARGE_UPPER.Contains(","))
            {
                string[] strValue = objConItemVo.DISCHARGE_UPPER.Split(',');
                foreach (string str in strValue)
                {
                    if (str.Length > 0)
                    {
                        strUp += (strUnit + str) + ",";
                    }
                }
                if (strUp.Length > 0)
                {
                    strUp = strUp.Remove(strUp.LastIndexOf(","));
                }
            }
            else
            {
                strUp = strUnit + objConItemVo.DISCHARGE_UPPER;
            }
        }
        //下限处理
        if (objConItemVo.DISCHARGE_LOWER.Length > 0)
        {
            //下限单位
            string strUnit = new TSysDictLogic().GetDictNameByDictCodeAndType(objConItemVo.LOWER_OPERATOR, "logic_operator");
            if (strUnit.Length > 0)
            {
                if (strUnit.IndexOf("≤") >= 0)
                {
                    strUnit = "<=";
                }
                else if (strUnit.IndexOf("≥") >= 0)
                {
                    strUnit = ">=";
                }
            }
            if (objConItemVo.DISCHARGE_LOWER.Contains(","))
            {
                string[] strValue = objConItemVo.DISCHARGE_LOWER.Split(',');
                foreach (string str in strValue)
                {
                    if (str.Length > 0)
                    {
                        strLow += (strUnit + str) + ",";
                    }
                }
                if (strLow.Length > 0)
                {
                    strLow = strLow.Remove(strLow.LastIndexOf(","));
                }
            }
            else
            {
                strLow = strUnit + objConItemVo.DISCHARGE_LOWER;
            }
        }
        strConditionType = new TBaseEvaluationInfoLogic().Details(new TBaseEvaluationConInfoLogic().Details(strConditionID).STANDARD_ID).STANDARD_TYPE;
    }
Пример #14
0
    public string getTreeInfo(string strMonitorId)
    {
        //组建DataTable
        DataTable objTable = new DataTable();

        //ID
        objTable.Columns.Add("ID", System.Type.GetType("System.String"));
        //评价标准ID
        objTable.Columns.Add("STANDARD_ID", System.Type.GetType("System.String"));
        //评价标准代码
        objTable.Columns.Add("STANDARD_CODE", System.Type.GetType("System.String"));
        //条件项代码
        objTable.Columns.Add("CONDITION_CODE", System.Type.GetType("System.String"));
        //名称
        objTable.Columns.Add("NAME", System.Type.GetType("System.String"));
        //父节点ID
        objTable.Columns.Add("PARENT_ID", System.Type.GetType("System.String"));
        //类型,0为评价标准,1为条件项
        objTable.Columns.Add("TYPE", System.Type.GetType("System.String"));

        //获取评价标准信息
        TBaseEvaluationInfoVo TBaseEvaluationInfoVo = new TBaseEvaluationInfoVo();

        TBaseEvaluationInfoVo.MONITOR_ID = strMonitorId;
        TBaseEvaluationInfoVo.IS_DEL     = "0";
        DataTable dtEvaluationInfo = new TBaseEvaluationInfoLogic().SelectByTable(TBaseEvaluationInfoVo);

        //获取评价标准条件项信息
        TBaseEvaluationConInfoVo TBaseEvaluationConInfoVo = new TBaseEvaluationConInfoVo();

        TBaseEvaluationConInfoVo.IS_DEL = "0";
        DataTable dtEvaluationConInfo = new TBaseEvaluationConInfoLogic().SelectByTable(TBaseEvaluationConInfoVo);

        //遍历评价标准信息
        foreach (DataRow row in dtEvaluationInfo.Rows)
        {
            DataRow objTableNewRow = objTable.NewRow();
            string  strStandardId  = row["ID"].ToString();
            objTableNewRow["ID"]            = strStandardId;
            objTableNewRow["STANDARD_ID"]   = strStandardId;
            objTableNewRow["STANDARD_CODE"] = row["STANDARD_CODE"].ToString();
            objTableNewRow["NAME"]          = row["STANDARD_NAME"].ToString();
            objTableNewRow["PARENT_ID"]     = "0";
            objTableNewRow["TYPE"]          = "0";
            objTable.Rows.Add(objTableNewRow);

            /*//遍历条件项
             * foreach (DataRow rowCon in dtEvaluationConInfo.Rows)
             * {
             *  if (rowCon["STANDARD_ID"].ToString() == strStandardId && isExist(dtEvaluationConInfo, rowCon["PARENT_ID"].ToString()))
             *  {
             *      DataRow objTableConNewRow = objTable.NewRow();
             *      objTableConNewRow["ID"] = rowCon["ID"].ToString();
             *      objTableConNewRow["STANDARD_ID"] = rowCon["STANDARD_ID"].ToString();
             *      objTableConNewRow["STANDARD_CODE"] = row["STANDARD_CODE"].ToString();
             *      objTableConNewRow["CONDITION_CODE"] = rowCon["CONDITION_CODE"].ToString();
             *      objTableConNewRow["NAME"] = rowCon["CONDITION_NAME"].ToString();
             *      if (rowCon["PARENT_ID"].ToString() == "0")
             *          objTableConNewRow["PARENT_ID"] = strStandardId;
             *      else
             *          objTableConNewRow["PARENT_ID"] = rowCon["PARENT_ID"].ToString();
             *      objTableConNewRow["TYPE"] = "1";
             *      objTable.Rows.Add(objTableConNewRow);
             *  }
             * }*/
        }
        //将DataTable序列化之后返回
        return(DataTableToJson(objTable));
    }