• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python logger.exception函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中scapp.config.logger.exception函数的典型用法代码示例。如果您正苦于以下问题:Python exception函数的具体用法?Python exception怎么用?Python exception使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了exception函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: assets_receivable

def assets_receivable(loan_apply_id):
    '''
    资产负债表-应收账款,预付账款
    账户类型,0:应收账款,1:预付账款
    '''
    if request.method == 'POST':
        result={'result':'success'}
        try:
            sc_assets_receivable( request.form['loan_apply_id'],request.form['accounts_type'],
                            request.form['customer_name'],request.form['describe'],request.form['proportion'],
                            request.form['amount']
            ).add()
            # 事务提交
            db.session.commit()
            # 消息闪现
            #flash('保存成功','Success')
        except:
            # 回滚
            db.session.rollback()
            logger.exception('exception')
            # 消息闪现
            #flash('保存失败','Error')
            result={'result':'fail'}
        finally:
            return json.dumps(result,ensure_ascii=False)
    else :
        data = sc_assets_receivable.query.filter_by(loan_apply_id==loan_apply_id).all()
        encoder.FLOAT_REPR = lambda o: format(o, '.2f')#使float类型字段只显示两位小数
        return json.dumps(data,ensure_ascii=False)
开发者ID:JohnCny,项目名称:xhsc,代码行数:29,代码来源:sc_assets_recervable.py


示例2: change_password

def change_password(id):
    if request.method == 'POST':
        try:
            user = SC_User.query.filter_by(id=id).first()
            if user.login_password == GetStringMD5(request.form['old_password']):
                user.login_password = GetStringMD5(request.form['login_password'])
            else:
                raise Exception

            # 事务提交
            db.session.commit()
            # 消息闪现
            flash('修改密码成功,请重新登录!','success')

        except:
            # 回滚
            db.session.rollback()
            logger.exception('exception')
            # 消息闪现
            flash('修改密码失败,为保障账号安全,请重新登录后再尝试修改!','error')

        logout_user()
        return redirect("login")
    else:
        return render_template("change_password.html")
开发者ID:JohnCny,项目名称:xhsc,代码行数:25,代码来源:index.py


示例3: assets_fixed_assets

def assets_fixed_assets(loan_apply_id):
    '''
    资产负债表-固定资产清单
    '''
    if request.method == 'POST':
        result={'result':'success'}
        try:
            sc_assets_fixed_assets( request.form['loan_apply_id'],request.form['assets_type'],
                                    request.form['assets_name'],request.form['assets_ah'],request.form['describe'],
                                    request.form['assets_date'],request.form['price'],request.form['amount']
            ).add()
            # 事务提交
            db.session.commit()
            # 消息闪现
            #flash('保存成功','Success')
        except:
            # 回滚
            db.session.rollback()
            logger.exception('exception')
            # 消息闪现
            #flash('保存失败','Error')
            result={'result':'fail'}
        finally:
            return json.dumps(result,ensure_ascii=False)
    else :
        data = sc_assets_fixed_assets.query.filter_by(loan_apply_id==loan_apply_id).all()
        encoder.FLOAT_REPR = lambda o: format(o, '.2f')#使float类型字段只显示两位小数
        return json.dumps(data,cls=json_encoding.DateEncoder,ensure_ascii=False)
开发者ID:JohnCny,项目名称:xhsc,代码行数:28,代码来源:sc_assets_fixed_assets.py


示例4: assets_receipts

def assets_receipts(loan_apply_id):
    """
    资产负债表-预收账款
    """
    if request.method == "POST":
        result = {"result": "success"}
        try:
            sc_assets_receipts(
                request.form["loan_apply_id"],
                request.form["source"],
                request.form["occur_date"],
                request.form["describe"],
                request.form["amount"],
            ).add()
            # 事务提交
            db.session.commit()
            # 消息闪现
            # flash('保存成功','Success')
        except:
            # 回滚
            db.session.rollback()
            logger.exception("exception")
            # 消息闪现
            # flash('保存失败','Error')
            result = {"result": "fail"}
        finally:
            return json.dumps(result, ensure_ascii=False)
    else:
        data = sc_assets_receipts.query.filter_by(loan_apply_id == loan_apply_id).all()
        encoder.FLOAT_REPR = lambda o: format(o, ".2f")  # 使float类型字段只显示两位小数
        return json.dumps(data, cls=json_encoding.DateEncoder, ensure_ascii=False)
开发者ID:JohnCny,项目名称:xhsc,代码行数:31,代码来源:sc_assets_receipts.py


示例5: add

 def add(self, request):
     try:
         SC_parameter_configure.query.delete()
         db.session.flush()
         level_base_list = request.form.getlist('level_base')
         level_A1_list = request.form.getlist('level_A1')
         level_A2_list = request.form.getlist('level_A2')
         level_A3_list = request.form.getlist('level_A3')
         level_R_list = request.form.getlist('level_R')
         back_payment = request.form['back_payment']
         performance_a = request.form['performance_a']
         performance_b = request.form['performance_b']
         performance_c = request.form['performance_c']
         level_a = request.form['level_a']
         level_b = request.form['level_b']
         for i in range(len(level_base_list)):
             SC_parameter_configure(i + 1, level_base_list[i], level_A1_list[i], level_A2_list[i],
                                    level_A3_list[i], level_R_list[i], back_payment,performance_a, performance_b, performance_c,
                                    level_a, level_b).add()
         # 事务提交
         db.session.commit()
         # 消息闪现
         flash('保存成功', 'success')
     except:
         # 回滚
         db.session.rollback()
         logger.exception('exception')
         # 消息闪现
         flash('保存失败', 'error')
开发者ID:wangxu2013,项目名称:xhsc,代码行数:29,代码来源:performanceMapper.py


示例6: edit_jggl

def edit_jggl(id):
    if request.method == 'POST':
        try:
            obj = OA_Org.query.filter_by(id=id).first()
            obj.name = request.form['name']
            obj.manager = request.form['manager']
            obj.amount = request.form['amount']
            obj.is_caiwu = request.form['is_caiwu']
            obj.modify_user = current_user.id
            obj.modify_date = datetime.datetime.now()
            
            # 事务提交
            db.session.commit()
            # 消息闪现
            flash('保存成功','success')
        except:
            # 回滚
            db.session.rollback()
            logger.exception('exception')
            # 消息闪现
            flash('保存失败','error')
        
        return redirect('System/jggl')
    else:
        obj = OA_Org.query.filter_by(id=id).first()
        user = OA_User.query.filter("id!=1").all()
        return render_template("System/org/edit_jggl.html",obj=obj,user=user)
开发者ID:wangscript,项目名称:oa-1,代码行数:27,代码来源:jggl.py


示例7: edit_zkqd

def edit_zkqd(id):
	if request.method == 'GET':
		accounts_list = SC_Accounts_List.query.filter_by(id=id).first()
		return render_template("Process/dqdc/edit_zkqd.html",accounts_list=accounts_list)
	else:
		try:
			accounts_list = SC_Accounts_List.query.filter_by(id=id).first()
			accounts_list.name = request.form['name']
			accounts_list.original_price = request.form['original_price']
			accounts_list.occur_date = request.form['occur_date']
			accounts_list.deadline = request.form['deadline']
			accounts_list.present_price = request.form['present_price']
			accounts_list.cooperation_history = request.form['cooperation_history']
			accounts_list.average_period = request.form['average_period']
			accounts_list.trading_frequency = request.form['trading_frequency']
			accounts_list.turnover = request.form['turnover']
			accounts_list.pay_type = request.form['pay_type']
			accounts_list.source = request.form['source']
			accounts_list.other_info = request.form['other_info']

			# 事务提交
			db.session.commit()
			# 消息闪现
			flash('保存成功','success')
		except:
			# 回滚
			db.session.rollback()
			logger.exception('exception')
			# 消息闪现
			flash('保存失败','error')

		return redirect('Process/dqdc/dqdc')
开发者ID:JohnCny,项目名称:xhsc,代码行数:32,代码来源:dqdcXed_zkqd.py


示例8: sc_asset_info

def sc_asset_info(belong_customer_type,belong_customer_value):
	if request.method == 'POST':
		try:
			SC_Asset_Info(request.form['asset_name'],request.form['asset_type'],
				request.form['asset_description'],request.form['asset_position'],request.form['credentials_name'],
				request.form['credentials_no'],request.form['appraisal'],request.form['is_mortgage'],
				request.form['mortgage_amount'],request.form['mortgage_object'],
				belong_customer_type,belong_customer_value).add()

			# 事务提交
			db.session.commit()
            # 消息闪现
			flash('保存成功','success')
		except:
            # 回滚
			db.session.rollback()
			logger.exception('exception')
            # 消息闪现
			flash('保存失败','error')

		return redirect('xxgl')

	else:
		asset_type = SC_Asset_Type.query.order_by("id").all()
		asset_info = SC_Asset_Info.query.filter_by(belong_customer_type=belong_customer_type,
			belong_customer_value=belong_customer_value).order_by("id").all()
		if belong_customer_type == 'Company':
			customer = SC_Company_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_asset_info.html",customer=customer,asset_type=asset_type,
				asset_info=asset_info)
		else:
			customer = SC_Individual_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_asset_info.html",customer=customer,asset_type=asset_type,
				asset_info=asset_info)
开发者ID:JohnCny,项目名称:xhsc,代码行数:34,代码来源:khxxgl.py


示例9: sc_financial_affairs

def sc_financial_affairs(belong_customer_type,belong_customer_value):
	if request.method == 'POST':
		try:
			SC_Financial_Affairs(request.form['main_supplier'],request.form['main_client'],
				request.form['total_assets'],request.form['stock'],request.form['accounts'],
				request.form['fixed_assets'],request.form['total_liabilities'],request.form['bank_borrowings'],
				request.form['private_borrowers'],request.form['monthly_sales'],request.form['profit'],
				request.form['other_monthly_income'],belong_customer_type,belong_customer_value).add()
				
			# 事务提交
			db.session.commit()
            # 消息闪现
			flash('保存成功','success')
		except:
            # 回滚
			db.session.rollback()
			logger.exception('exception')
            # 消息闪现
			flash('保存失败','error')

		return redirect('xxgl')

	else:
		financial_affairs = SC_Financial_Affairs.query.filter_by(belong_customer_type=belong_customer_type,
			belong_customer_value=belong_customer_value).order_by("id").first()

		if belong_customer_type == 'Company':
			customer = SC_Company_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_financial_affairs.html",customer=customer,financial_affairs=financial_affairs)
		else:
			customer = SC_Individual_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_financial_affairs.html",customer=customer,financial_affairs=financial_affairs)
开发者ID:JohnCny,项目名称:xhsc,代码行数:32,代码来源:khxxgl.py


示例10: sc_dealings

def sc_dealings(belong_customer_type,belong_customer_value):
	if request.method == 'POST':
		try:
			SC_Dealings(request.form['deal_name'],request.form['deal_description'],
				belong_customer_type,belong_customer_value).add()

			# 事务提交
			db.session.commit()
            # 消息闪现
			flash('保存成功','success')
		except:
            # 回滚
			db.session.rollback()
			logger.exception('exception')
            # 消息闪现
			flash('保存失败','error')

		return redirect('xxgl')

	else:
		dealings = SC_Dealings.query.filter_by(belong_customer_type=belong_customer_type,
			belong_customer_value=belong_customer_value).order_by("id").all()
		if belong_customer_type == 'Company':
			customer = SC_Company_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_dealings.html",customer=customer,dealings=dealings)
		else:
			customer = SC_Individual_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_dealings.html",customer=customer,dealings=dealings)
开发者ID:JohnCny,项目名称:xhsc,代码行数:28,代码来源:khxxgl.py


示例11: sc_relations

def sc_relations(belong_customer_type,belong_customer_value):
	if request.method == 'POST':
		try:
			SC_Relations(request.form['relation_no'],request.form['relation_name'],
				request.form['relation_type'],request.form['cgbl'],request.form['business_name'],
				request.form['relation_describe'],belong_customer_type,belong_customer_value).add()

			# 事务提交
			db.session.commit()
            # 消息闪现
			flash('保存成功','success')
		except:
            # 回滚
			db.session.rollback()
			logger.exception('exception')
            # 消息闪现
			flash('保存失败','error')

		return redirect('xxgl')

	else:
		if belong_customer_type == 'Company':
			customer = SC_Company_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_relations.html",customer=customer)
		else:
			customer = SC_Individual_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_relations.html",customer=customer)
开发者ID:JohnCny,项目名称:xhsc,代码行数:27,代码来源:khxxgl.py


示例12: delete_khxxgl

def delete_khxxgl(type,id):
    loan_apply = SC_Loan_Apply.query.filter_by(belong_customer_type=type,belong_customer_value=id).first()
    if loan_apply is None:
        try:
            if type == "Individual":
                SC_Individual_Customer.query.filter_by(id=id).delete()
            else:
                SC_Company_Customer.query.filter_by(id=id).delete()
            
            SC_Dealings.query.filter_by(belong_customer_type=type,belong_customer_value=id).delete()
            SC_Relations.query.filter_by(belong_customer_type=type,belong_customer_value=id).delete()
            SC_Manage_Info.query.filter_by(belong_customer_type=type,belong_customer_value=id).delete()
            SC_Asset_Info.query.filter_by(belong_customer_type=type,belong_customer_value=id).delete()
            SC_Financial_Affairs.query.filter_by(belong_customer_type=type,belong_customer_value=id).delete()
            SC_Other_Info.query.filter_by(belong_customer_type=type,belong_customer_value=id).delete()
            # 事务提交
            db.session.commit()
            # 消息闪现
            flash('删除成功','success')
        except:
            # 回滚
            db.session.rollback()
            logger.exception('exception')
            # 消息闪现
            flash('删除失败','error')
    else:
        flash('该客户已提交贷款申请,无法删除','error')
        
    return redirect('Information/khxxgl')
开发者ID:JohnCny,项目名称:xhsc,代码行数:29,代码来源:khxxgl.py


示例13: assets_loan

def assets_loan(loan_apply_id):
    '''
    资产负债表-银行贷款,社会集资
    '''
    if request.method == 'POST':
        result={'result':'success'}
        try:
            sc_assets_loan( request.form['loan_apply_id'],request.form['loan_type'],
                                    request.form['loan_org'],request.form['loan_amount'],request.form['loan_date'],
                                    request.form['loan_deadline'],request.form['guarantee'],request.form['banlance']
            ).add()
            # 事务提交
            db.session.commit()
            # 消息闪现
            #flash('保存成功','Success')
        except:
            # 回滚
            db.session.rollback()
            logger.exception('exception')
            # 消息闪现
            #flash('保存失败','Error')
            result={'result':'fail'}
        finally:
            return json.dumps(result,ensure_ascii=False)
    else :
        data = sc_assets_loan.query.filter_by(loan_apply_id==loan_apply_id).all()
        encoder.FLOAT_REPR = lambda o: format(o, '.2f')#使float类型字段只显示两位小数
        return json.dumps(data,cls=json_encoding.DateEncoder,ensure_ascii=False)
开发者ID:JohnCny,项目名称:xhsc,代码行数:28,代码来源:sc_assets_loan.py


示例14: dqdcXed_zcfzb

def dqdcXed_zcfzb(loan_apply_id):
	if request.method == 'GET':
		balance_sheets = SC_Balance_Sheet.query.filter_by(loan_apply_id=loan_apply_id).order_by("id").all()
		count_0 = SC_Balance_Sheet.query.filter_by(loan_apply_id=loan_apply_id,loan_type=0).count()
		count_2 = SC_Balance_Sheet.query.filter_by(loan_apply_id=loan_apply_id,loan_type=2).count()
		count_4 = SC_Balance_Sheet.query.filter_by(loan_apply_id=loan_apply_id,loan_type=4).count()
		count_6 = SC_Balance_Sheet.query.filter_by(loan_apply_id=loan_apply_id,loan_type=6).count()
		count_10 = SC_Balance_Sheet.query.filter_by(loan_apply_id=loan_apply_id,loan_type=10).count()
		count_12 = SC_Balance_Sheet.query.filter_by(loan_apply_id=loan_apply_id,loan_type=12).count()
		return render_template("Process/dqdc/dqdcXed_zcfzb.html",loan_apply_id=loan_apply_id,
			balance_sheets=balance_sheets,count_0=count_0,count_2=count_2,count_4=count_4,count_6=count_6,
			count_10=count_10,count_12=count_12)
	else:
		try:
			SC_Balance_Sheet.query.filter_by(loan_apply_id=loan_apply_id).delete()
			db.session.flush()

			for i in range(34):
				for j in range(len(request.form.getlist('type_%s' % i))):
					SC_Balance_Sheet(loan_apply_id,i,request.form.getlist('name_%s' % i)[j],
						j,request.form.getlist('value_%s' % i)[j]).add()

			# 事务提交
			db.session.commit()
			# 消息闪现
			flash('保存成功','success')
		except:
			# 回滚
			db.session.rollback()
			logger.exception('exception')
			# 消息闪现
			flash('保存失败','error')
			
		return redirect('Process/dqdc/dqdcXed_zcfzb/%d' % loan_apply_id)
开发者ID:JohnCny,项目名称:xhsc,代码行数:34,代码来源:dqdcXed_zcfzb.py


示例15: assets_stock

def assets_stock(loan_apply_id):
    '''
    资产负债表-存货
    '''
    if request.method == 'POST':
        result={'result':'success'}
        try:
            sc_assets_stock( request.form['loan_apply_id'],request.form['stock_type'],
                            request.form['stock_evaluate'],request.form['stock_mobility'],request.form['proportion'],
                            request.form['amount']
            ).add()
            # 事务提交
            db.session.commit()
            # 消息闪现
            #flash('保存成功','Success')
        except:
            # 回滚
            db.session.rollback()
            logger.exception('exception')
            # 消息闪现
            #flash('保存失败','Error')
            result={'result':'fail'}
        finally:
            return json.dumps(result,ensure_ascii=False)
    else :
        data = sc_assets_stock.query.filter_by(loan_apply_id==loan_apply_id).all()
        encoder.FLOAT_REPR = lambda o: format(o, '.2f')#使float类型字段只显示两位小数
        return json.dumps(data,ensure_ascii=False)
开发者ID:JohnCny,项目名称:xhsc,代码行数:28,代码来源:sc_assets_stock.py


示例16: sc_other_info

def sc_other_info(belong_customer_type,belong_customer_value):
	if request.method == 'POST':
		try:
			# 先获取上传文件
			f = request.files['attachment']
			fname = f.filename
			f.save(os.path.join(UPLOAD_FOLDER_ABS, fname))

			SC_Other_Info(request.form['info_name'],request.form['info_description'],
				UPLOAD_FOLDER_REL + fname,belong_customer_type,belong_customer_value).add()

			# 事务提交
			db.session.commit()
            # 消息闪现
			flash('保存成功','success')
		except:
            # 回滚
			db.session.rollback()
			logger.exception('exception')
            # 消息闪现
			flash('保存失败','error')

		return redirect('xxgl')

	else:
		other_info = SC_Other_Info.query.filter_by(belong_customer_type=belong_customer_type,
			belong_customer_value=belong_customer_value).order_by("id").all()
		if belong_customer_type == 'Company':
			customer = SC_Company_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_other_info.html",customer=customer,other_info=other_info)
		else:
			customer = SC_Individual_Customer.query.filter_by(id=belong_customer_value).first()
			return render_template("Information/sc_other_info.html",customer=customer,other_info=other_info)
开发者ID:JohnCny,项目名称:xhsc,代码行数:33,代码来源:khxxgl.py


示例17: new_assets_aa

def new_assets_aa(loan_apply_id):
    if request.method == "POST":
        result = {"result": "success"}
        try:
            sc_assets_acceptances(
                request.form["loan_apply_id"],
                request.form["bank"],
                request.form["account_expiry_date"],
                request.form["account_balance"],
            ).add()
            # 事务提交
            db.session.commit()
            # 消息闪现
            # flash('保存成功','Success')
        except:
            # 回滚
            db.session.rollback()
            logger.exception("exception")
            # 消息闪现
            # flash('保存失败','Error')
            result = {"result": "fail"}
        finally:
            return json.dumps(result, ensure_ascii=False)
        # return redirect('/Process/dqdc/new_xjlfx')
    else:
        cfa_data = sc_assets_acceptances.query.filter_by(loan_apply_id == loan_apply_id).all()
        return json.dumps(cfa_data, cls=json_encoding.DateEncoder, ensure_ascii=False)
开发者ID:JohnCny,项目名称:xhsc,代码行数:27,代码来源:sc_assets_acceptances.py


示例18: new_company_customer

def new_company_customer(target_customer_id):
	if request.method == 'POST':
		try:
			SC_Company_Customer(current_user.id,request.form['customer_no'],request.form['customer_name'],
				request.form['frdb'],request.form['yyzz'],request.form['yyzz_fzjg'],request.form['swdjz'],
				request.form['swdjz_fzjg'],request.form['gszczj'],request.form['gsyyfw'],request.form['gsclrq'],
				request.form['gszclx'],request.form['jbhzh'],request.form['zcdz'],request.form['xdz'],request.form['bgdz'],
				request.form['qtdz'],request.form['education'],request.form['family'],request.form['telephone'],
				request.form['mobile'],request.form['contact_phone'],request.form['email']).add()

			# 事务提交
			db.session.commit()
            # 消息闪现
			flash('保存成功','success')
		except:
            # 回滚
			db.session.rollback()
			logger.exception('exception')
            # 消息闪现
			flash('保存失败','error')
			
		return redirect('Information/khxxgl')

	else:	
		target_customer = SC_Target_Customer.query.filter_by(id=target_customer_id).first()
		user = SC_User.query.order_by("id").all()
		regisiter_type = SC_Regisiter_Type.query.order_by("id").all()

		return render_template("Information/new_company_customer.html",user=user,
			regisiter_type=regisiter_type,target_customer=target_customer)
开发者ID:JohnCny,项目名称:xhsc,代码行数:30,代码来源:khxxgl.py


示例19: wdgl_delete

def wdgl_delete(id):
    try:
        oa_doc = OA_Doc.query.filter_by(id=id).first()
        doc_versions = OA_Doc_Version.query.filter_by(doc_id=id).all()
        #删除db
        OA_Doc.query.filter_by(id=id).delete()
        db.session.flush()
        #删权限
        OA_Privilege.query.filter_by(privilege_access="OA_Doc",privilege_access_value=id).delete()
        db.session.flush()
        #删文件
        for obj in doc_versions:
            if oa_doc.org_id:
                dir_version = "OA_Org" + "_" +str(oa_doc.org_id)+"/"+str(id)+"_"+str(obj.version)
            else:
                dir_version = "OA_Project" + "_" +str(oa_doc.project_id)+"/"+str(id)+"_"+str(obj.version)
            shutil.rmtree(os.path.join(UPLOAD_FOLDER_ABS,dir_version))
        
        # 事务提交
        db.session.commit()
        # 消息闪现
        flash('保存成功','success')
    except:
        # 回滚
        db.session.rollback()
        logger.exception('exception')
        # 消息闪现
        flash('保存失败','error')
        
    return render_template("wdgl/wdgl.html")
开发者ID:wangscript,项目名称:oa-1,代码行数:30,代码来源:wdgl.py


示例20: new_xjlfx

def new_xjlfx(id,type,loan_apply_id):
    if request.method == 'POST':
        result={'result':'success'}
        try:
            cash_flow( request.form['loan_apply_id'],request.form['type'],request.form['month'],request.form['early_cash'],
                        request.form['sale_amount'],request.form['accounts_receivable'],request.form['prepaments'],
                        request.form['total_cash_flow'],request.form['cash_purchase'],request.form['accounts_payable'],
                        request.form['advance_purchases'],request.form['total_cash_outflow'],
                        request.form['wage_labor'],request.form['tax'],
                        request.form['transportation_costs'],request.form['rent'],request.form['maintenance_fees'],
                        request.form['utility_bills'],request.form['advertising_fees'],request.form['social_intercourse_fees'],
                        request.form['fixed_asset_investment'],request.form['disposal_of_fixed_assets'],
                        request.form['investment_cash_flow'],request.form['bank_loans'],request.form['repayments_bank'],
                        request.form['financing_cash_flow'],request.form['household_expenditure'],request.form['private_use'],
                        request.form['private_cash_flow'],request.form['fixed_costs'],
            ).add()
            # 事务提交
            db.session.commit()
            # 消息闪现
            #flash('保存成功','Success')
        except:
            # 回滚
            db.session.rollback()
            logger.exception('exception')
            # 消息闪现
            #flash('保存失败','Error')
            result={'result':'fail'}
        finally:
            return json.dumps(result,ensure_ascii=False)
    else :
        cash_flow_data = cash_flow.query.filter_by(loan_apply_id==loan_apply_id,type==type).first()
        encoder.FLOAT_REPR = lambda o: format(o, '.2f')#使float类型字段只显示两位小数
        return json.dumps(cash_flow_data,ensure_ascii=False)
开发者ID:JohnCny,项目名称:xhsc,代码行数:33,代码来源:cash_flow.py



注:本文中的scapp.config.logger.exception函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python all.rdpcap函数代码示例发布时间:2022-05-27
下一篇:
Python Model.Model类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap