예제 #1
0
        /// <summary>
        /// 2015-11-11
        /// 通过项目Guid找到建设程序中证照批复的Guid
        /// </summary>
        /// <param name="ProjGuid"></param>
        /// <param name="fileSign"></param>
        /// <returns></returns>
        public string GetRefGuid(string ProjGuid, string fileSign)
        {
            string sql            = "";
            string strAffiliation = BuildProcedureInfo.GetProjAffiliation(ProjGuid);

            if (strAffiliation == "集中立项可研")
            {
                //判断是否是项目建议书、可行性研究报告
                if (fileSign == "Busi_ProjProposal" || fileSign == "Busi_ProjFsbtyStudy")
                {
                    //获取项目的TopGuid主键
                    string topGuid = "select TopGuid from Busi_ProjRegister where Guid='" + ProjGuid + "' and sysstatus<>-1 ";
                    if (db.ExecuteScalar(topGuid).ToString() == "")//TopGuid为空是主项目
                    {
                        sql = "SELECT TOP 1 Guid FROM " + fileSign + " WHERE ProjGuid='" + ProjGuid + "' AND SysStatus<>-1 ORDER BY tstamp DESC";
                    }
                    else//子项目
                    {
                        sql = "SELECT TOP 1 Guid FROM " + fileSign + " WHERE ProjGuid='" + db.ExecuteScalar(topGuid).ToString() + "' AND SysStatus<>-1 ORDER BY tstamp DESC";
                    }
                }
                else
                {
                    sql = "SELECT TOP 1 Guid FROM " + fileSign + " WHERE ProjGuid='" + ProjGuid + "' AND SysStatus<>-1 ORDER BY tstamp DESC";
                }
            }
            else if (strAffiliation == "集中批复立项可研概算")
            {
                //获取项目的TopGuid主键
                string topGuid = "select TopGuid from Busi_ProjRegister where Guid='" + ProjGuid + "' and sysstatus<>-1 ";
                if (db.ExecuteScalar(topGuid).ToString() == "")//TopGuid为空是主项目
                {
                    sql = "SELECT TOP 1 Guid FROM " + fileSign + " WHERE ProjGuid='" + ProjGuid + "' AND SysStatus<>-1 ORDER BY tstamp DESC";
                }
                else//子项目
                {
                    sql = "SELECT TOP 1 Guid FROM " + fileSign + " WHERE ProjGuid='" + db.ExecuteScalar(topGuid).ToString() + "' AND SysStatus<>-1 ORDER BY tstamp DESC";
                }
            }
            else
            {
                sql = "SELECT TOP 1 Guid FROM " + fileSign + " WHERE ProjGuid='" + ProjGuid + "' AND SysStatus<>-1 ORDER BY tstamp DESC";
            }
            string refGuid = "";

            if (db.ExecuteScalar(sql) != null)
            {
                refGuid = db.ExecuteScalar(sql).ToString();
            }
            return(refGuid);
        }
예제 #2
0
        /// <summary>
        /// 根据投资类型和审批类型获取相对应的主要审批手续
        /// </summary>
        /// <param name="ProjGuid">项目主键</param>
        /// <returns></returns>
        public static DataSet GetMainByType(string ProjGuid)
        {
            string MainSql = "";
            //string ProjAffiliationSql = "";//获取该项目的项目主从关系
            //DataSet AffiliationDs = new DataSet();//项目主从关系
            string ProjAffiliation = BuildProcedureInfo.GetProjAffiliation(ProjGuid);

            //判断该项目是主项目还是子项目
            int count = BuildProcedureInfo.GetProjTop(ProjGuid);

            //如果是主项目
            if (count == 0)
            {
                // //判断主从关系是否是集中批复立项可研概算,子项目独立概算
                if (ProjAffiliation == "集中批复立项可研概算")
                {
                    //只显示集中批复立项可研概算
                    MainSql = "SELECT * FROM Busi_ApprovalConfig WHERE Type='主要审批手续' AND Code IN ('1','2','3','4','5','6','7','10','12') ORDER BY convert(INT, Code)";
                }
            }
            //如果是子项目
            else
            {
                // //判断主从关系是否是集中批复立项可研概算,子项目独立概算
                if (ProjAffiliation == "集中批复立项可研概算")
                {
                    //根据投资类型查询出相对应的审批手续
                    //加入集中批复立项可研概算

                    MainSql = "SELECT * FROM Busi_ApprovalConfig WHERE Type='主要审批手续' AND Code IN ('11') ORDER BY OrderCode";
                }
            }
            DataSet MainDs = GetDatabase().ExecuteDataSet(MainSql);

            return(MainDs);
        }
예제 #3
0
 /// <summary>
 /// 获取该项目的其他手续类型
 /// </summary>
 /// <param name="projGuid"></param>
 /// <returns></returns>
 public static DataSet GetProjOtherConfig(string projGuid)
 {
     return(BuildProcedureInfo.GetProjOtherConfig(projGuid));
 }
예제 #4
0
 /// <summary>
 /// 获取该项目的子手续
 /// </summary>
 /// <param name="projGuid"></param>
 /// <returns></returns>
 public static DataSet GetProjChildProcedure(string projGuid)
 {
     return(BuildProcedureInfo.GetProjChildProcedure(projGuid));
 }
예제 #5
0
 /// <summary>
 /// 保存办理手续
 /// </summary>
 /// <param name="ds"></param>
 /// <returns></returns>
 public static void Save(DataSet ds)
 {
     BuildProcedureInfo.Save(ds);
 }
예제 #6
0
 /// <summary>
 /// 获取其他审批手续
 /// </summary>
 /// <param name="ProjGuid">项目主键</param>
 /// <returns></returns>
 public static DataSet GetOther(string ProjGuid)
 {
     return(BuildProcedureInfo.GetOther(ProjGuid));
 }
예제 #7
0
 /// <summary>
 /// 根据投资类型和审批类型获取相对应的主要审批手续
 /// </summary>
 /// <param name="NationType">审批类型</param>
 /// <param name="InvestType">投资类型</param>
 /// <param name="ProjGuid">项目主键</param>
 /// <returns></returns>
 public static DataSet GetMainByType(string NationType, string InvestType, string ProjGuid)
 {
     return(BuildProcedureInfo.GetMainByType(NationType, InvestType, ProjGuid));
 }
예제 #8
0
 /// <summary>
 /// 获取该项目的项目主从关系
 /// </summary>
 /// <param name="ProjGuid"></param>
 /// <returns></returns>
 public static string GetProjAffiliation(string ProjGuid)
 {
     return(BuildProcedureInfo.GetProjAffiliation(ProjGuid));
 }
예제 #9
0
 /// <summary>
 /// 判断项目是主项目还是子项目
 /// </summary>
 /// <param name="ProjGuid"></param>
 /// <returns></returns>
 public static int GetProjTop(string ProjGuid)
 {
     return(BuildProcedureInfo.GetProjTop(ProjGuid));
 }
예제 #10
0
 /// <summary>
 /// 获取子手续计划时间
 /// </summary>
 /// <param name="ProjGuid">项目主键</param>
 /// <returns>DataTable数据集</returns>
 public static DataTable GetProcedureChildData(string ProjGuid)
 {
     return(BuildProcedureInfo.GetProcedureChildData(ProjGuid));
 }
예제 #11
0
 /// <summary>
 /// 保存子手续计划时间
 /// </summary>
 /// <param name="datas">子手续计划时间数据集</param>
 /// <param name="ProjGuid">项目主键</param>
 /// <returns>返回影响行数</returns>
 public static int SaveProcedureChild(string datas, string ProjGuid)
 {
     return(BuildProcedureInfo.SaveProcedureChild(datas, ProjGuid));
 }
예제 #12
0
 /// <summary>
 /// 判断该项目选中的手续是否在建设过程中已填
 /// </summary>
 /// <param name="ProjGuid">项目Guid</param>
 /// <param name="ApprovalGuid">审批手续Guid</param>
 /// <returns></returns>
 public static bool isProjProcedureByCstrctProcess(string ProjGuid, string ApprovalGuid)
 {
     return(BuildProcedureInfo.isProjProcedureByCstrctProcess(ProjGuid, ApprovalGuid));
 }
예제 #13
0
 /// <summary>
 /// 通过项目主键获取设置的手续
 /// </summary>
 /// <param name="ProjGuid">项目主键</param>
 /// <param name="MainAppList">主手续字符串</param>
 /// <param name="ApproveList">手续字符串</param>
 /// <param name="ApproveTypeList">手续类别字符串</param>
 /// <param name="topProj">如果是子项目返回主项目手续</param>
 public static void GetSelectedApproveByProjGuid(string ProjGuid, out string MainAppList, out string ApproveList, out string ApproveTypeList, out string topProj)
 {
     BuildProcedureInfo.GetSelectedApproveByProjGuid(ProjGuid, out MainAppList, out ApproveList, out ApproveTypeList, out topProj);
 }
예제 #14
0
 /// <summary>
 /// 获取该项目的其他手续
 /// </summary>
 /// <param name="projGuid"></param>
 /// <param name="Type"></param>
 /// <returns></returns>
 public static DataSet GetProjOtherProcedure(string projGuid, string Type)
 {
     return(BuildProcedureInfo.GetProjOtherProcedure(projGuid, Type));
 }