|
|
|
|
@ -338,7 +338,7 @@ namespace DM_Weight.Report
|
|
|
|
|
Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "orderUse_template.grf");
|
|
|
|
|
|
|
|
|
|
SQL = $@"
|
|
|
|
|
SELECT oi.p_name,oi.age,oi.sex,oi.id_number,oi.patientno,oi.disease,od.drug_id,oi.doctor_name,oi.order_no,oi.order_date,
|
|
|
|
|
SELECT oi.p_name,oi.age,oi.sex,oi.id_number,oi.patientno,oi.disease,di.drug_id2,oi.doctor_name,oi.order_no,oi.order_date,
|
|
|
|
|
dmr.id,dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,dmr.`quantity` AS quantity,
|
|
|
|
|
dmr.`manu_no` AS manuNo,dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,
|
|
|
|
|
di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
|
|
|
|
|
@ -384,7 +384,7 @@ namespace DM_Weight.Report
|
|
|
|
|
string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
|
|
|
|
|
string SQL = $@" SELECT ac.create_time as operationTime, IF(ac.INVOICE_NO='日结','',ac.INVOICE_NO) invoiceNo,
|
|
|
|
|
ac.manu_no as manuNo,ac.eff_date as effDate,ac.add_quantity inQuantity,ac.manu_stock as manuQuantity,ac.department as dept,ac.out_quantity as outQuantity,ac.total_stock as totalQuantity,IF(ac.INVOICE_NO='日结',ac.INVOICE_NO,'') as rj,
|
|
|
|
|
di.drug_id as drugId,di.drug_name as drugName,di.drug_spec as drugSpec,di.manufactory as manufactory,di.big_unit as bigUnit,u1.user_name as operatorName,u2.user_name as reviewerName,db.baseQuantity
|
|
|
|
|
di.drug_id2 as drugId,di.drug_name as drugName,di.drug_spec as drugSpec,di.manufactory as manufactory,di.big_unit as bigUnit,u1.user_name as operatorName,u2.user_name as reviewerName,db.baseQuantity
|
|
|
|
|
FROM account_book_g2 ac left join drug_info di on ac.drug_id=di.drug_id left join user_list u1 on ac.user_id1=u1.id left join user_list u2 on ac.user_id2=u2.id LEFT JOIN DRUG_BASE db on di.drug_id=db.drugid and db.machine_id='{p_machine_id}'
|
|
|
|
|
WHERE ac.machine_id='{p_machine_id}' and create_time>'{p_startDate}' AND create_time<'{p_endDate}' AND TYPE IN(1,2,3) ";
|
|
|
|
|
if (!string.IsNullOrEmpty(drug_id))
|
|
|
|
|
|