예제 #1
0
        private string DeclData()
        {
            string msg = SaveData();

            if (msg.Length > 0)
            {
                var oid = Post("OID");
                if (string.IsNullOrEmpty(oid))
                {
                    return("主键为空,不允许提交");
                }

                head.OID = oid;
                ds.RetrieveObject(head);
                msg = CheckFamilyInfo(head.SEQ_NO) + CheckMembers(head.SEQ_NO);
                if (msg.Length > 0)
                {
                    return(msg);
                }
                //学生个人信息是否审核通过
                if (!ComHandleClass.getInstance().IsPassStudentModify(head.NUMBER))
                {
                    return("个人信息修改未审核通过,不允许提交");
                }

                //家庭调查表提交后不需要流转
                Wkf_rule_queue rule = WKF_RuleQueueHandleCLass.getInstance().GetCurrRule(HQ.Model.CValue.DOC_TYPE_BDM04, WKF_VLAUES.DECLARE_TYPE_D, HQ.Model.CValue.STEP_A0, HQ.Model.CValue.RET_CHANNEL_A0010, user.User_Role);
                if (rule == null)
                {
                    msg = "没有权限提交";
                }
                else
                {
                    head.OP_CODE   = user.User_Id;
                    head.OP_NAME   = user.User_Name;
                    head.OP_TIME   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    head.DECL_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    //提交时,插入一条文档编号
                    ComHandleClass.getInstance().InsertIntoBasicStuWordNo(head.NUMBER, head.SCHYEAR);
                    head.SERIAL_NO   = ComHandleClass.getInstance().GetStuWorNo(head.NUMBER, head.SCHYEAR);
                    head.RET_CHANNEL = HQ.Model.CValue.RET_CHANNEL_A0010;
                    ds.UpdateObject(head);

                    //增加一条记录
                    if (!FamilySurveyHandleClass.getInstance().CreateRecord(head))
                    {
                        msg = "提交成功,但生成调查记录失败";
                    }
                }
            }
            else
            {
                msg = "提交失败";
            }

            return(msg);
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        /// <summary>
        /// 生成新的流转规则
        /// </summary>
        /// <param name="doc_type"></param>
        /// <returns></returns>
        private bool InsertNewRule(string doc_type)
        {
            DataTable dtbiz = ds.ExecuteTxtDataTable(string.Format("SELECT * FROM COD_BIZ_CODES A WHERE A.DOC_TYPE='{0}' ", doc_type));
            DataRow drbiz = null;
            if (cod.TableIsValid(dtbiz))
                drbiz = dtbiz.Rows[0];
            else
                return false;
            try
            {
                string op_time = ComTranClass.getInstance().GetCurrLongDateTime();
                if (Post("hidAudit_type").ToString().Equals("Ctype1"))
                {
                    WKF_RuleQueueHandleCLass.getInstance().SetOneLevelRule(doc_type, user.User_Id, op_time);
                }
                else if (Post("hidAudit_type").ToString().Equals("Ctype2"))
                {
                    if (Post("hidDeclare_role").ToString().Equals("Declare_S"))
                        WKF_RuleQueueHandleCLass.getInstance().SetTwoLevelRule(doc_type, user.User_Id, op_time);
                    else
                        WKF_RuleQueueHandleCLass.getInstance().SetTwoLevelRule_F(doc_type, user.User_Id, op_time);
                }
                else if (Post("hidAudit_type").ToString().Equals("Ctype3"))
                {
                    if (Post("hidDeclare_role").ToString().Equals("Declare_S"))
                        WKF_RuleQueueHandleCLass.getInstance().SetThreeLevelRule(doc_type, user.User_Id, op_time);
                    else if (Post("hidDeclare_role").ToString().Equals("Declare_F"))
                        WKF_RuleQueueHandleCLass.getInstance().SetThreeLevelRule_F(doc_type, user.User_Id, op_time);
                    else
                        WKF_RuleQueueHandleCLass.getInstance().SetThreeLevelRule_Y(doc_type, user.User_Id, op_time);
                }
                else if (Post("hidAudit_type").ToString().Equals("Ctype_Q"))
                {
                    if (Post("hidDeclare_role").ToString().Equals("Declare_D"))
                        WKF_RuleQueueHandleCLass.getInstance().SetQZRule(doc_type, user.User_Id, op_time);
                }

                #region 撤销申请审批流转规则

                string audit_type = Post("hidAudit_type").Equals("Ctype1") ? "F" : (Post("hidAudit_type").Equals("Ctype2") ? "Y" : "X");
                if (Post("hidDeclare_role").ToString().Equals("Declare_S"))
                {
                    if (Post("hidRevoke_type").ToString().Equals("Revoke1"))
                        WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_S_F(doc_type, user.User_Id, op_time, audit_type);
                    else if (Post("hidRevoke_type").ToString().Equals("Revoke2"))
                        WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_S_Y(doc_type, user.User_Id, op_time, audit_type);
                    else if (Post("hidRevoke_type").ToString().Equals("Revoke3"))
                        WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_S_X(doc_type, user.User_Id, op_time, audit_type);
                }
                else if (Post("hidDeclare_role").ToString().Equals("Declare_F"))
                {
                    if (Post("hidRevoke_type").ToString().Equals("Revoke2"))
                        WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_F_Y(doc_type, user.User_Id, op_time, audit_type);
                    else if (Post("hidRevoke_type").ToString().Equals("Revoke3"))
                        WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_F_X(doc_type, user.User_Id, op_time, audit_type);
                }
                else if (Post("hidDeclare_role").ToString().Equals("Declare_Y"))
                {
                    if (Post("hidRevoke_type").ToString().Equals("Revoke2"))
                        WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_Y_Y(doc_type, user.User_Id, op_time, audit_type);
                    else if (Post("hidRevoke_type").ToString().Equals("Revoke3"))
                        WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_Y_X(doc_type, user.User_Id, op_time, audit_type);
                }

                #endregion 撤销申请审批流转规则

                return true;
            }
            catch (Exception ex)
            {
                // info = string.Format("生成新的流转规则失败!原因:{0}", ex.Message);
                return false;
            }
        }