Exemplo n.º 1
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public string Search_Search()
        {
            string TSpan   = this.GetRequestVal("TSpan");
            string FK_Flow = this.GetRequestVal("FK_Flow");

            GenerWorkFlows gwfs = new GenerWorkFlows();
            QueryObject    qo   = new QueryObject(gwfs);

            qo.AddWhere(GenerWorkFlowAttr.Emps, " LIKE ", "%" + BP.Web.WebUser.No + "%");
            if (!DataType.IsNullOrEmpty(TSpan))
            {
                qo.addAnd();
                qo.AddWhere(GenerWorkFlowAttr.TSpan, this.GetRequestVal("TSpan"));
            }
            if (!DataType.IsNullOrEmpty(FK_Flow))
            {
                qo.addAnd();
                qo.AddWhere(GenerWorkFlowAttr.FK_Flow, this.GetRequestVal("FK_Flow"));
            }
            qo.Top = 50;

            if (SystemConfig.AppCenterDBType == DBType.Oracle || SystemConfig.AppCenterDBType == DBType.PostgreSQL)
            {
                qo.DoQuery();
                DataTable dt = gwfs.ToDataTableField("Ens");
                return(BP.Tools.Json.ToJson(dt));
            }
            else
            {
                DataTable dt = qo.DoQueryToTable();
                return(BP.Tools.Json.ToJson(dt));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取挂起数据,传入流程编号与项目编号
        /// </summary>
        /// <returns></returns>
        private string GetHunupFlowData()
        {
            try
            {
                string FK_Flow = getUTF8ToString("FK_Flow");
                string ProjNo  = getUTF8ToString("ProjNo");
                int    state   = (int)WFState.HungUp;
                string sql     = "SELECT a.WorkID FROM WF_GenerWorkFlow A, WF_GenerWorkerlist B WHERE A.FK_Flow='" + FK_Flow
                                 + "'  AND A.WFState=" + state + " AND A.WorkID=B.WorkID AND B.FK_Emp='" + WebUser.No
                                 + "' AND A.WorkID in (select OID from V_FlowData where ProjNo ='" + ProjNo + "') AND B.IsEnable=1 ";

                GenerWorkFlows gwfs = new GenerWorkFlows();
                gwfs.RetrieveInSQL(GenerWorkFlowAttr.WorkID, "(" + sql + ")");
                DataTable dt = gwfs.ToDataTableField();

                return(GetEasyUIJson(dt));
            }
            catch
            {
                return("[{}]");
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取在途数据,传入流程编号和项目编号
        /// </summary>
        /// <returns></returns>
        private string GetRuningFlowData()
        {
            try
            {
                string FK_Flow = getUTF8ToString("FK_Flow");
                string ProjNo  = getUTF8ToString("ProjNo");

                string sql = "SELECT a.WorkID FROM WF_GenerWorkFlow A, WF_GenerWorkerlist B WHERE A.FK_Flow='" + FK_Flow
                             + "'  AND A.WorkID=B.WorkID AND B.FK_Emp='" + WebUser.No + "' AND A.WorkID in (select OID from V_FlowData where ProjNo ='" + ProjNo
                             + "') AND B.IsEnable=1 AND (B.IsPass=1 or B.IsPass < 0 ) ";

                GenerWorkFlows gwfs = new GenerWorkFlows();
                gwfs.RetrieveInSQL(GenerWorkFlowAttr.WorkID, "(" + sql + ")");
                DataTable dt = gwfs.ToDataTableField();
                //按照接受日期排序
                dt.DefaultView.Sort = "RDT DESC";
                return(GetEasyUIJson(dt.DefaultView.ToTable()));
            }
            catch
            {
                return("[{}]");
            }
        }