Beispiel #1
0
 protected override SelectTransaction <Shoolar_apply_head> GetSelectTransaction()
 {
     if (!string.IsNullOrEmpty(Get("page_from")))
     {
         if (Get("page_from").ToString().Equals("approve_pend"))/// 待处理查看
         {
             param.Add(string.Format(DataFilterHandleClass.getInstance().Pend_DataFilter(user.User_Role, CValue.DOC_TYPE_BDM03)), string.Empty);
         }
         else if (Get("page_from").ToString().Equals("approve_proce"))   /// 已处理查看
         {
             param.Add(string.Format(DataFilterHandleClass.getInstance().Proc_DataFilter(user.User_Role, CValue.DOC_TYPE_BDM03)), string.Empty);
         }
         else if (Get("page_from").ToString().Equals("result")) //查询都是审批通过的数据
         {
             param.Add("RET_CHANNEL", CValue.RET_CHANNEL_D4000);
         }
         else if (Get("page_from").ToString().Equals("nation_schoolar")) //全国信息:查询都是审批通过的数据
         {
             param.Add("RET_CHANNEL", CValue.RET_CHANNEL_D4000);
         }
         else if (Get("page_from").ToString().Equals("result_outline")) //查询线下项目数据
         {
             param.Add("PROJECT_CLASS", "OUTLINE");
         }
     }
     return(ImplementFactory.GetSelectTransaction <Shoolar_apply_head>("Shoolar_apply_headSelectTransaction", param));
 }
Beispiel #2
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <returns></returns>
 public override string GetSearchWhere()
 {
     string where = string.Empty;
     if (!string.IsNullOrEmpty(Post("GRADE")))
     {
         where += string.Format(" AND GRADE = '{0}' ", Post("GRADE"));
     }
     if (!string.IsNullOrEmpty(Post("COLLEGE")))
     {
         where += string.Format(" AND COLLEGE = '{0}' ", Post("COLLEGE"));
     }
     if (!string.IsNullOrEmpty(Post("MAJOR")))
     {
         where += string.Format(" AND MAJOR = '{0}' ", Post("MAJOR"));
     }
     if (!string.IsNullOrEmpty(Post("STU_NUMBER")))
     {
         where += string.Format(" AND STU_NUMBER LIKE '%{0}%' ", Post("STU_NUMBER"));
     }
     if (!string.IsNullOrEmpty(Post("STU_NAME")))
     {
         where += string.Format(" AND STU_NAME LIKE '%{0}%' ", Post("STU_NAME"));
     }
     where += " AND " + DataFilterHandleClass.getInstance().Pend_DataFilter(user.User_Role, Doc_type);
     return(where);
 }
Beispiel #3
0
        private string GetListData()
        {
            Hashtable ddl = new Hashtable();

            ddl["STEP_NO_NAME"]      = "ddl_STEP_NO";      //单据流转环节
            ddl["CHK_STATUS_NAME"]   = "ddl_CHK_STATUS";   //单据锁单状态
            ddl["DECLARE_TYPE_NAME"] = "ddl_DECLARE_TYPE"; //单据申请类型
            ddl["RET_CHANNEL_NAME"]  = "ddl_RET_CHANNEL";  //单据回执状态
            ddl["GROUP_TYPE_NAME"]   = "ddl_group_type";
            ddl["XY_NAME"]           = "ddl_department";
            ddl["ZY_NAME"]           = "ddl_zy";
            ddl["GRADE_NAME"]        = "ddl_grade";
            ddl["STU_TYPE_NAME"]     = "ddl_basic_stu_type";
            string where             = string.Empty;
            where += cod.GetDataFilterString(true, "DECL_NUMBER", "CLASSCODE", "XY");
            where += GetSearchWhere(where);
            string from_type = Request.QueryString["from_type"];

            if (!string.IsNullOrEmpty(from_type))
            {
                if (from_type.Equals("pend"))
                {
                    //未处理数据过滤
                    where += " AND " + DataFilterHandleClass.getInstance().Pend_DataFilter(user.User_Role, CValue.DOC_TYPE_UA01);
                }
                else
                {
                    //已处理数据过滤
                    where += " AND " + DataFilterHandleClass.getInstance().Proc_DataFilter(user.User_Role, CValue.DOC_TYPE_UA01);
                }
            }
            return(tables.GetCmdQueryData("Get_Approve_ClassGrouplist", null, where, string.Empty, ddl));
        }
Beispiel #4
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <returns></returns>
 public override string GetSearchWhere()
 {
     string where = string.Empty;
     if (!string.IsNullOrEmpty(Post("COLLEGE")))
     {
         where += string.Format(" AND COLLEGE = '{0}' ", Post("COLLEGE"));
     }
     if (!string.IsNullOrEmpty(Post("MAJOR")))
     {
         where += string.Format(" AND MAJOR = '{0}' ", Post("MAJOR"));
     }
     if (!string.IsNullOrEmpty(Post("CLASS")))
     {
         where += string.Format(" AND CLASS = '{0}' ", Post("CLASS"));
     }
     if (!string.IsNullOrEmpty(Post("NAME")))
     {
         where += string.Format(" AND NAME LIKE '%{0}%' ", Post("NAME"));
     }
     if (!string.IsNullOrEmpty(Post("NUMBER")))
     {
         where += string.Format(" AND NUMBER LIKE '%{0}%' ", Post("NUMBER"));
     }
     if (!string.IsNullOrEmpty(Post("SCHYEAR")))
     {
         where += string.Format(" AND SCHYEAR = '{0}' ", Post("SCHYEAR"));
     }
     if (!string.IsNullOrEmpty(Post("LEVEL_CODE")))
     {
         where += string.Format(" AND LEVEL_CODE = '{0}' ", Post("LEVEL_CODE"));
     }
     if (!string.IsNullOrEmpty(Post("DECLARE_TYPE")))
     {
         where += string.Format(" AND DECLARE_TYPE = '{0}' ", Post("DECLARE_TYPE"));
     }
     if (!string.IsNullOrEmpty(Post("RET_CHANNEL")))
     {
         where += string.Format(" AND RET_CHANNEL = '{0}' ", Post("RET_CHANNEL"));
     }
     if (!string.IsNullOrEmpty(Post("BATCH_NO")))
     {
         where += string.Format(" AND BATCH_NO = '{0}' ", Post("BATCH_NO"));
     }
     where += string.Format(" AND {0} ", DataFilterHandleClass.getInstance().Proc_DataFilter(user.User_Role, Doc_type));
     return(where);
 }
Beispiel #5
0
        /// <summary>
        /// 待办事项集合
        /// </summary>
        /// <param name="strUserId"></param>
        /// <param name="strUserRole"></param>
        /// <param name="strUserFilter"></param>
        /// <returns></returns>
        public DataTable GetTodoDataTable(string strUserId, string strUserRole)
        {
            StringBuilder strSQL = new StringBuilder();

            if (strUserRole.Equals(HQ.Model.CValue.ROLE_TYPE_S))
            {
                foreach (var table in TableList_S)
                {
                    if (table.Key.Equals("LOAN_PROJECT_APPLY"))
                    {
                        strSQL.AppendFormat("SELECT OID,SEQ_NO,DOC_TYPE,'未完成信息核对' RET_CHANNEL FROM (SELECT A.*,B.CHECK_STEP FROM LOAN_PROJECT_APPLY A LEFT JOIN LOAN_APPLY_CHECK B ON A.SEQ_NO = B.SEQ_NO) T WHERE STU_NUMBER = '{0}' AND (CHECK_STEP IS NULL OR CHECK_STEP = '') UNION ALL ", strUserId);
                    }
                    else if (table.Key.Equals("INSUR_PROJECT_APPLY"))
                    {
                        strSQL.AppendFormat("SELECT OID,SEQ_NO,DOC_TYPE,'未完成信息核对' RET_CHANNEL FROM (SELECT A.*,B.CHECK_STEP FROM INSUR_PROJECT_APPLY A LEFT JOIN INSUR_APPLY_CHECK B ON A.SEQ_NO = B.SEQ_NO) T WHERE STU_NUMBER = '{0}' AND (CHECK_STEP IS NULL OR CHECK_STEP = '') UNION ALL ", strUserId);
                    }
                    else
                    {
                        strSQL.AppendFormat("SELECT OID,SEQ_NO,DOC_TYPE,'未完成申请' RET_CHANNEL FROM {0} WHERE {1} = '{2}' AND RET_CHANNEL IN ('A0000') UNION ALL ", table.Key, table.Value, strUserId);
                    }
                }
            }
            else
            {
                foreach (var table in TableList_T)
                {
                    string[] arr       = table.Value.Split(',');
                    string   strFilter = DataFilterHandleClass.getInstance().Pend_DataFilter(strUserRole, arr[0]);
                    strFilter += cod.GetDataFilterString(true, arr[1], arr[2], arr[3]);
                    if (table.Key.Equals("UA_CLASS_GROUP"))
                    {
                        strSQL.AppendFormat("SELECT DOC_TYPE,COUNT(1) QTY FROM (SELECT A.CLASSCODE,A.XY,B.* FROM BASIC_CLASS_INFO A INNER JOIN UA_CLASS_GROUP B ON A.CLASSCODE = B.GROUP_CLASS) T WHERE {1} GROUP BY DOC_TYPE UNION ALL ", table.Key, strFilter);
                    }
                    else if (table.Key.Equals("INSUR_PROJECT_APPLY"))
                    {
                        string check_step = strUserRole.Equals(HQ.Model.CValue.ROLE_TYPE_F) ? "1" : (strUserRole.Equals(HQ.Model.CValue.ROLE_TYPE_Y) ? "2" : "");
                        strSQL.AppendFormat("SELECT DOC_TYPE,COUNT(1) FROM (SELECT A.*,B.CHECK_STEP FROM INSUR_PROJECT_APPLY A LEFT JOIN INSUR_APPLY_CHECK B ON A.SEQ_NO = B.SEQ_NO) T WHERE {0} AND CHECK_STEP = '{1}' GROUP BY DOC_TYPE UNION ALL ", strFilter, check_step);
                    }
                    else
                    {
                        strSQL.AppendFormat("SELECT DOC_TYPE,COUNT(1) QTY FROM {0} WHERE {1} GROUP BY DOC_TYPE UNION ALL ", table.Key, strFilter);
                    }
                }
            }
            return(ds.ExecuteTxtDataTable(strSQL.ToString().Substring(0, strSQL.ToString().Length - 10)));//把最后面的“UNION ALL”拿掉
        }
Beispiel #6
0
        /// <summary>
        /// 学生:提交申报及之后的审核环节都属于“已办”
        /// 教师:自己已审及上级已审都属于“已办”
        /// </summary>
        /// <returns></returns>
        private string GetList()
        {
            StringBuilder strSQL = new StringBuilder();
            Hashtable     ddl    = new Hashtable();

            ddl["DOC_TYPE"] = "ddl_doc_type";
            if (user.User_Role.Equals(CValue.ROLE_TYPE_S))
            {
                ddl["RET_CHANNEL"] = "ddl_RET_CHANNEL";
                foreach (var table in TableList_S)
                {
                    strSQL.AppendFormat("SELECT OID,SEQ_NO,DOC_TYPE,RET_CHANNEL FROM {0} WHERE {1} = '{2}' AND RET_CHANNEL NOT IN ('A0000') UNION ALL ", table.Key, table.Value, user.User_Id);
                }
            }
            else
            {
                foreach (var table in TableList_T)
                {
                    string[] arr       = table.Value.Split(',');
                    string   strFilter = DataFilterHandleClass.getInstance().Proc_DataFilter(user.User_Role, arr[0]);
                    strFilter += cod.GetDataFilterString(true, arr[1], arr[2], arr[3]);
                    if (!table.Key.Equals("UA_CLASS_GROUP"))
                    {
                        strSQL.AppendFormat("SELECT DOC_TYPE,COUNT(1) QTY FROM {0} WHERE {1} GROUP BY DOC_TYPE UNION ALL ", table.Key, strFilter);
                    }
                    else
                    {
                        strSQL.AppendFormat("SELECT DOC_TYPE,COUNT(1) QTY FROM (SELECT A.CLASSCODE,A.XY,B.* FROM BASIC_CLASS_INFO A INNER JOIN UA_CLASS_GROUP B ON A.CLASSCODE = B.GROUP_CLASS) T WHERE {1} GROUP BY DOC_TYPE UNION ALL ", table.Key, strFilter);
                    }
                }
            }

            DataTable dt = ds.ExecuteTxtDataTable(strSQL.ToString().Substring(0, strSQL.ToString().Length - 10));

            if (ddl != null && ddl.Count > 0)
            {
                cod.ConvertTabDdl(dt, ddl);
            }

            return(DataTableToJson(dt));
        }
Beispiel #7
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <returns></returns>
 public override string GetSearchWhere()
 {
     string where = string.Empty;
     if (!string.IsNullOrEmpty(Post("SCH_YEAR")))
     {
         where += string.Format(" AND SCH_YEAR = '{0}' ", Post("SCH_YEAR"));
     }
     if (!string.IsNullOrEmpty(Post("SCH_TERM")))
     {
         where += string.Format(" AND SCH_TERM = '{0}' ", Post("SCH_TERM"));
     }
     if (!string.IsNullOrEmpty(Post("EMPLOYER")))
     {
         where += string.Format(" AND EMPLOYER = '{0}' ", Post("EMPLOYER"));
     }
     if (!string.IsNullOrEmpty(Post("JOB_SEQ_NO")))
     {
         where += string.Format(" AND JOB_SEQ_NO = '{0}' ", Post("JOB_SEQ_NO"));
     }
     where += " AND " + DataFilterHandleClass.getInstance().Proc_DataFilter(user.User_Role, Doc_type);
     return(where);
 }
Beispiel #8
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <returns></returns>
 public override string GetSearchWhere()
 {
     string where = string.Empty;
     if (!string.IsNullOrEmpty(Post("SCH_YEAR")))
     {
         where += string.Format(" AND SCH_YEAR = '{0}' ", Post("SCH_YEAR"));
     }
     if (!string.IsNullOrEmpty(Post("IS_USE")))
     {
         where += string.Format(" AND IS_USE = '{0}' ", Post("IS_USE"));
     }
     if (!string.IsNullOrEmpty(Post("JOB_TYPE")))
     {
         where += string.Format(" AND JOB_TYPE = '{0}' ", Post("JOB_TYPE"));
     }
     if (!string.IsNullOrEmpty(Post("JOB_NAME")))
     {
         where += string.Format(" AND JOB_NAME LIKE '%{0}%' ", Post("JOB_NAME"));
     }
     where += " AND " + DataFilterHandleClass.getInstance().Proc_DataFilter(user.User_Role, Doc_type);
     return(where);
 }
Beispiel #9
0
        private string GetMultiAuditID()
        {
            string ids = string.Empty;

            #region 查询
            Dictionary <string, string> param = new Dictionary <string, string>();
            string filter = cod.GetDataFilterString(true, "OP_CODE", "CLASS", "COLLEGE");
            if (filter.Length > 0)
            {
                param.Add(filter.Substring(4, filter.Length - 4), string.Empty);
            }
            param.Add(string.Format(DataFilterHandleClass.getInstance().Pend_DataFilter(user.User_Role, CValue.DOC_TYPE_BDM01)), string.Empty);
            if (!string.IsNullOrEmpty(Get("COLLEGE")))
            {
                param.Add("COLLEGE", Get("COLLEGE"));
            }
            if (!string.IsNullOrEmpty(Get("MAJOR")))
            {
                param.Add("MAJOR", Get("MAJOR"));
            }
            if (!string.IsNullOrEmpty(Get("CLASS")))
            {
                param.Add("CLASS", Get("CLASS"));
            }
            if (!string.IsNullOrEmpty(Get("NAME")))
            {
                param.Add(string.Format("NAME LIKE '%{0}%' ", HttpUtility.UrlDecode(Get("NAME"))), string.Empty);
            }
            if (!string.IsNullOrEmpty(Get("SCHYEAR")))
            {
                param.Add("SCHYEAR", Get("SCHYEAR"));
            }
            if (!string.IsNullOrEmpty(Get("RET_CHANNEL")))
            {
                param.Add("RET_CHANNEL", Get("RET_CHANNEL"));
            }
            if (!string.IsNullOrEmpty(Get("DECLARE_TYPE")))
            {
                param.Add("DECLARE_TYPE", Get("DECLARE_TYPE"));
            }
            if (!string.IsNullOrEmpty(Get("LEVEL_CODE")))
            {
                if (user.User_Role.Equals(CValue.ROLE_TYPE_F))
                {
                }
                else if (user.User_Role.Equals(CValue.ROLE_TYPE_Y))
                {
                    param.Add("LEVEL1", Get("LEVEL_CODE"));
                }
                else if (user.User_Role.Equals(CValue.ROLE_TYPE_X))
                {
                    param.Add("LEVEL2", Get("LEVEL_CODE"));
                }
                else
                {
                    param.Add("1", "2");
                }
            }
            List <Dst_stu_apply> applyList = DstApplyHandleClass.getInstance().GetDst_stu_applyArray(param);
            if (applyList == null)
            {
                return("查询批量审批申请数据出错!");
            }
            #endregion 查询

            foreach (Dst_stu_apply apply in applyList)
            {
                ids += apply.OID + ",";
            }
            ids = ids.TrimEnd(',');

            return(ids);
        }
Beispiel #10
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <returns></returns>
 public override string GetSearchWhere()
 {
     string where = string.Empty;
     if (!string.IsNullOrEmpty(Post("COLLEGE")))
     {
         where += string.Format(" AND COLLEGE = '{0}' ", Post("COLLEGE"));
     }
     if (!string.IsNullOrEmpty(Post("MAJOR")))
     {
         where += string.Format(" AND MAJOR = '{0}' ", Post("MAJOR"));
     }
     if (!string.IsNullOrEmpty(Post("CLASS")))
     {
         where += string.Format(" AND CLASS = '{0}' ", Post("CLASS"));
     }
     if (!string.IsNullOrEmpty(Post("NAME")))
     {
         where += string.Format(" AND NAME LIKE '%{0}%' ", Post("NAME"));
     }
     if (!string.IsNullOrEmpty(Post("NUMBER")))
     {
         where += string.Format(" AND NUMBER LIKE '%{0}%' ", Post("NUMBER"));
     }
     if (!string.IsNullOrEmpty(Post("SCHYEAR")))
     {
         where += string.Format(" AND SCHYEAR = '{0}' ", Post("SCHYEAR"));
     }
     if (!string.IsNullOrEmpty(Post("LEVEL_CODE")))
     {
         if (user.User_Role.Equals(CValue.ROLE_TYPE_F))
         {
         }
         else if (user.User_Role.Equals(CValue.ROLE_TYPE_Y))
         {
             where += string.Format(" AND LEVEL1 = '{0}' ", Post("LEVEL_CODE"));
         }
         else if (user.User_Role.Equals(CValue.ROLE_TYPE_X))
         {
             where += string.Format(" AND LEVEL2 = '{0}' ", Post("LEVEL_CODE"));
         }
         else
         {
             where += string.Format(" AND 1 = 2 ");
         }
     }
     if (!string.IsNullOrEmpty(Post("DECLARE_TYPE")))
     {
         where += string.Format(" AND DECLARE_TYPE = '{0}' ", Post("DECLARE_TYPE"));
     }
     if (!string.IsNullOrEmpty(Post("RET_CHANNEL")))
     {
         where += string.Format(" AND RET_CHANNEL = '{0}' ", Post("RET_CHANNEL"));
     }
     if (!string.IsNullOrEmpty(Post("BATCH_NO")))
     {
         where += string.Format(" AND BATCH_NO = '{0}' ", Post("BATCH_NO"));
     }
     where += cod.GetDataFilterString(true, "OP_CODE", "CLASS", "COLLEGE");
     where += " AND " + DataFilterHandleClass.getInstance().Pend_DataFilter(user.User_Role, Doc_type);
     return(where);
 }
Beispiel #11
0
        private string CheckMulti()
        {
            #region 获得批量审核数据集合

            Dictionary <string, string> param = new Dictionary <string, string>();
            string filter = cod.GetDataFilterString(true, "OP_CODE", "CLASS", "COLLEGE");
            if (filter.Length > 0)
            {
                param.Add(filter.Substring(4, filter.Length - 4), string.Empty);
            }
            param.Add(string.Format(DataFilterHandleClass.getInstance().Pend_DataFilter(user.User_Role, CValue.DOC_TYPE_BDM01)), string.Empty);
            if (!string.IsNullOrEmpty(Get("COLLEGE")))
            {
                param.Add("COLLEGE", Get("COLLEGE"));
            }
            if (!string.IsNullOrEmpty(Get("MAJOR")))
            {
                param.Add("MAJOR", Get("MAJOR"));
            }
            if (!string.IsNullOrEmpty(Get("CLASS")))
            {
                param.Add("CLASS", Get("CLASS"));
            }
            if (!string.IsNullOrEmpty(Get("NAME")))
            {
                param.Add(string.Format("NAME LIKE '%{0}%' ", HttpUtility.UrlDecode(Get("NAME"))), string.Empty);
            }
            if (!string.IsNullOrEmpty(Get("SCHYEAR")))
            {
                param.Add("SCHYEAR", Get("SCHYEAR"));
            }
            if (!string.IsNullOrEmpty(Get("RET_CHANNEL")))
            {
                param.Add("RET_CHANNEL", Get("RET_CHANNEL"));
            }
            if (!string.IsNullOrEmpty(Get("DECLARE_TYPE")))
            {
                param.Add("DECLARE_TYPE", Get("DECLARE_TYPE"));
            }
            if (!string.IsNullOrEmpty(Get("LEVEL_CODE")))
            {
                if (user.User_Role.Equals(CValue.ROLE_TYPE_F))
                {
                }
                else if (user.User_Role.Equals(CValue.ROLE_TYPE_Y))
                {
                    param.Add("LEVEL1", Get("LEVEL_CODE"));
                }
                else if (user.User_Role.Equals(CValue.ROLE_TYPE_X))
                {
                    param.Add("LEVEL2", Get("LEVEL_CODE"));
                }
                else
                {
                    param.Add("1", "2");
                }
            }
            if (!string.IsNullOrEmpty(Get("NUMBER")))
            {
                param.Add(string.Format("NUMBER LIKE '%{0}%' ", HttpUtility.UrlDecode(Get("NUMBER"))), string.Empty);
            }
            if (!string.IsNullOrEmpty(Get("BATCH_NO")))
            {
                param.Add("BATCH_NO", Get("BATCH_NO"));
            }
            List <Dst_stu_apply> applyList = DstApplyHandleClass.getInstance().GetDst_stu_applyArray(param);
            if (applyList == null)
            {
                return("查询批量审批申请数据出错!");
            }

            #endregion 获得批量审核数据集合

            int    i           = 0;
            string ret_channel = string.Empty;
            string pos_code    = string.Empty;
            string level       = string.Empty;
            foreach (Dst_stu_apply apply in applyList)
            {
                if (apply.OID.Length == 0)
                {
                    continue;
                }

                if (apply.POS_CODE.Equals(WKF_VLAUES.POST_CODE_F))//辅导员不允许批量审核
                {
                    return("不符合批量审核的条件!");
                }

                if (!apply.DECLARE_TYPE.Equals(WKF_VLAUES.DECLARE_TYPE_D))
                {
                    return("不符合批量审核的条件,原因:选择的单据申请类型不一致!");
                }
                if (i > 0 && !(apply.RET_CHANNEL.Equals(ret_channel) && apply.POS_CODE.Equals(pos_code)))
                {
                    return("不符合批量审核的条件,原因:选择的单据审核状态不一致!");
                }

                if (i > 0 && !level.Equals(user.User_Role.Equals(CValue.ROLE_TYPE_Y) ? apply.LEVEL1 : apply.LEVEL2))
                {
                    return("不符合批量审核的条件,原因:选择的单据前级推荐档次不一致!");
                }

                ret_channel = apply.RET_CHANNEL;
                pos_code    = apply.POS_CODE;
                if (user.User_Role.Equals(CValue.ROLE_TYPE_Y))
                {
                    level = apply.LEVEL1;
                }
                else if (user.User_Role.Equals(CValue.ROLE_TYPE_X))
                {
                    level = apply.LEVEL2;
                }

                i++;
            }

            return(string.Format("{0}^{1}", pos_code, level));
        }
Beispiel #12
0
        /// <summary>
        /// 批量审批
        /// </summary>
        /// <returns></returns>
        private string MultiPAudit()
        {
            try
            {
                #region 获得批量审核数据集合

                Dictionary <string, string> param = new Dictionary <string, string>();
                param.Add(string.Format(DataFilterHandleClass.getInstance().Pend_DataFilter(user.User_Role, Doc_type)), string.Empty);
                if (!string.IsNullOrEmpty(Get("SCH_YEAR")))
                {
                    param.Add("SCH_YEAR", Get("SCH_YEAR"));
                }
                if (!string.IsNullOrEmpty(Get("JOB_TYPE")))
                {
                    param.Add("JOB_TYPE", Get("JOB_TYPE"));
                }
                if (!string.IsNullOrEmpty(Get("IS_USE")))
                {
                    param.Add("IS_USE", Get("IS_USE"));
                }
                if (!string.IsNullOrEmpty(Get("JOB_NAME")))
                {
                    param.Add(string.Format("JOB_NAME LIKE '%{0}%' ", HttpUtility.UrlDecode(Get("JOB_NAME"))), string.Empty);
                }

                List <Qz_job_manage> applyList = JobManageHandleClass.getInstance().GetJobManageList(param);
                if (applyList == null)
                {
                    return("查询批量审批勤助岗位申报数据出错!");
                }

                #endregion 获得批量审核数据集合

                #region 批量审批

                string strFlag = Get("flag");
                foreach (Qz_job_manage head in applyList)
                {
                    #region 审核操作

                    if (head == null)
                    {
                        continue;
                    }

                    string strMsg = WKF_ExternalInterface.getInstance().ChkAudit(head.DOC_TYPE, head.SEQ_NO, user.User_Role);
                    if (strMsg.Length > 0)
                    {
                        continue;
                    }

                    strMsg = string.Empty;
                    string strOpNote = string.Format("{0}在{1}操作:勤助岗位申报批量审批{2}", user.User_Id, GetDateLongFormater(), strFlag.Equals("P") ? "通过" : "不通过");
                    if (!WKF_ExternalInterface.getInstance().WKF_Audit(head.DOC_TYPE, head.SEQ_NO, user.User_Id, user.User_Role, strFlag, strOpNote, out strMsg))
                    {
                        LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, strMsg);
                    }

                    #endregion 审核操作

                    #region 审批通过之后给申请人发送信息

                    string strFinalPosCode = WKF_AuditHandleCLass.getInstance().GetFinalPosCode(head.DOC_TYPE);
                    if (!string.IsNullOrEmpty(strFinalPosCode))
                    {
                        if (strFinalPosCode == user.User_Role)
                        {
                            string strApproveInfo = string.Empty;
                            if (strFlag.ToString().Equals("P"))
                            {
                                strApproveInfo = "审批通过";
                            }
                            else
                            {
                                strApproveInfo = "审批不通过";
                            }

                            string strMsgContent = "勤助岗位申报:" + head.JOB_NAME + strApproveInfo;
                            Dictionary <string, string> dicAccpter = new Dictionary <string, string>();
                            dicAccpter.Add(head.OP_CODE, head.OP_NAME);
                            MessgeHandleClass.getInstance().SendMessge("M", strMsgContent, user.User_Id, user.User_Name, dicAccpter, out strMsg);
                        }
                    }

                    #endregion 审批通过之后给申请人发送信息
                }

                #endregion 批量审批

                return(string.Empty);
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "勤助岗位申报批量审批出错:" + ex.ToString());
                return("批量审批失败!");
            }
        }
Beispiel #13
0
        /// <summary>
        /// 批量审批
        /// </summary>
        /// <returns></returns>
        private string MultiPAudit()
        {
            try
            {
                #region 获得批量审核数据集合

                Dictionary <string, string> param = new Dictionary <string, string>();
                param.Add(string.Format(DataFilterHandleClass.getInstance().Pend_DataFilter(user.User_Role, CValue.DOC_TYPE_BDM03)), string.Empty);
                //ZZ 20171108 修改:加入数据过滤
                DataFilterHandleClass filter = new DataFilterHandleClass();
                filter.InputerInfo("STU_NUMBER", "CLASS_CODE", "XY", user.User_Id, user.User_Role, user.User_Xy);
                switch (user.User_Type)
                {
                case "S":
                    filter.Student_DataFilter(param);
                    break;

                case "T":
                    filter.Teacher_DataFilter(param);
                    break;

                default:
                    filter.DefaultParams(param);
                    break;
                }
                if (!string.IsNullOrEmpty(Get("PROJECT_YEAR")))
                {
                    param.Add("PROJECT_YEAR", Get("PROJECT_YEAR"));
                }
                if (!string.IsNullOrEmpty(Get("PROJECT_CLASS")))
                {
                    param.Add("PROJECT_CLASS", Get("PROJECT_CLASS"));
                }
                if (!string.IsNullOrEmpty(Get("PROJECT_TYPE")))
                {
                    param.Add("PROJECT_TYPE", Get("PROJECT_TYPE"));
                }
                if (!string.IsNullOrEmpty(Get("PROJECT_SEQ_NO")))
                {
                    param.Add("PROJECT_SEQ_NO", Get("PROJECT_SEQ_NO"));
                }
                if (!string.IsNullOrEmpty(Get("XY")))
                {
                    param.Add("XY", Get("XY"));
                }
                if (!string.IsNullOrEmpty(Get("ZY")))
                {
                    param.Add("ZY", Get("ZY"));
                }
                if (!string.IsNullOrEmpty(Get("GRADE")))
                {
                    param.Add("GRADE", Get("GRADE"));
                }
                if (!string.IsNullOrEmpty(Get("CLASS_CODE")))
                {
                    param.Add("CLASS_CODE", Get("CLASS_CODE"));
                }
                if (!string.IsNullOrEmpty(Get("STU_NUMBER")))
                {
                    param.Add(string.Format("STU_NUMBER LIKE '%{0}%' ", HttpUtility.UrlDecode(Get("STU_NUMBER"))), string.Empty);
                }
                if (!string.IsNullOrEmpty(Get("STU_NAME")))
                {
                    param.Add(string.Format("STU_NAME LIKE '%{0}%' ", HttpUtility.UrlDecode(Get("STU_NAME"))), string.Empty);
                }
                if (!string.IsNullOrEmpty(Get("RET_CHANNEL")))
                {
                    param.Add("RET_CHANNEL", Get("RET_CHANNEL"));
                }
                if (!string.IsNullOrEmpty(Get("DECLARE_TYPE")))
                {
                    param.Add("DECLARE_TYPE", Get("DECLARE_TYPE"));
                }
                //ZZ 20171107 :新增
                if (!user.User_Role.Equals(CValue.ROLE_TYPE_X))//不是校级管理员时,都需要经过勾选过滤
                {
                    string strSelectIds = ComHandleClass.getInstance().GetNoRepeatAndNoEmptyStringSql(Get("ids"));
                    if (strSelectIds.Length > 0)
                    {
                        param.Add(string.Format(" OID IN ({0}) ", strSelectIds), string.Empty);
                    }
                }
                List <Shoolar_apply_head> applyList = ProjectApplyHandleClass.getInstance().GetApplyHeadList(param);
                if (applyList == null)
                {
                    return("查询批量审批奖助申请数据出错!");
                }

                #endregion 获得批量审核数据集合

                #region 批量审批

                int    nSuccess = 0;
                string strFlag  = Get("flag");
                foreach (Shoolar_apply_head head in applyList)
                {
                    #region 审核操作

                    if (head == null)
                    {
                        continue;
                    }

                    string strMsg = WKF_ExternalInterface.getInstance().ChkAudit(head.DOC_TYPE, head.SEQ_NO, user.User_Role);
                    if (strMsg.Length > 0)
                    {
                        continue;
                    }
                    Shoolar_project_head project_head = ProjectSettingHandleClass.getInstance().GetProjectHead(head.PROJECT_SEQ_NO);
                    if (project_head == null)
                    {
                        continue;
                    }

                    #region 过了项目申请结束时间,学生、辅导员、学院都不能操作,校级可以审批操作

                    //ZZ 20171221 新增:过了项目申请结束时间,学生、辅导员、学院都不能操作,校级可以审批操作

                    if (!ProjectSettingHandleClass.getInstance().CheckIsFitApplyDate(project_head.APPLY_END, user.User_Role))
                    {
                        continue;
                    }

                    #endregion 过了项目申请结束时间,学生、辅导员、学院都不能操作,校级可以审批操作

                    #region 申请人数限制放在院级审核的时候,并且再次用条件进行校验

                    if (user.User_Role.Equals(CValue.ROLE_TYPE_Y) && strFlag.Equals("P"))
                    {
                        //ZZ 20171114 新增:申请人数限制放在院级审核的时候,并且再次用条件进行校验
                        Basic_stu_info stu_info = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                        if (stu_info == null || project_head == null)
                        {
                            continue;
                        }

                        #region 再次校验申请条件

                        //再次校验申请条件
                        if (!ProjectApplyHandleClass.getInstance().CheckProjectLimit(stu_info, project_head, out strMsg))
                        {
                            //发送消息
                            Dictionary <string, string> dicAccpter = new Dictionary <string, string>();
                            dicAccpter.Add(head.STU_NUMBER, head.STU_NAME);
                            string strMsgContent = string.Format("您好!您的{0}奖助申请不符合该项目申请条件({1}),该奖助申请数据已被退回预录入状态,望您悉知,谢谢!", head.PROJECT_NAME, strMsg);
                            string strMessageMsg = string.Empty;
                            MessgeHandleClass.getInstance().SendMessge(CValue.MSG_TYPE_M, strMsgContent, user.User_Id, user.User_Name, dicAccpter, out strMessageMsg);
                            ////记录日志(屏蔽:不删除之后 不需要记录操作日志,因为已经写入了 审批流程日志中)
                            //LogDBHandleClass.getInstance().LogOperation(head.SEQ_NO, "奖助院级审核", CValue.LOG_ACTION_TYPE_6, CValue.LOG_RECORD_TYPE_1, string.Format("删除:学号{0}姓名{1} 不满足奖助[{2}]申请条件:{3}", head.STU_NUMBER, head.STU_NAME, head.PROJECT_NAME, strMsg), user.User_Id, user.User_Name, user.UserLoginIP);
                            //20171121 ZZ 屏蔽:物理删除数据不合理,修改成 变成预录入
                            //删除数据
                            //ProjectApplyHandleClass.getInstance().DeleteProjectApplyData(head.SEQ_NO);
                            ProjectApplyHandleClass.getInstance().TurnBackApplyToRetchannelA0000(head.SEQ_NO, CValue.STEP_D2, CValue.RET_CHANNEL_D2020, CValue.ROLE_TYPE_Y, user.User_Name, strMsg);
                            continue;
                        }
                        if (!ProjectApplyHandleClass.getInstance().CheckProjectNotBoth(stu_info, project_head, out strMsg))
                        {
                            //发送消息
                            Dictionary <string, string> dicAccpter = new Dictionary <string, string>();
                            dicAccpter.Add(head.STU_NUMBER, head.STU_NAME);
                            string strMsgContent = string.Format("您好!您的{0}奖助申请不符合该项目申请条件({1}),该奖助申请数据已被退回预录入状态,望您悉知,谢谢!", head.PROJECT_NAME, strMsg);
                            string strMessageMsg = string.Empty;
                            MessgeHandleClass.getInstance().SendMessge(CValue.MSG_TYPE_M, strMsgContent, user.User_Id, user.User_Name, dicAccpter, out strMessageMsg);
                            ////记录日志(屏蔽:不删除之后 不需要记录操作日志,因为已经写入了 审批流程日志中)
                            //LogDBHandleClass.getInstance().LogOperation(head.SEQ_NO, "奖助院级审核", CValue.LOG_ACTION_TYPE_6, CValue.LOG_RECORD_TYPE_1, string.Format("删除:学号{0}姓名{1} 不满足奖助[{2}]申请条件:{3}", head.STU_NUMBER, head.STU_NAME, head.PROJECT_NAME, strMsg), user.User_Id, user.User_Name, user.UserLoginIP);
                            //20171121 ZZ 屏蔽:物理删除数据不合理,修改成 变成预录入
                            //删除数据
                            //ProjectApplyHandleClass.getInstance().DeleteProjectApplyData(head.SEQ_NO);
                            ProjectApplyHandleClass.getInstance().TurnBackApplyToRetchannelA0000(head.SEQ_NO, CValue.STEP_D2, CValue.RET_CHANNEL_D2020, CValue.ROLE_TYPE_Y, user.User_Name, strMsg);
                            continue;
                        }

                        #endregion 再次校验申请条件

                        #region 申请人数已满

                        //由于审核流转需要1秒,等待一秒之后再查询更准确。
                        Thread.Sleep(1000);
                        //申请人数已满
                        if (!ProjectApplyHandleClass.getInstance().CheckProjectNum(stu_info, project_head, out strMsg))
                        {
                            LogDBHandleClass.getInstance().LogOperation(head.SEQ_NO, "奖助院级审核", CValue.LOG_ACTION_TYPE_6, CValue.LOG_RECORD_TYPE_1, string.Format("学号{0}姓名{1} 不满足奖助[{2}]申请条件:{3}", head.STU_NUMBER, head.STU_NAME, head.PROJECT_NAME, strMsg), user.User_Id, user.User_Name, user.UserLoginIP);
                            Dictionary <string, string> param_projectnum = new Dictionary <string, string>();
                            param_projectnum.Add("SEQ_NO", project_head.SEQ_NO);
                            param_projectnum.Add("XY", stu_info.COLLEGE);
                            List <Shoolar_project_num> projectNum = ProjectSettingHandleClass.getInstance().GetProjectNum(param_projectnum);
                            return(string.Format("审核失败,原因:已超出{0}学院所获得的该项目名额人数{1}人!", cod.GetDDLTextByValue("ddl_department", projectNum[0].XY), projectNum[0].APPLY_NUM));
                        }

                        #endregion 申请人数已满
                    }

                    #endregion 申请人数限制放在院级审核的时候,并且再次用条件进行校验

                    strMsg = string.Empty;
                    string strOpNote = string.Format("{0}在{1}操作:奖助申请批量审批{2}", user.User_Id, GetDateLongFormater(), strFlag.Equals("P") ? "通过" : "不通过");
                    if (!WKF_ExternalInterface.getInstance().WKF_Audit(head.DOC_TYPE, head.SEQ_NO, user.User_Id, user.User_Role, strFlag, strOpNote, out strMsg))
                    {
                        LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, strMsg);
                    }

                    #endregion 审核操作

                    #region 审批通过之后给申请人发送信息

                    //审批通过之后给申请人发送信息

                    string strFinalPosCode = WKF_AuditHandleCLass.getInstance().GetFinalPosCode(head.DOC_TYPE);
                    if (!string.IsNullOrEmpty(strFinalPosCode))
                    {
                        if (strFinalPosCode == user.User_Role)
                        {
                            string strApproveInfo = string.Empty;
                            if (strFlag.ToString().Equals("P"))
                            {
                                strApproveInfo = "审批通过";
                            }
                            else
                            {
                                strApproveInfo = "审批不通过";
                            }

                            string strMsgContent = "奖助申请:" + head.PROJECT_NAME + strApproveInfo;
                            Dictionary <string, string> dicAccpter = new Dictionary <string, string>();
                            dicAccpter.Add(head.STU_NUMBER, head.STU_NAME);
                            MessgeHandleClass.getInstance().SendMessge("M", strMsgContent, user.User_Id, user.User_Name, dicAccpter, out strMsg);
                        }
                    }

                    #endregion 审批通过之后给申请人发送信息

                    #region 由于是批量审核,没有弹出相应的审核界面,所以需要更新奖助默认审核信息

                    //由于是批量审核,没有弹出相应的审核界面,所以需要更新奖助默认审核信息
                    if (strFlag.Equals("P"))
                    {
                        string strApproveMsg = ProjectApplyHandleClass.getInstance().GetApproveDefaultInfo(head.PROJECT_NAME, head.PROJECT_TYPE, user.User_Role);
                        string strComMsg     = ProjectApplyHandleClass.getInstance().GetApproveDefaultInfo(head.PROJECT_NAME, head.PROJECT_TYPE, user.User_Role);
                        ProjectApplyHandleClass.getInstance().ApproveData_UpTxt(head.SEQ_NO, head.PROJECT_TYPE, user.User_Role, strApproveMsg, strComMsg);
                        nSuccess++;
                    }

                    #endregion 由于是批量审核,没有弹出相应的审核界面,所以需要更新奖助默认审核信息
                }

                #endregion 批量审批

                return(string.Empty);
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助批量审批出错:" + ex.ToString());
                return("批量审批失败!");
            }
        }