diff --git a/DM_Weight/App.config b/DM_Weight/App.config
index fc8061d..6b861da 100644
--- a/DM_Weight/App.config
+++ b/DM_Weight/App.config
@@ -3,7 +3,7 @@
-
+
+
+
@@ -36,9 +38,9 @@
-
+
-
+
diff --git a/DM_Weight/Port/PortUtil.cs b/DM_Weight/Port/PortUtil.cs
index 090f194..43b48d8 100644
--- a/DM_Weight/Port/PortUtil.cs
+++ b/DM_Weight/Port/PortUtil.cs
@@ -706,7 +706,7 @@ namespace DM_Weight.Port
}
if (_length != length)
{
- throw new TimeoutException($"串口【{serialPort.PortName}】交互超时");
+ throw new TimeoutException($"串口【{serialPort.PortName}】交互超时");
}
serialPort.Read(buffer, 0, length);
// }
diff --git a/DM_Weight/ReportTemp/account_book_temp.grf b/DM_Weight/ReportTemp/account_book_temp.grf
index 6272475..650cf0f 100644
--- a/DM_Weight/ReportTemp/account_book_temp.grf
+++ b/DM_Weight/ReportTemp/account_book_temp.grf
@@ -1,5 +1,5 @@
{
- "Version":"6.3.0.1",
+ "Version":"6.8.1.1",
"Font":{
"Name":"宋体",
"Size":105000,
@@ -116,14 +116,6 @@
"Name":"操作类型",
"Width":2.19604
},
- {
- "Name":"批号",
- "Width":3.99521
- },
- {
- "Name":"有效期",
- "Width":2.43417
- },
{
"Name":"入库数量",
"Width":1.79917
@@ -173,16 +165,6 @@
}
]
},
- {
- "Column":"批号",
- "TextAlign":"MiddleCenter",
- "DataField":"批号"
- },
- {
- "Column":"有效期",
- "TextAlign":"MiddleCenter",
- "DataField":"有效期"
- },
{
"Column":"入库数量",
"TextAlign":"MiddleCenter",
@@ -280,30 +262,6 @@
"TextAlign":"MiddleCenter",
"Text":"凭证号"
},
- {
- "GroupTitle":false,
- "Column":"批号",
- "Font":{
- "Name":"宋体",
- "Size":105000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"批号"
- },
- {
- "GroupTitle":false,
- "Column":"有效期",
- "Font":{
- "Name":"宋体",
- "Size":105000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"有效\r\n期"
- },
{
"GroupTitle":false,
"Column":"入库数量",
diff --git a/DM_Weight/ReportTemp/machine_log_add.grf b/DM_Weight/ReportTemp/machine_log_add.grf
index bf9031e..bbf13e4 100644
--- a/DM_Weight/ReportTemp/machine_log_add.grf
+++ b/DM_Weight/ReportTemp/machine_log_add.grf
@@ -1,5 +1,5 @@
{
- "Version":"6.3.0.1",
+ "Version":"6.8.1.1",
"Font":{
"Name":"宋体",
"Size":105000,
@@ -76,14 +76,6 @@
"Name":"数量",
"Width":1.98438
},
- {
- "Name":"批次",
- "Width":2.61938
- },
- {
- "Name":"效期",
- "Width":2.38125
- },
{
"Name":"库位",
"Width":2.59292
@@ -112,16 +104,6 @@
"TextAlign":"MiddleCenter",
"DataField":"数量"
},
- {
- "Column":"批次",
- "TextAlign":"MiddleCenter",
- "DataField":"批次"
- },
- {
- "Column":"效期",
- "TextAlign":"MiddleCenter",
- "DataField":"效期"
- },
{
"Column":"库位",
"FreeCell":true,
@@ -198,30 +180,6 @@
"TextAlign":"MiddleCenter",
"Text":"数量"
},
- {
- "GroupTitle":false,
- "Column":"批次",
- "Font":{
- "Name":"宋体",
- "Size":120000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"批次"
- },
- {
- "GroupTitle":false,
- "Column":"效期",
- "Font":{
- "Name":"宋体",
- "Size":120000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"效期"
- },
{
"GroupTitle":false,
"Column":"库位",
diff --git a/DM_Weight/ReportTemp/machine_log_check.grf b/DM_Weight/ReportTemp/machine_log_check.grf
index 09cc4ae..188b266 100644
--- a/DM_Weight/ReportTemp/machine_log_check.grf
+++ b/DM_Weight/ReportTemp/machine_log_check.grf
@@ -1,5 +1,5 @@
{
- "Version":"6.3.0.1",
+ "Version":"6.8.1.1",
"Font":{
"Name":"宋体",
"Size":105000,
@@ -76,14 +76,6 @@
"Name":"数量",
"Width":1.98438
},
- {
- "Name":"批次",
- "Width":2.61938
- },
- {
- "Name":"效期",
- "Width":2.38125
- },
{
"Name":"库位",
"Width":2.59292
@@ -112,16 +104,6 @@
"TextAlign":"MiddleCenter",
"DataField":"数量"
},
- {
- "Column":"批次",
- "TextAlign":"MiddleCenter",
- "DataField":"批次"
- },
- {
- "Column":"效期",
- "TextAlign":"MiddleCenter",
- "DataField":"效期"
- },
{
"Column":"库位",
"FreeCell":true,
@@ -198,30 +180,6 @@
"TextAlign":"MiddleCenter",
"Text":"数量"
},
- {
- "GroupTitle":false,
- "Column":"批次",
- "Font":{
- "Name":"宋体",
- "Size":120000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"批次"
- },
- {
- "GroupTitle":false,
- "Column":"效期",
- "Font":{
- "Name":"宋体",
- "Size":120000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"效期"
- },
{
"GroupTitle":false,
"Column":"库位",
diff --git a/DM_Weight/ReportTemp/machine_log_return.grf b/DM_Weight/ReportTemp/machine_log_return.grf
index 493f661..e4ea4ec 100644
--- a/DM_Weight/ReportTemp/machine_log_return.grf
+++ b/DM_Weight/ReportTemp/machine_log_return.grf
@@ -1,5 +1,5 @@
{
- "Version":"6.3.0.1",
+ "Version":"6.8.1.1",
"Font":{
"Name":"宋体",
"Size":105000,
@@ -76,14 +76,6 @@
"Name":"数量",
"Width":1.98438
},
- {
- "Name":"批次",
- "Width":2.61938
- },
- {
- "Name":"效期",
- "Width":2.38125
- },
{
"Name":"库位",
"Width":2.59292
@@ -112,16 +104,6 @@
"TextAlign":"MiddleCenter",
"DataField":"数量"
},
- {
- "Column":"批次",
- "TextAlign":"MiddleCenter",
- "DataField":"批次"
- },
- {
- "Column":"效期",
- "TextAlign":"MiddleCenter",
- "DataField":"效期"
- },
{
"Column":"库位",
"FreeCell":true,
@@ -198,30 +180,6 @@
"TextAlign":"MiddleCenter",
"Text":"数量"
},
- {
- "GroupTitle":false,
- "Column":"批次",
- "Font":{
- "Name":"宋体",
- "Size":120000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"批次"
- },
- {
- "GroupTitle":false,
- "Column":"效期",
- "Font":{
- "Name":"宋体",
- "Size":120000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"效期"
- },
{
"GroupTitle":false,
"Column":"库位",
diff --git a/DM_Weight/ReportTemp/machine_log_take.grf b/DM_Weight/ReportTemp/machine_log_take.grf
index 32fe037..e27b490 100644
--- a/DM_Weight/ReportTemp/machine_log_take.grf
+++ b/DM_Weight/ReportTemp/machine_log_take.grf
@@ -1,5 +1,5 @@
{
- "Version":"6.3.0.1",
+ "Version":"6.8.1.1",
"Font":{
"Name":"宋体",
"Size":105000,
@@ -76,14 +76,6 @@
"Name":"数量",
"Width":1.98438
},
- {
- "Name":"批次",
- "Width":2.61938
- },
- {
- "Name":"效期",
- "Width":2.38125
- },
{
"Name":"库位",
"Width":2.59292
@@ -112,16 +104,6 @@
"TextAlign":"MiddleCenter",
"DataField":"数量"
},
- {
- "Column":"批次",
- "TextAlign":"MiddleCenter",
- "DataField":"批次"
- },
- {
- "Column":"效期",
- "TextAlign":"MiddleCenter",
- "DataField":"效期"
- },
{
"Column":"库位",
"FreeCell":true,
@@ -198,30 +180,6 @@
"TextAlign":"MiddleCenter",
"Text":"数量"
},
- {
- "GroupTitle":false,
- "Column":"批次",
- "Font":{
- "Name":"宋体",
- "Size":120000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"批次"
- },
- {
- "GroupTitle":false,
- "Column":"效期",
- "Font":{
- "Name":"宋体",
- "Size":120000,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"效期"
- },
{
"GroupTitle":false,
"Column":"库位",
diff --git a/DM_Weight/ReportTemp/stock_template.grf b/DM_Weight/ReportTemp/stock_template.grf
index 6a2d5fb..d092627 100644
--- a/DM_Weight/ReportTemp/stock_template.grf
+++ b/DM_Weight/ReportTemp/stock_template.grf
@@ -1,5 +1,5 @@
{
- "Version":"6.3.0.1",
+ "Version":"6.8.1.1",
"Font":{
"Name":"宋体",
"Size":105000,
@@ -70,12 +70,6 @@
"Name":"quantityCount",
"Width":2.59292
},
- {
- "Name":"manuNo"
- },
- {
- "Name":"effDate"
- },
{
"Name":"quantity",
"Width":2.43417
@@ -107,16 +101,6 @@
"Column":"quantityCount",
"FreeCell":true
},
- {
- "Column":"manuNo",
- "TextAlign":"MiddleCenter",
- "DataField":"manuNo"
- },
- {
- "Column":"effDate",
- "TextAlign":"MiddleCenter",
- "DataField":"effDate"
- },
{
"Column":"quantity",
"TextAlign":"MiddleCenter",
@@ -188,30 +172,6 @@
"TextAlign":"MiddleCenter",
"Text":"总库存"
},
- {
- "GroupTitle":false,
- "Column":"manuNo",
- "Font":{
- "Name":"宋体",
- "Size":142500,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"批次"
- },
- {
- "GroupTitle":false,
- "Column":"effDate",
- "Font":{
- "Name":"宋体",
- "Size":142500,
- "Bold":true,
- "Charset":134
- },
- "TextAlign":"MiddleCenter",
- "Text":"效期"
- },
{
"GroupTitle":false,
"Column":"quantity",
@@ -253,7 +213,7 @@
"Type":"MemoBox",
"Name":"MemoBox3",
"AlignColumn":"drugName",
- "Width":5.3975,
+ "Width":5.34458,
"Height":1.19063,
"TextAlign":"MiddleCenter",
"Text":"[#drugName#]"
@@ -263,7 +223,7 @@
"Name":"MemoBox4",
"AlignColumn":"drugSpec",
"Left":5.37104,
- "Width":3.01625,
+ "Width":2.96333,
"Height":1.19063,
"TextAlign":"MiddleCenter",
"Text":"[#drugSpec#]"
@@ -273,7 +233,7 @@
"Name":"MemoBox5",
"AlignColumn":"manuFactory",
"Left":8.36083,
- "Width":4.63021,
+ "Width":4.57729,
"Height":1.19063,
"TextAlign":"MiddleCenter",
"Text":"[#manuFactory#]"
@@ -283,7 +243,7 @@
"Name":"MemoBox6",
"AlignColumn":"Column1",
"Left":12.9646,
- "Width":3.01625,
+ "Width":2.96333,
"Height":1.19063,
"TextAlign":"MiddleCenter",
"Text":"[#baseQuantity#]"
@@ -293,7 +253,7 @@
"Name":"SummaryBox1",
"AlignColumn":"quantityCount",
"Left":15.9544,
- "Width":2.61938,
+ "Width":2.56646,
"Height":1.19063,
"TextAlign":"MiddleCenter",
"DataField":"quantity",
@@ -326,7 +286,7 @@
"Type":"StaticBox",
"Name":"StaticBox1",
"Center":"Horizontal",
- "Left":8.89,
+ "Left":7.77875,
"Top":0.608542,
"Width":9.18104,
"Height":1.21708,
diff --git a/DM_Weight/ViewModels/BiaoDingWindowViewModel.cs b/DM_Weight/ViewModels/BiaoDingWindowViewModel.cs
index dd4af3f..e09c6b8 100644
--- a/DM_Weight/ViewModels/BiaoDingWindowViewModel.cs
+++ b/DM_Weight/ViewModels/BiaoDingWindowViewModel.cs
@@ -74,21 +74,21 @@ namespace DM_Weight.ViewModels
_portUtil = portUtil;
_eventAggregator = eventAggregator;
}
- public DelegateCommand SelectionChangedCommand => new DelegateCommand(selectionAction);
+ //public DelegateCommand SelectionChangedCommand => new DelegateCommand(selectionAction);
- private async void selectionAction()
- {
- if (CStock != null)
- {
- // 此处延时1毫秒,等待页面渲染
- await Task.Delay(TimeSpan.FromMilliseconds(1));
- DialogParameters dialogParameters = new DialogParameters();
- dialogParameters.Add("addManuno", CStock);
- DialogServiceExtensions.ShowDialogHost(_dialogService, "AddManunoDialog", dialogParameters, DoDialogResult, "RootDialog");
+ //private async void selectionAction()
+ //{
+ // if (CStock != null)
+ // {
+ // // 此处延时1毫秒,等待页面渲染
+ // await Task.Delay(TimeSpan.FromMilliseconds(1));
+ // DialogParameters dialogParameters = new DialogParameters();
+ // dialogParameters.Add("addManuno", CStock);
+ // DialogServiceExtensions.ShowDialogHost(_dialogService, "AddManunoDialog", dialogParameters, DoDialogResult, "RootDialog");
- }
+ // }
- }
+ //}
private void DoDialogResult(IDialogResult dialogResult)
{
CStock = null;
@@ -350,11 +350,11 @@ namespace DM_Weight.ViewModels
SqlSugarHelper.Db.Updateable(new ChannelStock()
{
Quantity = it.Quantity + it.AddQuantity,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
+ //ManuNo = it.ManuNo,
+ //EffDate = it.EffDate,
Id = it.Id,
PosNo = 1
- }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
+ }).UpdateColumns(it => new { it.Quantity, it.PosNo }).ExecuteCommand();
// 获取更新完库存后的药品库存
List nowChannels = SqlSugarHelper.Db.Queryable()
.Where(cs => cs.MachineId.Equals(it.MachineId))
@@ -369,8 +369,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
OperationTime = DateTime.Now,
Quantity = it.AddQuantity,
diff --git a/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs b/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs
index 6f0f1f3..bafc385 100644
--- a/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs
+++ b/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs
@@ -78,11 +78,11 @@ namespace DM_Weight.ViewModels
set
{
SetProperty(ref _drugInfo, value);
- if (_drugInfo != null)
- {
- //DrugManuNos = _drugInfo.DrugManuNos;
- DrugManuNos = SqlSugarHelper.Db.Queryable().Where(m => m.DrugId == _drugInfo.DrugId.ToString()).ToList();
- }
+ //if (_drugInfo != null)
+ //{
+ // //DrugManuNos = _drugInfo.DrugManuNos;
+ // DrugManuNos = SqlSugarHelper.Db.Queryable().Where(m => m.DrugId == _drugInfo.DrugId.ToString()).ToList();
+ //}
}
}
@@ -94,20 +94,21 @@ namespace DM_Weight.ViewModels
set => SetProperty(ref _drugInfos, value);
}
- private DrugManuNo? _drugManuNo;
+ //private DrugManuNo? _drugManuNo;
- public DrugManuNo? DrugManuNo
- {
- get => _drugManuNo;
- set => SetProperty(ref _drugManuNo, value);
- }
- private List? _drugManuNos;
+ //public DrugManuNo? DrugManuNo
+ //{
+ // get => _drugManuNo;
+ // set => SetProperty(ref _drugManuNo, value);
+ //}
- public List? DrugManuNos
- {
- get => _drugManuNos;
- set => SetProperty(ref _drugManuNos, value);
- }
+ //private List? _drugManuNos;
+
+ //public List? DrugManuNos
+ //{
+ // get => _drugManuNos;
+ // set => SetProperty(ref _drugManuNos, value);
+ //}
private List? _channels;
@@ -166,7 +167,7 @@ namespace DM_Weight.ViewModels
private void GetAllDrugInfos()
{
- var list = SqlSugarHelper.Db.Queryable().Includes(di => di.DrugManuNos).OrderBy(di => di.DrugId).ToList();
+ var list = SqlSugarHelper.Db.Queryable().OrderBy(di => di.DrugId).ToList();
DrugInfos = list;
}
@@ -264,7 +265,7 @@ namespace DM_Weight.ViewModels
}
else
{
- if (DrugInfo != null && DrugManuNo != null)
+ if (DrugInfo != null)
{
var c = SelectChannels.Count;
@@ -279,10 +280,10 @@ namespace DM_Weight.ViewModels
}
item.DrugId = DrugInfo.DrugId.ToString();
- item.ManuNo = DrugManuNo.ManuNo;
+ //item.ManuNo = DrugManuNo.ManuNo;
item.DrugInfo = DrugInfo;
- item.EffDate = String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate);
- SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
+ //item.EffDate = String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate);
+ SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.PosNo }).ExecuteCommand();
if (item.BoardType == (Int32)BoardTypeEnum.smart || item.BoardType == (Int32)BoardTypeEnum.weighSmartBox)
{
@@ -294,9 +295,9 @@ namespace DM_Weight.ViewModels
await Task.Delay(200);
_portUtil.WriteChannelInfo(8, DrugInfo.Manufactory, item.DrawerNo, item.ColNo);
await Task.Delay(200);
- _portUtil.WriteChannelInfo(6, DrugManuNo.ManuNo, item.DrawerNo, item.ColNo);
+ //_portUtil.WriteChannelInfo(6, DrugManuNo.ManuNo, item.DrawerNo, item.ColNo);
await Task.Delay(200);
- _portUtil.WriteChannelInfo(5, String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate), item.DrawerNo, item.ColNo);
+ //_portUtil.WriteChannelInfo(5, String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate), item.DrawerNo, item.ColNo);
await Task.Delay(200);
_portUtil.ShowContent(item.DrawerNo, item.ColNo);
}
@@ -313,7 +314,7 @@ namespace DM_Weight.ViewModels
else
{
SnackbarBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#b71c1c"));
- SnackbarMessageQueue.Enqueue("请选择库位需要绑定的药品及批次信息");
+ SnackbarMessageQueue.Enqueue("请选择库位需要绑定的药品");
}
}
});
@@ -333,7 +334,7 @@ namespace DM_Weight.ViewModels
item.ManuNo = null;
item.EffDate = null;
item.DrugInfo = null;
- SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.ManuNo, it.EffDate }).ExecuteCommand();
+ SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId }).ExecuteCommand();
if (item.BoardType == (Int32)BoardTypeEnum.smart || item.BoardType == (Int32)BoardTypeEnum.weighSmartBox)
{
// 清除显示屏库位信息
diff --git a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs
index 9ba8ed7..e17b09e 100644
--- a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs
+++ b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs
@@ -163,11 +163,9 @@ namespace DM_Weight.ViewModels
// 更新数据 库存信息
SqlSugarHelper.Db.Updateable(new ChannelStock()
{
- Quantity = it.CheckQuantity,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
+ Quantity = it.CheckQuantity,
Id = it.Id,
- }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
+ }).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
// 获取更新完库存后的药品库存
List nowChannels = SqlSugarHelper.Db.Queryable()
.Where(cs => cs.MachineId.Equals(it.MachineId))
@@ -182,8 +180,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
Reviewer = HomeWindowViewModel.Reviewer?.Id,
OperationTime = DateTime.Now,
diff --git a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
index 3ba851f..e9bfebe 100644
--- a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
+++ b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs
@@ -175,18 +175,18 @@ namespace DM_Weight.ViewModels
for (int i = 0; i < record.Count; i++)
{
ChannelStock it = record[i];
- it.ManuNo = it.drugManuNo==null?it.ManuNo: it.drugManuNo.ManuNo;
- it.EffDate = it.drugManuNo == null? it.EffDate: it.drugManuNo.EffDate;
+ //it.ManuNo = it.drugManuNo==null?it.ManuNo: it.drugManuNo.ManuNo;
+ //it.EffDate = it.drugManuNo == null? it.EffDate: it.drugManuNo.EffDate;
// 更新数据 库存信息
SqlSugarHelper.Db.Updateable(new ChannelStock()
{
Quantity = it.Quantity + it.AddQuantity,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
+ //ManuNo = it.ManuNo,
+ //EffDate = it.EffDate,
Id = it.Id,
- }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
+ }).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
// 获取更新完库存后的药品库存
List nowChannels = SqlSugarHelper.Db.Queryable()
.Where(cs => cs.MachineId.Equals(it.MachineId))
@@ -201,8 +201,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
Reviewer = HomeWindowViewModel.Reviewer?.Id,
OperationTime = DateTime.Now,
@@ -360,7 +360,7 @@ namespace DM_Weight.ViewModels
{
ChannelStocks = queryData.Select(cs =>
{
- cs.drugManuNo = cs.DrugInfo.DrugManuNos.Find(it => it.ManuNo.Equals(cs.ManuNo));
+ //cs.drugManuNo = cs.DrugInfo.DrugManuNos.Find(it => it.ManuNo.Equals(cs.ManuNo));
return cs;
}).ToList();
}
diff --git a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
index 1df301d..412b3a4 100644
--- a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
+++ b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs
@@ -183,10 +183,10 @@ namespace DM_Weight.ViewModels
SqlSugarHelper.Db.Updateable(new ChannelStock()
{
Quantity = it.Quantity - it.TakeQuantity,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
+ //ManuNo = it.ManuNo,
+ //EffDate = it.EffDate,
Id = it.Id,
- }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
+ }).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
// 获取更新完库存后的药品库存
List nowChannels = SqlSugarHelper.Db.Queryable()
.Where(cs => cs.MachineId.Equals(it.MachineId))
@@ -201,8 +201,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
Reviewer = HomeWindowViewModel.Reviewer?.Id,
OperationTime = DateTime.Now,
diff --git a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs
index 695a31b..1ceb700 100644
--- a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs
+++ b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs
@@ -256,10 +256,8 @@ namespace DM_Weight.ViewModels
{
Quantity = it.Quantity + it.AddQuantity,
PosNo = 1,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
Id = it.Id,
- }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
+ }).UpdateColumns(it => new { it.Quantity, it.PosNo }).ExecuteCommand();
// 获取更新完库存后的药品库存
List nowChannels = SqlSugarHelper.Db.Queryable()
.Where(cs => cs.MachineId.Equals(it.MachineId))
@@ -274,8 +272,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
Reviewer = HomeWindowViewModel.Reviewer?.Id,
OperationTime = DateTime.Now,
diff --git a/DM_Weight/ViewModels/InvoiceInWindowViewModel.cs b/DM_Weight/ViewModels/InvoiceInWindowViewModel.cs
index 3c930f4..a409e4f 100644
--- a/DM_Weight/ViewModels/InvoiceInWindowViewModel.cs
+++ b/DM_Weight/ViewModels/InvoiceInWindowViewModel.cs
@@ -206,8 +206,8 @@ namespace DM_Weight.ViewModels
{
List q = SqlSugarHelper.Db.Queryable()
.Includes(cs => cs.DrugInfo)
- .WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Equals(invoice.DrugEffDate))
- .WhereIF(!string.IsNullOrEmpty(invoice.DrugManuNo), cs => cs.ManuNo.Equals(invoice.DrugManuNo))
+ //.WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Equals(invoice.DrugEffDate))
+ //.WhereIF(!string.IsNullOrEmpty(invoice.DrugManuNo), cs => cs.ManuNo.Equals(invoice.DrugManuNo))
.Where(cs => cs.DrugId == invoice.DrugId)
.Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne)
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
diff --git a/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs
index 2f3afc3..5cf5b85 100644
--- a/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs
+++ b/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs
@@ -192,10 +192,10 @@ namespace DM_Weight.ViewModels
.Where(cs => cs.Quantity > 0)
.Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne)
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
- .WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Equals(invoice.DrugEffDate))
- .WhereIF(!string.IsNullOrEmpty(invoice.DrugManuNo), cs => cs.ManuNo.Equals(invoice.DrugManuNo))
+ //.WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Equals(invoice.DrugEffDate))
+ //.WhereIF(!string.IsNullOrEmpty(invoice.DrugManuNo), cs => cs.ManuNo.Equals(invoice.DrugManuNo))
.Where(cs => cs.DrugId == invoice.DrugId)
- .OrderBy(cs => cs.EffDate)
+ //.OrderBy(cs => cs.EffDate)
.ToList();
int total = HasQChannels.Sum(it => it.Quantity);
int TakeQ = invoice.quantity;
@@ -317,10 +317,10 @@ namespace DM_Weight.ViewModels
SqlSugarHelper.Db.Updateable(new ChannelStock()
{
Quantity = it.Quantity - it.TakeQuantity,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
+ //ManuNo = it.ManuNo,
+ //EffDate = it.EffDate,
Id = it.Id,
- }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
+ }).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
// 获取更新完库存后的药品库存
List nowChannels = SqlSugarHelper.Db.Queryable()
.Where(cs => cs.MachineId.Equals(it.MachineId))
@@ -335,8 +335,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
Reviewer = HomeWindowViewModel.Reviewer?.Id,
OperationTime = DateTime.Now,
diff --git a/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs b/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs
index 9eda48c..1bd3dec 100644
--- a/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs
+++ b/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs
@@ -178,7 +178,7 @@ namespace DM_Weight.ViewModels
.InnerJoin(SqlSugarHelper.Db.Queryable().Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne).Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).GroupBy(cs => cs.DrugId), (od, t) => od.DrugId == t.DrugId)
.Where(od => OrderInfo.Select(o => o.OrderNo).Contains(od.OrderNo)).GroupBy(od => od.DrugId)
- .Select(od => new OrderDetail { DrugId = od.DrugId, SetEffDate = od.SetEffDate, SetManuNo = od.SetManuNo, Quantity = SqlFunc.AggregateSum(od.Quantity) })
+ .Select(od => new OrderDetail { DrugId = od.DrugId,Quantity = SqlFunc.AggregateSum(od.Quantity) })
//.Where(od => od.OrderNo. OrderInfo.OrderNo)
.ToList();
@@ -195,8 +195,8 @@ namespace DM_Weight.ViewModels
.Where(cs => cs.Quantity > 0)
.Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne)
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
- .WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate))
- .WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo))
+ //.WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate))
+ //.WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo))
.Where(cs => cs.DrugId == orderDetail.DrugId)
.OrderBy(cs => cs.EffDate)
.OrderBy(cs => cs.DrawerNo)
@@ -375,8 +375,8 @@ namespace DM_Weight.ViewModels
SqlSugarHelper.Db.Updateable(new ChannelStock()
{
Quantity = it.Quantity - it.TakeQuantity,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
+ //ManuNo = it.ManuNo,
+ //EffDate = it.EffDate,
Id = it.Id,
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
// 获取更新完库存后的药品库存
@@ -393,8 +393,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
Reviewer = HomeWindowViewModel.Reviewer?.Id,
OperationTime = DateTime.Now,
diff --git a/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs b/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs
index 466d04b..db91d63 100644
--- a/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs
+++ b/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs
@@ -190,10 +190,10 @@ namespace DM_Weight.ViewModels
.Where(cs => cs.Quantity > 0)
.Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne)
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
- .WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate))
- .WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo))
+ //.WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate))
+ //.WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo))
.Where(cs => cs.DrugId == orderDetail.DrugId)
- .OrderBy(cs => cs.EffDate)
+ //.OrderBy(cs => cs.EffDate)
.OrderBy(cs => cs.DrawerNo)
.ToList();
int total = HasQChannels.Sum(it => it.Quantity);
@@ -337,10 +337,10 @@ namespace DM_Weight.ViewModels
SqlSugarHelper.Db.Updateable(new ChannelStock()
{
Quantity = it.Quantity - it.TakeQuantity,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
+ //ManuNo = it.ManuNo,
+ //EffDate = it.EffDate,
Id = it.Id,
- }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
+ }).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
// 获取更新完库存后的药品库存
List nowChannels = SqlSugarHelper.Db.Queryable()
.Where(cs => cs.MachineId.Equals(it.MachineId))
@@ -355,8 +355,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
Reviewer = HomeWindowViewModel.Reviewer?.Id,
OperationTime = DateTime.Now,
diff --git a/DM_Weight/ViewModels/SelfAddDialogViewModel.cs b/DM_Weight/ViewModels/SelfAddDialogViewModel.cs
index 99a5a15..88e936f 100644
--- a/DM_Weight/ViewModels/SelfAddDialogViewModel.cs
+++ b/DM_Weight/ViewModels/SelfAddDialogViewModel.cs
@@ -243,10 +243,10 @@ namespace DM_Weight.ViewModels
{
Quantity = it.Quantity + it.AddQuantity,
PosNo = 1,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
+ //ManuNo = it.ManuNo,
+ //EffDate = it.EffDate,
Id = it.Id,
- }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
+ }).UpdateColumns(it => new { it.Quantity, it.PosNo }).ExecuteCommand();
// 获取更新完库存后的药品库存
List nowChannels = SqlSugarHelper.Db.Queryable()
.Where(cs => cs.MachineId.Equals(it.MachineId))
@@ -261,8 +261,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
Reviewer = HomeWindowViewModel.Reviewer?.Id,
OperationTime = DateTime.Now,
diff --git a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs
index 614d594..b1df958 100644
--- a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs
+++ b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs
@@ -220,10 +220,10 @@ namespace DM_Weight.ViewModels
SqlSugarHelper.Db.Updateable(new ChannelStock()
{
Quantity = it.Quantity - it.TakeQuantity,
- ManuNo = it.ManuNo,
- EffDate = it.EffDate,
+ //ManuNo = it.ManuNo,
+ //EffDate = it.EffDate,
Id = it.Id,
- }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
+ }).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
// 获取更新完库存后的药品库存
List nowChannels = SqlSugarHelper.Db.Queryable()
.Where(cs => cs.MachineId.Equals(it.MachineId))
@@ -238,8 +238,8 @@ namespace DM_Weight.ViewModels
DrawerNo = it.DrawerNo,
ColNo = it.ColNo,
DrugId = it.DrugId,
- ManuNo = it.ManuNo,
- EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
+ //ManuNo = it.ManuNo,
+ //EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,
OperationTime = DateTime.Now,
Quantity = it.TakeQuantity,
diff --git a/DM_Weight/Views/BiaoDingWindow.xaml b/DM_Weight/Views/BiaoDingWindow.xaml
index de2cb49..79d4c0b 100644
--- a/DM_Weight/Views/BiaoDingWindow.xaml
+++ b/DM_Weight/Views/BiaoDingWindow.xaml
@@ -222,11 +222,11 @@
SelectionUnit="Cell"
CanUserAddRows="False"
AutoGenerateColumns="False">
-
+