def test_xhd_11_manager_approval(self): '''高级审批经理审批''' # 获取审批经理ID self.test_xhd_10_regional_prereview() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 result = common.approval_to_review(page, self.applyCode, u'高级审批经理审批') if not result: Log().error("风控-高级审批经理审批失败") raise else: Log().info("风控-高级审批经理审批完成") # 查看下一步处理人 res = common.process_monitor(page, self.applyCode) if not res: Log().error("Can't found Next userId!") raise else: self.next_user_id = res Log().info("next_user_id: %s", res) # 当前用户退出系统 self.page.driver.quit()
def test_eyt_10_regional_prereview(self): '''区域预复核审批''' # 获取区域预复核员ID self.test_eyt_09_branch_manager_approval() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 res = common.approval_to_review(page, self.applyCode, u'区域预复核通过') if not res: Log().error("区域预复核失败") raise else: Log().info("区域预复核审批完成!") # 查看下一步处理人 res = common.process_monitor(page, self.applyCode) if not res: Log().error("Can't not found the next UserId") raise else: self.next_user_id = res Log().info("next_user_id %s", self.next_user_id) # 当前用户退出系统 self.page.driver.quit()
def test_xhd_09_branch_manager_approval(self): '''分公司经理审批''' # 获取分公司经理登录ID self.test_xhd_08_branch_supervisor_approval() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 res = common.approval_to_review(page, self.applyCode, u'分公司经理同意审批') if not res: Log().error("风控-分公司审批失败") raise else: Log().info("风控-分公司经理完成!") # 查看下一步处理人 res = common.process_monitor(page, self.applyCode) if not res: Log().error("Can't found the next userId!") raise else: self.next_user_id = res Log().info("next User Id is :%s", res) # 当前用户退出系统 self.page.driver.quit()
def test_xhd_10_regional_prereview(self): '''区域预复核审批''' # 获取区域预复核员ID self.test_xhd_09_branch_manager_approval() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 rs = common.approval_to_review(page, self.applyCode, u'区域预复核通过') if not rs: Log().error("风控-区域预复核失败") raise else: Log().info("风控-区域预复核成功!") # 查看下一步处理人 res = common.process_monitor(page, self.applyCode) if not res: self.log.error("Can't Get next User") raise else: self.next_user_id = res self.log.info("Next deal User:" + self.next_user_id) # 当前用户退出系统 self.page.driver.quit()
def test_gqt_11_manager_approval(self): '''审批经理审批''' # 获取审批经理ID next_id = self.test_gqt_10_regional_prereview() # 下一个处理人重新登录 page = Login(next_id) # 审批审核 res = common.approval_to_review(page, self.applyCode, u'审批经理审批') if not res: self.log.error("can't find applycode") raise ValueError("can't find applycode") # 查看下一步处理人 res = common.process_monitor(page, self.applyCode) if not res: return False else: self.next_user_id = res self.log.info("风控审批-审批经理审批结束") # 当前用户退出系统 self.page.driver.quit() return res
def test_gqt_08_branch_supervisor_approval(self): '''分公司主管审批''' # 获取分公司登录ID res = self.test_gqt_07_process_monitor() print "userId:" + res[0] # 下一个处理人重新登录 page = Login(res[0]) # 审批审核 res = common.approval_to_review(page, res[1], u'分公司主管同意审批') if not res: self.log.error("can't find applycode") raise ValueError("can't find applycode") # 查看下一步处理人 next_id = common.process_monitor(page, self.applyCode) if not res: self.log.error("流程监控查询失败") raise else: self.next_user_id = next_id self.log.info("风控审批-分公司主管审批结束") # 当前用户退出系统 self.page.driver.quit() return next_id # 下一步处理人ID
def test_gqt_09_branch_manager_approval(self): '''分公司经理审批''' # 获取分公司经理登录ID next_id = self.test_gqt_08_branch_supervisor_approval() # 下一个处理人重新登录 page = Login(next_id) # 审批审核 res = common.approval_to_review(page, self.applyCode, u'分公司经理同意审批') if not res: self.log.error("can't find applycode") raise ValueError("can't find applycode") # 查看下一步处理人 res = common.process_monitor(page, self.applyCode) if not res: return False else: self.next_user_id = res self.log.info("风控审批-分公司经理审批结束") # 当前用户退出系统 self.page.driver.quit() return res
def test_cwd_11_manager_approval(self): '''高级审批经理审批''' # 获取审批经理ID self.test_cwd_10_regional_prereview() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 res = common.approval_to_review(page, self.applyCode, u'审批经理审批') if not res: custom.Log().ERROR("can't find applycode") raise ValueError("can't find applycode") else: self.log.info("风控审批-审批经理审批结束") # 查看下一步处理人 res = common.process_monitor(page, self.applyCode) if not res: self.log.error("Can't found next user!") else: self.next_user_id = res self.log.info("下一个处理人:" + self.next_user_id) # 当前用户退出系统 self.page.driver.quit()
def test_cwd_08_branch_supervisor_approval(self): '''分公司主管审批''' # 获取分公司登录ID self.test_cwd_07_process_monitor() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 res = common.approval_to_review(page, self.applyCode, u'分公司主管同意审批') if not res: self.log.error("can't find applycode") raise ValueError("can't find applycode") else: self.log.info("风控审批-分公司主管审批结束") # 查看下一步处理人 next_id = common.process_monitor(page, self.applyCode) if not res: self.log.error("查询下一步处理人出错!") raise else: self.next_user_id = next_id self.log.info("下一个处理人:" + self.next_user_id) # 当前用户退出系统 self.page.driver.quit()
def test_eyt_11_manager_approval(self): '''高级审批经理审批''' # 获取审批经理ID self.test_eyt_10_regional_prereview() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 common.approval_to_review(page, self.applyCode, u'高级审批经理审批') # 查看下一步处理人 res = common.process_monitor(page, self.applyCode) if not res: raise else: self.cust_info['next_user_id'] = res self.next_user_id = res self.log.info("下一个处理人:" + res) # 当前用户退出系统 self.page.driver.quit()
def test_eyt_08_branch_supervisor_approval(self): '''分公司主管审批''' # 获取分公司登录ID self.test_eyt_07_process_monitor() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 common.approval_to_review(page, self.applyCode, u'分公司主管同意审批') # 查看下一步处理人 next_id = common.process_monitor(page, self.cust_info['applyCode']) if not next_id: raise else: self.cust_info['next_user_id'] = next_id self.next_user_id = next_id self.log.info("下一个处理人:" + self.next_user_id) # 当前用户退出系统 self.page.driver.quit()
def test_xhd_08_branch_supervisor_approval(self): '''分公司主管审批''' # 获取分公司登录ID self.test_xhd_07_process_monitor() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 common.approval_to_review(page, self.applyCode, u'分公司主管同意审批') # 查看下一步处理人 next_id = common.process_monitor(page, self.applyCode) if not next_id: self.log.error("Can't Get Next User") raise else: self.next_user_id = next_id self.log.info("Next Deal User: " + self.next_user_id) # 当前用户退出系统 self.page.driver.quit()
def test_eyt_09_branch_manager_approval(self): '''分公司经理审批''' # 获取分公司经理登录ID self.test_eyt_08_branch_supervisor_approval() # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批审核 common.approval_to_review(page, self.cust_info['applyCode'], u'分公司经理同意审批') # 查看下一步处理人 res = common.process_monitor(page, self.cust_info['applyCode']) if not res: raise else: self.cust_info['next_user_id'] = res self.next_user_id = res self.log.info("下一个处理人: " + self.next_user_id) # 当前用户退出系统 self.page.driver.quit()
def test_warrantManage_original(self): '''原件请款''' ''' 1. 申请录入 ''' # 1 客户信息-业务基本信息 if common.input_customer_base_info(self.page, self.data['applyVo']): self.log.info("录入基本信息完成") # 2 客户基本信息 - 借款人/共贷人/担保人信息 self.custName = common.input_customer_borrow_info( self.page, self.data['custInfoVo'][0])[1] # 3 物业信息 common.input_cwd_bbi_Property_info( self.page, self.data['applyPropertyInfoVo'][0], self.data['applyCustCreditInfoVo'][0]) # 提交 common.submit(self.page) self.log.info("申请件录入完成提交") applyCode = common.get_applycode(self.page, self.custName) if applyCode: self.applyCode = applyCode self.log.info("申请件查询完成") print("applyCode:" + self.applyCode) # 流程监控 result = common.process_monitor(self.page, applyCode) if result is not None: self.next_user_id = result self.log.info("完成流程监控查询") else: self.log.error("流程监控查询出错!") raise ''' 2. 风控审批流程 ''' # 下一个处理人重新登录 page = Login(result) # 分公司主管审批 res = common.approval_to_review(page, applyCode, u'分公司主管审批通过', 0) if not res: self.log.error("审批失败") raise self.get_next_user(page, applyCode, u'分公司主管审批通过!') # 下一个处理人重新登录 page = Login(self.next_user_id) # 分公司经理审批 res = common.approval_to_review(page, applyCode, u'分公司经理回退到申请录入', 0) if not res: self.log.error("审批失败") raise self.get_next_user(page, applyCode, u'分公司经理审批通过!') # 下一个处理人重新登录 page = Login(self.next_user_id) # 区域预复核审批 res = common.approval_to_review(page, applyCode, u'区域预复核审批通过', 0) if not res: self.log.error("区域预复核审批失败!") raise self.get_next_user(page, applyCode, u'区域预复核审批通过!') # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批经理审批通过 res = common.approval_to_review(page, applyCode, u'审批经理审批通过', 0) if not res: self.log.error("审批经理审批失败!") raise self.get_next_user(page, applyCode, u'审批经理审批成功!') ''' 3. 合同打印 ''' # 下一个处理人重新登录 page = Login(self.next_user_id)
def test_01_region_special_approval(self): '''区域李伟波特批''' ''' --------------------------------------------------------------------- 1. 申请基本信息录入 --------------------------------------------------------------------- ''' # 1 客户信息-业务基本信息 if common.input_customer_base_info(self.page, self.data['applyVo']): self.log.info("录入基本信息完成") # 2 客户基本信息 - 借款人/共贷人/担保人信息 self.custName = common.input_customer_borrow_info( self.page, self.data['custInfoVo'][0])[1] # 3 物业信息 common.input_cwd_bbi_Property_info( self.page, self.data['applyPropertyInfoVo'][0], self.data['applyCustCreditInfoVo'][0]) # 提交 common.submit(self.page) self.log.info("申请件录入完成提交") self.log.info("主借人:" + self.custName) applyCode = common.get_applycode(self.page, self.custName) if applyCode: self.applyCode = applyCode self.log.info("申请件查询完成:" + self.applyCode) else: self.log.error("申请件查询失败!") raise # 流程监控 result = common.process_monitor(self.page, applyCode) if result is not None: self.next_user_id = result self.log.info("完成流程监控查询") self.page.driver.quit() else: self.log.error("流程监控查询出错!") raise ''' ------------------------------------------------------------ 2. 风控审批-区域特批 ------------------------------------------------------------ ''' # 下一个处理人重新登录 page = Login(result) # 分公司主管审批 res = common.approval_to_review(page, applyCode, u'分公司主管审批通过', 0) if not res: self.log.error("审批失败") raise else: self.log.info(u'分公司主管审批通过!') self.get_next_user(page, applyCode) # 下一个处理人重新登录 page = Login(self.next_user_id) # 分公司经理审批通过 res = common.approval_to_review(page, applyCode, u'分公司经理回退到申请录入', 0) if not res: self.log.error("审批失败") raise else: self.log.info(u'分公司经理审批通过!') self.get_next_user(page, applyCode) # 下一个处理人重新登录 page = Login(self.next_user_id) if self.next_user_id != 'xn004754': # 区域特批 res = common.approval_to_review(page, applyCode, u'区域审批经理审批', 0) if not res: self.log.error("区域审批经理审批失败") raise else: self.log.info(u'区域审批经理审批成功!') self.get_next_user(page, applyCode) else: r = common.special_approval(page, self.applyCode, u'区域特批') if not r: self.log.error('区域特批出错!') raise else: self.log.info('区域特批通过!') page.driver.quit()
def test_one_person_sign(self): '''单人签约''' # --------------------------------------------------------------------------------- # 1. 申请录入 # --------------------------------------------------------------------------------- # 1 客户信息-业务基本信息 if common.input_customer_base_info(self.page, self.data['applyVo']): self.log.info("录入基本信息完成") # 2 客户基本信息 - 借款人/共贷人/担保人信息 self.custName = common.input_customer_borrow_info(self.page, self.data['custInfoVo'][0])[1] # 3 物业信息 common.input_cwd_bbi_Property_info(self.page, self.data['applyPropertyInfoVo'][0], self.data['applyCustCreditInfoVo'][0]) # 提交 common.submit(self.page) self.log.info("申请件录入完成提交") applyCode = common.get_applycode(self.page, self.custName) if applyCode: self.applyCode = applyCode self.log.info("申请件查询完成") print("applyCode:" + self.applyCode) # 流程监控 result = common.process_monitor(self.page, applyCode) if result is not None: self.next_user_id = result self.log.info("完成流程监控查询") else: self.log.error("流程监控查询出错!") raise # --------------------------------------------------------------------------------------- # 2. 风控审批流程 # --------------------------------------------------------------------------------------- # 下一个处理人重新登录 page = Login(result) # 分公司主管审批 res = common.approval_to_review(page, applyCode, u'分公司主管审批通过', 0) if not res: self.log.error("审批失败") raise else: self.log.info("分公司主管审批通过!") self.get_next_user(page, applyCode) # 下一个处理人重新登录 page = Login(self.next_user_id) # 分公司经理审批 res = common.approval_to_review(page, applyCode, u'分公司经理回退到申请录入', 0) if not res: self.log.error("审批失败") raise else: self.log.info("分公司经理审批通过!") self.get_next_user(page, applyCode) # 下一个处理人重新登录 page = Login(self.next_user_id) # 区域预复核审批 res = common.approval_to_review(page, applyCode, u'区域预复核审批通过', 0) if not res: self.log.error("区域预复核审批失败!") raise else: self.log.info("区域预复核审批通过") self.get_next_user(page, applyCode) # 下一个处理人重新登录 page = Login(self.next_user_id) # 审批经理审批通过 res = common.approval_to_review(page, applyCode, u'审批经理审批通过', 0) if not res: self.log.error("审批经理审批失败!") raise else: self.log.info("审批经理审批通过成功!") self.get_next_user(page, applyCode) # ----------------------------------------------------------------------------- # 3. 合同打印 # ----------------------------------------------------------------------------- i_frame = 'bTabs_tab_house_commonIndex_todoList' rec_bank_info = dict( recBankNum=self.data['houseCommonLoanInfoList'][0]['recBankNum'], recPhone=self.data['houseCommonLoanInfoList'][0]['recPhone'], recBankProvince=self.data['houseCommonLoanInfoList'][0]['recBankProvince'], recBankDistrict=self.data['houseCommonLoanInfoList'][0]['recBankDistrict'], recBank=self.data['houseCommonLoanInfoList'][0]['recBank'], recBankBranch=self.data['houseCommonLoanInfoList'][0]['recBankBranch'], ) # 扣款银行信息 rep_bank_info = dict( rep_name=u'习近平', rep_id_num='420101198201013526', rep_bank_code='6210302082441017886', rep_phone='13686467482', provice=u'湖南省', district=u'长沙', rep_bank_name=u'中国银行', rep_bank_branch_name=u'北京支行', ) # 下一个处理人重新登录 page = Login(self.next_user_id) # 签约 common.make_signing(page, self.applyCode, rec_bank_info) self.log.info("签约完成") # 查看下一步处理人 self.get_next_user(page, applyCode)