Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightAggregationTerminal
This commit is contained in:
commit
f100d5398c
4 files changed
+31
-4
No files matched your search
+1
-1
@@ -152,7 +152,7 @@ namespace SunlightAggregationTerminal.Class
|
||||
private static void Start()
|
||||
{
|
||||
// 延迟30秒后执行一次,不自动循环
|
||||
_timer = new Timer(Httpout, null, TimeSpan.FromSeconds(5), Timeout.InfiniteTimeSpan);
|
||||
_timer = new Timer(Httpout, null, TimeSpan.FromSeconds(60), Timeout.InfiniteTimeSpan);
|
||||
}
|
||||
private static async void Dispose()
|
||||
{
|
||||
|
||||
@@ -76,7 +76,9 @@ namespace SunlightAggregationTerminal.Models
|
||||
public string? DispenseStartTime { get; set; }
|
||||
public string? DispenseEndTime { get; set; }
|
||||
public string? DispenseTime { get; set; }
|
||||
public string? CallTime { get; set; }
|
||||
public string? UsageTime { get; set; }
|
||||
public string? Tank { get; set; }
|
||||
public double? DispenseGrams { get; set; }
|
||||
public string DispenseGramsDisplay => DispenseGrams?.ToString("F2") ?? "";
|
||||
public int? DispenseResult { get; set; }
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="SunlightAggregationTerminal.QueryDetail"
|
||||
xmlns:converters="clr-namespace:SunlightAggregationTerminal.Converters"
|
||||
Title="细节" >
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<converters:StringToBoolConverter x:Key="StringToBoolConverter" />
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
<Grid RowDefinitions="Auto, *" >
|
||||
<Grid BackgroundColor="#CCCCCC" Padding="10" Grid.Row="0" Grid.Column="0">
|
||||
<VerticalStackLayout>
|
||||
@@ -54,6 +60,8 @@
|
||||
FontSize="22" TextColor="Black"/>
|
||||
<Label Text="{Binding StepNumber}" FontAttributes="Bold"
|
||||
FontSize="22" TextColor="Black"/>
|
||||
<Label Text="{Binding Tank}" FontAttributes="Bold"
|
||||
FontSize="22" TextColor="Black"/>
|
||||
</HorizontalStackLayout>
|
||||
<HorizontalStackLayout>
|
||||
<Label Text="呼叫时间: " FontAttributes="Bold"
|
||||
@@ -73,6 +81,12 @@
|
||||
<Label Text="{Binding UsageTime}" FontAttributes="Bold"
|
||||
FontSize="22" TextColor="Black"/>
|
||||
</HorizontalStackLayout>
|
||||
<HorizontalStackLayout>
|
||||
<Label Text="溶解流程: " FontAttributes="Bold" FontSize="22" TextColor="Black"
|
||||
IsVisible="{Binding Path=Process, Converter={StaticResource StringToBoolConverter}}"/>
|
||||
<Label Text="{Binding Process}" FontAttributes="Bold" FontSize="22" TextColor="Black"
|
||||
IsVisible="{Binding Path=Process, Converter={StaticResource StringToBoolConverter}}"/>
|
||||
</HorizontalStackLayout>
|
||||
<BoxView HeightRequest="3" Color="#CCCCCC" />
|
||||
<HorizontalStackLayout>
|
||||
<Label Text="{Binding ProductName}" FontAttributes="Bold"
|
||||
|
||||
+14
-3
@@ -32,7 +32,6 @@ public partial class QueryDetail : ContentPage
|
||||
QueryDictionary.Add("Dyelot", item.Dyelot?.ToString() ?? "");
|
||||
QueryDictionary.Add("ReDye", item.ReDye?.ToString()??"");
|
||||
Query_Command(QueryDictionary.ToJsonString());
|
||||
|
||||
}
|
||||
|
||||
private void Data_()
|
||||
@@ -54,7 +53,6 @@ public partial class QueryDetail : ContentPage
|
||||
$"目标/实际: {list[i].GramsDisplay}g / {list[i].DispenseGramsDisplay}g")
|
||||
);
|
||||
// 赋值给最终展示的 ProductName
|
||||
if (list[0].Process !=null) combinedInfo = combinedInfo + "\n溶解流程:"+ list[0].Process;
|
||||
firstItem.ProductName = combinedInfo;
|
||||
return firstItem;
|
||||
})
|
||||
@@ -106,7 +104,20 @@ public partial class QueryDetail : ContentPage
|
||||
//添加入显示信息
|
||||
foreach (var item in data)
|
||||
{
|
||||
if (item.DispenseEndTime != null) item.DispenseEndTime = item.DispenseEndTime.Replace("T", " ");
|
||||
//时间处理
|
||||
if (DateTime.TryParse(item.DispenseEndTime, out DateTime dte))
|
||||
{
|
||||
item.DispenseEndTime = dte.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
if (DateTime.TryParse(item.DispenseStartTime, out DateTime dtr))
|
||||
{
|
||||
item.UsageTime = (dte - dtr).ToString("mm:ss");
|
||||
}
|
||||
}
|
||||
if (item.ProductType == 1 && item.Process == null) item.Process = "未知";
|
||||
if (item.Tank != null) item.Tank ="@" + item.Tank;
|
||||
|
||||
//行信息
|
||||
QueryDetailDyelotDetailsItems.Add(item);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user