Пример #1
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tMisReturnInfo_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tMisReturnInfo_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TMisReturnInfoVo tMisReturnInfo_UpdateSet, TMisReturnInfoVo tMisReturnInfo_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tMisReturnInfo_UpdateSet, TMisReturnInfoVo.T_MIS_RETURN_INFO_TABLE);

            strSQL += this.BuildWhereStatement(tMisReturnInfo_UpdateWhere);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Пример #2
0
        /// <summary>
        /// 获取对象DataTable
        /// </summary>
        /// <param name="tMisReturnInfo">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTable(TMisReturnInfoVo tMisReturnInfo, int iIndex, int iCount)
        {
            string strSQL = " select * from T_MIS_RETURN_INFO {0} ";

            strSQL = String.Format(strSQL, BuildWhereStatement(tMisReturnInfo));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
Пример #3
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tMisReturnInfo">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TMisReturnInfoVo tMisReturnInfo)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tMisReturnInfo, TMisReturnInfoVo.T_MIS_RETURN_INFO_TABLE);

            strSQL += string.Format(" where ID='{0}' ", tMisReturnInfo.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
    /// <summary>
    /// 获取监测点信息
    /// </summary>
    /// <returns></returns>
    private string getOneGridInfo()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        DataTable dt = new TMisMonitorResultLogic().getTaskInfo(LogInfo.UserInfo.ID, "sample_allocation_sheet", "021", "'01','00'", intPageIndex, intPageSize);

        //退回意见
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_006;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_005;
            objReturnInfoVo       = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            dt.Rows[i]["REMARK1"] = objReturnInfoVo.SUGGESTION;
        }

        int    intTotalCount = new TMisMonitorResultLogic().getTaskInfoCount(LogInfo.UserInfo.ID, "sample_allocation_sheet", "021", "'01','00'");
        string strJson       = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
    /// <summary>
    /// 任务退回
    /// </summary>
    /// <param name="strTaskId">任务Id</param>
    /// <returns></returns>
    private string GoToBack(string strTaskId, string strSubTaskId, string strSuggestion)
    {
        bool isSuccess = false;
        TMisMonitorSubtaskVo objSubtaskVo = new TMisMonitorSubtaskVo();

        objSubtaskVo.ID          = strSubTaskId;
        objSubtaskVo.TASK_STATUS = "02";
        objSubtaskVo.TASK_TYPE   = "退回";

        isSuccess = new TMisMonitorSubtaskLogic().Edit(objSubtaskVo);

        TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();

        objReturnInfoVo.TASK_ID        = strTaskId;
        objReturnInfoVo.SUBTASK_ID     = strSubTaskId;
        objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_005;
        objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_002;
        TMisReturnInfoVo obj = new TMisReturnInfoLogic().Details(objReturnInfoVo);

        if (obj.ID.Length > 0)
        {
            objReturnInfoVo.ID         = obj.ID;
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Edit(objReturnInfoVo);
        }
        else
        {
            objReturnInfoVo.ID         = GetSerialNumber("t_mis_return_id");
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Create(objReturnInfoVo);
        }

        return(isSuccess == true ? "1" : "0");
    }
Пример #6
0
    /// <summary>
    /// 获取监测项目类别信息
    /// </summary>
    /// <returns></returns>
    private string getTwoGridInfo(string strOneGridId)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int       intPageSize = Convert.ToInt32(Request.Params["pagesize"]);
        DataTable dt          = new TMisMonitorResultLogic().getSimpleCodeInResult_QY(strOneGridId, LogInfo.UserInfo.ID, "20");

        //退回意见
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            TMisMonitorSampleInfoVo objSampleInfoVo = new TMisMonitorSampleInfoLogic().Details(dt.Rows[i]["SAMPLE_ID"].ToString());
            TMisMonitorSubtaskVo    objSubtaskVo    = new TMisMonitorSubtaskLogic().Details(objSampleInfoVo.SUBTASK_ID);

            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = objSubtaskVo.TASK_ID;
            objReturnInfoVo.SUBTASK_ID     = objSubtaskVo.ID;
            objReturnInfoVo.RESULT_ID      = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_008;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_007;
            objReturnInfoVo = new TMisReturnInfoLogic().Details(objReturnInfoVo);

            dt.Rows[i]["REMARK_1"] = objReturnInfoVo.SUGGESTION;
        }

        string strJson = CreateToJson(dt, dt.Rows.Count);

        return(strJson);
    }
Пример #7
0
    /// <summary>
    /// 任务退回
    /// </summary>
    /// <param name="strTaskId">任务Id</param>
    /// <returns></returns>
    private string GoToBack(string strTaskId, string strSuggestion)
    {
        bool isSuccess = new TMisMonitorResultLogic().sendTaskQcCheckInfoToNext_QY(strTaskId, "03", "40", "50", "退回", "2");

        TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();

        objReturnInfoVo.TASK_ID        = strTaskId;
        objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_009;
        objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_011;
        TMisReturnInfoVo obj = new TMisReturnInfoLogic().Details(objReturnInfoVo);

        if (obj.ID.Length > 0)
        {
            objReturnInfoVo.ID         = obj.ID;
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Edit(objReturnInfoVo);
        }
        else
        {
            objReturnInfoVo.ID         = GetSerialNumber("t_mis_return_id");
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Create(objReturnInfoVo);
        }

        return(isSuccess == true ? "1" : "0");
    }
Пример #8
0
    /// <summary>
    /// 获取任务信息
    /// </summary>
    /// <returns></returns>
    private string getOneGridInfo(string strTaskID, string strSubTaskID)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        DataTable dt = new TMisMonitorResultLogic().getTaskInfo_CD(strTaskID, strSubTaskID, intPageIndex, intPageSize);

        //int intTotalCount = new TMisMonitorResultLogic().getTaskInfoCount_MAS(strTaskID, strSubTaskID);


        //退回意见
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            //分析审核退回到复核的意见
            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_009;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_011;
            objReturnInfoVo       = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            dt.Rows[i]["REMARK1"] = objReturnInfoVo.SUGGESTION;
        }

        string strJson = CreateToJson(dt, dt.Rows.Count);

        return(strJson);
    }
Пример #9
0
    /// <summary>
    /// 退回到上一环节
    /// </summary>
    /// <param name="strTaskId">任务ID</param>
    /// <returns></returns>
    public string GoToBack(string strTaskId, string strSuggestion)
    {
        bool IsSuccess = new TMisMonitorResultLogic().subTaskGoToBackEx(strTaskId, "03", LogInfo.UserInfo.ID, "021", "duty_other_analyse");

        TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();

        objReturnInfoVo.TASK_ID        = strTaskId;
        objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_006;
        objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_005;
        TMisReturnInfoVo obj = new TMisReturnInfoLogic().Details(objReturnInfoVo);

        if (obj.ID.Length > 0)
        {
            objReturnInfoVo.ID         = obj.ID;
            objReturnInfoVo.SUGGESTION = strSuggestion;
            IsSuccess = new TMisReturnInfoLogic().Edit(objReturnInfoVo);
        }
        else
        {
            objReturnInfoVo.ID         = GetSerialNumber("t_mis_return_id");
            objReturnInfoVo.SUGGESTION = strSuggestion;
            IsSuccess = new TMisReturnInfoLogic().Create(objReturnInfoVo);
        }

        return(IsSuccess == true ? "1" : "0");
    }
    /// <summary>
    /// 获取任务信息
    /// </summary>
    /// <returns></returns>
    private string getOneGridInfo()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        DataTable dt = new TMisMonitorTaskLogic().SelectSampleTaskForWithSampleAnalysisQY(LogInfo.UserInfo.ID, "sample_result_check", "'02','022'", "0", "50", intPageIndex, intPageSize);

        //退回意见
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            //分析审核退回到复核的意见
            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_003;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_010;
            objReturnInfoVo       = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            dt.Rows[i]["REMARK1"] = objReturnInfoVo.SUGGESTION;
        }

        int    intTotalCount = new TMisMonitorTaskLogic().SelectSampleTaskForWithSampleAnalysisCountQY(LogInfo.UserInfo.ID, "sample_result_check", "'02','022'", "0", "50");
        string strJson       = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
Пример #11
0
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TMisReturnInfoVo tMisReturnInfo)
        {
            string strSQL = "delete from T_MIS_RETURN_INFO ";

            strSQL += this.BuildWhereStatement(tMisReturnInfo);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
    /// <summary>
    /// 获得委托书信息
    /// </summary>
    /// <returns>Json</returns>
    protected string GetContractInfo()
    {
        TMisMonitorSubtaskVo objSubtask = new TMisMonitorSubtaskLogic().Details(this.SUBTASK_ID.Value);
        TMisMonitorTaskVo    objTask    = new TMisMonitorTaskLogic().Details(objSubtask.TASK_ID);

        TMisMonitorTaskCompanyVo objConCompany = new TMisMonitorTaskCompanyVo();

        //objConCompany.TASK_ID = objTask.ID;
        objConCompany                  = new TMisMonitorTaskCompanyLogic().Details(objTask.TESTED_COMPANY_ID);
        objSubtask.MONITOR_ID          = getMonitorTypeName(objSubtask.MONITOR_ID);
        objSubtask.SAMPLING_MANAGER_ID = new TSysUserLogic().Details(objSubtask.SAMPLING_MANAGER_ID).REAL_NAME;
        objSubtask.REMARK1             = objTask.CONTRACT_CODE;
        objSubtask.REMARK2             = getDictName(objTask.CONTRACT_TYPE, "Contract_Type");
        objSubtask.REMARK3             = objConCompany.COMPANY_NAME;
        objSubtask.REMARK4             = objConCompany.CONTACT_NAME;
        objSubtask.REMARK5             = objConCompany.PHONE;
        objSubtask.SAMPLE_APPROVE_INFO = objTask.TEST_PURPOSE;
        if (!String.IsNullOrEmpty(objSubtask.SAMPLE_ASK_DATE))
        {
            objSubtask.SAMPLE_ASK_DATE = DateTime.Parse(objSubtask.SAMPLE_ASK_DATE).ToString("yyyy-MM-dd");
        }
        if (!String.IsNullOrEmpty(objSubtask.SAMPLE_FINISH_DATE))
        {
            objSubtask.SAMPLE_FINISH_DATE = DateTime.Parse(objSubtask.SAMPLE_FINISH_DATE).ToString("yyyy-MM-dd");
        }
        //获取退回意见信息
        TMisReturnInfoVo ReturnInfoVo = new TMisReturnInfoVo();

        ReturnInfoVo.TASK_ID    = objSubtask.TASK_ID;
        ReturnInfoVo.SUBTASK_ID = objSubtask.ID;
        if (Request.QueryString["strLink"].ToString() == "Sample")
        {
            ReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_003;
            ReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_002;
        }
        if (Request.QueryString["strLink"].ToString() == "Check")
        {
            ReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_004;
            ReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_003;
        }
        if (Request.QueryString["strLink"].ToString() == "QcCheck")
        {
            ReturnInfoVo.CURRENT_STATUS = "111";
            ReturnInfoVo.BACKTO_STATUS  = "222";
        }
        ReturnInfoVo = new TMisReturnInfoLogic().Details(ReturnInfoVo);
        if (ReturnInfoVo.ID.Length > 0)
        {
            objSubtask.SAMPLING_METHOD = "退回意见:" + ReturnInfoVo.SUGGESTION;
        }

        return(ToJson(objSubtask));
    }
Пример #13
0
    /// <summary>
    /// 采样任务分配信息
    /// </summary>
    /// <returns></returns>
    private string getTwoGridInfo(string strTaskID)
    {
        if (this.PLAN_ID.Value.Length == 0)
        {
            return("");
        }
        TMisMonitorTaskVo objTask = new TMisMonitorTaskVo();

        objTask.ID      = strTaskID;
        objTask.PLAN_ID = this.PLAN_ID.Value;
        objTask         = new TMisMonitorTaskLogic().Details(objTask);

        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        TMisMonitorSubtaskVo objSubtask = new TMisMonitorSubtaskVo();

        objSubtask.TASK_ID     = objTask.ID;
        objSubtask.TASK_STATUS = "01";
        DataTable dt = new TMisMonitorSubtaskLogic().SelectByTable(objSubtask, intPageIndex, intPageSize);

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (dt.Rows[i]["SAMPLING_MANAGER_ID"].ToString().Length > 0)
            {
                dt.Rows[i]["SAMPLING_MANAGER_ID"] = new TSysUserLogic().Details(dt.Rows[i]["SAMPLING_MANAGER_ID"].ToString()).REAL_NAME;
            }
            else
            {
                dt.Rows[i]["SAMPLING_MANAGER_ID"] = "请选择";
            }

            //退回意见
            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = dt.Rows[i]["TASK_ID"].ToString();
            objReturnInfoVo.SUBTASK_ID     = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_002;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_001;
            objReturnInfoVo       = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            dt.Rows[i]["REMARK1"] = objReturnInfoVo.SUGGESTION;
        }
        dt.DefaultView.Sort = "MONITOR_ID ASC";
        DataTable dtTemp        = dt.DefaultView.ToTable();
        int       intTotalCount = new TMisMonitorSubtaskLogic().GetSelectResultCount(objSubtask);
        string    strJson       = CreateToJson(dtTemp, intTotalCount);

        return(strJson);
    }
Пример #14
0
    /// <summary>
    /// 退回监测项目
    /// </summary>
    /// <param name="strResultId">结果ID</param>
    /// <returns></returns>
    public string GoToBack(string strResultIds, string strSuggestion)
    {
        bool isSuccess = true;

        string[] strResultId = strResultIds.Split(',');
        for (int i = 0; i < strResultId.Length; i++)
        {
            TBaseItemInfoVo BaseItemInfoVo = new TBaseItemInfoVo();
            BaseItemInfoVo = new TBaseItemInfoLogic().Details(new TMisMonitorResultLogic().Details(strResultId[i].ToString()).ITEM_ID);

            TMisMonitorResultVo TMisMonitorResultVo = new TMisMonitorResultVo();
            TMisMonitorResultVo.ID        = strResultId[i].ToString();
            TMisMonitorResultVo.TASK_TYPE = "退回";
            if (BaseItemInfoVo.IS_ANYSCENE_ITEM == "1")         //分析类现场监测项目 退回到:00
            {
                TMisMonitorResultVo.RESULT_STATUS = "00";
            }
            else
            {
                TMisMonitorResultVo.RESULT_STATUS = "01";       //分析类监测项目 退回到:01
            }
            isSuccess = new TMisMonitorResultLogic().Edit(TMisMonitorResultVo);

            TMisMonitorResultVo = new TMisMonitorResultLogic().Details(strResultId[i].ToString());
            TMisMonitorSampleInfoVo objSampleInfoVo = new TMisMonitorSampleInfoLogic().Details(TMisMonitorResultVo.SAMPLE_ID);
            TMisMonitorSubtaskVo    objSubtaskVo    = new TMisMonitorSubtaskLogic().Details(objSampleInfoVo.SUBTASK_ID);

            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = objSubtaskVo.TASK_ID;
            objReturnInfoVo.SUBTASK_ID     = objSubtaskVo.ID;
            objReturnInfoVo.RESULT_ID      = strResultId[i].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_007;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_006;
            TMisReturnInfoVo obj = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            if (obj.ID.Length > 0)
            {
                objReturnInfoVo.ID         = obj.ID;
                objReturnInfoVo.SUGGESTION = strSuggestion;
                isSuccess = new TMisReturnInfoLogic().Edit(objReturnInfoVo);
            }
            else
            {
                objReturnInfoVo.ID         = GetSerialNumber("t_mis_return_id");
                objReturnInfoVo.SUGGESTION = strSuggestion;
                isSuccess = new TMisReturnInfoLogic().Create(objReturnInfoVo);
            }
        }

        return(isSuccess == true ? "1" : "0");
    }
Пример #15
0
    public static string btnBackClick(string strSubtaskID, string strSuggestion)
    {
        //TMisMonitorSubtaskVo TMisMonitorSubtaskVo = new TMisMonitorSubtaskVo();
        //TMisMonitorSubtaskVo.ID = strSubtaskID;
        //TMisMonitorSubtaskVo.TASK_STATUS = "04";
        //TMisMonitorSubtaskVo.TASK_TYPE = "退回";
        //bool isSuccess = new TMisMonitorSubtaskLogic().Edit(TMisMonitorSubtaskVo);
        //return isSuccess == true ? "1" : "0";

        bool isSuccess = true;
        TMisMonitorSubtaskVo objSubTaskVo = new TMisMonitorSubtaskLogic().Details(strSubtaskID);

        objSubTaskVo.TASK_STATUS = "01";
        objSubTaskVo.TASK_TYPE   = "退回";
        new TMisMonitorSubtaskLogic().Edit(objSubTaskVo);

        TMisMonitorTaskVo objTaskVo = new TMisMonitorTaskLogic().Details(objSubTaskVo.TASK_ID);

        objTaskVo.QC_STATUS = "2";
        new TMisMonitorTaskLogic().Edit(objTaskVo);

        TMisContractPlanVo objContractPlanVo = new TMisContractPlanLogic().Details(objTaskVo.PLAN_ID);

        objContractPlanVo.HAS_DONE = "0";
        new TMisContractPlanLogic().Edit(objContractPlanVo);

        TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();

        objReturnInfoVo.TASK_ID        = objSubTaskVo.TASK_ID;
        objReturnInfoVo.SUBTASK_ID     = objSubTaskVo.ID;
        objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_002;
        objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_001;
        TMisReturnInfoVo obj = new TMisReturnInfoLogic().Details(objReturnInfoVo);

        if (obj.ID.Length > 0)
        {
            objReturnInfoVo.ID         = obj.ID;
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Edit(objReturnInfoVo);
        }
        else
        {
            objReturnInfoVo.ID         = GetSerialNumber("t_mis_return_id");
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Create(objReturnInfoVo);
        }
        return(isSuccess == true ? "1" : "0");
    }
    /// <summary>
    /// 获取任务信息
    /// </summary>
    /// <returns></returns>
    private string getOneGridInfo(string strTaskID, string strSubTaskID)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        strTaskID = string.IsNullOrEmpty(strTaskID) ? "-999999" : strTaskID;

        DataTable dt            = new DataTable();
        int       intTotalCount = 0;

        var taskIDList    = strTaskID.Split(',');
        var subTaskIDList = strSubTaskID.Split(',');

        if (taskIDList.Count() != subTaskIDList.Count())
        {
            throw new Exception("系统错误,请联系管理员");
        }

        for (var i = 0; i < taskIDList.Count(); i++)
        {
            var tempDT = new TMisMonitorResultLogic().getTaskInfo_MAS(taskIDList[i], subTaskIDList[i], intPageIndex, intPageSize);
            dt.Merge(tempDT);

            intTotalCount += new TMisMonitorResultLogic().getTaskInfoCount_MAS(taskIDList[i], subTaskIDList[i]);
        }

        //退回意见
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            //分析审核退回到复核的意见
            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_009;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_011;
            objReturnInfoVo       = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            dt.Rows[i]["REMARK1"] = objReturnInfoVo.SUGGESTION;
        }

        string strJson = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
    /// <summary>
    /// 获取任务信息
    /// </summary>
    /// <returns></returns>
    private string getOneGridInfo(string strIsDo)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        DataTable dt            = new DataTable();
        int       intTotalCount = 0;

        if (strIsDo == "0")
        {
            dt            = new TMisMonitorResultLogic().getTaskCheckInfo_QY(LogInfo.UserInfo.ID, "03", "30", intPageIndex, intPageSize);
            intTotalCount = new TMisMonitorResultLogic().getTaskInfoCheckCount_QY(LogInfo.UserInfo.ID, "03", "30");
        }
        else
        {
            dt            = new TMisMonitorResultLogic().getTaskCheckInfo_QY(LogInfo.UserInfo.ID, "03','09", "40','50", intPageIndex, intPageSize);
            intTotalCount = new TMisMonitorResultLogic().getTaskInfoCheckCount_QY(LogInfo.UserInfo.ID, "03','09", "40','50");
        }

        //退回意见
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            //分析审核退回到复核的意见
            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_011;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_008;
            objReturnInfoVo       = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            dt.Rows[i]["REMARK1"] = objReturnInfoVo.SUGGESTION;
            //现场核录退回到复核的意见
            objReturnInfoVo                = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_010;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_008;
            objReturnInfoVo                = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            dt.Rows[i]["REMARK1"]         += objReturnInfoVo.SUGGESTION;
        }

        string strJson = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
    /// <summary>
    /// 获取监测类别信息
    /// </summary>
    /// <param name="strOneGridId"></param>
    /// <returns></returns>
    private string getTwoGridInfo(string strOneGridId)
    {
        string    strSubTaskID = Request["strSubTaskID"].ToString();
        DataTable dt           = new TMisMonitorSubtaskLogic().SelectSampleSubTaskForQY(strSubTaskID, strOneGridId, "022", "sample_result_check");

        TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();

        objReturnInfoVo.TASK_ID        = strOneGridId;
        objReturnInfoVo.SUBTASK_ID     = strSubTaskID;
        objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_004;
        objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_003;
        objReturnInfoVo = new TMisReturnInfoLogic().Details(objReturnInfoVo);
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            dt.Rows[i]["Suggestion"] = objReturnInfoVo.SUGGESTION;
        }

        string strJson = CreateToJson(dt, dt.Rows.Count);

        return(strJson);
    }
Пример #19
0
    /// <summary>
    /// 监测项目退回 黄进军20141103
    /// </summary>
    /// <param name="strResultId">监测结果Id</param>
    /// <returns></returns>
    public string ResultGoToBack(string strResultId, string strSuggestion)
    {
        //bool isSuccess = new TMisMonitorResultLogic().SendResultToNext_QHD(strResultId, "30");
        //return isSuccess == true ? "1" : "0";

        TMisMonitorResultVo TMisMonitorResultVo = new TMisMonitorResultVo();

        TMisMonitorResultVo.ID            = strResultId;
        TMisMonitorResultVo.TASK_TYPE     = "退回";
        TMisMonitorResultVo.RESULT_STATUS = "50";
        bool isSuccess = new TMisMonitorResultLogic().Edit(TMisMonitorResultVo);

        TMisMonitorResultVo = new TMisMonitorResultLogic().Details(strResultId);
        TMisMonitorSampleInfoVo objSampleInfoVo = new TMisMonitorSampleInfoLogic().Details(TMisMonitorResultVo.SAMPLE_ID);
        TMisMonitorSubtaskVo    objSubtaskVo    = new TMisMonitorSubtaskLogic().Details(objSampleInfoVo.SUBTASK_ID);

        TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();

        objReturnInfoVo.TASK_ID        = objSubtaskVo.TASK_ID;
        objReturnInfoVo.SUBTASK_ID     = objSubtaskVo.ID;
        objReturnInfoVo.RESULT_ID      = strResultId;
        objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_009;
        objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_011;
        TMisReturnInfoVo obj = new TMisReturnInfoLogic().Details(objReturnInfoVo);

        if (obj.ID.Length > 0)
        {
            objReturnInfoVo.ID         = obj.ID;
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Edit(objReturnInfoVo);
        }
        else
        {
            objReturnInfoVo.ID         = GetSerialNumber("t_mis_return_id");
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Create(objReturnInfoVo);
        }

        return(isSuccess == true ? "1" : "0");
    }
Пример #20
0
    /// <summary>
    /// 任务退回
    /// </summary>
    /// <param name="strTaskId">任务Id</param>
    /// <returns></returns>
    private string GoToBack(string strTaskId, string strSubTaskID, string strSuggestion)
    {
        //TMisMonitorSubtaskVo objSubtaskVo = new TMisMonitorSubtaskVo();
        //objSubtaskVo.ID = strSubTaskId;
        //objSubtaskVo.TASK_STATUS = "022";
        //objSubtaskVo.TASK_TYPE = "退回";
        //bool IsSuccess = new TMisMonitorSubtaskLogic().Edit(objSubtaskVo);
        //bool IsSuccess = new TMisMonitorSubtaskLogic().SampleResultQcCheckBackTo(strTaskId, "023", "022", "退回");
        bool IsSuccess = true;
        TMisMonitorSubtaskVo objSubtaskVo = new TMisMonitorSubtaskVo();

        objSubtaskVo.ID          = strSubTaskID;
        objSubtaskVo.TASK_STATUS = "022";
        objSubtaskVo.TASK_TYPE   = "退回";
        IsSuccess = new TMisMonitorSubtaskLogic().Edit(objSubtaskVo);

        TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();

        objReturnInfoVo.TASK_ID        = strTaskId;
        objReturnInfoVo.SUBTASK_ID     = strSubTaskID;
        objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_004;
        objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_003;
        TMisReturnInfoVo obj = new TMisReturnInfoLogic().Details(objReturnInfoVo);

        if (obj.ID.Length > 0)
        {
            objReturnInfoVo.ID         = obj.ID;
            objReturnInfoVo.SUGGESTION = strSuggestion;
            IsSuccess = new TMisReturnInfoLogic().Edit(objReturnInfoVo);
        }
        else
        {
            objReturnInfoVo.ID         = GetSerialNumber("t_mis_return_id");
            objReturnInfoVo.SUGGESTION = strSuggestion;
            IsSuccess = new TMisReturnInfoLogic().Create(objReturnInfoVo);
        }

        return(IsSuccess == true ? "1" : "0");
    }
    /// <summary>
    /// 退回监测项目
    /// </summary>
    /// <param name="strResultId">结果ID</param>
    /// <returns></returns>
    public string GoToBack(string strTaskId, string strSuggestion)
    {
        bool isSuccess = false;

        isSuccess = new TMisMonitorResultLogic().sendTaskQcCheckInfoToNext_QY(strTaskId, "02','022','03", "50", "30", "退回", "1");
        if (isSuccess)
        {
            TMisMonitorSubtaskVo objSetVo = new TMisMonitorSubtaskVo();
            objSetVo.TASK_STATUS = "03";
            TMisMonitorSubtaskVo objWhereVo = new TMisMonitorSubtaskVo();
            objWhereVo.TASK_ID     = strTaskId;
            objWhereVo.TASK_STATUS = "09";
            new TMisMonitorSubtaskLogic().Edit(objSetVo, objWhereVo);
        }

        TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();

        objReturnInfoVo.TASK_ID        = strTaskId;
        objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_010;
        objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_008;
        TMisReturnInfoVo obj = new TMisReturnInfoLogic().Details(objReturnInfoVo);

        if (obj.ID.Length > 0)
        {
            objReturnInfoVo.ID         = obj.ID;
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Edit(objReturnInfoVo);
        }
        else
        {
            objReturnInfoVo.ID         = GetSerialNumber("t_mis_return_id");
            objReturnInfoVo.SUGGESTION = strSuggestion;
            isSuccess = new TMisReturnInfoLogic().Create(objReturnInfoVo);
        }

        return(isSuccess == true ? "1" : "0");
    }
Пример #22
0
    /// <summary>
    /// 获取监测项目信息
    /// </summary>
    /// <returns></returns>
    private string getFourGridInfo(string strThreeGridId)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        DataTable dt = new TMisMonitorResultLogic().getItemInfoInAlloction_QHD(strThreeGridId, "'01','00'", "0", "", "", intPageIndex, intPageSize);

        //退回意见
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            TMisMonitorResultVo     objResutlVo     = new TMisMonitorResultLogic().Details(dt.Rows[i]["ID"].ToString());
            TMisMonitorSampleInfoVo objSampleInfoVo = new TMisMonitorSampleInfoLogic().Details(objResutlVo.SAMPLE_ID);
            TMisMonitorSubtaskVo    objSubtaskVo    = new TMisMonitorSubtaskLogic().Details(objSampleInfoVo.SUBTASK_ID);

            TMisReturnInfoVo objReturnInfoVo = new TMisReturnInfoVo();
            objReturnInfoVo.TASK_ID        = objSubtaskVo.TASK_ID;
            objReturnInfoVo.SUBTASK_ID     = objSubtaskVo.ID;
            objReturnInfoVo.RESULT_ID      = dt.Rows[i]["ID"].ToString();
            objReturnInfoVo.CURRENT_STATUS = SerialType.Monitor_007;
            objReturnInfoVo.BACKTO_STATUS  = SerialType.Monitor_006;
            objReturnInfoVo        = new TMisReturnInfoLogic().Details(objReturnInfoVo);
            dt.Rows[i]["REMARK_1"] = objReturnInfoVo.SUGGESTION;

            //获取原始记录表的采样编号
            DataTable dtInfo        = new DataTable();
            DataRow[] drInfo        = dtInfo.Select("1=2");
            string    strFiter_Code = "";
            TMisMonitorDustinforVo objDustinforVo = new TMisMonitorDustinforVo();
            objDustinforVo.SUBTASK_ID = dt.Rows[i]["ID"].ToString();
            objDustinforVo            = new TMisMonitorDustinforLogic().Details(objDustinforVo);
            if (objDustinforVo.ID.Length > 0)
            {
                TMisMonitorDustattributeVo objDustattributeVo = new TMisMonitorDustattributeVo();
                objDustattributeVo.BASEINFOR_ID = objDustinforVo.ID;
                dtInfo = new TMisMonitorDustattributeLogic().SelectByTable(objDustattributeVo);
                if (dtInfo.Rows.Count > 0)
                {
                    drInfo = dtInfo.Select("FITER_CODE<>'平均'");
                }
                else
                {
                    TMisMonitorDustattributeSo2ornoxVo objDustattributeSo2ornoxVo = new TMisMonitorDustattributeSo2ornoxVo();
                    objDustattributeSo2ornoxVo.BASEINFOR_ID = objDustinforVo.ID;
                    dtInfo = new TMisMonitorDustattributeSo2ornoxLogic().SelectByTable(objDustattributeSo2ornoxVo);
                    if (dtInfo.Rows.Count > 0)
                    {
                        drInfo = dtInfo.Select("FITER_CODE<>'平均'");
                    }
                    else
                    {
                        TMisMonitorDustattributePmVo DustattributePmVo = new TMisMonitorDustattributePmVo();
                        DustattributePmVo.BASEINFOR_ID = objDustinforVo.ID;
                        dtInfo = new TMisMonitorDustattributePmLogic().SelectByTable(DustattributePmVo);
                        if (dtInfo.Rows.Count > 0)
                        {
                            drInfo = dtInfo.Select("FITER_CODE<>'平均'");
                        }
                    }
                }
                for (int j = 0; j < drInfo.Length; j++)
                {
                    strFiter_Code += drInfo[j]["FITER_CODE"].ToString() + ",";
                }
                dt.Rows[i]["REMARK_2"] = strFiter_Code.TrimEnd(',');
            }
        }

        int    intTotalCount = new TMisMonitorResultLogic().getItemInfoCountInAlloction_QHD(strThreeGridId, "'01','00'", "0", "", "");
        string strJson       = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
Пример #23
0
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tMisReturnInfo">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TMisReturnInfoVo tMisReturnInfo)
        {
            string strSQL = "select Count(*) from T_MIS_RETURN_INFO " + this.BuildWhereStatement(tMisReturnInfo);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
Пример #24
0
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tMisReturnInfo"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TMisReturnInfoVo tMisReturnInfo)
 {
     return(access.SelectByTable(tMisReturnInfo));
 }
Пример #25
0
        /// <summary>
        /// 根据对象特征获取单一对象
        /// </summary>
        /// <param name="tMisReturnInfo">对象</param>
        /// <returns></returns>
        public TMisReturnInfoVo SelectByObject(TMisReturnInfoVo tMisReturnInfo)
        {
            string strSQL = "select * from T_MIS_RETURN_INFO " + this.BuildWhereStatement(tMisReturnInfo);

            return(SqlHelper.ExecuteObject(new TMisReturnInfoVo(), strSQL));
        }
Пример #26
0
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tMisReturnInfo"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TMisReturnInfoVo tMisReturnInfo)
        {
            string strSQL = "select * from T_MIS_RETURN_INFO " + this.BuildWhereStatement(tMisReturnInfo);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
Пример #27
0
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tMisReturnInfo">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TMisReturnInfoVo tMisReturnInfo)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tMisReturnInfo, TMisReturnInfoVo.T_MIS_RETURN_INFO_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Пример #28
0
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tMisReturnInfo">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TMisReturnInfoVo> SelectByObject(TMisReturnInfoVo tMisReturnInfo, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_MIS_RETURN_INFO " + this.BuildWhereStatement(tMisReturnInfo));

            return(SqlHelper.ExecuteObjectList(tMisReturnInfo, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
Пример #29
0
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tMisReturnInfo">对象条件</param>
        /// <returns>对象</returns>
        public TMisReturnInfoVo Details(TMisReturnInfoVo tMisReturnInfo)
        {
            string strSQL = String.Format("select * from  T_MIS_RETURN_INFO " + this.BuildWhereStatement(tMisReturnInfo));

            return(SqlHelper.ExecuteObject(new TMisReturnInfoVo(), strSQL));
        }
Пример #30
0
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tMisReturnInfo"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TMisReturnInfoVo tMisReturnInfo)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tMisReturnInfo)
            {
                //
                if (!String.IsNullOrEmpty(tMisReturnInfo.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tMisReturnInfo.ID.ToString()));
                }
                //任务ID
                if (!String.IsNullOrEmpty(tMisReturnInfo.TASK_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND TASK_ID = '{0}'", tMisReturnInfo.TASK_ID.ToString()));
                }
                //子任务ID
                if (!String.IsNullOrEmpty(tMisReturnInfo.SUBTASK_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SUBTASK_ID = '{0}'", tMisReturnInfo.SUBTASK_ID.ToString()));
                }
                //项目结果ID
                if (!String.IsNullOrEmpty(tMisReturnInfo.RESULT_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND RESULT_ID = '{0}'", tMisReturnInfo.RESULT_ID.ToString()));
                }
                //当前环节号
                if (!String.IsNullOrEmpty(tMisReturnInfo.CURRENT_STATUS.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND CURRENT_STATUS = '{0}'", tMisReturnInfo.CURRENT_STATUS.ToString()));
                }
                //退回环节号
                if (!String.IsNullOrEmpty(tMisReturnInfo.BACKTO_STATUS.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BACKTO_STATUS = '{0}'", tMisReturnInfo.BACKTO_STATUS.ToString()));
                }
                //退回意见
                if (!String.IsNullOrEmpty(tMisReturnInfo.SUGGESTION.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SUGGESTION = '{0}'", tMisReturnInfo.SUGGESTION.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tMisReturnInfo.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tMisReturnInfo.REMARK1.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tMisReturnInfo.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tMisReturnInfo.REMARK2.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tMisReturnInfo.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tMisReturnInfo.REMARK3.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tMisReturnInfo.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tMisReturnInfo.REMARK4.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tMisReturnInfo.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tMisReturnInfo.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }