修改文件调用

duizhaopin
apan 2 years ago
parent b6ed0329e1
commit ac29da01fc

1
.gitignore vendored

@ -59,6 +59,7 @@ coverage.xml
# Django stuff:
*.log
.conf
local_settings.py
db.sqlite3
db.sqlite3-journal

@ -5,7 +5,7 @@
'''
from flask import jsonify, request
from common.utils import PageParam, Utils
from Common.Utils import PageParam, Utils
from db_logic.medicament_record import BllMedicamentRecord
from db_logic.medicament import BllMedicament

@ -4,16 +4,13 @@
@Date:2022/07/19 16:34:34
'''
from flask import jsonify, request, Blueprint, g
from common.auth import token_auth
from common.utils import Utils
from flask_siwadoc import SiwaDoc
from pydantic import BaseModel
from Common.auth import token_auth
from Common.Utils import Utils
from db_logic.user import BllUser
user_router = Blueprint('user', __name__)
doc_siwa = SiwaDoc(user_router)
# class LoginBase(BaseModel):

@ -11,7 +11,6 @@ import decimal
from flask import Flask as New_flask
from flask.json import JSONEncoder as _JSONEncoder
from flask_cors import CORS
from flask_siwadoc import SiwaDoc
from sqlalchemy.ext.declarative import DeclarativeMeta
@ -81,7 +80,6 @@ def register_blueprints(app: New_flask):
def create_app():
app = Flask(__name__)
CORS(app)
SiwaDoc(app)
# app.config.from_object('setting')
app.config["SECRET_KEY"] = "wYdilHT~TRw7j{lF+Ee5MR3nFBINONPUcObwjwzge&/(~[C?Yz"
register_blueprints(app)

@ -2,5 +2,5 @@
clientid = 000
serverip = 127.0.0.1
port = 9001
dbconntion = mysql+pymysql://root:123456@127.0.0.1/local_rms_db?charset=utf8
# 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

@ -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.log_utlis import logger
from Common.Utils import logger
"""数据仓储类"""

@ -15,7 +15,7 @@ from models.medicament_models import EntityMedicament, EntityMedicamentRecord, E
from models.client_models import EntityClient
from models.user_models import EntityUser
from db_logic.meidcament_variety import BllMedicamentVariety
from common.utils import Utils, DrugStatus, DrugRecordType, PageParam
from Common.Utils import Utils, DrugStatus, DrugRecordType, PageParam
@ -333,7 +333,7 @@ class BllMedicament(Repository):
if __name__ == '__main__':
from db_logic.medicament import BllMedicament
from common.utils import PageParam
from Common.Utils import PageParam
page_param = PageParam(1, 10)
data = BllMedicament().get_drug_use_classify()
print(data)

@ -12,7 +12,7 @@ from flask import current_app
from sqlalchemy import and_, insert, or_, desc
from db_logic.db_base import Repository
from models.user_models import EntityUser
from common.utils import Utils
from Common.Utils import Utils
#用户操作业务逻辑类
class BllUser(Repository):

@ -3,9 +3,10 @@
'''
@Date:2022/07/18 15:00:54
'''
import sys
sys.path.append(".")
from config.server import create_app
from common.exception_base import APIException
from Common.exception_base import APIException
from config.SystemConfig import SystemConfig
app = create_app()

@ -3,7 +3,8 @@
'''
@Date:2022/07/18 15:24:43
'''
import sys
sys.path.append(".")
# 已同步本地数据库
from models.models_base import Base, get_uuid

@ -3,7 +3,8 @@
'''
@Date:2022/07/18 15:26:19
'''
import sys
sys.path.append(".")
from sqlalchemy import Column, String, Float, Integer
from models.models_base import Base, get_uuid

@ -3,7 +3,8 @@
'''
@Date:2022/07/18 15:30:14
'''
import sys
sys.path.append(".")
# 已同步本地数据库
from sqlalchemy import Column, String, Integer
from models.models_base import Base, get_uuid

@ -3,8 +3,6 @@
'''
@Date:2022/07/18 15:28:11
'''
from datetime import datetime
from random import randint
import sys
sys.path.append('.')
# from common.utils import Utils
@ -103,16 +101,6 @@ class EntityMedicament(Base):
remark30 = Column(String(50), comment='扩展字段30')
def to_dict(self):
# li = []
# for i in self.__table__.columns:
# li.append(i.name)
return [i for i in c.__table__.columns]
# return {c.name: getattr(self, c.name) for c in self.__table__.columns}
class EntityMedicamentTemplate(Base):
__tablename__ = "rms_medicament_template"
@ -230,7 +218,7 @@ class EntityMedicamentExtend(Base):
if __name__ == '__main__':
drug_info = {}
user_info = {}
from common.utils import Utils
from Common.Utils import Utils
entity = EntityMedicamentVariety(
customer_id="customer_id",
name=drug_info.get("name"),

@ -3,8 +3,10 @@
'''
@Date:2022/07/18 15:29:38
'''
import sys
sys.path.append(".")
from sqlalchemy import Column, String, Text, Integer
from common.utils import Utils
from Common.Utils import Utils
from models.models_base import Base, get_uuid
from werkzeug.security import check_password_hash, generate_password_hash

@ -3,7 +3,8 @@
'''
@Date:2022/07/18 15:27:14
'''
import sys
sys.path.append(".")
from sqlalchemy import Column, String, Integer, Text
from models.models_base import Base, get_uuid

Loading…
Cancel
Save