入库类型存储

duizhaopin
tangxuan 2 years ago
parent 0d5bf3b3d6
commit aa0881e47f

@ -118,7 +118,8 @@ def bind_tmp_input_db():
drug_variety = BllMedicamentVariety().createDrugVariety( drug_variety = BllMedicamentVariety().createDrugVariety(
customer_id=customer_id, 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 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) 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://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://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: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) 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( entity = self.findEntity(
and_( and_(
EntityMedicamentVariety.name == drug_info.get("name"), EntityMedicamentVariety.name == drug_info.get("name"),
@ -55,7 +55,8 @@ class BllMedicamentVariety(Repository):
normal_count=1, normal_count=1,
use_count=0, use_count=0,
empty_count=0, empty_count=0,
is_supervise=0 is_supervise=0,
remark1=func_type,
) )
self.insert(entity) self.insert(entity)
else: else:
@ -74,7 +75,7 @@ class BllMedicamentVariety(Repository):
if func_type: if func_type:
if filter_base: if filter_base:
filter_base += " and " filter_base += " and "
filter_base += f" tp = {func_type}" filter_base += f" remark1 = {func_type}"
if filter_base: if filter_base:
filter_base = f" where {filter_base} " filter_base = f" where {filter_base} "

Loading…
Cancel
Save