diff --git a/DM_Weight/App.config b/DM_Weight/App.config
index db39a32..fd496d9 100644
--- a/DM_Weight/App.config
+++ b/DM_Weight/App.config
@@ -28,7 +28,7 @@
-
+
diff --git a/DM_Weight/Port/PortUtil.cs b/DM_Weight/Port/PortUtil.cs
index 77875a0..5c6bcd2 100644
--- a/DM_Weight/Port/PortUtil.cs
+++ b/DM_Weight/Port/PortUtil.cs
@@ -545,6 +545,7 @@ namespace DM_Weight.Port
}
else
{
+ Thread.Sleep(50);
// 灯在闪烁继续监听状态
GetBackDoorState();
}
@@ -581,6 +582,7 @@ namespace DM_Weight.Port
});
logger.Info($"储物箱打开成功");
}
+ Thread.Sleep(50);
// 灯在闪烁继续监听状态
GetBackDoorState();
}
diff --git a/DM_Weight/ReportTemp/changeShifts_temp_new.grf b/DM_Weight/ReportTemp/changeShifts_temp_new.grf
new file mode 100644
index 0000000..454040f
--- /dev/null
+++ b/DM_Weight/ReportTemp/changeShifts_temp_new.grf
@@ -0,0 +1,444 @@
+{
+ "Version":"6.8.1.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Oriention":"Landscape",
+ "LeftMargin":1,
+ "TopMargin":1.4287,
+ "RightMargin":1,
+ "BottomMargin":1.8
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "Recordset":{
+ "Field":[
+ {
+ "Name":"日期",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd",
+ "DBFieldName":"opt_date"
+ },
+ {
+ "Name":"品名",
+ "DBFieldName":"drug_name"
+ },
+ {
+ "Name":"规格",
+ "DBFieldName":"drug_spec"
+ },
+ {
+ "Name":"上班结存数",
+ "Type":"Integer",
+ "DBFieldName":"beforenum"
+ },
+ {
+ "Name":"领用数",
+ "Type":"Integer",
+ "DBFieldName":"getnum"
+ },
+ {
+ "Name":"消耗数",
+ "Type":"Integer",
+ "DBFieldName":"usenum"
+ },
+ {
+ "Name":"批号",
+ "DBFieldName":"manu_no"
+ },
+ {
+ "Name":"余",
+ "Type":"Integer",
+ "DBFieldName":"surplus"
+ },
+ {
+ "Name":"交班人",
+ "DBFieldName":"fromoperator"
+ },
+ {
+ "Name":"接班人",
+ "DBFieldName":"tooperator"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"品名",
+ "Width":4.60375
+ },
+ {
+ "Name":"规格",
+ "Width":2.59292
+ },
+ {
+ "Name":"单位"
+ },
+ {
+ "Name":"基数数量"
+ },
+ {
+ "Name":"现存数量"
+ },
+ {
+ "Name":"处方数量"
+ },
+ {
+ "Name":"空安瓿数"
+ },
+ {
+ "Name":"交接班时间"
+ },
+ {
+ "Name":"上班结存数",
+ "Width":1.4
+ },
+ {
+ "Name":"领用数",
+ "Width":1.4
+ },
+ {
+ "Name":"消耗数",
+ "Width":1.4
+ },
+ {
+ "Name":"批号",
+ "Width":1.98438
+ },
+ {
+ "Name":"余",
+ "Width":0.608542
+ },
+ {
+ "Name":"交班人",
+ "Width":2.80458
+ },
+ {
+ "Name":"接班人",
+ "Width":2.35479
+ },
+ {
+ "Name":"备注"
+ }
+ ],
+ "ColumnContent":{
+ "Height":0.85,
+ "ColumnContentCell":[
+ {
+ "Column":"品名",
+ "DataField":"品名"
+ },
+ {
+ "Column":"规格",
+ "TextAlign":"MiddleCenter",
+ "DataField":"规格"
+ },
+ {
+ "Column":"单位"
+ },
+ {
+ "Column":"基数数量"
+ },
+ {
+ "Column":"现存数量"
+ },
+ {
+ "Column":"处方数量"
+ },
+ {
+ "Column":"空安瓿数"
+ },
+ {
+ "Column":"交接班时间"
+ },
+ {
+ "Column":"上班结存数",
+ "TextAlign":"MiddleCenter",
+ "DataField":"上班结存数"
+ },
+ {
+ "Column":"领用数",
+ "TextAlign":"MiddleCenter",
+ "DataField":"领用数"
+ },
+ {
+ "Column":"消耗数",
+ "TextAlign":"MiddleCenter",
+ "DataField":"消耗数"
+ },
+ {
+ "Column":"批号",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批号"
+ },
+ {
+ "Column":"余",
+ "TextAlign":"MiddleCenter",
+ "DataField":"余"
+ },
+ {
+ "Column":"交班人",
+ "TextAlign":"MiddleCenter",
+ "DataField":"交班人"
+ },
+ {
+ "Column":"接班人",
+ "TextAlign":"MiddleCenter",
+ "DataField":"接班人"
+ },
+ {
+ "Column":"备注"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.00542,
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "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":"规格"
+ },
+ {
+ "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":"基数数量"
+ },
+ {
+ "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":"处方数量"
+ },
+ {
+ "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":"交接班时间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"上班结存数",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "WordWrap":true,
+ "TextAlign":"MiddleCenter",
+ "Text":"上班\r\n结存数"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"领用数",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "WordWrap":true,
+ "TextAlign":"MiddleCenter",
+ "Text":"领用数"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"消耗数",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "WordWrap":true,
+ "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":"余"
+ },
+ {
+ "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":"接班人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"备注",
+ "TextAlign":"MiddleCenter",
+ "Text":"备注"
+ }
+ ]
+ },
+ "Group":[
+ {
+ "Name":"Group1",
+ "ByFields":"日期",
+ "GroupHeader":{
+ "Height":0,
+ "PrintGridBorder":false,
+ "NewPageColumn":"Before"
+ },
+ "GroupFooter":{
+ "Visible":false,
+ "PrintGridBorder":false
+ }
+ }
+ ]
+ },
+ "Parameter":[
+ {
+ "Name":"machine_id"
+ },
+ {
+ "Name":"startDate",
+ "DataType":"DateTime"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.79917,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox1",
+ "Dock":"Fill",
+ "Center":"Both",
+ "Font":{
+ "Name":"宋体",
+ "Size":262500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"麻醉药品、第一类精神药品交接班记录"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs b/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs
index 7cf17b3..38186d5 100644
--- a/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs
+++ b/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs
@@ -331,12 +331,14 @@ namespace DM_Weight.ViewModels
{
if (Status == 0)
{
+ logger.Info("开始盘点");
enumerable = ChannelStocks.GroupBy(cs => cs.DrawerNo, cs => cs);
//enumerable = ChannelStocks.GroupBy(cs => cs.Location, cs => cs);
enumerator = enumerable.GetEnumerator();
enumerator.MoveNext();
Status = 1;
OpenOneByOne();
+ logger.Info("结束盘点");
}
});
}
diff --git a/DM_Weight/ViewModels/LoginWindowViewModel.cs b/DM_Weight/ViewModels/LoginWindowViewModel.cs
index 1b95b96..5c2951e 100644
--- a/DM_Weight/ViewModels/LoginWindowViewModel.cs
+++ b/DM_Weight/ViewModels/LoginWindowViewModel.cs
@@ -343,7 +343,7 @@ _exitCommand ??= new DelegateCommand(Exit);
{
UserList userList = SqlSugarHelper.Db.Queryable()
.Includes(u => u.Role)
- .First(u => u.Id == msg.Id);
+ .First(u => u.Id == msg.Id&& ConfigurationManager.AppSettings["machineId"].ToString().Equals(u.MachineId));
//UserList userList = new UserService().CheckUserByFingerPrinter(msg.Id);
diff --git a/DM_Weight/ViewModels/MainWindowViewModel.cs b/DM_Weight/ViewModels/MainWindowViewModel.cs
index 048f8f4..17af269 100644
--- a/DM_Weight/ViewModels/MainWindowViewModel.cs
+++ b/DM_Weight/ViewModels/MainWindowViewModel.cs
@@ -88,11 +88,11 @@ namespace DM_Weight.ViewModels
_regionManager.RequestNavigate("MainRegion", "BeforeLogin");
}));
- string bAutoWriteNum = ConfigurationManager.AppSettings["AutoWriteNum"] ?? "false";
- if (bAutoWriteNum == "true")
- {
- Task.Factory.StartNew(() => BindStock());
- }
+ //string bAutoWriteNum = ConfigurationManager.AppSettings["AutoWriteNum"] ?? "false";
+ //if (bAutoWriteNum == "true")
+ //{
+ // Task.Factory.StartNew(() => BindStock());
+ //}
}
void doMyPrismEvent2(AlertMsg msg)
diff --git a/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs b/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs
index 631bf20..8b9e688 100644
--- a/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs
+++ b/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs
@@ -31,6 +31,14 @@ namespace DM_Weight.ViewModels
private static readonly DateTime Jan1st1970 = new DateTime
(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+ //取药人(科室)
+ private string receivePerson;
+ public string ReceivePerson
+ {
+ get => receivePerson;
+ set => SetProperty(ref receivePerson, value);
+ }
+
private PortUtil _portUtil;
IEventAggregator _eventAggregator;
IDialogService _dialogService;
@@ -412,7 +420,12 @@ namespace DM_Weight.ViewModels
OperationTime = DateTime.Now,
Quantity = orderTakeQuantity,
Type = 2,
- InvoiceId = InvoiceId
+ InvoiceId = InvoiceId,
+ StockQuantity = nowChannels.Sum(it => it.Quantity),
+ ManunoQuantity = nowChannels.FindAll(it2 => it2.ManuNo == it.ManuNo).Sum(it => it.Quantity),
+ SupplierDept = ConfigurationManager.AppSettings["receiveDept"].ToString(),
+ ReceiveDept = OrderInfo[0].DeptName,
+ ReceivePerson = ReceivePerson
//,StockQuantity = nowChannels.Sum(it => it.Quantity)
}).ExecuteCommand();
}
diff --git a/DM_Weight/Views/Dialog/MultiOrderTakeDialog.xaml b/DM_Weight/Views/Dialog/MultiOrderTakeDialog.xaml
index e1f3cdc..a6489d1 100644
--- a/DM_Weight/Views/Dialog/MultiOrderTakeDialog.xaml
+++ b/DM_Weight/Views/Dialog/MultiOrderTakeDialog.xaml
@@ -149,6 +149,10 @@
Content="取药"
Command="{Binding OpenDrawer}">
-->
+