parent
a9f937508a
commit
d783b9c631
|
@ -3,7 +3,7 @@
|
|||
<connectionStrings>
|
||||
<!-- 数据库连接字符串 -->
|
||||
<!--<add name="database" connectionString="server=127.0.0.1;database=wpf_dm_program;userid=root;password=qq1223" />-->
|
||||
<add name="database" connectionString="server=192.168.50.252;port=3306;database=xiangtan_mazuike_xx;userid=root;password=qq1223" />
|
||||
<add name="database" connectionString="server=127.0.0.1;port=3306;database=xiangtan_mazuike_xx;userid=root;password=root" />
|
||||
</connectionStrings>
|
||||
<!--<runtime>
|
||||
--><!--配置之后,Appdomain.CurrentDomain.UnhandledException 事件的 IsTerminating 就变成了 false 啦!也就是说,程序并不会因为这次的异常而崩溃退出。--><!--
|
||||
|
@ -37,7 +37,7 @@
|
|||
<!-- 按处方还药或者按取药记录还药 1:处方(ReturnDrugWindow2)2:药品(ReturnDrugWindow)-->
|
||||
<add key="returnDrugMode" value="1" />
|
||||
<!-- 自动退出时间,单位秒,为0时不自动退出 -->
|
||||
<add key="autoExit" value="0"/>
|
||||
<add key="autoExit" value="5"/>
|
||||
|
||||
<!-- 无操作退出录像时间,单位秒,为0时不退出录像 -->
|
||||
<add key="stopRecord" value="180"/>
|
||||
|
|
|
@ -1363,7 +1363,8 @@ namespace DM_Weight.Port
|
|||
}
|
||||
logger.Info($"开始写标签指令:{Convert.ToHexString(buffer)}");
|
||||
canBusSerial.Write(buffer, 0, 8);
|
||||
logger.Info($"写标签指令:{Convert.ToHexString(buffer)}");
|
||||
byte[] retBuffer= await GetBufferByPort(canBusSerial, 8);
|
||||
logger.Info($"收到写标签回复:{Convert.ToHexString(retBuffer)}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -370,7 +370,7 @@ namespace DM_Weight.Report
|
|||
/// 使用登记册
|
||||
/// 能按麻醉师名字、时间结合起来查找
|
||||
/// </summary>
|
||||
public static void UserAccount(DateTime? startDate, DateTime? endDate, string Name)
|
||||
public static void UserAccount(DateTime? startDate, DateTime? endDate, string Name, string box)
|
||||
{
|
||||
|
||||
// 定义Grid++Report报表主对象
|
||||
|
@ -385,7 +385,7 @@ namespace DM_Weight.Report
|
|||
SELECT re.create_time as OptDate, di.drug_name as DrugName,di.Drug_spec as DrugSpec,dt.Set_manu_no as ManuNo,re.patient_name as PName,
|
||||
CONCAT(use_dose,dose_unit) as UDose,CONCAT(residual_dose,dose_unit) as ReDose,if(residual_dose>0,'是','否') as Disposal,
|
||||
re.anaesthetist_name as AName,re.operator_name as OName,re.supervisor_name as CName,of.operator as EmpRecive,'彭蕾' as EmpMedicRecive,re.disposal_time as DisposalTime,of.win_no as WinNo
|
||||
from surgical_residual re inner join drug_info di on re.drug_id=di.drug_id left join hkc_order_finish of on re.order_no=of.order_no left join order_detail_sm dt on re.order_no=dt.order_no
|
||||
from surgical_residual re inner join drug_info di on re.drug_id=di.drug_id left join hkc_order_finish of on re.order_no=of.order_no and of.state=2 left join order_detail_sm dt on re.order_no=dt.order_no
|
||||
where re.create_time > '{startDate}' and re.create_time< '{endDate}'";
|
||||
|
||||
|
||||
|
@ -394,6 +394,10 @@ namespace DM_Weight.Report
|
|||
{
|
||||
SQL += " AND re.anaesthetist_name='" + Name + "' ";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(box))
|
||||
{
|
||||
SQL += " AND of.win_no='" + box + "' ";
|
||||
}
|
||||
SQL += " ORDER BY re.create_time";
|
||||
Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
|
||||
Report.DetailGrid.Recordset.QuerySQL = SQL;
|
||||
|
|
|
@ -367,7 +367,7 @@ namespace DM_Weight.ViewModels
|
|||
// 完成按钮
|
||||
public DelegateCommand TakeFinish
|
||||
{
|
||||
get => new DelegateCommand(() =>
|
||||
get => new DelegateCommand(async () =>
|
||||
{
|
||||
if (!_isFinishClick)
|
||||
{
|
||||
|
@ -640,11 +640,11 @@ namespace DM_Weight.ViewModels
|
|||
List<ChannelStock> singleChannelsBoxSmart = record.FindAll(it => it.BoardType == 35);
|
||||
if ((singleChannelsBoxSmart.Count > 0 ? singleChannelsBoxSmart[0].BoardType : 1) == 35)
|
||||
{
|
||||
singleChannelsBoxSmart.ForEach(async it =>
|
||||
for (int i = 0; i < singleChannelsBoxSmart.Count; i++)
|
||||
{
|
||||
ChannelStock it = singleChannelsBoxSmart[i];
|
||||
await _portUtil.WriteQuantityMethod((it.Quantity - it.CheckQuantity), it.DrawerNo, it.ColNo);
|
||||
await Task.Delay(20);
|
||||
});
|
||||
}
|
||||
}
|
||||
//});
|
||||
AlertMsg alertMsg = new AlertMsg
|
||||
|
|
|
@ -267,6 +267,7 @@ namespace DM_Weight.ViewModels
|
|||
Task.Delay(200);
|
||||
_portUtil.WriteChannelInfoMethod(6, item.ManuNo, item.DrawerNo, item.ColNo);
|
||||
Task.Delay(200);
|
||||
Task.Delay(200);
|
||||
_portUtil.ShowContentMethod(item.DrawerNo, item.ColNo);
|
||||
Task.Delay(200);
|
||||
}
|
||||
|
|
|
@ -564,6 +564,10 @@ namespace DM_Weight.ViewModels
|
|||
stop();
|
||||
System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
||||
{
|
||||
if (DialogHost.IsDialogOpen("RootDialog"))
|
||||
{
|
||||
DialogHost.Close("RootDialog");
|
||||
}
|
||||
_regionManager.RequestNavigate("ContentRegion", "EmptyWindow");
|
||||
_regionManager.RequestNavigate("MainRegion", "LoginWindow");
|
||||
}));
|
||||
|
|
|
@ -8,6 +8,7 @@ using Prism.Events;
|
|||
using Prism.Mvvm;
|
||||
using Prism.Regions;
|
||||
using Prism.Services.Dialogs;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
@ -198,10 +199,32 @@ namespace DM_Weight.ViewModels
|
|||
if (SelectedInvoice != null)
|
||||
{
|
||||
var invoices = SqlSugarHelper.Db.Queryable<InOutInvoice>()
|
||||
.LeftJoin(
|
||||
SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
|
||||
.GroupBy(cs => cs.DrugId), (i, t) => i.DrugId == t.DrugId
|
||||
)
|
||||
.Includes<DrugInfo>(i => i.DrugInfo)
|
||||
.LeftJoin(SqlSugarHelper.Db.Queryable<ChannelStock>().Where(cs => cs.DrawerType == 1).Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).GroupBy(cs => cs.DrugId), (i, t) => i.DrugId == t.DrugId)
|
||||
.Where(i => i.InvoiceNo == SelectedInvoice.InvoiceNo && i.Status == 1 && i.Type == 2 && i.CancelFlag == 0)
|
||||
.MergeTable().GroupBy(i => new { i.DrugId, i.DrugManuNo })
|
||||
.Select(i => new InOutInvoice
|
||||
{
|
||||
DrugId = i.DrugId,
|
||||
DrugEffDate = i.DrugEffDate,
|
||||
DrugManuNo = i.DrugManuNo,
|
||||
quantity = SqlFunc.AggregateSum(i.quantity),
|
||||
DrugInfo=i.DrugInfo
|
||||
})
|
||||
.ToList();
|
||||
//.Select((i, t) => new InOutInvoice
|
||||
// {
|
||||
// DrugId = i.DrugId,
|
||||
// DrugEffDate = i.DrugEffDate,
|
||||
// DrugManuNo = i.DrugManuNo,
|
||||
// quantity = i.quantity,
|
||||
// DrugInfo = i.DrugInfo
|
||||
// }).ToList();
|
||||
foreach (var invoice in invoices)
|
||||
{
|
||||
List<ChannelStock> q = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
|
|
|
@ -74,6 +74,21 @@ namespace DM_Weight.ViewModels
|
|||
set { SetProperty(ref _User, value); }
|
||||
}
|
||||
|
||||
private static List<string> boxDefine =
|
||||
new List<string> { "1号手术间", "2号手术间", "3号手术间", "4号手术间", "5号手术间", "6号手术间", "7号手术间", "8号手术间", "9号手术间", "10号手术间", "11号手术间", "12号手术间", "13号手术间", "14号手术间", "15号手术间", "16号手术间", "17号手术间", "18号手术间" };
|
||||
|
||||
private List<string> _Boxs = boxDefine;
|
||||
public List<string> Boxs
|
||||
{
|
||||
get => _Boxs;
|
||||
set { SetProperty(ref _Boxs, value); }
|
||||
}
|
||||
private string _Box;
|
||||
public string Box
|
||||
{
|
||||
get => _Box;
|
||||
set { SetProperty(ref _Box, value); }
|
||||
}
|
||||
private static readonly DateTime Jan1st1970 = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
public long CurrentTimeMillis()
|
||||
{
|
||||
|
@ -95,7 +110,6 @@ namespace DM_Weight.ViewModels
|
|||
public void OnNavigatedFrom(NavigationContext navigationContext)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出账册
|
||||
/// </summary>
|
||||
|
@ -103,7 +117,7 @@ namespace DM_Weight.ViewModels
|
|||
{
|
||||
get => new DelegateCommand(() =>
|
||||
{
|
||||
GridReportUtil.UserAccount(StartDate, EndDate, User == null ? "" : User.Nickname);
|
||||
GridReportUtil.UserAccount(StartDate, EndDate, User == null ? "" : User.Nickname, Box);
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
@ -55,7 +55,13 @@
|
|||
ItemsSource="{Binding UserInfos}"
|
||||
SelectedItem="{Binding User}"
|
||||
DisplayMemberPath="Nickname" IsEditable="True" IsTextSearchEnabled="False"/>
|
||||
|
||||
<ComboBox Width="130"
|
||||
Margin="16 0 6 0"
|
||||
Grid.Column="2"
|
||||
materialDesign:HintAssist.Hint="手术间"
|
||||
ItemsSource="{Binding Boxs}"
|
||||
SelectedItem="{Binding Box}"
|
||||
IsEditable="True" IsTextSearchEnabled="False"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button
|
||||
|
|
Loading…
Reference in New Issue