示例#1
0
    /// <summary>
    /// 获取样品信息
    /// </summary>
    /// <returns></returns>
    private string getThreeGridInfo(string strTwoGridId)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        var strCCflowWorkId       = Request.QueryString["strCCflowWorkId"];
        var subFlowId             = CCFlowFacade.GetFatherThreadIDOfSubFlow(LogInfo.UserInfo.USER_NAME, Convert.ToInt64(strCCflowWorkId));
        var subFlowIdentification = CCFlowFacade.GetFlowIdentification(LogInfo.UserInfo.USER_NAME, subFlowId);

        var sampleIdList = subFlowIdentification.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries).ToList();

        if (sampleIdList.Count > 0)
        {
            sampleIdList.RemoveAt(0);
        }

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

        dt            = new TMisMonitorSampleInfoLogic().SelectSampleSitePoint(strTwoGridId);
        intTotalCount = new TMisMonitorSampleInfoLogic().SelectSampleSitePointCount(strTwoGridId);

        var newDT = new DataTable();

        foreach (DataColumn column in dt.Columns)
        {
            newDT.Columns.Add(column.ColumnName);
        }

        foreach (DataRow row in dt.Rows)
        {
            if (sampleIdList.Count > 0 && !sampleIdList.Contains(row["ID"].ToString()))
            {
                intTotalCount--;
                continue;
            }

            newDT.Rows.Add(row.ItemArray);
        }

        //dt = new TMisMonitorSampleInfoLogic().getSamplingForSampleItemOne_MAS(strTwoGridId, intPageIndex, intPageSize);
        //intTotalCount = new TMisMonitorSampleInfoLogic().getSamplingCountForSampleItemOne_MAS(strTwoGridId);

        //dt = new TMisMonitorTaskPointLogic().SelectSampleDeptPoint(strTwoGridId);
        //intTotalCount = dt.Rows.Count;

        string strJson = CreateToJson(newDT, intTotalCount);

        return(strJson);
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            // ccflow结点发送前事件
            if (Request["type"] != null && Request["type"].ToString() == "check")
            {
                var workID = Convert.ToInt64(Request.QueryString["OID"]);

                var flowId = Request.QueryString["FK_Flow"];
                var nodeId = Convert.ToInt32(Request.QueryString["FK_Node"]);
                var fid    = Convert.ToInt32(Request.QueryString["FID"]);


                var identification = CCFlowFacade.GetFlowIdentification(Request["UserNo"], workID);

                //// yinchengyi 2015-4-2 记录monistor_result对应的子流程ID和父线程ID
                //TMisMonitorResultVo objMomRstVo = new TMisMonitorResultVo();
                //objMomRstVo.ID = identification;

                //objMomRstVo.CCFLOW_ID1 = workID.ToString();
                //objMomRstVo.CCFLOW_ID2 = fid.ToString();

                //if (!new TMisMonitorResultLogic().Edit(objMomRstVo))
                //{
                //    Response.Write("false流程ID更新失败,不能发送");


                //}

                Response.ContentType     = "text/plain";
                Response.ContentEncoding = Encoding.UTF8;
                Response.Write("true");
                Response.End();
            }

            //黄飞 20150916  监测分析  批处理
            if (Request.QueryString["WorkIDs"] != null || Request.QueryString["WorkID"] != null)
            {
                string strWorkIDs = Request.QueryString["WorkIDs"];
                if (string.IsNullOrEmpty(strWorkIDs))
                {
                    strWorkIDs = Request.QueryString["WorkID"];
                }

                string[] strarr = strWorkIDs.Split(',');
                for (int i = 0; i < strarr.Length; i++)
                {
                    if (strarr[i] != "" || !string.IsNullOrEmpty(strarr[i]))
                    {
                        var workID         = Convert.ToInt64(strarr[i]);
                        var identification = CCFlowFacade.GetFlowIdentification(LogInfo.UserInfo.USER_NAME, workID);

                        this.RESULT_ID.Value = this.RESULT_ID.Value + "," + identification;

                        // yinchengyi 2015-4-2 记录monistor_result对应的子流程ID和父线程ID
                        TMisMonitorResultVo objMomRstVo = new TMisMonitorResultVo();
                        objMomRstVo.ID = identification;

                        var fatherID = CCFlowFacade.GetFatherThreadIDOfSubFlow(LogInfo.UserInfo.USER_NAME, workID);

                        objMomRstVo.CCFLOW_ID1 = workID.ToString();
                        objMomRstVo.CCFLOW_ID2 = fatherID.ToString();

                        if (!new TMisMonitorResultLogic().Edit(objMomRstVo))
                        {
                            //todo-yinchengyi
                        }
                    }
                }
            }



            //定义结果
            string strResult = "";
            //任务信息
            if (Request["type"] != null && Request["type"].ToString() == "getOneGridInfo")
            {
                strResult = getOneGridInfo(Request["strResultID"].ToString());
                Response.Write(strResult);
                Response.End();
            }
            //监测项目信息
            if (Request["type"] != null && Request["type"].ToString() == "getTwoGridInfo")
            {
                strResult = getTwoGridInfo(Request["oneGridId"].ToString(), Request["strResultID"].ToString());
                Response.Write(strResult);
                Response.End();
            }
            //监测项目实验室质控信息
            if (Request["type"] != null && Request["type"].ToString() == "getThreeGridInfo")
            {
                strResult = getThreeGridInfo(Request["twoGridId"].ToString());
                Response.Write(strResult);
                Response.End();
            }
            //监测项目信息
            if (Request["type"] != null && Request["type"].ToString() == "getAnalysisByItemId")
            {
                strResult = getAnalysisByItemId(Request["strItemId"].ToString());
                Response.Write(strResult);
                Response.End();
            }
            //监测项目信息
            if (Request["type"] != null && Request["type"].ToString() == "getSampleInfor")
            {
                strResult = getSampleInfor(Request["strSampleId"].ToString());
                Response.Write(strResult);
                Response.End();
            }
            //获取样品编号及结果值
            if (Request["type"] != null && Request["type"].ToString() == "getItemInfo")
            {
                strResult = getItemInfo(Request["resultids"].ToString());
                Response.Write(strResult);
                Response.End();
            }
        }
    }