Beispiel #1
0
        /// <summary>
        /// 获得页面数据
        /// </summary>
        /// <param name="model"></param>
        private void GetPageValue(Peer_coun_head model)
        {
            string          strCounId = ComHandleClass.getInstance().ByStuNumberGetCounCode(user.User_Id);
            Basic_coun_info coun      = CounHandleClass.getInstance().GetCounInfo_Obj(strCounId);

            if (coun != null)
            {
                model.COUN_ID         = coun.ENO;
                model.COUN_NAME       = coun.NAME;
                model.COUN_DEPARTMENT = coun.DEPARTMENT;
            }

            Basic_stu_info stu = StuHandleClass.getInstance().GetStuInfo_Obj(user.User_Id);

            if (stu != null)
            {
                model.STU_NAME   = stu.NAME;
                model.STU_NUMBER = stu.NUMBER;
                model.XY         = stu.COLLEGE;
                model.ZY         = stu.MAJOR;
                model.GRADE      = stu.EDULENTH;
                model.CLASS_CODE = stu.CLASS;
            }

            Peer_project_head peer = PeerInfoHandleClass.getInstance().GetPeerInfoHead(Post("hidPeerSeqNo"));

            if (peer != null)
            {
                model.PEER_SEQ_NO = peer.SEQ_NO;
                model.PEER_NAME   = peer.PEER_NAME;
                model.PEER_YEAR   = peer.PEER_YEAR;
            }
            model.OP_TIME = GetDateLongFormater();
        }
Beispiel #2
0
        private void GetPrintData(string oid)
        {
            #region 奖助申请信息

            //奖助申请信息
            head.OID = oid;
            ds.RetrieveObject(head);
            if (head == null)
            {
                return;
            }
            strPrintCode     = ComHandleClass.getInstance().GetStuWorNo(head.STU_NUMBER, head.PROJECT_YEAR);
            head.XY          = cod.GetDDLTextByValue("ddl_department", head.XY);
            head.ZY          = cod.GetDDLTextByValue("ddl_zy", head.ZY);
            head.STUDY_LEVEL = cod.GetDDLTextByValue("ddl_apply_study_level", head.STUDY_LEVEL);
            //大文本数据
            if (ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO) != null)
            {
                txt = ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO);
            }

            #endregion 奖助申请信息

            #region 学生基础信息

            //学生基础信息
            if (StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER) != null)
            {
                stu        = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                stu.NATION = cod.GetDDLTextByValue("ddl_mz", stu.NATION);
                stu.SYSTEM = cod.GetDDLTextByValue("ddl_edu_system", stu.SYSTEM);
            }

            #endregion 学生基础信息
        }
Beispiel #3
0
        /// <summary>
        /// 判断是否满足该项目申请条件
        /// </summary>
        /// <returns></returns>
        private string ChkIsCanApply()
        {
            if (string.IsNullOrEmpty(Get("project_seq_no")))
            {
                return("选择申请的项目单据编号为空,不允许操作!");
            }
            //ZZ 20171026 新增:申请条件,多增加一个校验:校验学生基本信息是否完整
            Basic_stu_info stuInfo = StuHandleClass.getInstance().GetStuInfo_Obj(user.User_Id);

            if (stuInfo == null)
            {
                return("学生信息为空,不允许操作!");
            }
            if (stuInfo != null)
            {
                if (stuInfo.POLISTATUS.Length == 0 || stuInfo.ENTERTIME.Length == 0 || stuInfo.REGISTER.Length == 0)
                {
                    return("学生信息不完整,学籍、入学时间、政治面貌不允许为空!需到个人中心进行个人信息维护!");
                }
            }
            //判断该项目的限制条件是否一一通过
            string strMsg = string.Empty;

            if (!ProjectApplyHandleClass.getInstance().CheckIsCanApply(user.User_Id, Get("project_seq_no"), out strMsg))
            {
                return(strMsg);
            }
            return(string.Empty);
        }
Beispiel #4
0
        /// <summary>
        /// 通过学号判断是否是辅导员或者研究生
        /// </summary>
        /// <returns></returns>
        private string ChkUserInfo()
        {
            if (string.IsNullOrEmpty(Get("userno")))
            {
                return("用户学工号不能为空!");
            }
            //判断是否是辅导员
            Basic_coun_info coun_info = CounHandleClass.getInstance().GetCounInfo_Obj(Get("userno"));
            Basic_stu_info  stu_info  = StuHandleClass.getInstance().GetStuInfo_Obj(Get("userno"));

            if (coun_info == null)
            {
                if (stu_info == null)
                {
                    return("录入的学工号不存在,请确认!");
                }

                if (stu_info.STUTYPE.Equals("B"))
                {
                    return("录入的学工号不符合班级辅导员设置要求!");
                }
            }

            return(string.Empty);
        }
Beispiel #5
0
        /// <summary>
        /// 插入生活补贴类
        /// </summary>
        /// <param name="project"></param>
        /// <param name="strStuType"></param>
        private void InsertIntoLifeApplyData(Shoolar_project_head project, string strStuType)
        {
            if (strStuType.Contains("Y"))
            {
                strStuType += ",P";
            }
            Dictionary <string, string> param = new Dictionary <string, string>();

            param.Add(string.Format(" STUTYPE IN ({0}) ", ComHandleClass.getInstance().GetNoRepeatAndNoEmptyStringSql(strStuType)), string.Empty);
            List <Basic_stu_info> stuList = StuHandleClass.getInstance().GetStuInfoArray(param);

            if (stuList == null)
            {
                return;
            }

            foreach (Basic_stu_info stu in stuList)
            {
                if (stu == null)
                {
                    continue;
                }

                //删除重复数据,再插入
                string strDelHead = string.Format("DELETE FROM SHOOLAR_APPLY_HEAD WHERE PROJECT_SEQ_NO = '{0}' AND STU_NUMBER = '{1}' ", project.SEQ_NO, stu.NUMBER);
                ds.ExecuteTxtNonQuery(strDelHead);
                Shoolar_apply_head head = InsertIntoApplyHead(project, stu);
                //删除重复数据,再插入
                string strDelChk = string.Format("DELETE FROM SHOOLAR_APPLY_CHECK WHERE SEQ_NO = '{0}' ", head.SEQ_NO);
                ds.ExecuteTxtNonQuery(strDelChk);
                ProjectCheckHandleClass.getInstance().InsertIntoCheckInfo(head.SEQ_NO, head.STU_IDCARDNO, head.STU_BANKCODE);
            }
        }
Beispiel #6
0
        /// <summary>
        /// 自动生成数据
        /// </summary>
        /// <returns></returns>
        private string AutoData()
        {
            try
            {
                string insur_seq_no = Post("insur_seq_no");
                if (string.IsNullOrWhiteSpace(insur_seq_no))
                {
                    return("自动生成保险申请数据失败:参数不能为空!");
                }
                Dictionary <string, string> param_pro_head = new Dictionary <string, string>();
                param_pro_head.Add("SEQ_NO", insur_seq_no);
                Insur_project_head project = InsurHandleClass.getInstance().GetInsurProjectHeadInfo(param_pro_head);
                if (project == null)
                {
                    return("自动生成保险申请数据失败:项目信息为空!");
                }
                //当为“医保”的时候,判断是否设置了 保险期限、金额
                if (project.INSUR_TYPE.Equals("A"))
                {
                    if (project.INSUR_LIMITDATE.Length == 0 || project.INSUR_MONEY.ToString().Length == 0)
                    {
                        return("自动生成保险申请数据失败:项目信息中承保期限、金额设置不能为空!");
                    }
                }
                Dictionary <string, string> param   = new Dictionary <string, string>();
                List <Basic_stu_info>       stuList = StuHandleClass.getInstance().GetStuInfoArray(param);
                if (stuList == null)
                {
                    return("自动生成保险申请数据失败!");
                }
                foreach (Basic_stu_info stu in stuList)
                {
                    if (stu == null)
                    {
                        continue;
                    }

                    //删除相同学号的数据
                    string    strSelectSql = string.Format("SELECT SEQ_NO FROM INSUR_PROJECT_APPLY WHERE INSUR_SEQ_NO = '{0}' AND STU_NUMBER = '{1}' ", insur_seq_no, stu.NUMBER);
                    DataTable dt           = ds.ExecuteTxtDataTable(strSelectSql);
                    if (dt != null && dt.Rows.Count != 0)
                    {
                        string strDeleteSql_Head  = string.Format("DELETE FROM INSUR_PROJECT_APPLY WHERE SEQ_NO = '{0}' ", dt.Rows[0]["SEQ_NO"].ToString());
                        string strDeleteSql_Check = string.Format("DELETE FROM INSUR_APPLY_CHECK WHERE SEQ_NO = '{0}' ", dt.Rows[0]["SEQ_NO"].ToString());
                        ds.ExecuteTxtNonQuery(strDeleteSql_Head);
                        ds.ExecuteTxtNonQuery(strDeleteSql_Check);
                    }
                    //插入申请数据
                    Insur_project_apply head = InsertIntoApplyHead(project, stu);
                    //插入预先核对信息
                    InsertIntoCheckInfo(head.SEQ_NO, head.INSUR_LIMITDATE, head.INSUR_MONEY);
                }
                return(string.Empty);
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "自动生成保险申请数据,出错:" + ex.ToString());
                return("自动生成保险申请数据失败!");
            }
        }
Beispiel #7
0
 /// <summary>
 /// 通过学号获得学生信息
 /// </summary>
 /// <returns></returns>
 private string GetStuInfo()
 {
     if (string.IsNullOrEmpty(Get("stu_num")))
     {
         return("{}");
     }
     return(StuHandleClass.getInstance().GetStuInfoJson(Get("stu_num")));
 }
Beispiel #8
0
        /// <summary>
        /// 通过学工号获得辅导员基础信息
        /// </summary>
        /// <returns></returns>
        private string GetUserInfo()
        {
            if (string.IsNullOrEmpty(Get("userno")))
            {
                return("用户学工号不能为空!");
            }
            Basic_coun_info coun_info = CounHandleClass.getInstance().GetCounInfo_Obj(Get("userno"));
            Basic_stu_info  stu_info  = StuHandleClass.getInstance().GetStuInfo_Obj(Get("userno"));

            #region 构建表结构

            DataTable dtJson = new DataTable();
            dtJson.TableName = "FDY_INFO";
            //创建 “用户编号” 列
            DataColumn UserIdColumn = new DataColumn();
            UserIdColumn.DataType   = System.Type.GetType("System.String");
            UserIdColumn.ColumnName = "USERID";
            dtJson.Columns.Add(UserIdColumn);
            //创建 “用户姓名” 列
            DataColumn UserNameColumn = new DataColumn();
            UserNameColumn.DataType   = System.Type.GetType("System.String");
            UserNameColumn.ColumnName = "USERNAME";
            dtJson.Columns.Add(UserNameColumn);
            //创建 “用户类型” 列
            DataColumn UserTypeColumn = new DataColumn();
            UserTypeColumn.DataType   = System.Type.GetType("System.String");
            UserTypeColumn.ColumnName = "USERTYPE";
            dtJson.Columns.Add(UserTypeColumn);

            #endregion 构建表结构

            #region 给表赋值

            DataRow row = dtJson.NewRow();
            if (coun_info != null)
            {
                row["USERID"]   = coun_info.ENO;
                row["USERNAME"] = coun_info.NAME;
                row["USERTYPE"] = "F";
            }
            else if (stu_info != null)
            {
                row["USERID"]   = stu_info.NUMBER;
                row["USERNAME"] = stu_info.NAME;
                row["USERTYPE"] = "Y";
            }
            else
            {
                row["USERID"]   = "";
                row["USERNAME"] = "";
                row["USERTYPE"] = "";
            }
            dtJson.Rows.Add(row);

            #endregion 给表赋值

            return(Json.DatatableToJson(dtJson));
        }
Beispiel #9
0
        /// <summary>
        /// 通过学号获得学生基础信息
        /// </summary>
        /// <returns></returns>
        private string GetStuInfo()
        {
            DataTable dt = StuHandleClass.getInstance().GetStuInfo_Dt(Get("stuno"));

            if (dt == null)
            {
                return(string.Empty);
            }

            return(Json.DatatableToJson(dt));
        }
Beispiel #10
0
        /// <summary>
        /// 往奖助申报表中插入数据
        /// </summary>
        /// <param name="project"></param>
        private Shoolar_apply_head InsertIntoApplyHead(Shoolar_project_head project, Basic_stu_info stu)
        {
            Shoolar_apply_head head = new Shoolar_apply_head();

            head.OID          = Guid.NewGuid().ToString();
            head.SEQ_NO       = BusDataDeclareTransaction.getInstance().GetSeq_no(CValue.DOC_TYPE_BDM03);
            head.RET_CHANNEL  = CValue.RET_CHANNEL_D4000;
            head.CHK_STATUS   = CValue.CHK_STATUS_N;
            head.DOC_TYPE     = CValue.DOC_TYPE_BDM03;
            head.CHK_TIME     = GetDateLongFormater();
            head.DECL_TIME    = GetDateLongFormater();
            head.DECLARE_TYPE = CValue.DECLARE_TYPE_D;

            #region 项目信息

            head.PROJECT_SEQ_NO = project.SEQ_NO;
            head.PROJECT_CLASS  = project.PROJECT_CLASS;
            head.PROJECT_TYPE   = project.PROJECT_TYPE;
            head.PROJECT_YEAR   = project.APPLY_YEAR;
            head.PROJECT_NAME   = project.PROJECT_NAME;
            head.PROJECT_MONEY  = project.PROJECT_MONEY;

            #endregion 项目信息

            #region 保存学生信息

            //学生信息
            head.STU_NUMBER = stu.NUMBER;
            head.STU_NAME   = stu.NAME;
            //学生信息
            if (stu.STUTYPE.Equals(CValue.USER_STUTYPE_B))
            {
                head.STU_TYPE = CValue.USER_STUTYPE_B;
            }
            else
            {
                head.STU_TYPE = CValue.USER_STUTYPE_Y;
            }
            head.XY           = stu.COLLEGE;
            head.ZY           = stu.MAJOR;
            head.GRADE        = stu.EDULENTH;
            head.CLASS_CODE   = stu.CLASS;
            head.STU_IDCARDNO = stu.IDCARDNO;
            head.STU_BANKCODE = StuHandleClass.getInstance().ByStuNoGetBankCode(head.STU_NUMBER);

            #endregion 保存学生信息

            ds.UpdateObject(head);
            return(head);
        }
Beispiel #11
0
        /// <summary>
        /// 不符合奖助申请的原因
        /// </summary>
        /// <param name="strSTU_NUMBER"></param>
        /// <param name="strPROJECT_SEQ_NO"></param>
        /// <returns></returns>
        private string GetNotFitLimitRemark(string strSTU_NUMBER, string strPROJECT_SEQ_NO)
        {
            Basic_stu_info       stu_info     = StuHandleClass.getInstance().GetStuInfo_Obj(strSTU_NUMBER);
            Shoolar_project_head project_head = ProjectSettingHandleClass.getInstance().GetProjectHead(strPROJECT_SEQ_NO);

            if (stu_info == null || project_head == null)
            {
                return("学生信息为空或者奖助项目信息读取失败!");
            }
            string strMsg = string.Empty;

            #region 再次校验申请条件

            //再次校验申请条件
            if (!ProjectApplyHandleClass.getInstance().CheckProjectLimit(stu_info, project_head, out strMsg))
            {
                return(strMsg);
            }
            if (!ProjectApplyHandleClass.getInstance().CheckProjectNotBoth(stu_info, project_head, out strMsg))
            {
                return(strMsg);
            }

            #endregion 再次校验申请条件

            #region 申请人数是否满足

            Dictionary <string, string> param_num = new Dictionary <string, string>();
            param_num.Add("SEQ_NO", project_head.SEQ_NO);
            param_num.Add("XY", stu_info.COLLEGE);
            List <Shoolar_project_num> projectNum = ProjectSettingHandleClass.getInstance().GetProjectNum(param_num);
            if (projectNum == null)
            {
                return(string.Format("项目限制申报人数信息读取失败!"));
            }
            if (projectNum.Count == 0)
            {
                return(string.Empty);
            }

            int nApplyTotalNum = ProjectApplyHandleClass.getInstance().CheckProjectNum_PassedNum(stu_info, project_head);
            if (projectNum[0].APPLY_NUM <= nApplyTotalNum)
            {
                return(strMsg = string.Format("[{0}] 奖助项目 {1} 学院设置的申请人数为 {2} 人,现在学院审核通过人数为 {3} 人,超出了{4} 人。", project_head.PROJECT_NAME, cod.GetDDLTextByValue("ddl_department", stu_info.COLLEGE), projectNum[0].APPLY_NUM, nApplyTotalNum, (nApplyTotalNum - projectNum[0].APPLY_NUM)));
            }

            #endregion 申请人数是否满足

            return(string.Empty);
        }
Beispiel #12
0
        /// <summary>
        /// 通过学号判断是否是辅导员所带班级的学生
        /// </summary>
        /// <returns></returns>
        private string ChkStuInfo()
        {
            Basic_stu_info info = StuHandleClass.getInstance().GetStuInfo_Obj(Get("stuno"));

            if (info == null)
            {
                return(string.Empty);
            }

            ComHandleClass chc       = new ComHandleClass();
            string         strFClass = chc.ByFGetClassCode(user.User_Id);

            if (!strFClass.Contains(info.CLASS))
            {
                return("录入的学号不是所带班级的学生,请确认!");
            }
            return(string.Empty);
        }
Beispiel #13
0
        /// <summary>
        /// 判断是否满足评议条件:是学生并且有辅导员
        /// </summary>
        /// <returns></returns>
        private string ChkIsCanPeer()
        {
            Basic_stu_info stu = StuHandleClass.getInstance().GetStuInfo_Obj(user.User_Id);

            if (stu == null)
            {
                return("该用户不是学生,无法进行辅导员评议!");
            }

            string strCounId = ComHandleClass.getInstance().ByStuNumberGetCounCode(user.User_Id);

            if (strCounId.Length == 0)
            {
                return("该学生所属的班级没有设置辅导员,无法进行辅导员评议!");
            }

            return(string.Empty);
        }
Beispiel #14
0
        protected void GetData()
        {
            string id        = Get("id");
            string strNumber = Get("number");

            if (id.Length == 0)
            {
                object oid = ds.ExecuteTxtScalar(string.Format("SELECT OID FROM BASIC_STU_INFO_MODI WHERE NUMBER = '{0}' ", strNumber));
                if (oid != null && oid.ToString().Length > 0)
                {
                    id = oid.ToString().ToString();
                }
                else
                {
                    return;
                }
            }

            bhead        = false;
            hidoid.Value = id;
            modi.OID     = id;
            ds.RetrieveObject(modi);
            ConvertAddress(modi.NATIVEPLACE, modi.REGISTPLACE, modi.STUPLACE, modi.ADDRESS);
            strIDNO     = modi.IDCARDNO;
            strBankName = modi.BANKNAME;
            strBankCode = modi.BANKCODE;
            strCollege  = bhead ? head.COLLEGE : modi.COLLEGE;
            strMajor    = bhead ? head.MAJOR : modi.MAJOR;
            strClass    = bhead ? head.CLASS : modi.CLASS;

            head = StuHandleClass.getInstance().GetStuInfo_Obj(strNumber);
            if (head == null)
            {
                head = new Basic_stu_info();
            }

            bank = StuHandleClass.getInstance().GetBankInfo_Obj(strNumber);
            if (bank == null)
            {
                bank = new Basic_stu_bank_info();
            }
        }
Beispiel #15
0
        /// <summary>
        /// 是否符合奖助申请条件
        /// Y符合;N不符合
        /// </summary>
        /// <param name="strSTU_NUMBER"></param>
        /// <param name="strPROJECT_SEQ_NO"></param>
        /// <returns></returns>
        private string GetIsFitLimit(string strSTU_NUMBER, string strPROJECT_SEQ_NO)
        {
            Basic_stu_info       stu_info     = StuHandleClass.getInstance().GetStuInfo_Obj(strSTU_NUMBER);
            Shoolar_project_head project_head = ProjectSettingHandleClass.getInstance().GetProjectHead(strPROJECT_SEQ_NO);

            if (stu_info == null || project_head == null)
            {
                return(CValue.FLAG_N);
            }

            string strMsg = string.Empty;

            #region 再次校验申请条件

            //再次校验申请条件
            if (!ProjectApplyHandleClass.getInstance().CheckProjectLimit(stu_info, project_head, out strMsg))
            {
                return(CValue.FLAG_N);
            }
            if (!ProjectApplyHandleClass.getInstance().CheckProjectNotBoth(stu_info, project_head, out strMsg))
            {
                return(CValue.FLAG_N);
            }

            #endregion 再次校验申请条件

            #region 申请人数已满

            //申请人数已满
            if (!ProjectApplyHandleClass.getInstance().CheckProjectNum(stu_info, project_head, out strMsg))
            {
                return(CValue.FLAG_N);
            }

            #endregion 申请人数已满

            return(CValue.FLAG_Y);
        }
Beispiel #16
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <returns></returns>
        private string SaveData()
        {
            bool bFlag = false;
            //新增
            Insur_apply_check head = new Insur_apply_check();

            if (string.IsNullOrEmpty(Post("CHECK_OID")))
            {
                head.OID = Guid.NewGuid().ToString();
                ds.RetrieveObject(head);
                head.SEQ_NO = Post("hidApplySeqNo");
                GetFormValue(head);
                //是否申请弃保 字段,如果没有值 就赋值 ,默认值 为否
                if (string.IsNullOrWhiteSpace(Post("IS_REFUND")))
                {
                    head.IS_REFUND = CValue.FLAG_N;
                }

                var inserttrcn = ImplementFactory.GetInsertTransaction <Insur_apply_check>("Insur_apply_checkInsertTransaction", user.User_Name);
                inserttrcn.EntityList.Add(head);
                if (inserttrcn.Commit())
                {
                    bFlag = true;
                }
            }
            else //修改
            {
                head.OID = Post("CHECK_OID");
                ds.RetrieveObject(head);
                GetFormValue(head);
                //是否申请弃保 字段,如果没有值 就赋值 ,默认值 为否
                if (string.IsNullOrWhiteSpace(Post("IS_REFUND")))
                {
                    head.IS_REFUND = CValue.FLAG_N;
                }

                var updatetrcn = ImplementFactory.GetUpdateTransaction <Insur_apply_check>("Insur_apply_checkUpdateTransaction", user.User_Name);
                if (updatetrcn.Commit(head))
                {
                    bFlag = true;
                }
            }
            if (bFlag)
            {
                #region 保存成功之后,修改的 手机号、身份证号、银行卡号 同步更新至学生个人信息中

                //ZZ 20171213 修改:保存成功之后,修改的 手机号、身份证号、银行卡号 同步更新至学生个人信息中
                Dictionary <string, string> param = new Dictionary <string, string>();
                param.Add("SEQ_NO", head.SEQ_NO);
                Insur_project_apply apply = InsurHandleClass.getInstance().GetInsurProjectApplyInfo(param);
                if (apply != null)
                {
                    //手机号
                    if (!string.IsNullOrWhiteSpace(Post("STU_PHONE")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_Phone(apply.STU_NUMBER, Post("STU_PHONE"));
                    }
                    //身份证号
                    if (!string.IsNullOrWhiteSpace(Post("STU_IDNO")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_IDNo(apply.STU_NUMBER, Post("STU_IDNO"));
                    }
                    //银行卡号
                    if (!string.IsNullOrWhiteSpace(Post("STU_BANDKCODE")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_BankCode(apply.STU_NUMBER, Post("STU_BANDKCODE"));
                    }
                }

                #endregion 保存成功之后,修改的 手机号、身份证号、银行卡号 同步更新至学生个人信息中

                StringBuilder json = new StringBuilder();//用来存放Json的
                json.Append("{");
                json.Append(Json.StringToJson(head.OID, "OID"));
                json.Append(",");
                json.Append(Json.StringToJson(head.SEQ_NO, "SEQ_NO"));
                json.Append("}");
                return(json.ToString());
            }
            else
            {
                return(string.Empty);
            }
        }
Beispiel #17
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <returns></returns>
        private string SaveData()
        {
            bool bFlag = false;
            //新增
            Loan_apply_check head = new Loan_apply_check();

            if (string.IsNullOrEmpty(Post("CHECK_OID")))
            {
                head.OID = Guid.NewGuid().ToString();
                ds.RetrieveObject(head);
                head.SEQ_NO = Post("hidApplySeqNo");
                GetFormValue(head);
                var inserttrcn = ImplementFactory.GetInsertTransaction <Loan_apply_check>("Loan_apply_checkInsertTransaction", user.User_Name);
                inserttrcn.EntityList.Add(head);
                if (inserttrcn.Commit())
                {
                    bFlag = true;
                }
            }
            else //修改
            {
                head.OID = Post("CHECK_OID");
                ds.RetrieveObject(head);
                GetFormValue(head);
                var updatetrcn = ImplementFactory.GetUpdateTransaction <Loan_apply_check>("Loan_apply_checkUpdateTransaction", user.User_Name);
                if (updatetrcn.Commit(head))
                {
                    bFlag = true;
                }
            }
            if (bFlag)
            {
                #region 保存成功之后,修改的 手机号、银行卡号 同步更新至学生个人信息中

                //ZZ 20171213 修改:保存成功之后,修改的 手机号、身份证号 同步更新至学生个人信息中
                Dictionary <string, string> param = new Dictionary <string, string>();
                param.Add("SEQ_NO", head.SEQ_NO);
                Loan_project_apply apply = LoanHandleClass.getInstance().GetLoanProjectApplyInfo(param);
                if (apply != null)
                {
                    //手机号
                    if (!string.IsNullOrWhiteSpace(Post("STU_PHONE")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_Phone(apply.STU_NUMBER, Post("STU_PHONE"));
                    }
                    //身份证号
                    if (!string.IsNullOrWhiteSpace(Post("STU_IDNO")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_IDNo(apply.STU_NUMBER, Post("STU_IDNO"));
                    }
                }

                #endregion 保存成功之后,修改的 手机号、银行卡号 同步更新至学生个人信息中

                return(string.Empty);
            }
            else
            {
                return("保存核对信息失败!");
            }
        }
Beispiel #18
0
        /// <summary>
        /// 数据加载
        /// </summary>
        /// <param name="oid"></param>
        private void GetPrintData(string oid)
        {
            #region 奖助申请信息

            //奖助申请信息
            head.OID = oid;
            ds.RetrieveObject(head);
            if (head == null)
            {
                return;
            }

            strPrintCode      = ComHandleClass.getInstance().GetStuWorNo(head.STU_NUMBER, head.PROJECT_YEAR);
            head.PROJECT_YEAR = cod.GetDDLTextByValue("ddl_year_type", head.PROJECT_YEAR);
            head.XY           = cod.GetDDLTextByValue("ddl_department", head.XY);
            head.ZY           = cod.GetDDLTextByValue("ddl_zy", head.ZY);
            head.REWARD_FLAG  = cod.GetDDLTextByValue("ddl_apply_reward_flag_2", head.REWARD_FLAG);

            //大文本数据
            if (ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO) != null)
            {
                txt = ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO);
            }

            #endregion 奖助申请信息

            #region 学生基础信息

            //学生基础信息
            if (StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER) != null)
            {
                stu            = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                stu.SEX        = cod.GetDDLTextByValue("ddl_xb", stu.SEX);
                stu.POLISTATUS = cod.GetDDLTextByValue("ddl_zzmm", stu.POLISTATUS);
                stu.NATION     = cod.GetDDLTextByValue("ddl_mz", stu.NATION);
                stu.SYSTEM     = cod.GetDDLTextByValue("ddl_edu_system", stu.SYSTEM);
            }

            #endregion 学生基础信息

            #region 公共参数

            Dictionary <string, string> param = new Dictionary <string, string>();
            param.Add("SEQ_NO", head.SEQ_NO);

            #endregion 公共参数

            #region 成绩信息

            //成绩信息
            if (ProjectApplyHandleClass.getInstance().GetStudyInfo(param) != null)
            {
                study = ProjectApplyHandleClass.getInstance().GetStudyInfo(param);
                study.IS_SCORE_FLAG = cod.GetDDLTextByValue("ddl_yes_no", study.IS_SCORE_FLAG);
            }

            #endregion 成绩信息

            #region 获奖列表

            //获奖列表
            List <Shoolar_apply_reward> rewardList = ProjectApplyHandleClass.getInstance().GetRewardListInfo(param);
            if (rewardList != null)
            {
                if (rewardList.Count == 0)
                {
                    divReward.InnerHtml = "无";
                }
                else
                {
                    StringBuilder strR = new StringBuilder();
                    foreach (Shoolar_apply_reward item in rewardList)
                    {
                        if (item == null)
                        {
                            continue;
                        }
                        strR.AppendFormat("{0}      {1}         {2}<br/>", cod.GetDDLTextByValue("ddl_year_type", item.REWARD_DATE), item.REWARD_NAME, item.AWARD_DEPARTMENT);
                    }
                    divReward.InnerHtml = strR.ToString();
                }
            }

            #endregion 获奖列表
        }
Beispiel #19
0
        private void GetPrintData(string oid)
        {
            #region 奖助申请信息

            //奖助申请信息
            head.OID = oid;
            ds.RetrieveObject(head);
            if (head == null)
            {
                return;
            }
            strPrintCode = ComHandleClass.getInstance().GetStuWorNo(head.STU_NUMBER, head.PROJECT_YEAR);
            //标题
            if (head.PROJECT_TYPE.Equals("COUNTRY_B"))//国家奖学金(本科)
            {
                strTitle = string.Format("国家奖学金申请者个人先进事迹");
            }
            else if (head.PROJECT_TYPE.Equals("SCHOOL_MODEL"))//三好学生标兵
            {
                strTitle = string.Format("校级三好学生标兵申请者个人先进事迹");
            }

            head.XY = cod.GetDDLTextByValue("ddl_department", head.XY);
            head.ZY = cod.GetDDLTextByValue("ddl_zy", head.ZY);
            //大文本数据
            if (ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO) != null)
            {
                txt = ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO);
            }

            #endregion 奖助申请信息

            #region 学生基础信息

            //学生基础信息
            if (StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER) != null)
            {
                stu        = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                stu.NATION = cod.GetDDLTextByValue("ddl_mz", stu.NATION);
            }

            #endregion 学生基础信息

            #region 获奖情况(区分获奖列表与奖助列表)

            #region 获奖列表

            //获奖列表
            Dictionary <string, string> param_o = new Dictionary <string, string>();
            param_o.Add("SEQ_NO", head.SEQ_NO);
            param_o.Add(string.Format("REWARD_TYPE != 'P' "), "");//其他
            List <Shoolar_apply_reward> rewardList = ProjectApplyHandleClass.getInstance().GetRewardListInfo(param_o);
            if (rewardList != null)
            {
                if (rewardList.Count == 0)
                {
                    divReward.InnerHtml = "无";
                }
                else
                {
                    StringBuilder strR_O = new StringBuilder();
                    foreach (Shoolar_apply_reward item in rewardList)
                    {
                        if (item == null)
                        {
                            continue;
                        }
                        strR_O.AppendFormat("{0}      {1}         {2}<br/>", cod.GetDDLTextByValue("ddl_year_type", item.REWARD_DATE), item.REWARD_NAME, item.AWARD_DEPARTMENT);
                    }
                    divReward.InnerHtml = strR_O.ToString();
                }
            }

            #endregion 获奖列表

            #region 奖助列表

            //奖助列表
            Dictionary <string, string> param_p = new Dictionary <string, string>();
            param_p.Add("SEQ_NO", head.SEQ_NO);
            param_p.Add("REWARD_TYPE", "P");//奖助
            List <Shoolar_apply_reward> proList = ProjectApplyHandleClass.getInstance().GetRewardListInfo(param_p);
            if (proList != null)
            {
                if (proList.Count == 0)
                {
                    divPassPro.InnerHtml = "无";
                }
                else
                {
                    StringBuilder strR_P = new StringBuilder();
                    foreach (Shoolar_apply_reward item in rewardList)
                    {
                        if (item == null)
                        {
                            continue;
                        }
                        strR_P.AppendFormat("{0}      {1}         {2}<br/>", cod.GetDDLTextByValue("ddl_year_type", item.REWARD_DATE), item.REWARD_NAME, item.AWARD_DEPARTMENT);
                    }
                    divPassPro.InnerHtml = strR_P.ToString();
                }
            }

            #endregion 奖助列表

            #endregion 获奖情况(区分获奖列表与奖助列表)
        }
Beispiel #20
0
        /// <summary>
        ///保存数据
        /// </summary>
        /// <returns></returns>
        private string SaveData()
        {
            try
            {
                bool result             = false;
                Shoolar_apply_head head = new Shoolar_apply_head();
                if (string.IsNullOrEmpty(Post("hidOid")))//新增
                {
                    head.OID         = Guid.NewGuid().ToString();
                    head.SEQ_NO      = BusDataDeclareTransaction.getInstance().GetSeq_no(CValue.DOC_TYPE_BDM03);
                    head.RET_CHANNEL = Ret_Channel_A0000; //预录入 全程通道(回执状态)
                    head.DOC_TYPE    = CValue.DOC_TYPE_BDM03;
                    GetPageValue(head);

                    #region 保存项目信息

                    //项目信息
                    Dictionary <string, string> param = new Dictionary <string, string>();
                    if (!string.IsNullOrEmpty(Post("hidProjectSeqNo")))
                    {
                        param.Add("SEQ_NO", Post("hidProjectSeqNo"));
                    }
                    Shoolar_project_head project = ProjectSettingHandleClass.getInstance().GetProjectList(param)[0];
                    if (project == null)
                    {
                        LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, string.Format("通过项目单据编号{0},读取项目信息出错!", Post("hidProjectSeqNo")));
                        return(string.Empty);
                    }

                    head.PROJECT_SEQ_NO = project.SEQ_NO;
                    head.PROJECT_CLASS  = project.PROJECT_CLASS;
                    head.PROJECT_TYPE   = project.PROJECT_TYPE;
                    head.PROJECT_YEAR   = project.APPLY_YEAR;
                    head.PROJECT_NAME   = project.PROJECT_NAME;
                    head.PROJECT_MONEY  = project.PROJECT_MONEY;

                    #endregion 保存项目信息

                    #region 保存学生信息

                    //学生信息
                    head.STU_NUMBER = user.User_Id;
                    head.STU_NAME   = user.User_Name;
                    Basic_stu_info stuInfo = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                    if (stuInfo == null)
                    {
                        LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, string.Format("通过学号{0},读取学生信息出错!", head.STU_NUMBER));
                        return(string.Empty);
                    }
                    //学生信息
                    if (stuInfo.STUTYPE.Equals(CValue.USER_STUTYPE_B))
                    {
                        head.STU_TYPE = CValue.USER_STUTYPE_B;
                    }
                    else
                    {
                        head.STU_TYPE = CValue.USER_STUTYPE_Y;
                    }
                    head.XY           = stuInfo.COLLEGE;
                    head.ZY           = stuInfo.MAJOR;
                    head.GRADE        = stuInfo.EDULENTH;
                    head.CLASS_CODE   = stuInfo.CLASS;
                    head.STU_IDCARDNO = stuInfo.IDCARDNO;
                    head.STU_BANKCODE = StuHandleClass.getInstance().ByStuNoGetBankCode(head.STU_NUMBER);

                    #endregion 保存学生信息

                    var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_head>("Shoolar_apply_headInsertTransaction");
                    inserttrcn.EntityList.Add(head);
                    result = inserttrcn.Commit();
                    if (result)
                    {
                        #region  步其他信息数据

                        //ZZ 20171125 新增:同步学生其他信息,因为在保存之前这些数据是还没有录入的 可以直接同步

                        #region 家庭情况

                        string strSynchroMsg = string.Empty;
                        ProjectApplyHandleClass.getInstance().InsertInto_apply_family(head.SEQ_NO, out strSynchroMsg);
                        if (strSynchroMsg.Length > 0)
                        {
                            LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请保存时,同步家庭情况出错:" + strSynchroMsg);
                        }

                        #endregion 家庭情况

                        #region 学习情况

                        ProjectApplyHandleClass.getInstance().InsertInto_apply_score(head.SEQ_NO, out strSynchroMsg);
                        if (strSynchroMsg.Length > 0)
                        {
                            LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请保存时,同步学习情况出错:" + strSynchroMsg);
                        }

                        #endregion 学习情况

                        #region 获奖情况

                        ProjectApplyHandleClass.getInstance().InsertInto_apply_reward(head.SEQ_NO, out strSynchroMsg);
                        if (strSynchroMsg.Length > 0)
                        {
                            LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请保存时,同步获奖情况出错:" + strSynchroMsg);
                        }

                        #endregion 获奖情况

                        #endregion  步其他信息数据
                    }
                }
                else//修改
                {
                    head.OID = Post("hidOid");
                    ds.RetrieveObject(head);
                    GetPageValue(head);
                    var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_apply_head>("Shoolar_apply_headUpdateTransaction", user.User_Name);
                    result = updatetrcn.Commit(head);
                }

                if (result)
                {
                    StringBuilder json = new StringBuilder();//用来存放Json的
                    json.Append("{");
                    json.Append(Json.StringToJson(head.OID, "OID"));
                    json.Append(",");
                    json.Append(Json.StringToJson(head.SEQ_NO, "SEQ_NO"));
                    json.Append(",");
                    json.Append(Json.StringToJson(head.PROJECT_SEQ_NO, "PROJECT_SEQ_NO"));
                    json.Append("}");
                    return(json.ToString());
                }//保存成功 返回JSON
                else
                {
                    return(string.Empty);
                }
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "保存奖助申请,出错:" + ex.ToString());
                return(string.Empty);
            }
        }
Beispiel #21
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <returns></returns>
        private string SaveData()
        {
            bool bFlag = false;
            //新增
            Shoolar_apply_check head = new Shoolar_apply_check();

            if (string.IsNullOrEmpty(Post("CHECK_OID")))
            {
                head.OID = Guid.NewGuid().ToString();
                ds.RetrieveObject(head);
                head.SEQ_NO = Post("hidApplySeqNo");
                GetFormValue(head);
                var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_check>("Shoolar_apply_checkInsertTransaction", user.User_Name);
                inserttrcn.EntityList.Add(head);
                if (inserttrcn.Commit())
                {
                    bFlag = true;
                }
            }
            else //修改
            {
                head.OID = Post("CHECK_OID");
                ds.RetrieveObject(head);
                GetFormValue(head);
                var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_apply_check>("Shoolar_apply_checkUpdateTransaction", user.User_Name);
                if (updatetrcn.Commit(head))
                {
                    bFlag = true;
                }
            }
            if (bFlag)
            {
                #region 保存成功之后,修改的 学生信息 同步更新至学生个人信息中

                //ZZ 20171213 修改:保存成功之后,修改的 手机号 同步更新至学生个人信息中
                Dictionary <string, string> param = new Dictionary <string, string>();
                param.Add("SEQ_NO", head.SEQ_NO);
                Shoolar_apply_head apply = ProjectApplyHandleClass.getInstance().GetApplyHeadInfo(param);
                if (apply != null)
                {
                    //手机号
                    if (!string.IsNullOrWhiteSpace(Post("STU_PHONE")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_Phone(apply.STU_NUMBER, Post("STU_PHONE"));
                    }
                    //ZZ 20180319 修改:保存成功之后,修改的 学籍状态以及异动时间 同步更新至学生个人信息中
                    if (!string.IsNullOrWhiteSpace(Post("STU_REGISTER")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_Register(apply.STU_NUMBER, Post("STU_REGISTER"));
                    }
                    if (!string.IsNullOrWhiteSpace(Post("STU_DIFFDATE")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_DiffDate(apply.STU_NUMBER, Post("STU_DIFFDATE"));
                    }
                    if (!string.IsNullOrWhiteSpace(Post("STU_RICE_CARD")))
                    {
                        StuHandleClass.getInstance().ByStuNumberUpStuInfo_RiceCard(apply.STU_NUMBER, Post("STU_RICE_CARD"));
                    }
                }

                #endregion 保存成功之后,修改的 学生信息 同步更新至学生个人信息中

                return(string.Empty);
            }
            else
            {
                return("保存核对信息失败!");
            }
        }
Beispiel #22
0
        private void GetPrintData(string oid)
        {
            #region 奖助申请信息

            //奖助申请信息
            head.OID = oid;
            ds.RetrieveObject(head);
            if (head == null)
            {
                return;
            }
            strPrintCode      = ComHandleClass.getInstance().GetStuWorNo(head.STU_NUMBER, head.PROJECT_YEAR);
            head.PROJECT_YEAR = cod.GetDDLTextByValue("ddl_year_type", head.PROJECT_YEAR);
            //标题
            if (head.PROJECT_TYPE.Equals("SCHOOL_GOODD"))//三好学生
            {
                strTitle = string.Format(" 广西师范大学({0}学年)三好学生登记表", head.PROJECT_YEAR);
            }
            else if (head.PROJECT_TYPE.Equals("SCHOOL_MODEL"))//三好学生标兵
            {
                strTitle = string.Format(" 广西师范大学({0}学年)三好学生标兵登记表", head.PROJECT_YEAR);
            }
            else if (head.PROJECT_TYPE.Equals("SCHOOL_SINGLE"))//单项奖学金
            {
                strTitle = string.Format(" 广西师范大学({0}学年)单项奖学金登记表", head.PROJECT_YEAR);
            }

            head.XY          = cod.GetDDLTextByValue("ddl_department", head.XY);
            head.ZY          = cod.GetDDLTextByValue("ddl_zy", head.ZY);
            head.GRADE       = cod.GetDDLTextByValue("ddl_grade", head.GRADE);
            head.REWARD_FLAG = cod.GetDDLTextByValue("ddl_apply_reward_flag", head.REWARD_FLAG);
            //大文本数据
            if (ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO) != null)
            {
                txt = ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO);
            }

            #endregion 奖助申请信息

            #region 学生基础信息

            //学生基础信息
            if (StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER) != null)
            {
                stu            = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                stu.SEX        = cod.GetDDLTextByValue("ddl_xb", stu.SEX);
                stu.POLISTATUS = cod.GetDDLTextByValue("ddl_zzmm", stu.POLISTATUS);
                stu.NATION     = cod.GetDDLTextByValue("ddl_mz", stu.NATION);
            }

            #endregion 学生基础信息

            #region 公共参数

            Dictionary <string, string> param = new Dictionary <string, string>();
            param.Add("SEQ_NO", head.SEQ_NO);

            #endregion 公共参数

            #region 获奖列表

            //获奖列表
            List <Shoolar_apply_reward> rewardList = ProjectApplyHandleClass.getInstance().GetRewardListInfo(param);
            if (rewardList == null)
            {
                return;
            }

            #region 跨行数

            if (rewardList.Count == 0)
            {
                nRewardList = 1;
            }
            else
            {
                nRewardList = rewardList.Count + 1;
            }

            #endregion 跨行数

            strRewardJson = ProjectResultHandleClass.getInstance().GetRewardList(rewardList);
            StringBuilder strR = new StringBuilder();
            foreach (Shoolar_apply_reward item in rewardList)
            {
                if (item == null)
                {
                    continue;
                }
                strR.AppendFormat("<tr><td>{0}</td><td colspan=\"4\">{1}</td><td colspan=\"2\">{2}</td></tr>", cod.GetDDLTextByValue("ddl_year_type", item.REWARD_DATE), item.REWARD_NAME, item.AWARD_DEPARTMENT);
            }
            divReward.InnerHtml = strR.ToString();

            #endregion 获奖列表

            #region 学习情况(分为 成绩信息 与 科目成绩列表)

            #region 成绩信息

            //成绩信息
            if (ProjectApplyHandleClass.getInstance().GetStudyInfo(param) != null)
            {
                study = ProjectApplyHandleClass.getInstance().GetStudyInfo(param);
                study.IS_SCORE_FLAG = cod.GetDDLTextByValue("ddl_yes_no", study.IS_SCORE_FLAG);
            }

            #endregion 成绩信息

            #region 科目成绩列表

            //科目成绩列表
            List <Shoolar_apply_study_list> studyList = ProjectApplyHandleClass.getInstance().GetStudyListInfo(param);
            if (studyList == null)
            {
                return;
            }
            if (studyList.Count != 0)
            {
                nScoreList = nScoreList + studyList.Count;
            }
            StringBuilder strS = new StringBuilder();
            foreach (Shoolar_apply_study_list item in studyList)
            {
                if (item == null)
                {
                    continue;
                }
                strS.AppendFormat("<tr><td colspan=\"4\">{0}</td><td colspan=\"3\">{1}</td></tr>", item.COURSE_NAME, item.SCORE);
            }
            divScore.InnerHtml = strS.ToString();

            #endregion 科目成绩列表

            #endregion 学习情况(分为 成绩信息 与 科目成绩列表)
        }
Beispiel #23
0
        /// <summary>
        /// 通过接口获得学生信息
        /// </summary>
        /// <returns></returns>
        private string GetStuInfo()
        {
            ReturnJson json = new ReturnJson();

            try
            {
                #region 校验参数

                string stuno = Request.QueryString["stuno"];
                string token = Request.QueryString["token"];
                LogDBHandleClass.getInstance().LogOperation("", "学生信息接口", CValue.LOG_ACTION_TYPE_8, CValue.LOG_RECORD_TYPE_1, "学生信息接口被调用", "", "", "");
                if (string.IsNullOrWhiteSpace(stuno))
                {
                    json.status  = 0;
                    json.message = "参数错误";
                    LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "学生信息接口参数错误:");
                    return(Newtonsoft.Json.JsonConvert.SerializeObject(json));
                }

                #endregion 校验参数

                #region 校验密钥

                string msg = "";
                if (!OpenDataHandleClass.getInstance().VerifyParamForMD5(token, out msg))
                {
                    json.status  = 0;
                    json.message = msg;
                    LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "学生信息接口密钥错误:" + msg);
                    return(Newtonsoft.Json.JsonConvert.SerializeObject(json));
                }

                #endregion 校验密钥

                #region 通过学号读取学生信息

                Basic_stu_info stuInfo = StuHandleClass.getInstance().GetStuInfo_Obj(stuno);
                if (stuInfo == null)
                {
                    json.status  = 0;
                    json.message = "通过学号未找到相关学生信息";
                    LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "学生信息接口密钥错误,通过学号未找到相关学生信息:" + stuno);
                    return(Newtonsoft.Json.JsonConvert.SerializeObject(json));
                }
                OpenStudentInfo openStuInfo = new OpenStudentInfo(stuInfo);
                List <object>   objData     = new List <object>();
                objData.Add(openStuInfo);

                #endregion 通过学号读取学生信息

                json.status  = 1;
                json.message = "";
                json.data    = objData;
                return(Newtonsoft.Json.JsonConvert.SerializeObject(json));
            }
            catch (Exception ex)
            {
                json.status  = 0;
                json.message = "接口内部错误";
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "调用学生信息接口错误:" + ex.Message + ex.StackTrace);
                return(Newtonsoft.Json.JsonConvert.SerializeObject(json));
            }
        }
Beispiel #24
0
        /// <summary>
        /// 删除并发消息告知
        /// 删除只会删除申请条件不符合要求的,申请人数已经满了 不在删除的范围内,申请人数超员的情况应该由学院或者学校进行撤销处理。
        /// </summary>
        /// <returns></returns>
        private string DeleteData()
        {
            if (string.IsNullOrEmpty(Get("id")))
            {
                return("删除失败,原因:主键为空!");
            }

            Shoolar_apply_head head = new Shoolar_apply_head();

            head.OID = Get("id");
            ds.RetrieveObject(head);
            if (head != null)
            {
                #region 申请人数限制放在院级审核的时候,并且再次用条件进行校验

                Basic_stu_info       stu_info     = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                Shoolar_project_head project_head = ProjectSettingHandleClass.getInstance().GetProjectHead(head.PROJECT_SEQ_NO);
                if (stu_info == null || project_head == null)
                {
                    return("删除失败,原因:学生信息为空或者奖助项目信息为空!");
                }

                string strMsg = string.Empty;

                #region 再次校验申请条件

                //再次校验申请条件
                if (!ProjectApplyHandleClass.getInstance().CheckProjectLimit(stu_info, project_head, out strMsg))
                {
                    string strMessageMsg = string.Empty;
                    //发送消息
                    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);
                    MessgeHandleClass.getInstance().SendMessge("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);
                    //删除数据
                    ProjectApplyHandleClass.getInstance().DeleteProjectApplyData(head.SEQ_NO);
                    return(string.Empty);
                }
                if (!ProjectApplyHandleClass.getInstance().CheckProjectNotBoth(stu_info, project_head, out strMsg))
                {
                    string strMessageMsg = string.Empty;
                    //发送消息
                    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);
                    MessgeHandleClass.getInstance().SendMessge("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);
                    //删除数据
                    ProjectApplyHandleClass.getInstance().DeleteProjectApplyData(head.SEQ_NO);
                    return(string.Empty);
                }

                #endregion 再次校验申请条件

                #endregion 申请人数限制放在院级审核的时候,并且再次用条件进行校验
            }
            return("不满足删除条件!");
        }
Beispiel #25
0
        /// <summary>
        /// 提交审核信息
        /// </summary>
        /// <returns></returns>
        private string ApproveData()
        {
            try
            {
                #region 获得奖助申请信息

                if (string.IsNullOrEmpty(Post("hidOid_ForApprove")))
                {
                    return("奖助申请主键不能为空!");
                }
                Shoolar_apply_head head = new Shoolar_apply_head();
                head.OID = Post("hidOid_ForApprove").ToString();
                ds.RetrieveObject(head);
                if (head == null)
                {
                    return("奖助申请信息为空!");
                }
                if (head.DECLARE_TYPE != CValue.DECLARE_TYPE_D)
                {
                    return("该状态不允许进行操作!");
                }

                #endregion 获得奖助申请信息

                #region 是否满足提交审核条件

                string strMsg = string.Empty;
                strMsg = ChkApproveData(head.PROJECT_TYPE, Post("approveMsg"), Post("comMsg"));
                if (strMsg.Length > 0)
                {
                    return(strMsg);
                }

                #endregion 是否满足提交审核条件

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

                Shoolar_project_head project_head = ProjectSettingHandleClass.getInstance().GetProjectHead(head.PROJECT_SEQ_NO);
                if (project_head == null)
                {
                    return("项目信息为空,不允许进行操作!");
                }
                //ZZ 20171221 新增:过了项目申请结束时间,学生、辅导员、学院都不能操作,校级可以审批操作
                if (!ProjectSettingHandleClass.getInstance().CheckIsFitApplyDate(project_head.APPLY_END, user.User_Role))
                {
                    return("该项目申请结束日期已过,不允许进行操作!");
                }

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

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

                if (user.User_Role.Equals(CValue.ROLE_TYPE_Y) && Post("approveType").Equals("P"))
                {
                    //ZZ 20171114 新增:申请人数限制放在院级审核的时候,并且再次用条件进行校验
                    Basic_stu_info stu_info = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                    if (stu_info == null || project_head == null)
                    {
                        return("审核失败:学生信息或者奖助项目信息不能为空!");
                    }

                    #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("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);
                        return("由于该奖助申请不满足申请条件,已退回预录入状态,原因:" + strMsg);
                    }
                    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("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);
                        return("由于该奖助申请不满足申请条件,已退回预录入状态,原因:" + strMsg);
                    }

                    #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}人!", projectNum[0].APPLY_NUM));
                    }

                    #endregion 申请人数已满
                }

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

                #region 提交审核信息

                bool bFlag = WKF_ExternalInterface.getInstance().WKF_Audit(head.DOC_TYPE, head.SEQ_NO, user.User_Id, user.User_Role, Post("approveType"), Post("approveMsg"), out strMsg);
                if (bFlag)
                {
                    ProjectApplyHandleClass.getInstance().ApproveData_UpTxt(head.SEQ_NO, head.PROJECT_TYPE, user.User_Role, Post("approveMsg"), Post("comMsg"));

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

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

                    string strFinalPosCode = WKF_AuditHandleCLass.getInstance().GetFinalPosCode(head.DOC_TYPE);
                    if (!string.IsNullOrEmpty(strFinalPosCode))
                    {
                        if (strFinalPosCode == user.User_Role)
                        {
                            string strMsgContent = string.Empty;
                            if (Post("approveType").ToString().Equals("P"))
                            {
                                strMsgContent = string.Format("奖助申请:{0}审批通过", head.PROJECT_NAME);
                            }
                            else
                            {
                                strMsgContent = string.Format("奖助申请:{0}审批不通过,审批意见:{1}", head.PROJECT_NAME, Post("approveMsg"));
                            }
                            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 审批通过之后给申请人发送信息

                    return(string.Empty);
                }
                else
                {
                    LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, strMsg);
                    return("提交审核信息失败!");
                }

                #endregion 提交审核信息
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助审核提交审核信息失败:" + ex.ToString());
                return("提交审核信息失败!");
            }
        }
Beispiel #26
0
        private void GetPrintData(string oid)
        {
            #region 奖助申请信息

            //奖助申请信息
            head.OID = oid;
            ds.RetrieveObject(head);
            if (head == null)
            {
                return;
            }
            strPrintCode      = ComHandleClass.getInstance().GetStuWorNo(head.STU_NUMBER, head.PROJECT_YEAR);
            head.PROJECT_YEAR = cod.GetDDLTextByValue("ddl_year_type", head.PROJECT_YEAR);
            //标题
            if (head.PROJECT_TYPE.Equals("COUNTRY_YP"))//国家奖学金(研究生/博士)
            {
                strTitle = string.Format("广西师范大学{0}学年研究生国家奖学金申请审批表", head.PROJECT_YEAR);
            }
            else if (head.PROJECT_TYPE.Equals("COUNTRY_STUDY"))//国家学业奖学金
            {
                strTitle = string.Format(" 广西师范大学({0}学年)学业奖学金申请审批表", head.PROJECT_YEAR);
            }
            else if (head.PROJECT_TYPE.Equals("SCHOOL_NOTCOUNTRY"))//非国家级奖学金
            {
                strTitle = string.Format(" 广西师范大学({0}学年)研究生{1}申请审批表", head.PROJECT_YEAR, head.PROJECT_NAME);
            }

            head.XY          = cod.GetDDLTextByValue("ddl_department", head.XY);
            head.ZY          = cod.GetDDLTextByValue("ddl_zy", head.ZY);
            head.TRAIN_TYPE  = cod.GetDDLTextByValue("ddl_apply_train_type", head.TRAIN_TYPE);
            head.STUDY_LEVEL = cod.GetDDLTextByValue("ddl_apply_study_level", head.STUDY_LEVEL);
            //大文本数据
            if (ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO) != null)
            {
                txt = ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO);
            }

            #endregion 奖助申请信息

            #region 学生基础信息

            //学生基础信息
            if (StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER) != null)
            {
                stu            = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                stu.SEX        = cod.GetDDLTextByValue("ddl_xb", stu.SEX);
                stu.POLISTATUS = cod.GetDDLTextByValue("ddl_zzmm", stu.POLISTATUS);
                stu.NATION     = cod.GetDDLTextByValue("ddl_mz", stu.NATION);
                stu.SYSTEM     = cod.GetDDLTextByValue("ddl_edu_system", stu.SYSTEM);
            }

            #endregion 学生基础信息

            #region 公共参数

            Dictionary <string, string> param = new Dictionary <string, string>();
            param.Add("SEQ_NO", head.SEQ_NO);

            #endregion 公共参数

            #region 学习情况(分为 成绩信息 与 科目成绩列表)

            #region 成绩信息

            //成绩信息
            if (ProjectApplyHandleClass.getInstance().GetStudyInfo(param) != null)
            {
                study = ProjectApplyHandleClass.getInstance().GetStudyInfo(param);
                study.IS_SCORE_FLAG = cod.GetDDLTextByValue("ddl_yes_no", study.IS_SCORE_FLAG);
            }

            #endregion 成绩信息

            #region 科目成绩列表

            //科目成绩列表
            List <Shoolar_apply_study_list> studyList = ProjectApplyHandleClass.getInstance().GetStudyListInfo(param);
            if (studyList == null)
            {
                return;
            }
            if (studyList.Count != 0)
            {
                nScoreList = nScoreList + studyList.Count;
            }
            StringBuilder strS = new StringBuilder();
            foreach (Shoolar_apply_study_list item in studyList)
            {
                if (item == null)
                {
                    continue;
                }
                strS.AppendFormat("<tr><td colspan=\"4\">{0}</td><td colspan=\"2\">{1}</td></tr>", item.COURSE_NAME, item.SCORE);
            }
            divScore.InnerHtml = strS.ToString();

            #endregion 科目成绩列表

            #endregion 学习情况(分为 成绩信息 与 科目成绩列表)

            #region 获奖列表

            //获奖列表
            List <Shoolar_apply_reward> rewardList = ProjectApplyHandleClass.getInstance().GetRewardListInfo(param);
            if (rewardList != null)
            {
                if (rewardList.Count == 0)
                {
                    divReward.InnerHtml = "无";
                }
                else
                {
                    StringBuilder strR = new StringBuilder();
                    foreach (Shoolar_apply_reward item in rewardList)
                    {
                        if (item == null)
                        {
                            continue;
                        }
                        strR.AppendFormat("{0}      {1}         {2}<br/>", cod.GetDDLTextByValue("ddl_year_type", item.REWARD_DATE), item.REWARD_NAME, item.AWARD_DEPARTMENT);
                    }
                    divReward.InnerHtml = strR.ToString();
                }
            }

            #endregion 获奖列表
        }
Beispiel #27
0
        private void GetPrintData(string oid)
        {
            #region 奖助申请信息

            //奖助申请信息
            head.OID = oid;
            ds.RetrieveObject(head);
            if (head == null)
            {
                return;
            }
            strPrintCode      = ComHandleClass.getInstance().GetStuWorNo(head.STU_NUMBER, head.PROJECT_YEAR);
            head.PROJECT_YEAR = cod.GetDDLTextByValue("ddl_year_type", head.PROJECT_YEAR);
            //标题
            if (head.PROJECT_TYPE.Equals("COUNTRY_ENCOUR"))//国家励志奖学金
            {
                strTitle = string.Format(" 广西师范大学({0}学年)国家励志奖学金申请表", head.PROJECT_YEAR);
            }
            else if (head.PROJECT_TYPE.Equals("AREA_GOV"))//自治区人民政府奖学金
            {
                strTitle = string.Format(" 广西师范大学({0}学年)自治区人民政府奖学金申请表", head.PROJECT_YEAR);
            }

            head.XY    = cod.GetDDLTextByValue("ddl_department", head.XY);
            head.ZY    = cod.GetDDLTextByValue("ddl_zy", head.ZY);
            head.GRADE = cod.GetDDLTextByValue("ddl_grade", head.GRADE);
            //大文本数据
            if (ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO) != null)
            {
                txt = ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO);
            }

            #endregion 奖助申请信息

            #region 学生基础信息

            //学生基础信息
            if (StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER) != null)
            {
                stu            = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                stu.SEX        = cod.GetDDLTextByValue("ddl_xb", stu.SEX);
                stu.POLISTATUS = cod.GetDDLTextByValue("ddl_zzmm", stu.POLISTATUS);
                stu.NATION     = cod.GetDDLTextByValue("ddl_mz", stu.NATION);
            }

            #endregion 学生基础信息

            #region 公共参数

            Dictionary <string, string> param = new Dictionary <string, string>();
            param.Add("SEQ_NO", head.SEQ_NO);

            #endregion 公共参数

            #region 家庭情况(分为 家庭信息 与 家庭成员)

            #region 家庭信息

            //家庭信息
            if (ProjectApplyHandleClass.getInstance().GetFamilyInfo(param) != null)
            {
                family              = ProjectApplyHandleClass.getInstance().GetFamilyInfo(param);
                family.HK           = cod.GetDDLTextByValue("ddl_stu_basic_hk", family.HK);
                family.COGRIZA_INFO = cod.GetDDLTextByValue("ddl_dst_level", family.COGRIZA_INFO);
            }

            #endregion 家庭信息

            #region 家庭成员信息

            //家庭成员信息
            List <Shoolar_apply_family_list> familyList = ProjectApplyHandleClass.getInstance().GetFamilyListInfo(param);
            if (familyList != null)
            {
                if (familyList.Count == 0)
                {
                    nMemberList = 1;
                }
                else
                {
                    nMemberList = familyList.Count + 1;
                }

                StringBuilder strM = new StringBuilder();
                foreach (Shoolar_apply_family_list item in familyList)
                {
                    if (item == null)
                    {
                        continue;
                    }
                    strM.AppendFormat("<tr><td>{0}</td><td>{1}</td><td colspan=\"2\">{2}</td><td colspan=\"3\">{3}</td></tr>", item.MEMBER_NAME, item.MEMBER_AGE, item.MEMBER_RELATION, item.MEMBER_UNIT);
                }
                divMember.InnerHtml = strM.ToString();
            }

            #endregion 家庭成员信息

            #endregion 家庭情况(分为 家庭信息 与 家庭成员)

            #region 获奖情况

            //获得奖助列表
            List <Shoolar_apply_reward> proList = ProjectApplyHandleClass.getInstance().GetRewardListInfo(param);
            if (proList != null)
            {
                if (proList.Count == 0)
                {
                    divReward.InnerHtml = "无";
                }
                else
                {
                    StringBuilder strR = new StringBuilder();
                    foreach (Shoolar_apply_reward item in proList)
                    {
                        if (item == null)
                        {
                            continue;
                        }
                        strR.AppendFormat("{0}        {1}           {2}<br/>", cod.GetDDLTextByValue("ddl_year_type", item.REWARD_DATE), item.REWARD_NAME, item.AWARD_DEPARTMENT);
                    }
                    divReward.InnerHtml = strR.ToString();
                }
            }

            #endregion 获奖情况

            #region 学习情况(分为 成绩信息 与 科目成绩列表)

            #region 成绩信息

            //成绩信息
            if (ProjectApplyHandleClass.getInstance().GetStudyInfo(param) != null)
            {
                study = ProjectApplyHandleClass.getInstance().GetStudyInfo(param);
                study.IS_SCORE_FLAG = cod.GetDDLTextByValue("ddl_yes_no", study.IS_SCORE_FLAG);
            }

            #endregion 成绩信息

            #region 科目成绩列表

            //科目成绩列表
            List <Shoolar_apply_study_list> studyList = ProjectApplyHandleClass.getInstance().GetStudyListInfo(param);
            if (studyList == null)
            {
                return;
            }
            if (studyList.Count != 0)
            {
                nScoreList = nScoreList + studyList.Count;
            }
            StringBuilder strS = new StringBuilder();
            foreach (Shoolar_apply_study_list item in studyList)
            {
                if (item == null)
                {
                    continue;
                }
                strS.AppendFormat("<tr><td colspan=\"5\">{0}</td><td colspan=\"2\">{1}</td></tr>", item.COURSE_NAME, item.SCORE);
            }
            divScore.InnerHtml = strS.ToString();

            #endregion 科目成绩列表

            #endregion 学习情况(分为 成绩信息 与 科目成绩列表)
        }
Beispiel #28
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("批量审批失败!");
            }
        }
Beispiel #29
0
        /// <summary>
        /// 批量确认核对信息
        /// </summary>
        /// <returns></returns>
        private string MultiCheck()
        {
            try
            {
                DataTable dtMultiCheck = GetMultiCheckData();
                if (dtMultiCheck == null)
                {
                    return("批量核对失败:批量核对数据读取失败!");
                }
                int nSuccessNum = 0;
                int nFailNum    = 0;
                foreach (DataRow row in dtMultiCheck.Rows)
                {
                    #region 筛选可以核对信息的数据

                    //筛选可以核对信息的数据
                    if (row == null)
                    {
                        continue;
                    }
                    string strMsg = string.Empty;
                    if (!ProjectCheckHandleClass.getInstance().IsCanCheck(row["OID"].ToString(), user.User_Role, "multi", out strMsg))
                    {
                        nFailNum++;
                        continue;
                    }

                    #endregion 筛选可以核对信息的数据

                    #region 更新核对信息

                    Shoolar_apply_head head = new Shoolar_apply_head();
                    head.OID = row["OID"].ToString();
                    ds.RetrieveObject(head);
                    if (head == null)
                    {
                        continue;
                    }

                    Shoolar_apply_check check = ProjectCheckHandleClass.getInstance().GetApplyCheckInfo(head.SEQ_NO);
                    check.OID = check.OID;
                    ds.RetrieveObject(check);

                    #region 批量核对时,也需要校验学生核对情况

                    if (head.PROJECT_CLASS.Equals("LIFE"))
                    {
                        //学生需要有饭卡号,银行卡号才可以核对通过
                        if (StuHandleClass.getInstance().ByStuNoGetRiceCard(head.STU_NUMBER).Length == 0)
                        {
                            nFailNum++;
                            continue;
                        }
                        if (check.OLD_BANKCODE.Length == 0 && check.NEW_BANKCODE.Length == 0)
                        {
                            nFailNum++;
                            continue;
                        }
                    }
                    else
                    {
                        //学生需要有银行卡号,身份证号 才可以核对通过
                        if (check.OLD_BANKCODE.Length == 0 && check.NEW_BANKCODE.Length == 0)
                        {
                            nFailNum++;
                            continue;
                        }
                        if (check.OLD_IDCARDNO.Length == 0 && check.NEW_IDCARDNO.Length == 0)
                        {
                            nFailNum++;
                            continue;
                        }
                    }

                    #endregion 批量核对时,也需要校验学生核对情况

                    switch (user.User_Role)
                    {
                    case "F":                     //辅导员
                        check.CHECK_STEP   = "2"; //辅导员已核对
                        check.F_CHECK_CODE = user.User_Id;
                        check.F_CHECK_NAME = user.User_Name;
                        check.F_CHECK_TIME = GetDateLongFormater();
                        break;

                    case "Y":                     //学院
                        check.CHECK_STEP   = "3"; //学院已核对
                        check.Y_CHECK_CODE = user.User_Id;
                        check.Y_CHECK_NAME = user.User_Name;
                        check.Y_CHECK_TIME = GetDateLongFormater();
                        break;
                    }
                    ds.UpdateObject(check);
                    nSuccessNum++;

                    #endregion 更新核对信息

                    #region  步学生信息中的银行卡与身份证号,修改成核对后的数据

                    if (check.CHECK_STEP.Equals("3"))
                    {
                        #region 银行卡

                        if (check.NEW_BANKCODE.Length > 0)
                        {
                            head.STU_BANKCODE = check.NEW_BANKCODE;
                            //更新至学生银行卡信息中的银行卡号
                            string strSqlBank = string.Format("UPDATE BASIC_STU_BANK_INFO SET BANKCODE = '{0}' WHERE NUMBER = '{1}' ", head.STU_BANKCODE, head.STU_NUMBER);
                            ds.ExecuteTxtNonQuery(strSqlBank);
                        }

                        #endregion 银行卡

                        #region 身份证

                        if (check.NEW_IDCARDNO.Length > 0)
                        {
                            head.STU_IDCARDNO = check.NEW_IDCARDNO;
                            //更新至学生信息中的身份证号
                            string strSqlID = string.Format("UPDATE BASIC_STU_INFO SET IDCARDNO = '{0}' WHERE NUMBER = '{1}' ", head.STU_IDCARDNO, head.STU_NUMBER);
                            ds.ExecuteTxtNonQuery(strSqlID);
                        }

                        #endregion 身份证

                        ds.UpdateObject(head);
                    }

                    #endregion  步学生信息中的银行卡与身份证号,修改成核对后的数据
                }
                return(string.Format("批量核对成功:生效{0}条记录,不生效{1}条记录。", nSuccessNum, nFailNum));
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "批量审批奖助核对失败:" + ex.ToString());
                return("批量核对失败!");
            }
        }
Beispiel #30
0
        /// <summary>
        /// 判断是否满足提交条件
        /// </summary>
        /// <returns></returns>
        private string ChkIsCanSubmit()
        {
            try
            {
                #region 基础校验

                if (string.IsNullOrEmpty(Get("id")))
                {
                    return("请先保存数据之后再进行提交!");
                }
                Shoolar_apply_head head = new Shoolar_apply_head();
                head.OID = Get("id");
                ds.RetrieveObject(head);
                if (head == null)
                {
                    return("读取奖助申请信息出错,不允许提交!");
                }

                #endregion 基础校验

                //20171121 ZZ 新增:在提交之前再次进行一次申请条件校验(人数不用放在这里校验,还是到院级审批)

                #region 申请条件校验

                Basic_stu_info       stu_info     = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER);
                Shoolar_project_head project_head = ProjectSettingHandleClass.getInstance().GetProjectHead(head.PROJECT_SEQ_NO);
                if (stu_info == null || project_head == null)
                {
                    return("删除失败,原因:学生信息为空或者奖助项目信息为空!");
                }

                string strMsg = string.Empty;

                #region 项目限制条件

                if (!ProjectApplyHandleClass.getInstance().CheckProjectLimit(stu_info, project_head, out strMsg))
                {
                    return(strMsg);
                }

                #endregion 项目限制条件

                #region  可兼得条件

                if (!ProjectApplyHandleClass.getInstance().CheckProjectNotBoth(stu_info, project_head, out strMsg))
                {
                    return(strMsg);
                }

                #endregion  可兼得条件

                #endregion 申请条件校验

                #region 参数设置

                Dictionary <string, string> param = new Dictionary <string, string>();
                param.Add("SEQ_NO", head.SEQ_NO);
                Dictionary <string, string> param_file = new Dictionary <string, string>();
                param_file.Add("SEQ_NO", head.SEQ_NO);
                param_file.Add("FILE_TYPE != '6' ", string.Empty);//附件
                Dictionary <string, string> param_file_photo = new Dictionary <string, string>();
                param_file_photo.Add("SEQ_NO", head.SEQ_NO);
                param_file_photo.Add("FILE_TYPE = '6' ", string.Empty);//附件:个人生活照
                Shoolar_apply_txt           txt        = ProjectApplyHandleClass.getInstance().GetTxtInfo(head.SEQ_NO);
                List <Shoolar_apply_reward> rewardList = ProjectApplyHandleClass.getInstance().GetRewardListInfo(param);
                //系统限制条件改为,本科生限制不变(需填写4-21门),研究生不限制填写条数。
                List <Shoolar_apply_study_list>  studyList  = ProjectApplyHandleClass.getInstance().GetStudyListInfo(param);
                List <Shoolar_apply_family_list> familyList = ProjectApplyHandleClass.getInstance().GetFamilyListInfo(param);
                List <Shoolar_apply_file>        fileList   = ProjectApplyHandleClass.getInstance().GetFileListInfo(param_file);
                //国奖和三好学生标兵需要在系统上传生活照,学校宣传用。
                List <Shoolar_apply_file> fileList_photo = ProjectApplyHandleClass.getInstance().GetFileListInfo(param_file_photo);

                #endregion 参数设置

                return(ByProjectTypeCheckInfo(head, txt, rewardList, studyList, familyList, fileList, fileList_photo));
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "判断是否满足奖助申请提交条件,出错:" + ex.ToString());
                return("是否满足提交条件校验出现异常!");
            }
        }