@ -118,7 +118,8 @@ def bind_tmp_input_db():
drug_variety = BllMedicamentVariety().createDrugVariety(
customer_id=customer_id,
drug_info=drug_info, user_info=user_info
drug_info=drug_info, user_info=user_info,
func_type=func_type
)
num = BllMedicament().execute(f"select count(*) num from rms_medicament where name like '%{drug_info.get('name')}%' and remark12 like '%{Utils.get_file_name_datetime()[:4]}%'").fetchone().num
remain_num = drug_info.get("remain", 0)
@ -6,4 +6,5 @@ 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
# dbconntion = mysql+pymysql://root:tangyan86910282@127.0.0.1/yy_rms_multiple?charset=utf8
dbconntion = mysql+pymysql://root:123456@192.168.1.200/yy_rms_multiple?charset=utf8
# dbconntion = mysql+pymysql://root:123456@192.168.1.200/yy_rms_multiple?charset=utf8
dbconntion = mysql+pymysql://root:123456@127.0.0.1/yy_rms_multiple?charset=utf8
@ -26,7 +26,7 @@ class BllMedicamentVariety(Repository):
return super().__init__(entityType)
# 创建药剂品种
def createDrugVariety(self, customer_id, drug_info, user_info):
def createDrugVariety(self, customer_id, drug_info, user_info, func_type):
entity = self.findEntity(
and_(
EntityMedicamentVariety.name == drug_info.get("name"),
@ -55,7 +55,8 @@ class BllMedicamentVariety(Repository):
normal_count=1,
use_count=0,
empty_count=0,
is_supervise=0
is_supervise=0,
remark1=func_type,
self.insert(entity)
else:
@ -74,7 +75,7 @@ class BllMedicamentVariety(Repository):
if func_type:
if filter_base:
filter_base += " and "
filter_base += f" tp = {func_type}"
filter_base += f" remark1 = {func_type}"
filter_base = f" where {filter_base} "