コード例 #1
0
        /// <summary>
        /// 撤销申请操作
        /// </summary>
        /// <returns></returns>
        private string SubmitRevokeData()
        {
            try
            {
                if (string.IsNullOrEmpty(Get("doc_type")))
                {
                    return("单据类型不能为空!");
                }
                if (string.IsNullOrEmpty(Get("seq_no")))
                {
                    return("单据编号不能为空!");
                }

                string msg     = string.Empty;
                bool   bResult = WKF_ExternalInterface.getInstance().WKF_RevokeDeclare(Get("doc_type"), Get("seq_no"), user.User_Id, user.User_Role, Post("revokeMsg"), Get("nj"), Get("xy"), Get("bj"), Get("zy"), true, out msg);

                if (!bResult)
                {
                    return(string.Format("撤销申请失败,原因:{0}", msg));
                }
                return(string.Empty);
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_WARN, "撤销申请操作,出错:" + ex.ToString());
                return("撤销申请失败!");
            }
        }
コード例 #2
0
ファイル: Return.aspx.cs プロジェクト: libao123/stuCMS
        private string ReturnData()
        {
            string strMsg  = string.Empty;
            bool   bResult = WKF_ExternalInterface.getInstance().WKF_Return(Get("doc_type"), Get("seq_no"), Post("rtn_step"), Post("rtn_post"), user.User_Name, Post("OP_NOTES"), user.User_Role, out strMsg);

            return(strMsg);
        }
コード例 #3
0
        private string SubmitData()
        {
            string saveResult = SaveData();

            if (saveResult.Length > 0)
            {
                string msg    = "";
                bool   result = WKF_ExternalInterface.getInstance().WKF_BusDeclare(head.DOC_TYPE, head.SEQ_NO, user.User_Id, user.User_Role, "", out msg);
                if (!result)
                {
                    return("提交失败!");
                }
                else
                {
                    //提交时,清除推荐档次、推荐理由
                    head.LEVEL_CODE     = string.Empty;
                    head.LEVEL1         = string.Empty;
                    head.OPINION1       = string.Empty;
                    head.LEVEL2         = string.Empty;
                    head.OPINION2       = string.Empty;
                    head.LEVEL3         = string.Empty;
                    head.OPINION3       = string.Empty;
                    head.AUDIT_POS_CODE = string.Empty;
                    //提交时,插入一条文档编号
                    ComHandleClass.getInstance().InsertIntoBasicStuWordNo(head.NUMBER, head.SCHYEAR);
                    head.SERIAL_NO = ComHandleClass.getInstance().GetStuWorNo(head.NUMBER, head.SCHYEAR);
                    ds.UpdateObject(head);
                    return("");
                }
            }
            else
            {
                return("提交失败");
            }
        }
コード例 #4
0
        /// <summary>
        /// 是否可以进行撤销申请
        /// </summary>
        /// <returns></returns>
        private string IsCanRevokeDeclare()
        {
            try
            {
                if (string.IsNullOrEmpty(Get("doc_type")))
                {
                    return("单据类型不能为空!");
                }
                if (string.IsNullOrEmpty(Get("seq_no")))
                {
                    return("单据编号不能为空!");
                }

                string strOut = WKF_ExternalInterface.getInstance().ChkRevoke(Get("doc_type"), Get("seq_no"), user.User_Role);
                if (string.IsNullOrEmpty(strOut))
                {
                    return(string.Empty);
                }
                else
                {
                    return(strOut);
                }
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_WARN, "是否可以进行撤销申请,出错:" + ex.ToString());
                return("不符合撤销申请要求!");
            }
        }
コード例 #5
0
ファイル: Edit.aspx.cs プロジェクト: libao123/stuCMS
 private string btnSubmit()
 {
     try
     {
         if (SaveData("submit"))
         {
             string msg    = string.Empty;
             bool   result = WKF_ExternalInterface.getInstance().WKF_BusDeclare(modi.DOC_TYPE, modi.SEQ_NO, user.User_Id, user.User_Type, "修改个人信息", out msg);
             if (result)
             {
                 return("");
             }
             else
             {
                 return("提交失败");
             }
         }
         else
         {
             return("提交失败");
         }
     }
     catch (Exception ex)
     {
         return("提交失败:" + ex.Message);
     }
 }
コード例 #6
0
ファイル: Edit.aspx.cs プロジェクト: libao123/stuCMS
        /// <summary>
        /// 提交数据
        /// </summary>
        /// <returns></returns>
        private string SubmitData()
        {
            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 基础校验

                string strMsg     = string.Empty;
                string strOpNotes = string.Format("提交奖助申请操作");
                if (!WKF_ExternalInterface.getInstance().WKF_BusDeclare(head.DOC_TYPE, head.SEQ_NO, user.User_Id, user.User_Role, strOpNotes, out strMsg))
                {
                    return(strMsg);
                }

                #region 往信息核对表中插入一条记录

                //首先判断是否已经存在数据,已经存在不需要再次插入
                string strSql = string.Format("SELECT COUNT(1) AS COUNT_NUM FROM SHOOLAR_APPLY_CHECK WHERE SEQ_NO = '{0}' ", head.SEQ_NO);
                int    nCount = cod.ChangeInt(ds.ExecuteTxtScalar(strSql).ToString());
                if (nCount == 0)
                {
                    //提交成功之后,往信息核对表中插入一条记录
                    ProjectCheckHandleClass.getInstance().InsertIntoCheckInfo(head.SEQ_NO, head.STU_IDCARDNO, head.STU_BANKCODE);
                }

                #endregion 往信息核对表中插入一条记录

                #region 申请时,插入一条文档编号

                ComHandleClass.getInstance().InsertIntoBasicStuWordNo(head.STU_NUMBER, head.PROJECT_YEAR);

                #endregion 申请时,插入一条文档编号

                return(string.Empty);
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "提交奖助申请信息,出错:" + ex.ToString());
                return("提交失败!");
            }
        }
コード例 #7
0
ファイル: List.aspx.cs プロジェクト: libao123/stuCMS
 /// <summary>
 /// 提交操作
 /// </summary>
 /// <returns></returns>
 private string SaveData()
 {
     try
     {
         if (string.IsNullOrEmpty(Post("hidOid")))
         {
             head.OID    = Guid.NewGuid().ToString();
             head.SEQ_NO = GetSeq_no();
             GetValue(head);
             head.DOC_TYPE    = this.Doc_type;
             head.DECL_NUMBER = user.User_Id;
             head.DECL_TIME   = GetDateLongFormater();
             var inserttrcn = ImplementFactory.GetInsertTransaction <Ua_class_group>("Ua_class_groupInsertTransaction");
             inserttrcn.EntityList.Add(head);
             if (!inserttrcn.Commit())
             {
                 return("提交失败!");
             }
         }
         else
         {
             head.OID = Post("hidOid");
             ds.RetrieveObject(head);
             GetValue(head);
             head.DECL_NUMBER = user.User_Id;
             head.DECL_TIME   = GetDateLongFormater();
             var updatetrcn = ImplementFactory.GetUpdateTransaction <Ua_class_group>("Ua_class_groupUpdateTransaction", user.User_Name);
             if (!updatetrcn.Commit(head))
             {
                 return("提交失败!");
             }
         }
         //提交编班申请
         string strOpNotes = string.Format("提交编班申请操作");
         string strMsg     = string.Empty;
         if (!WKF_ExternalInterface.getInstance().WKF_BusDeclare(head.DOC_TYPE, head.SEQ_NO, user.User_Name, user.User_Role, strOpNotes, out strMsg))
         {
             //20171017 ZZ 新增:由于编班没有暂存功能,所以编班提交失败或者没有权限提交,需要删除生成的数据。
             string strDelSql = string.Format("DELETE FROM UA_CLASS_GROUP WHERE SEQ_NO = '{0}' ", head.SEQ_NO);
             ds.ExecuteTxtNonQuery(strDelSql);
             return(string.Format("编班提交失败,原因:{0}", strMsg));
         }
         return(string.Empty);
     }
     catch (Exception ex)
     {
         //20171017 ZZ 新增:由于编班没有暂存功能,所以编班提交失败或者没有权限提交,需要删除生成的数据。
         string strDelSql = string.Format("DELETE FROM UA_CLASS_GROUP WHERE SEQ_NO = '{0}' ", head.SEQ_NO);
         ds.ExecuteTxtNonQuery(strDelSql);
         LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "编班提交失败,原因:" + ex.ToString());
         return("提交失败!");
     }
 }
コード例 #8
0
ファイル: AuditHandleClass.cs プロジェクト: libao123/stuCMS
        public bool AuditTranHandle(string doc_type, string doc_no, string op_user, string pos_code, string audit_result, string audit_note, string level_info, out string msg)
        {
            try
            {
                if (!WKF_ExternalInterface.getInstance().Chk_ClientParam(doc_type, doc_no, op_user, out msg))
                {
                    return(false);
                }
                var m_code = WKF_BusDataHandleCLass.getInstance().GetCodBiz(doc_type, out msg);
                if (m_code == null)
                {
                    return(false);
                }
                DataRow drData = WKF_BusDataHandleCLass.getInstance().GetBusHeadData(m_code, doc_no, out msg);
                if (drData == null)
                {
                    return(false);
                }
                if (!WKF_BusDataHandleCLass.getInstance().UpdateChk_status(m_code, doc_no, WKF_VLAUES.HANDLE_STATUS_Y, out msg))
                {
                    return(false);
                }

                string ret_channel = WKF_AuditHandleCLass.getInstance().GetAuditRet_Channel(drData[WKF_VLAUES.COLUMN_STEP_NO].ToString(), audit_result);

                Wkf_rule_queue rule = WKF_RuleQueueHandleCLass.getInstance().GetCurrRule(doc_type, WKF_VLAUES.DECLARE_TYPE_D, drData[WKF_VLAUES.COLUMN_STEP_NO].ToString(), ret_channel, drData[WKF_VLAUES.COLUMN_POS_CODE].ToString());
                if (rule == null)
                {
                    return(false);
                }

                string next_step_no     = rule.NEXT_STEP_NO;
                string next_ret_channel = rule.NEXT_RET_CHANNEL;
                string next_post_code   = rule.NEXT_POST_CODE;
                string declare_type     = rule.DECLARE_TYPE;
                string op_time          = ComTranClass.getInstance().GetCurrLongDateTime();
                string audit_pos_code   = audit_result.Equals("P") ? string.Format(",{0}='{1}'", WKF_VLAUES.COLUMN_AUDIT_POS_CODE, pos_code) : string.Empty;
                ds.ExecuteTxtNonQuery(string.Format("UPDATE {0} SET {3}='{4}',{5}='{6}',{7}='{8}',{9}='{10}',{11}='{12}',{13}='{14}'{15}{16} WHERE {1}='{2}'", m_code.BUS_TABLE, m_code.BUS_COLUMN, doc_no, WKF_VLAUES.COLUMN_STEP_NO, next_step_no, WKF_VLAUES.COLUMN_CHK_STATUS, WKF_VLAUES.HANDLE_STATUS_N, WKF_VLAUES.COLUMN_RET_CHANNEL, next_ret_channel, WKF_VLAUES.COLUMN_POS_CODE, next_post_code, WKF_VLAUES.COLUMN_DECLARE_TYPE, declare_type, WKF_VLAUES.COLUMN_CHK_TIME, op_time, level_info, audit_pos_code));

                //创建工作日志
                CreateNewLog(doc_type, doc_no, CValue.DECLARE_TYPE_D, drData[WKF_VLAUES.COLUMN_STEP_NO].ToString(), ret_channel, pos_code, op_user, op_time, audit_note);

                return(true);
            }
            catch (Exception ex)
            {
                var m_code = WKF_BusDataHandleCLass.getInstance().GetCodBiz(doc_type, out msg);
                WKF_BusDataHandleCLass.getInstance().UpdateChk_status(m_code, doc_no, WKF_VLAUES.HANDLE_STATUS_N, out msg);
                msg = ex.Message;
                return(false);
            }
        }
コード例 #9
0
ファイル: List.aspx.cs プロジェクト: libao123/stuCMS
 /// <summary>
 /// 加载数据
 /// </summary>
 private void LoadData()
 {
     if (!string.IsNullOrEmpty(Get("id")))
     {
         head.OID = Get("id");
         ds.RetrieveObject(head);
         //判断是否可以审批
         if (WKF_ExternalInterface.getInstance().ChkAudit(head.DOC_TYPE, head.SEQ_NO, user.User_Role).Length == 0)
         {
             m_strIsShowAuditBtn = "true";
         }
     }
 }
コード例 #10
0
        /// <summary>
        /// 判断是否符合申请条件
        /// </summary>
        /// <returns></returns>
        private string ChkDeclare()
        {
            if (string.IsNullOrEmpty(Get("doc_type")) || string.IsNullOrEmpty(Get("seq_no")) || string.IsNullOrEmpty(Get("user_role")))
            {
                return("单据类型、单据编号、用户角色,三者不能为空!");
            }
            string strMsg = WKF_ExternalInterface.getInstance().ChkDeclare(Get("doc_type"), Get("seq_no"), Get("user_role"));

            if (strMsg.Length > 0)
            {
                return(strMsg);
            }
            return(string.Empty);
        }
コード例 #11
0
        /// <summary>
        /// 自行撤销
        /// </summary>
        /// <returns></returns>
        private string RevokeData()
        {
            try
            {
                string msg      = string.Empty;
                string op_notes = string.Format("{0}自行撤销", cod.GetDDLTextByValue("ddl_ua_role", user.User_Role));
                bool   bResult  = WKF_ExternalInterface.getInstance().WKF_RevokeDeclare(Get("doc_type"), Get("seq_no"), user.User_Id, user.User_Role, op_notes, Get("nj"), Get("xy"), Get("bj"), Get("zy"), false, out msg);
                if (bResult)
                {
                    if (Get("doc_type").Equals(CValue.DOC_TYPE_UA01))
                    {
                        #region 编班撤销之后,如果辅导员是研究生,需要去掉研究生的“辅导员角色”

                        //ZZ 20171027 新增:编班审批通过之后,如果辅导员是研究生,需要给研究生多分配一个“辅导员角色”
                        Ua_class_group class_group = UaGroupClassHandle.getInstance().GetUaClassGroup(Get("seq_no"));
                        if (class_group != null)
                        {
                            if (class_group.GROUP_TYPE.Equals("Y"))
                            {
                                Ua_user user_group = new Ua_user();
                                user_group.USER_ID = class_group.GROUP_NUMBER;
                                ds.RetrieveObject(user_group);
                                if (user_group != null)
                                {
                                    if (user_group.USER_ROLE.Contains("F"))
                                    {
                                        user_group.USER_ROLE = "S";
                                        ds.UpdateObject(user_group);
                                    }
                                }
                            }
                        }

                        #endregion 编班撤销之后,如果辅导员是研究生,需要去掉研究生的“辅导员角色”
                    }
                    return(string.Empty);
                }
                return(string.Format("撤销失败,原因:{0}", msg));
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_WARN, "撤销,出错:" + ex.ToString());
                return("撤销失败!");
            }
        }
コード例 #12
0
ファイル: Edit.aspx.cs プロジェクト: libao123/stuCMS
        private bool IsCanAudit()
        {
            if (modi.RET_CHANNEL.Equals(WKF_VLAUES.RET_CHANNEL_D4000) || modi.RET_CHANNEL.Equals(WKF_VLAUES.RET_CHANNEL_A0000))
            {
                return(false);
            }

            string strOut = WKF_ExternalInterface.getInstance().ChkAudit(modi.DOC_TYPE, modi.SEQ_NO, user.User_Role);

            if (string.IsNullOrEmpty(strOut))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #13
0
 /// <summary>
 /// 是否可以自行撤销
 /// </summary>
 /// <returns></returns>
 private string IsCanRevoke()
 {
     try
     {
         string strOut = WKF_ExternalInterface.getInstance().ChkRevokeBySelf(Get("doc_type"), Get("seq_no"), user.User_Role, user.User_Id, Get("col_name"));
         if (string.IsNullOrEmpty(strOut))
         {
             return(string.Empty);
         }
         else
         {
             return(strOut);
         }
     }
     catch (Exception ex)
     {
         LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_WARN, "是否可以自行撤销,出错:" + ex.ToString());
         return("不符合撤销要求!");
     }
 }
コード例 #14
0
ファイル: Edit.aspx.cs プロジェクト: libao123/stuCMS
        /// <summary>
        /// 判断是否具有审批权限
        /// </summary>
        private void ChkAudit()
        {
            if (string.IsNullOrEmpty(Get("id")))
            {
                return;
            }
            Shoolar_apply_head head = new Shoolar_apply_head();

            head.OID = Get("id").ToString();
            ds.RetrieveObject(head);
            if (head == null)
            {
                return;
            }
            //判断是否可以审批
            if (WKF_ExternalInterface.getInstance().ChkAudit(head.DOC_TYPE, head.SEQ_NO, user.User_Role).Length == 0)
            {
                m_strIsShowAuditBtn = "true";
            }
        }
コード例 #15
0
ファイル: Approve.aspx.cs プロジェクト: libao123/stuCMS
        /// <summary>
        /// 是否可以进行审批
        /// </summary>
        /// <returns></returns>
        private string IsCanAudit()
        {
            if (string.IsNullOrEmpty(Get("doc_type")))
            {
                return("单据类型不能为空!");
            }
            if (string.IsNullOrEmpty(Get("seq_no")))
            {
                return("单据编号不能为空!");
            }
            string strOut = WKF_ExternalInterface.getInstance().ChkAudit(Get("doc_type"), Get("seq_no"), user.User_Role);

            if (string.IsNullOrEmpty(strOut))
            {
                return(string.Empty);
            }
            else
            {
                return(strOut);
            }
        }
コード例 #16
0
        private string IsCanAudit()
        {
            string seq_no      = Get("seq_no");
            string doc_type    = Get("doc_type");
            string ret_channel = Get("ret_channel");

            if (ret_channel.Equals(WKF_VLAUES.RET_CHANNEL_D4000) || ret_channel.Equals(WKF_VLAUES.RET_CHANNEL_A0000))
            {
                return("false");
            }

            string strOut = WKF_ExternalInterface.getInstance().ChkAudit(doc_type, seq_no, user.User_Role);

            if (string.IsNullOrEmpty(strOut))
            {
                return("true");
            }
            else
            {
                return("false");
            }
        }
コード例 #17
0
ファイル: List.aspx.cs プロジェクト: libao123/stuCMS
        private string SubmitData()
        {
            string saveResult = SaveData();

            if (saveResult.Length > 0)
            {
                string msg    = "";
                bool   result = WKF_ExternalInterface.getInstance().WKF_BusDeclare(head.DOC_TYPE, head.SEQ_NO, user.User_Id, user.User_Role, "提交岗位申报操作", out msg);
                if (!result)
                {
                    return("提交失败!" + msg);
                }
                else
                {
                    return(string.Empty);
                }
            }
            else
            {
                return("提交失败");
            }
        }
コード例 #18
0
ファイル: List_pend.aspx.cs プロジェクト: libao123/stuCMS
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (WKF_ExternalInterface.getInstance().IsShowEditButton(user.User_Role, this.Doc_type))
                {
                    m_strIsShowEditBtn = "true";
                }

                string optype = Request.QueryString["optype"];
                if (!string.IsNullOrEmpty(optype))
                {
                    switch (optype.ToLower().Trim())
                    {
                    case "getlist":
                        Response.Write(GetList());
                        Response.End();
                        break;

                    case "getgrantlist":
                        Response.Write(GetGrantList());
                        Response.End();
                        break;

                    case "getmemberlist":
                        Response.Write(GetMemberList());
                        Response.End();
                        break;

                    case "chkmulti":
                        Response.Write(CheckMulti());
                        Response.End();
                        break;
                    }
                }
            }
        }
コード例 #19
0
ファイル: List_Pend.aspx.cs プロジェクト: libao123/stuCMS
        /// <summary>
        /// 批量审批
        /// </summary>
        /// <returns></returns>
        private string MultiPAudit()
        {
            try
            {
                string   strFlag = Get("flag");
                string[] strs    = Get("ids").Split(',');
                for (int i = 0; i < strs.Length; i++)
                {
                    #region 审批操作

                    if (strs[i].Length == 0)
                    {
                        continue;
                    }
                    Ua_class_group head = new Ua_class_group();
                    head.OID = strs[i];
                    ds.RetrieveObject(head);
                    string strMsg = WKF_ExternalInterface.getInstance().ChkAudit(head.DOC_TYPE, head.SEQ_NO, user.User_Role);
                    if (strMsg.Length > 0)
                    {
                        continue;
                    }
                    strMsg = string.Empty;
                    string strOpNote = string.Format("{0}在{1}操作:编班批量审批{2}", user.User_Id, GetDateLongFormater(), strFlag.Equals("P") ? "通过" : "不通过");
                    if (!WKF_ExternalInterface.getInstance().WKF_Audit(head.DOC_TYPE, head.SEQ_NO, user.User_Id, user.User_Role, strFlag, strOpNote, out strMsg))
                    {
                        LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, string.Format("单据编号{0}编班审核失败,原因", head.SEQ_NO) + strMsg);
                        continue;
                    }

                    #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 = "编班审批:" + cod.GetDDLTextByValue("ddl_class", head.GROUP_CLASS) + strApproveInfo;
                            Dictionary <string, string> dicAccpter = new Dictionary <string, string>();
                            dicAccpter.Add(head.DECL_NUMBER, ComHandleClass.getInstance().ByUserIdGetUserName(head.DECL_NUMBER));
                            MessgeHandleClass.getInstance().SendMessge("M", strMsgContent, user.User_Id, user.User_Name, dicAccpter, out strMsg);
                        }
                    }

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

                    #region 编班审批通过之后,如果辅导员是研究生,需要给研究生多分配一个“辅导员角色”

                    //ZZ 20171027 新增:编班审批通过之后,如果辅导员是研究生,需要给研究生多分配一个“辅导员角色”
                    if (!string.IsNullOrEmpty(strFinalPosCode))
                    {
                        if (strFinalPosCode == user.User_Role)
                        {
                            if (strFlag.ToString().Equals("P"))
                            {
                                if (head.GROUP_TYPE.Equals("Y"))
                                {
                                    Ua_user user_group = new Ua_user();
                                    user_group.USER_ID = head.GROUP_NUMBER;
                                    ds.RetrieveObject(user_group);
                                    if (user_group != null)
                                    {
                                        if (!user_group.USER_ROLE.Contains("F"))
                                        {
                                            user_group.USER_ROLE = "S,F";
                                            ds.UpdateObject(user_group);
                                        }
                                    }
                                }
                            }
                        }
                    }

                    #endregion 编班审批通过之后,如果辅导员是研究生,需要给研究生多分配一个“辅导员角色”
                }

                return(string.Empty);
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "编班审批失败:" + ex.ToString());
                return("批量审批失败!");
            }
        }
コード例 #20
0
        /// <summary>
        /// 批量审批
        /// </summary>
        /// <returns></returns>
        private string MultiPAudit()
        {
            try
            {
                #region 获得批量审核数据集合

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

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

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

                #region 批量审批

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

                    if (head == null)
                    {
                        continue;
                    }

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

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

                    #endregion 审核操作

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

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

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

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

                #endregion 批量审批

                return(string.Empty);
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "勤助岗位申报批量审批出错:" + ex.ToString());
                return("批量审批失败!");
            }
        }
コード例 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (WKF_ExternalInterface.getInstance().IsShowEditButton(user.User_Role, this.Doc_type))
                {
                    m_strIsShowEditBtn = "true";
                }
                param_info = DstParamHandleClass.getInstance().GetDst_param_info(new Dictionary <string, string> {
                    { "SCHYEAR", sch_info.CURRENT_YEAR }, { "DECLARE_FLAG", HQ.Model.CValue.FLAG_Y }
                });

                string optype = Request.QueryString["optype"];
                if (!string.IsNullOrEmpty(optype))
                {
                    switch (optype.ToLower().Trim())
                    {
                    case "getlist":
                        Response.Write(GetList());
                        Response.End();
                        break;

                    case "checkadd":
                        Response.Write(CheckOperate("add"));
                        Response.End();
                        break;

                    case "checkmodi":
                        Response.Write(CheckOperate("modi"));
                        Response.End();
                        break;

                    case "checkdel":
                        Response.Write(CheckOperate("del"));
                        Response.End();
                        break;

                    case "checkdecl":
                        Response.Write(CheckOperate("decl"));
                        Response.End();
                        break;

                    case "checkrevoke":
                        Response.Write(CheckOperate("revoke"));
                        Response.End();
                        break;

                    case "delete":
                        Response.Write(DeleteData());
                        Response.End();
                        break;

                    case "selectstu":
                        Response.Write(SelectStudent());
                        Response.End();
                        break;

                    case "select":
                        Response.Write(GetStudentData());
                        Response.End();
                        break;

                    case "save":
                        Response.Write(SaveData());
                        Response.End();
                        break;

                    case "submit":
                        Response.Write(SubmitData());
                        Response.End();
                        break;

                    case "getgrantlist":
                        Response.Write(GetGrantList());
                        Response.End();
                        break;

                    case "delgrant":
                        Response.Write(DeleteGrant());
                        Response.End();
                        break;

                    case "savegrant":
                        Response.Write(SaveGrant());
                        Response.End();
                        break;

                    case "getmemberlist":
                        Response.Write(GetMemberList());
                        Response.End();
                        break;

                    case "savememberidcard":
                        Response.Write(SaveMemberIdCard());
                        Response.End();
                        break;

                    case "getdata":
                        Response.Write(GetApplyData());
                        Response.End();
                        break;
                    }
                }
            }
        }
コード例 #22
0
        /// <summary>
        /// 批量审批
        /// </summary>
        /// <returns></returns>
        private string MultiPAudit()
        {
            string strFlag = Get("flag");

            string[] strs = Get("ids").Split(',');
            for (int i = 0; i < strs.Length; i++)
            {
                #region 审核操作

                if (strs[i].Length == 0)
                {
                    continue;
                }
                Basic_stu_info_modi head = new Basic_stu_info_modi();
                head.OID = strs[i];
                ds.RetrieveObject(head);
                if (head.RET_CHANNEL.Equals(WKF_VLAUES.RET_CHANNEL_D4000) || head.RET_CHANNEL.Equals(WKF_VLAUES.RET_CHANNEL_A0000))
                {
                    continue;
                }

                string strMsg = WKF_ExternalInterface.getInstance().ChkAudit(head.DOC_TYPE, head.SEQ_NO, user.User_Role);
                if (strMsg.Length > 0)
                {
                    continue;
                }
                strMsg = string.Empty;
                string strOpNote = string.Format("{0}在{1}操作:学生信息修改批量审批{2}", user.User_Id, GetDateLongFormater(), strFlag.Equals("P") ? "通过" : "不通过");
                if (!WKF_ExternalInterface.getInstance().WKF_Audit(head.DOC_TYPE, head.SEQ_NO, user.User_Id, user.User_Role, strFlag, strOpNote, out strMsg))
                {
                    LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, strMsg);
                }

                #endregion 审核操作

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

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

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

                        string strMsgContent = "学生信息修改:" + strApproveInfo;
                        Dictionary <string, string> dicAccpter = new Dictionary <string, string>();
                        dicAccpter.Add(head.NUMBER, head.NAME);
                        MessgeHandleClass.getInstance().SendMessge("M", strMsgContent, user.User_Id, user.User_Name, dicAccpter, out strMsg);
                    }
                }

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

            return(string.Empty);
        }
コード例 #23
0
ファイル: Approve.aspx.cs プロジェクト: libao123/stuCMS
        /// <summary>
        /// 提交审核信息
        /// </summary>
        /// <returns></returns>
        private string ApproveData()
        {
            try
            {
                if (string.IsNullOrEmpty(Get("doc_type")))
                {
                    return("单据类型不能为空!");
                }
                if (string.IsNullOrEmpty(Get("seq_no")))
                {
                    return("单据编号不能为空!");
                }
                if (string.IsNullOrEmpty(Get("decltype")))
                {
                    return("申请类型不能为空!");
                }

                string strMsg  = string.Empty;
                bool   bResult = true;
                decl_type = Get("decltype");
                if (decl_type.Equals(CValue.DECLARE_TYPE_R))
                {
                    bResult = WKF_ExternalInterface.getInstance().WKF_RevokeAudit(Get("doc_type"), Get("seq_no"), user.User_Id, user.User_Role, Post("approveType"), Post("approveMsg"), out strMsg);
                }
                else
                {
                    bResult = WKF_ExternalInterface.getInstance().WKF_Audit(Get("doc_type"), Get("seq_no"), user.User_Id, user.User_Role, Post("approveType"), Post("approveMsg"), out strMsg);
                }

                if (!bResult)//审批成功
                {
                    return("审批失败!");
                }

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

                //审批通过之后给申请人发送信息
                if (!string.IsNullOrEmpty(Get("msg_accpter")))
                {
                    string strFinalPosCode = WKF_AuditHandleCLass.getInstance().GetFinalPosCode(Get("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}审批通过", cod.GetDDLTextByValue("ddl_doc_type", Get("doc_type")));
                            }
                            else
                            {
                                strMsgContent = string.Format("{0}审批不通过,审批意见:{1}", cod.GetDDLTextByValue("ddl_doc_type", Get("doc_type")), Post("approveMsg"));
                            }

                            Dictionary <string, string> dicAccpter = new Dictionary <string, string>();
                            dicAccpter.Add(Get("msg_accpter"), ComHandleClass.getInstance().ByUserIdGetUserName(Get("msg_accpter")));
                            MessgeHandleClass.getInstance().SendMessge("M", strMsgContent, user.User_Id, user.User_Name, dicAccpter, out strMsg);
                            if (strMsg.Length > 0)
                            {
                                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, strMsg);
                            }
                        }
                    }
                }

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

                #region 编班审核或者撤销操作

                //ZZ 20171028 新增:编班审核或者撤销操作时使用
                if (Get("doc_type").Equals(CValue.DOC_TYPE_UA01))
                {
                    #region 撤销申请

                    if (decl_type.Equals(CValue.DECLARE_TYPE_R))//撤销申请
                    {
                        if (WKF_ClientRevokeHandleCLass.getInstance().IsRevokeSuccess(Get("doc_type"), user.User_Role))
                        {
                            #region 编班撤销之后,如果辅导员是研究生,需要去掉研究生的“辅导员角色”

                            //ZZ 20171027 新增:编班审批通过之后,如果辅导员是研究生,需要给研究生多分配一个“辅导员角色”
                            Ua_class_group class_group = UaGroupClassHandle.getInstance().GetUaClassGroup(Get("seq_no"));
                            if (class_group != null)
                            {
                                if (class_group.GROUP_TYPE.Equals("Y"))
                                {
                                    Ua_user user_group = new Ua_user();
                                    user_group.USER_ID = class_group.GROUP_NUMBER;
                                    ds.RetrieveObject(user_group);
                                    if (user_group != null)
                                    {
                                        if (user_group.USER_ROLE.Contains("F"))
                                        {
                                            user_group.USER_ROLE = "S";
                                            ds.UpdateObject(user_group);
                                        }
                                    }
                                }
                            }

                            #endregion 编班撤销之后,如果辅导员是研究生,需要去掉研究生的“辅导员角色”
                        }
                    }

                    #endregion 撤销申请

                    #region 业务申请

                    else//业务申请
                    {
                        string strFinalPosCode = WKF_AuditHandleCLass.getInstance().GetFinalPosCode(Get("doc_type"));
                        //编班审批通过之后,如果辅导员是研究生,需要给研究生多分配一个“辅导员角色”
                        if (!string.IsNullOrEmpty(strFinalPosCode))
                        {
                            if (strFinalPosCode == user.User_Role)
                            {
                                if (Post("approveType").ToString().Equals("P"))
                                {
                                    Ua_class_group class_group = UaGroupClassHandle.getInstance().GetUaClassGroup(Get("seq_no"));
                                    if (class_group.GROUP_TYPE.Equals("Y"))
                                    {
                                        Ua_user user_group = new Ua_user();
                                        user_group.USER_ID = class_group.GROUP_NUMBER;
                                        ds.RetrieveObject(user_group);
                                        if (user_group != null)
                                        {
                                            if (!user_group.USER_ROLE.Contains("F"))
                                            {
                                                user_group.USER_ROLE = "S,F";
                                                ds.UpdateObject(user_group);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    #endregion 业务申请
                }

                #endregion 编班审核或者撤销操作

                return(string.Empty);
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_WARN, "提交审核信息,出错:" + ex.ToString());
                return("审批失败!");
            }
        }
コード例 #24
0
ファイル: List.aspx.cs プロジェクト: libao123/stuCMS
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (WKF_ExternalInterface.getInstance().IsShowEditButton(user.User_Role, this.Doc_type))
                {
                    m_strIsShowEditBtn = "true";
                }

                string optype = Request.QueryString["optype"];
                if (!string.IsNullOrEmpty(optype))
                {
                    switch (optype.ToLower().Trim())
                    {
                    case "getlist":
                        Response.Write(GetList());
                        Response.End();
                        break;

                    case "getdata":
                        Response.Write(GetData());
                        Response.End();
                        break;

                    case "chkmodi":
                        Response.Write(CheckModify());
                        Response.End();
                        break;

                    case "chksave":
                        Response.Write(CheckSave());
                        Response.End();
                        break;

                    case "save":
                        Response.Write(SaveData());
                        Response.End();
                        break;

                    case "submit":
                        Response.Write(SubmitData());
                        Response.End();
                        break;

                    case "chkdel":
                        Response.Write(CheckDelete());
                        Response.End();
                        break;

                    case "delete":
                        Response.Write(DeleteData());
                        Response.End();
                        break;

                    case "chkjob":
                        Response.Write(CheckJob());
                        Response.End();
                        break;
                    }
                }
            }
        }
コード例 #25
0
ファイル: Edit.aspx.cs プロジェクト: libao123/stuCMS
        /// <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("提交审核信息失败!");
            }
        }
コード例 #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (WKF_ExternalInterface.getInstance().IsShowEditButton(user.User_Role, this.Doc_type))
                {
                    m_strIsShowEditBtn = "true";
                }

                string optype = Request.QueryString["optype"];
                if (!string.IsNullOrEmpty(optype))
                {
                    switch (optype.ToLower().Trim())
                    {
                    case "getlist":
                        Response.Write(GetList());
                        Response.End();
                        break;

                    case "checkadd":
                        Response.Write(CheckOperate("add"));
                        Response.End();
                        break;

                    case "checkmodi":
                        Response.Write(CheckOperate("modi"));
                        Response.End();
                        break;

                    case "checkdel":
                        Response.Write(CheckOperate("del"));
                        Response.End();
                        break;

                    case "checkdecl":
                        Response.Write(CheckOperate("decl"));
                        Response.End();
                        break;

                    case "delete":    //删除操作
                        Response.Write(DeleteData());
                        Response.End();
                        break;

                    case "decl":
                        Response.Write(DeclData());
                        Response.End();
                        break;

                    case "save":
                        Response.Write(SaveData());
                        Response.End();
                        break;

                    case "createnewdata":
                        Response.Write(CreateNewData());
                        Response.End();
                        break;

                    case "getmember":
                        Response.Write(GetMember());
                        Response.End();
                        break;

                    case "getfile":
                        Response.Write(GetFile());
                        Response.End();
                        break;

                    case "checkaddmember":
                        Response.Write(CheckAdd());
                        Response.End();
                        break;

                    case "savemember":
                        Response.Write(SaveMember());
                        Response.End();
                        break;

                    case "delmember":
                        Response.Write(DeleteMember());
                        Response.End();
                        break;

                    case "delphoto":
                        Response.Write(DeletePhoto());
                        Response.End();
                        break;

                    case "getrecord":
                        Response.Write(GetSurveyRecord());
                        Response.End();
                        break;

                    case "getdata":
                        Response.Write(GetApplyData(Get("id")));
                        Response.End();
                        break;
                    }
                }
            }
        }
コード例 #27
0
ファイル: List_Pend.aspx.cs プロジェクト: libao123/stuCMS
        /// <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("批量审批失败!");
            }
        }