去掉冷藏抽屉相关内容(显示温度及设置页面)
This commit is contained in:
parent
abf30e2da0
commit
042a587afb
|
@ -1,18 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<connectionStrings>
|
||||
<!-- 数据库连接字符串 -->
|
||||
<!--<add name="database" connectionString="server=127.0.0.1;database=wpf_dm_program;userid=root;password=qq1223" />-->
|
||||
<add name="database" connectionString="server=127.0.0.1;port=3306;database=hkcdb;userid=root;password=root" />
|
||||
</connectionStrings>
|
||||
<connectionStrings>
|
||||
<!-- 数据库连接字符串 -->
|
||||
<!--<add name="database" connectionString="server=127.0.0.1;database=wpf_dm_program;userid=root;password=qq1223" />-->
|
||||
<add name="database" connectionString="server=127.0.0.1;port=3306;database=xiangtan_mazuike;userid=root;password=root" />
|
||||
</connectionStrings>
|
||||
<!--<runtime>
|
||||
--><!--配置之后,Appdomain.CurrentDomain.UnhandledException 事件的 IsTerminating 就变成了 false 啦!也就是说,程序并不会因为这次的异常而崩溃退出。--><!--
|
||||
-->
|
||||
<!--配置之后,Appdomain.CurrentDomain.UnhandledException 事件的 IsTerminating 就变成了 false 啦!也就是说,程序并不会因为这次的异常而崩溃退出。-->
|
||||
<!--
|
||||
<legacyUnhandledExceptionPolicy enabled="1"/>
|
||||
</runtime>-->
|
||||
<appSettings>
|
||||
|
||||
|
||||
<!-- 设备id -->
|
||||
<add key="machineId" value="DM1" />
|
||||
<add key="machineId" value="DM3" />
|
||||
<!--请领药库-->
|
||||
<add key="colloctedId" value="住院,DM2,门诊,DM22" />
|
||||
<!-- 供应单位 -->
|
||||
<add key="supplierDept" value="药库" />
|
||||
<!-- 领用部门 -->
|
||||
<add key="receiveDept" value="麻精药房" />
|
||||
<!--部门-->
|
||||
<add key="department" value="急诊药房"/>
|
||||
|
||||
<!--登录人 0全部用户可登录;1仅当班人、审核人可登录-->
|
||||
<add key="loginUser" value="0"/>
|
||||
|
||||
|
||||
<!--2023/7/13 药房代码 有则写无则空 -->
|
||||
<add key="storage" value="159" />
|
||||
<!-- 登录模式 1单人登录2双人登录 -->
|
||||
|
@ -24,7 +39,10 @@
|
|||
<!-- 自动退出时间,单位秒,为0时不自动退出 -->
|
||||
<add key="autoExit" value="0"/>
|
||||
|
||||
<add key="gridConnectionString" value="MYSQL; Database=hkcdb; Password=root; Port=3306; Server=127.0.0.1; User=root;"/>
|
||||
<!-- 无操作退出录像时间,单位秒,为0时不退出录像 -->
|
||||
<add key="stopRecord" value="180"/>
|
||||
|
||||
<add key="gridConnectionString" value="MYSQL; Database=xiangtan_mazuike; Password=root; Port=3306; Server=127.0.0.1; User=root;"/>
|
||||
<!-- 查询处方是orderNo还是orderGroupNo -->
|
||||
<add key="OrderNoName" value="orderNo" />
|
||||
<!-- 后门耗材板地址 没有则填写0-->
|
||||
|
@ -54,14 +72,19 @@
|
|||
<add key="FridgeState" value="0"/>
|
||||
<!--报警状态1关闭;0打开-->
|
||||
<add key="AlarmState" value="0"/>
|
||||
|
||||
|
||||
|
||||
<!-- 抽屉串口的串口号 --><!--
|
||||
|
||||
|
||||
|
||||
<!-- 抽屉串口的串口号 -->
|
||||
<!--
|
||||
<add key="DrawerPortPath" value="COM11" />
|
||||
--><!-- can总线串口的串口号 --><!--
|
||||
-->
|
||||
<!-- can总线串口的串口号 -->
|
||||
<!--
|
||||
<add key="CanBusPortPath" value="COM12" />
|
||||
--><!-- 条码枪串口的串口号 --><!--
|
||||
-->
|
||||
<!-- 条码枪串口的串口号 -->
|
||||
<!--
|
||||
<add key="ScanPortPath" value="COM7" />-->
|
||||
|
||||
|
||||
|
@ -71,7 +94,7 @@
|
|||
<add key="machineNumber" value="1"/>
|
||||
<!-- 指纹机ip -->
|
||||
<add key="fingerIp" value="192.168.1.201"/>
|
||||
|
||||
|
||||
<!-- 多处方取药 0:不启用 1:启用-->
|
||||
<add key="MultiOrder" value="1"/>
|
||||
<!-- 多批次抽屉加药 0:不启用 1:启用
|
||||
|
|
|
@ -232,9 +232,9 @@ namespace DM_Weight
|
|||
// 调试页面
|
||||
containerRegistry.RegisterForNavigation<DebugWindow, DebugWindowViewModel>();
|
||||
//主设置页面
|
||||
containerRegistry.RegisterForNavigation<SettingMainWindow, SettingMainWindowViewModel>();
|
||||
//冰箱抽屉设置页面
|
||||
containerRegistry.RegisterForNavigation<FridgeWindow, FridgeWindowViewModel>();
|
||||
//containerRegistry.RegisterForNavigation<SettingMainWindow, SettingMainWindowViewModel>();
|
||||
////冰箱抽屉设置页面
|
||||
//containerRegistry.RegisterForNavigation<FridgeWindow, FridgeWindowViewModel>();
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -272,64 +272,6 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
Is16Drawer = count == 16;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取温度信息
|
||||
/// </summary>
|
||||
private async void GetWD(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
if (!_portUtil.FridgeOperate)
|
||||
{
|
||||
string retStr = string.Empty;
|
||||
byte[] data = null;
|
||||
float retT = await _portUtil.GetFridgeTemperature();
|
||||
Thread.Sleep(80);
|
||||
WD = $"恒温冷藏抽屉当前温度:{Math.Round((retT - 1.5), 2)}℃";
|
||||
}
|
||||
}
|
||||
|
||||
private async void GetWD()
|
||||
{
|
||||
if (!_portUtil.FridgeOperate)
|
||||
{
|
||||
string retStr = string.Empty;
|
||||
byte[] data = null;
|
||||
float retT = await _portUtil.GetFridgeTemperature();
|
||||
Thread.Sleep(80);
|
||||
WD = $"恒温冷藏抽屉当前温度:{Math.Round((retT - 1.5), 2)}℃";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 将收到的返回转换成具体温度数值
|
||||
/// </summary>
|
||||
/// <param name="receiveData"></param>
|
||||
/// <returns></returns>
|
||||
public string GetResultWD(string receiveData)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
//string newStrWD = receiveData.Substring(10, 4);
|
||||
|
||||
//logger.Info($"截取后数据newStrWD:{newStrWD}");
|
||||
int iWD = Convert.ToInt32(receiveData, 16);
|
||||
logger.Info($"截取后数据iWD:{iWD}");
|
||||
float fWD = 0;
|
||||
if (iWD != 0)
|
||||
{
|
||||
fWD = iWD * 1.0f / 10;
|
||||
}
|
||||
|
||||
logger.Info($"截取后数据fWD:{fWD}");
|
||||
string strRet = $"恒温冷藏抽屉当前温度:{fWD}℃;";
|
||||
|
||||
return strRet;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Info("GetResultWD异常", new Exception($"{ex.ToString()}"));
|
||||
}
|
||||
return "数据异常";
|
||||
}
|
||||
//这个方法用于拦截请求,continuationCallback(true)就是不拦截,continuationCallback(false)拦截本次操作
|
||||
public void ConfirmNavigationRequest(NavigationContext navigationContext, Action<bool> continuationCallback)
|
||||
{
|
||||
|
@ -403,20 +345,6 @@ namespace DM_Weight.ViewModels
|
|||
};
|
||||
timer.Start();
|
||||
}
|
||||
#region 温度查询定时
|
||||
int interval = Convert.ToInt32(ConfigurationManager.AppSettings["Interval"]);
|
||||
if (interval > 0)
|
||||
{
|
||||
WDTimer = new System.Timers.Timer();
|
||||
|
||||
WDTimer.Elapsed += new System.Timers.ElapsedEventHandler(GetWD);
|
||||
WDTimer.Interval = interval;
|
||||
//WDTimer.Start();
|
||||
//WDTimer.AutoReset = true;
|
||||
//WDTimer.Enabled = true;
|
||||
}
|
||||
#endregion
|
||||
GetWD();
|
||||
if (stopRecord > 0)
|
||||
{
|
||||
System.Timers.Timer timer = new System.Timers.Timer();
|
||||
|
|
|
@ -389,18 +389,18 @@ namespace DM_Weight.ViewModels
|
|||
PremissionName = "角色管理",
|
||||
PremissionPath = "RoleManagerWindow",
|
||||
};
|
||||
//PremissionDm sysset3 = new PremissionDm
|
||||
//{
|
||||
// Id = 53,
|
||||
// PremissionName = "设置",
|
||||
// PremissionPath = "SettingWindow",
|
||||
//};
|
||||
PremissionDm sysset3 = new PremissionDm
|
||||
{
|
||||
Id = 53,
|
||||
PremissionName = "设置",
|
||||
PremissionPath = "SettingMainWindow",
|
||||
PremissionPath = "SettingWindow",
|
||||
};
|
||||
//PremissionDm sysset3 = new PremissionDm
|
||||
//{
|
||||
// Id = 53,
|
||||
// PremissionName = "设置",
|
||||
// PremissionPath = "SettingMainWindow",
|
||||
//};
|
||||
syssetChild.Add(sysset1);
|
||||
syssetChild.Add(sysset2);
|
||||
syssetChild.Add(sysset3);
|
||||
|
|
|
@ -117,8 +117,7 @@
|
|||
</Menu>
|
||||
<Grid Grid.Column="2">
|
||||
<StackPanel Margin="6" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="储物箱" Command="{Binding OpenRecoverCommand}" Visibility="{Binding Is16Drawer, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignFlatSecondaryLightButton}" />
|
||||
<TextBlock Margin="0,10,10,0" Text="{Binding WD}" Foreground="White" FontWeight="Bold" FontSize="14"/>
|
||||
<Button Content="储物箱" Command="{Binding OpenRecoverCommand}" Visibility="{Binding Is16Drawer, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignFlatSecondaryLightButton}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
|
Loading…
Reference in New Issue