diff --git a/Common/create_barcode.py b/Common/create_barcode.py index 24b20c0..fdbcef3 100644 --- a/Common/create_barcode.py +++ b/Common/create_barcode.py @@ -115,7 +115,7 @@ class CreateBarcode: kwargs.get("purity"), kwargs.get("standard_code"), kwargs.get("remark12"), - kwargs.get("cell_position_code"), + kwargs.get("flow_position_code"), kwargs.get("file_path"), ) document.setHtml(html) diff --git a/db_logic/medicament.py b/db_logic/medicament.py index 578bb07..7f5c431 100644 --- a/db_logic/medicament.py +++ b/db_logic/medicament.py @@ -622,14 +622,21 @@ class BllMedicament(Repository): filter_base += f" (`name` like '{name}' or english_name like '{name}') " if filter_base: filter_base = f" and {filter_base}" + # sql_all = f""" + # select a.*,b.client_name from ( + # select + # `name`, speci, purity, count(*) drug_num, manufacturer, distributor,client_id,medicament_id + # from + # rms_medicament WHERE `status`=1 {filter_base} + # GROUP BY + # `name`, speci, purity, client_id + # ) a LEFT JOIN ( + # select * from rms_client + # ) b on a.client_id = b.client_id + # """ sql_all = f""" select a.*,b.client_name from ( - select - `name`, speci, purity, count(*) drug_num, manufacturer, distributor,client_id,medicament_id - from - rms_medicament WHERE `status`=1 {filter_base} - GROUP BY - `name`, speci, purity, client_id + select * from rms_medicament WHERE `status`=1 {filter_base} ) a LEFT JOIN ( select * from rms_client ) b on a.client_id = b.client_id