From cc88fca01dca322edf3095e4b3a99646cf951c41 Mon Sep 17 00:00:00 2001
From: maqiao <625215135@qq.com>
Date: Thu, 31 Oct 2024 10:02:28 +0800
Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=A4=84=E6=96=B9=E6=8A=A5?=
=?UTF-8?q?=E8=A1=A8=E4=B8=AD=E7=97=85=E5=8E=86=E5=8F=B7=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E7=94=B1patient=5Fno=E6=94=B9=E4=B8=BApatient=5Fid.=202.?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=B7=BB=E5=8A=A0=E6=98=AF?=
=?UTF-8?q?=E5=90=A6=E8=87=AA=E5=8A=A8=E5=86=99=E6=A0=87=E7=AD=BE=E6=95=B0?=
=?UTF-8?q?=E9=87=8FAutoWriteNum=EF=BC=8C=E6=A0=B9=E6=8D=AE=E8=AF=A5?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=A0=87=E8=AF=86=E5=BC=80=E6=9C=BA=E5=90=8E?=
=?UTF-8?q?=E6=98=AF=E5=90=A6=E9=87=8D=E5=86=99=E6=A0=87=E7=AD=BE=E6=95=B0?=
=?UTF-8?q?=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DM_Weight/App.config | 2 ++
DM_Weight/Report/GridReportUtil.cs | 2 +-
DM_Weight/ReportTemp/account_book_order.grf | 2 +-
DM_Weight/ViewModels/MainWindowViewModel.cs | 18 +++++++++++-------
4 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/DM_Weight/App.config b/DM_Weight/App.config
index bd01fb4..60c148d 100644
--- a/DM_Weight/App.config
+++ b/DM_Weight/App.config
@@ -61,6 +61,8 @@
+
+
\ No newline at end of file
diff --git a/DM_Weight/Report/GridReportUtil.cs b/DM_Weight/Report/GridReportUtil.cs
index 3272696..f206326 100644
--- a/DM_Weight/Report/GridReportUtil.cs
+++ b/DM_Weight/Report/GridReportUtil.cs
@@ -301,7 +301,7 @@ namespace DM_Weight.Report
});
Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//account_book_order.grf");
- SQL = $@"SELECT DISTINCT oi.recv_date,oi.p_name,oi.sex,oi.age,oi.id_number,oi.patient_no,oi.disease,dm.manu_no,od.Quantity,oi.doctor_name,oi.order_no,dm.reviewer,dm.operator,ul.user_name operatorName,ul2.user_name reviewerName
+ SQL = $@"SELECT DISTINCT oi.recv_date,oi.p_name,oi.sex,oi.age,oi.id_number,oi.patient_no,oi.patient_id,oi.disease,dm.manu_no,od.Quantity,oi.doctor_name,oi.order_no,dm.reviewer,dm.operator,ul.user_name operatorName,ul2.user_name reviewerName
,di.Drug_name,di.Drug_spec,di.big_unit,di.drug_id,dm.receivePerson
from order_info oi inner join order_detail od on oi.order_no=od.Order_No
LEFT JOIN dm_machine_record dm on oi.order_no=dm.invoice_id
diff --git a/DM_Weight/ReportTemp/account_book_order.grf b/DM_Weight/ReportTemp/account_book_order.grf
index 0562a7c..9356d8a 100644
--- a/DM_Weight/ReportTemp/account_book_order.grf
+++ b/DM_Weight/ReportTemp/account_book_order.grf
@@ -43,7 +43,7 @@
{
"Name":"病历号",
"Type":"Integer",
- "DBFieldName":"patient_no"
+ "DBFieldName":"patient_id"
},
{
"Name":"疾病名称",
diff --git a/DM_Weight/ViewModels/MainWindowViewModel.cs b/DM_Weight/ViewModels/MainWindowViewModel.cs
index 532a969..048f8f4 100644
--- a/DM_Weight/ViewModels/MainWindowViewModel.cs
+++ b/DM_Weight/ViewModels/MainWindowViewModel.cs
@@ -76,7 +76,7 @@ namespace DM_Weight.ViewModels
_screenUtil = screenUtil;
_regionManager = regionManager;
_container = container;
- _portUtil = portUtil;
+ _portUtil = portUtil;
//this.SqlSugarHelper.Db=sqlSugarScope;
System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
@@ -88,8 +88,11 @@ namespace DM_Weight.ViewModels
_regionManager.RequestNavigate("MainRegion", "BeforeLogin");
}));
-
- Task.Factory.StartNew(() => BindStock());
+ string bAutoWriteNum = ConfigurationManager.AppSettings["AutoWriteNum"] ?? "false";
+ if (bAutoWriteNum == "true")
+ {
+ Task.Factory.StartNew(() => BindStock());
+ }
}
void doMyPrismEvent2(AlertMsg msg)
@@ -111,11 +114,12 @@ namespace DM_Weight.ViewModels
//写标签数量
async Task BindStock()
{
- List singleChannels = SqlSugarHelper.Db.Queryable().Where(cs => cs.BoardType == 5&&cs.Quantity>0)
- .Where(cs => cs.DrugId !=null)
- .Where(cs=>cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).ToList();
+ List singleChannels = SqlSugarHelper.Db.Queryable().Where(cs => cs.BoardType == 5 && cs.Quantity > 0)
+ .Where(cs => cs.DrugId != null)
+ .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).ToList();
singleChannels = singleChannels.GroupBy(cs => new { cs.DrawerNo, cs.ColNo })
- .Select(cs => {
+ .Select(cs =>
+ {
var ret = cs.First();
ret.Quantity = cs.Sum(xt => xt.Quantity);
return ret;