From a0b95aa4e376d8914f42d16829cf61340ef4312d Mon Sep 17 00:00:00 2001 From: apan Date: Thu, 28 Jul 2022 14:58:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=90=8D=E7=A7=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common/Utils.py | 5 ----- Common/auth.py | 2 +- Common/errors.py | 2 +- apps/drug/views.py | 2 +- apps/drug_template/views.py | 4 ++-- apps/home/views.py | 2 +- config/system.conf | 2 +- db_logic/client.py | 9 +++++++-- db_logic/db_base.py | 2 +- db_logic/medicament_record.py | 2 +- db_logic/medicament_template.py | 2 +- db_logic/meidcament_variety.py | 2 +- db_logic/warning.py | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Common/Utils.py b/Common/Utils.py index fa2b634..224f100 100644 --- a/Common/Utils.py +++ b/Common/Utils.py @@ -11,12 +11,7 @@ import platform import hashlib import uuid import psutil -from dateutil import parser, relativedelta -from sqlalchemy import and_ from config.SystemConfig import SystemConfig -from db_logic.client import BllClient -from db_logic.humiture_record import BllHumitureRecord -from models.humiture_models import EntityHumitureRecord # 判断当前系统是linux还是windows system_name = platform.system() diff --git a/Common/auth.py b/Common/auth.py index 7914ee3..039f319 100644 --- a/Common/auth.py +++ b/Common/auth.py @@ -8,7 +8,7 @@ from flask import g from flask_httpauth import HTTPBasicAuth, HTTPTokenAuth from db_logic.user import BllUser from models.user_models import EntityUser -from common.errors import error_response +from Common.errors import error_response basic_auth = HTTPBasicAuth() token_auth = HTTPTokenAuth() diff --git a/Common/errors.py b/Common/errors.py index 8737600..280695e 100644 --- a/Common/errors.py +++ b/Common/errors.py @@ -6,7 +6,7 @@ from flask import jsonify from werkzeug.http import HTTP_STATUS_CODES -from common.utils import Utils +from Common.Utils import Utils def error_response(status_code, message=None): payload = Utils.except_return( diff --git a/apps/drug/views.py b/apps/drug/views.py index 795f2ff..7f295e1 100644 --- a/apps/drug/views.py +++ b/apps/drug/views.py @@ -14,7 +14,7 @@ from models.medicament_models import EntityMedicament from db_logic.user import BllUser from models.user_models import EntityUser from models.client_models import EntityClient -from common.utils import DrugStatus, PageParam, Utils +from Common.Utils import DrugStatus, PageParam, Utils drug_router = Blueprint("drug", __name__) diff --git a/apps/drug_template/views.py b/apps/drug_template/views.py index 4655db6..cba0a36 100644 --- a/apps/drug_template/views.py +++ b/apps/drug_template/views.py @@ -10,9 +10,9 @@ import datetime import json from flask import jsonify, request, g from flask import Blueprint -from common.read_excel import ReadExcel +from Common.read_excel import ReadExcel -from common.utils import Utils, PageParam +from Common.Utils import Utils, PageParam from db_logic.client import BllClient from db_logic.medicament import BllMedicament from db_logic.user import BllUser diff --git a/apps/home/views.py b/apps/home/views.py index b7de911..665e6ed 100644 --- a/apps/home/views.py +++ b/apps/home/views.py @@ -11,7 +11,7 @@ from models.warning_models import EntityWarning from db_logic.medicament_record import BllMedicamentRecord from db_logic.warning import BllWarning -from common.utils import PageParam, Utils +from Common.Utils import PageParam, Utils from flask import Blueprint diff --git a/config/system.conf b/config/system.conf index dd69b85..d3b1688 100644 --- a/config/system.conf +++ b/config/system.conf @@ -1,6 +1,6 @@ [system] clientid = 000 -serverip = 127.0.0.1 +serverip = 0.0.0.0 port = 9001 # dbconntion = mysql+pymysql://root:123456@127.0.0.1/local_rms_db?charset=utf8 dbconntion = mysql+pymysql://yanyi:tangyan86910282@111.231.67.55/yy_rms_multiple?charset=utf8 diff --git a/db_logic/client.py b/db_logic/client.py index fcca21e..0a212ab 100644 --- a/db_logic/client.py +++ b/db_logic/client.py @@ -1,10 +1,15 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- ''' -@Date:2022/07/18 16:32:26 +@Da +te:2022/07/18 16:32:26 ''' +import sys +sys.path.append(".") +import os +print(os.getcwd()) from sqlalchemy import asc -from db_logic.db_base import Repository +from .db_base import Repository from models.client_models import EntityClient diff --git a/db_logic/db_base.py b/db_logic/db_base.py index 5fabd22..8043a24 100644 --- a/db_logic/db_base.py +++ b/db_logic/db_base.py @@ -13,7 +13,7 @@ from sqlalchemy.sql import func import paginate_sqlalchemy from config.SystemConfig import SystemConfig from models.models_base import Base -from Common.Utils import logger +from Common.log_utlis import logger """数据仓储类""" diff --git a/db_logic/medicament_record.py b/db_logic/medicament_record.py index f144841..768d4c9 100644 --- a/db_logic/medicament_record.py +++ b/db_logic/medicament_record.py @@ -14,7 +14,7 @@ from db_logic.db_base import Repository from models.medicament_models import EntityMedicamentRecord -from common.utils import Utils +from Common.Utils import Utils # from common.utils import Utils #药剂流转记录业务逻辑类 diff --git a/db_logic/medicament_template.py b/db_logic/medicament_template.py index 6a34903..5d97528 100644 --- a/db_logic/medicament_template.py +++ b/db_logic/medicament_template.py @@ -7,7 +7,7 @@ import sys sys.path.append(".") -from common.utils import Utils +from Common.Utils import Utils from sqlalchemy import desc, Table from db_logic.db_base import Repository diff --git a/db_logic/meidcament_variety.py b/db_logic/meidcament_variety.py index 35ca06e..d71a4bb 100644 --- a/db_logic/meidcament_variety.py +++ b/db_logic/meidcament_variety.py @@ -6,7 +6,7 @@ import sys sys.path.append(".") from sqlalchemy import or_, and_ -from common.utils import Utils +from Common.Utils import Utils from db_logic.db_base import Repository from models.medicament_models import EntityMedicamentVariety diff --git a/db_logic/warning.py b/db_logic/warning.py index 9314858..97a4945 100644 --- a/db_logic/warning.py +++ b/db_logic/warning.py @@ -9,7 +9,7 @@ sys.path.append(".") import random from sqlalchemy import or_, desc -from common.utils import Utils +from Common.Utils import Utils from db_logic.db_base import Repository from models.warning_models import EntityWarning #预警信息业务逻辑类