对照品同步更改

duizhaopin
tangxuan 2 years ago
parent f724d0e926
commit 3ffb823cc4

@ -594,3 +594,22 @@ def print_select_drug_code():
obj = CreateBarcode() obj = CreateBarcode()
obj.create_drug_lobel_code(**new_dict) obj.create_drug_lobel_code(**new_dict)
return jsonify(Utils.true_return(msg="打印完成")) return jsonify(Utils.true_return(msg="打印完成"))
@drug_router.route("/calculate_volume_weight", methods=["POST"])
@token_auth.login_required
def calculate_volume_weight():
"""
计算体积转化为质量 M = P * V
:param variety_id: 类别ID
:param input_volume: 输入体积
:return:
"""
variety_id = request.values.get("variety_id")
input_volume = request.values.get("input_volume")
medicament_variety_obj = BllMedicamentVariety().findEntity(
EntityMedicamentVariety.variety_id == variety_id)
weight = float(input_volume) * float(medicament_variety_obj.density)
return jsonify(Utils.true_return(msg="完成", data={"weight": Utils.reserve_decimal(weight)}))

@ -572,7 +572,7 @@ class BllMedicament(Repository):
select a.*,b.client_name from ( select a.*,b.client_name from (
select select
name, english_name,bar_code,manufacturer,speci,remain,purity,production_date,shelf_life,expiration_date,put_in_date,put_in_user_name, name, english_name,bar_code,manufacturer,speci,remain,purity,production_date,shelf_life,expiration_date,put_in_date,put_in_user_name,
status,by_user_name,client_id status,by_user_name,client_id, is_packing, is_label, is_aspect
from rms_medicament {filter_base} from rms_medicament {filter_base}
) a LEFT JOIN( ) a LEFT JOIN(
select client_id,client_name from rms_client {filter_base1} select client_id,client_name from rms_client {filter_base1}

@ -7,7 +7,7 @@ import sys
sys.path.append('.') sys.path.append('.')
# from common.utils import Utils # from common.utils import Utils
from sqlalchemy import Column, String, Integer, Text, Float, inspect from sqlalchemy import Column, String, Integer, Text, Float, inspect, SmallInteger
from models.models_base import Base, get_uuid from models.models_base import Base, get_uuid
# from sqlalchemy.ext.declarative import declarative_base # from sqlalchemy.ext.declarative import declarative_base
@ -208,6 +208,10 @@ class EntityMedicamentVariety(Base):
create_user_id = Column(String(50), comment="创建用户ID") create_user_id = Column(String(50), comment="创建用户ID")
create_user_name = Column(String(50), comment="创建用户名称") create_user_name = Column(String(50), comment="创建用户名称")
is_add = Column(Integer, comment="", default=0) is_add = Column(Integer, comment="", default=0)
# 1是 0否
is_packing = Column(SmallInteger, default=1, comment="包装是否完好 1是 0否")
is_label = Column(SmallInteger, default=1, comment="标签是否清晰 1是 0否")
is_aspect = Column(SmallInteger, default=1, comment="外观是否符合要求 1是 0否")
remark1 = Column(String(50), comment='扩展字段1 func_type类型') remark1 = Column(String(50), comment='扩展字段1 func_type类型')
remark2 = Column(String(50), comment='扩展字段2') remark2 = Column(String(50), comment='扩展字段2')

Loading…
Cancel
Save