Exemplo n.º 1
0
    def test_cwd_17_finace_approve_branch_manager(self):
        '''财务分公司经理审批'''

        remark = u"财务分公司经理审批"

        # 下一个处理人
        self.test_cwd_16_finace_transact()
        page = Login(self.next_user_id)
        result = common.finace_approve(page, self.applyCode, remark)

        if not result:
            raise result
        else:
            self.log.info("财务流程-分公司经理审批结束")
            # 查看下一步处理人
            res = common.process_monitor(page, self.applyCode, 1)
            if not res:
                self.log.error("Can't found Next User!")
                raise
            else:
                self.next_user_id = res
                self.log.info("Next deal User:" + self.next_user_id)
                # 当前用户退出系统
                page.driver.quit()
                self.page.driver.quit()
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
    def test_gqt_20_finace_approve_financial_accounting(self):
        '''财务会计审批'''

        remark = u'财务会计审批'

        self.test_gqt_19_funds_appprove()
        page = Login(self.next_user_id)
        result = common.finace_approve(page, self.applyCode, remark)
        if result:
            self.log.info("财务流程-财务会计审批结束")
        else:
            self.log.error("Error-财务会计审批报错!")
            raise
        # page = Login('xn037166')
        # common.finace_approve(page, "CS20171215X09", remark)

        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            return False
        else:
            self.next_user_id = res
            print("nextId:" + self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
            return res
Exemplo n.º 4
0
    def test_eyt_18_finace_approve_risk_control_manager(self):
        '''财务风控经理审批'''

        remark = u'风控经理审批'

        self.test_eyt_17_finace_approve_branch_manager()
        page = Login(self.next_user_id)
        result = common.finace_approve(page, self.applyCode, remark)
        if not result:
            Log().error("财务流程-风控经理审批出错")
            raise
        else:
            Log().info("财务流程-风控经理审批完成")

        # page = Login('xn003625')
        # common.finace_approve(page, "CS20171215X14", remark)
        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            Log().error("Can't found the next userId!")
            raise
        else:
            self.next_user_id = res
            Log().info("下一步处理人:%s", self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
Exemplo n.º 5
0
	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()
Exemplo n.º 6
0
    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()
Exemplo n.º 7
0
	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()
Exemplo n.º 8
0
    def test_gqt_17_finace_approve_branch_manager(self):
        '''财务分公司经理审批'''

        remark = u"财务分公司经理审批"

        # 下一个处理人
        self.test_gqt_16_finace_transact()
        page = Login(self.next_user_id)
        result = common.finace_approve(page, self.applyCode, remark)

        if not result:
            return False
        else:
            # page = Login('xn028154')
            # common.finace_approve(page, "CS20171215X14", remark)
            self.log.info("财务流程-分公司经理审批结束")
            # 查看下一步处理人
            res = common.process_monitor(page, self.applyCode, 1)
            if not res:
                return False
            else:
                self.next_user_id = res
                print("nextId:" + res)
                # 当前用户退出系统
                page.driver.quit()
                self.page.driver.quit()
                return res
Exemplo n.º 9
0
    def test_gqt_18_finace_approve_risk_control_manager(self):
        '''财务风控经理审批'''

        remark = u'风控经理审批'

        self.test_gqt_17_finace_approve_branch_manager()
        page = Login(self.next_user_id)
        result = common.finace_approve(page, self.applyCode, remark)
        if result:
            self.log.info("财务流程-风控经理审批结束")
        else:
            self.log.error("Error: 风控经理审批出错!")
            raise
        # page = Login('xn003625')
        # common.finace_approve(page, "CS20171215X14", remark)
        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            return False
        else:
            self.next_user_id = res
            print("nextId:" + self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
            return res
Exemplo n.º 10
0
	def test_xhd_19_finace_approve_financial_accounting(self):
		'''财务会计审批'''
		
		remark = u'财务会计审批'
		
		self.test_xhd_18_finace_approve_risk_control_manager()
		page = Login(self.next_user_id)
		result = common.finace_approve(page, self.applyCode, remark)
		if not result:
			Log().error("财务-财务会计审批出错!")
			raise
		else:
			Log().info("财务-财务会计审批完成!")
		
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode, 1)
		if not res:
			Log().error("can't found The next user Id!")
			raise
		else:
			self.next_user_id = res
			print("nextId:" + self.next_user_id)
			Log().info("nextId :%s", res)
			# 当前用户退出系统
			self.page.driver.quit()
Exemplo n.º 11
0
	def test_xhd_18_finace_approve_risk_control_manager(self):
		'''财务风控经理审批'''
		
		remark = u'风控经理审批'
		
		self.test_xhd_17_finace_approve_branch_manager()
		page = Login(self.next_user_id)
		result = common.finace_approve(page, self.applyCode, remark)
		if not result:
			Log().error("财务-风控经理审批出错")
			raise
		else:
			Log().info("财务-风控经理审批完成")
		
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode, 1)
		if not res:
			Log().error("Can't found the next user id")
			raise
		else:
			self.next_user_id = res
			Log().info("nextId: %s", res)
			print("nextId:" + self.next_user_id)
			# 当前用户退出系统
			self.page.driver.quit()
Exemplo n.º 12
0
    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
Exemplo n.º 13
0
    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
Exemplo n.º 14
0
    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
Exemplo n.º 15
0
    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()
Exemplo n.º 16
0
    def test_eyt_16_finace_transact(self):
        '''财务办理'''

        # 权证请款
        self.test_eyt_15_warrant_apply()
        # 业务助理登录
        page = Login(self.company["business_assistant"]["user"])
        rs = common.finace_transact(page, self.applyCode)
        if not rs:
            Log().error("财务办理失败")
            raise

        # page = Login('xn052298')
        # common.finace_transact(page, 'CS20171215C02')

        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            Log().error("没有找到下一步处理人")
            raise
        else:
            self.next_user_id = res
            Log().info("下一步处理人:%s", self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
Exemplo n.º 17
0
	def test_xhd_14_authority_card_member_transact(self):
		'''权证办理'''
		
		# print  u"申请编号:" + self.applyCode
		# 合规审查
		self.test_xhd_13_compliance_audit()
		# 权证员登录
		page = Login(self.company["authority_member"]["user"])
		# 权证员上传权证信息
		res = common.authority_card_transact(page, self.applyCode)
		if not res:
			Log().error("权证员上传资料失败")
			raise
		else:
			Log().info("权证员上传资料成功!")
		# common.authority_card_transact(page, "GZ20171213C06")
		# 查看下一步处理人
		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 UserId is :%s", res)
			# 当前用户退出系统
			self.page.driver.quit()
Exemplo n.º 18
0
	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()
Exemplo n.º 19
0
 def get_next_user(self, page, applyCode):
     next_id = common.process_monitor(page, applyCode)
     if next_id is None:
         self.log.error("没有找到下一步处理人!")
         raise
     else:
         self.next_user_id = next_id
         self.log.info("下一步处理人:" + next_id)
         # 当前用户退出系统
         page.driver.quit()
Exemplo n.º 20
0
	def test_xhd_07_process_monitor(self):
		'''流程监控'''
		
		self.test_xhd_05_get_applyCode()  # 申请件查询
		res = common.process_monitor(self.page, self.applyCode)  # l流程监控
		
		if not res:
			raise
		else:
			self.page.user_info['auth']["username"] = res  # 更新下一个登录人
			self.next_user_id = res
			self.log.info("Next Deal User: " + self.next_user_id)
Exemplo n.º 21
0
    def test_cwd_07_process_monitor(self):
        '''流程监控'''

        self.test_cwd_05_get_applyCode()  # 申请件查询
        res = common.process_monitor(self.page, self.applyCode)  # l流程监控

        if not res:
            raise ValueError("流程监控查询出错!")
        else:
            self.page.user_info['auth']["username"] = res  # 更新下一个登录人
            print self.page.user_info['auth']["username"]
            self.next_user_id = res
            self.log.info("完成流程监控查询")
Exemplo n.º 22
0
    def test_eyt_07_process_monitor(self):
        '''流程监控'''
        self.test_eyt_05_get_applyCode()  # 申请件查询
        res = common.process_monitor(self.page, self.applyCode)  # l流程监控

        if not res:
            raise ValueError("流程监控错误!")
        else:
            self.page.user_info['auth']["username"] = res  # 更新下一个登录人
            print self.page.user_info['auth']["username"]
            self.cust_info['next_user_id'] = res
            self.next_user_id = res
            self.log.info("next deal User: " + self.next_user_id)
Exemplo n.º 23
0
    def test_gqt_07_process_monitor(self):
        '''流程监控'''

        result = self.test_gqt_05_get_applyCode()  # 申请件查询
        res = common.process_monitor(self.page, result[0])  # l流程监控

        if not res:
            self.log.error("流程监控查询失败")
            raise
        else:
            self.page.user_info['auth']["username"] = res  # 更新下一个登录人
            print self.page.user_info['auth']["username"]
            self.next_user_id = res
            self.log.info("完成流程监控查询")
            return res, result[0]  # (下一个处理人ID, 申请件ID)
Exemplo n.º 24
0
    def test_gqt_12_contract_signing(self):
        '''签约'''

        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'北京支行',
        )

        # 获取合同打印专员ID
        next_id = self.test_gqt_11_manager_approval()

        # 下一个处理人重新登录
        page = Login(next_id)

        # 签约
        common.make_signing(page, self.applyCode, rec_bank_info)

        # 查看下一步处理人
        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
Exemplo n.º 25
0
	def test_xhd_12_contract_signing(self):
		'''签约'''
		
		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'北京支行',
				)
		
		# 获取合同打印专员ID
		self.test_xhd_11_manager_approval()
		
		# 下一个处理人重新登录
		page = Login(self.next_user_id)
		
		# 签约
		rs = common.make_signing(page, self.applyCode, rec_bank_info)
		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.page.driver.quit()
Exemplo n.º 26
0
    def test_12_contract_signing(self):
        '''签约'''

        i_frame = 'bTabs_tab_house_commonIndex_todoList'
        # 收款银行信息
        rec_bank_info = dict(
            recBankNum='6210302082441017886',
            recPhone='13686467482',
            recBankProvince=u'湖南省',
            recBankDistrict=u'长沙',
            recBank=u'中国农业银行',
            recBankBranch=u'北京支行',
        )

        # 扣款银行信息
        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'北京支行',
        )

        # 获取合同打印专员ID
        self.test_eyt_11_manager_approval()

        # 下一个处理人重新登录
        page = Login(self.next_user_id)

        # 签约
        common.make_signing(page, self.cust_info['applyCode'], rec_bank_info)

        # 查看下一步处理人
        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()
Exemplo n.º 27
0
    def test_cwd_19_finace_approve_financial_accounting(self):
        '''财务会计审批'''

        remark = u'财务会计审批'

        self.test_cwd_18_finace_approve_risk_control_manager()
        page = Login(self.next_user_id)
        common.finace_approve(page, self.applyCode, remark)

        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            raise ("Can't found next User!")
        else:
            self.log.info("财务流程-财务会计审批结束")
            self.next_user_id = res
            self.log.info("nextId:" + self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
Exemplo n.º 28
0
    def test_eyt_06_show_task(self):
        '''查看待处理任务列表'''
        self.test_eyt_05_get_applyCode()
        next_id = common.process_monitor(self.page, self.applyCode)
        if next_id:
            self.log.info("下一个处理人:" + next_id)
            self.next_user_id = next_id
        else:
            raise ValueError("没有找到下一个处理人!")
        self.page.driver.quit()

        page = Login(self.next_user_id)

        res = common.query_task(page, self.applyCode)
        if res:
            self.log.info("待处理任务列表中存在该笔案件!")
        else:
            self.log.info("待处理任务列表中不存在该笔案件!")
            raise
Exemplo n.º 29
0
    def test_gqt_06_show_task(self):
        '''查看待处理任务列表'''

        result = self.test_gqt_05_get_applyCode()[0]
        next_id = common.process_monitor(self.page, self.applyCode)
        if next_id:
            self.log.info("下一个处理人:" + next_id)
            self.next_user_id = next_id
        else:
            raise ValueError("没有找到下一个处理人!")
        self.page.driver.quit()

        page = Login(self.next_user_id)

        res = common.query_task(page, self.applyCode)
        if res:
            self.log.info("查询待处理任务成功")
            return True
        else:
            return False
Exemplo n.º 30
0
    def test_gqt_16_finace_transact(self):
        '''财务办理'''

        # 权证请款
        self.test_gqt_15_warrant_apply()
        # 业务助理登录
        page = Login(self.company["business_assistant"]["user"])
        common.finace_transact(page, self.applyCode)
        self.log.info("完成财务办理")
        # page = Login('xn052298')
        # common.finace_transact(page, 'CS20171215C02')

        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            return False
        else:
            self.next_user_id = res
            # 当前用户退出系统
            self.page.driver.quit()
            return res