修改打印Model

dev
liulb@mesnac.com 1 year ago
parent 7d409fe1a2
commit 5f968f59b2

@ -13,7 +13,7 @@ namespace Admin.Core.Model
/// 主键 /// 主键
/// </summary> /// </summary>
[SugarColumn(ColumnName = "OBJ_ID", IsIdentity = true, IsPrimaryKey = true)] [SugarColumn(ColumnName = "OBJ_ID", IsIdentity = true, IsPrimaryKey = true)]
public float ObjId { get; set; } public int ObjId { get; set; }
/// <summary> /// <summary>
/// 夹具箱型 /// 夹具箱型

@ -22,8 +22,8 @@ namespace Admin.Core.Model.Model_New
/// <summary> /// <summary>
/// 订单号 /// 订单号
/// </summary> /// </summary>
[SugarColumn(ColumnName = "PRODUCT_CODE")] [SugarColumn(ColumnName = "ORDER_CODE")]
public string ProductCode { get; set; } public string OrderCode { get; set; }
/// <summary> /// <summary>
/// 物料编码 /// 物料编码
/// </summary> /// </summary>

@ -0,0 +1,46 @@
using System;
namespace Aucma.Core.BoxFoam.Models
{
public class OldBoxFoamDataModel
{
/// <summary>
/// 主键
/// </summary>
public int ObjId { get; set; }
/// <summary>
/// 夹具箱型
/// </summary>
public string Fixtureboxtype { get; set; }
/// <summary>
/// 夹具状态
/// </summary>
public string Fixturestatus { get; set; }
/// <summary>
/// 产量
/// </summary>
public float Production { get; set; }
/// <summary>
/// 固化时间设定值
/// </summary>
public string CuringTimeSettingValue { get; set; }
/// <summary>
/// 固化时间实际值
/// </summary>
public string ActualValue { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreatedTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdatedTime { get; set; }
}
}

@ -2,6 +2,7 @@
using Admin.Core.Model; using Admin.Core.Model;
using Admin.Core.Model.ViewModels; using Admin.Core.Model.ViewModels;
using Admin.Core.Service; using Admin.Core.Service;
using Aucma.Core.BoxFoam.Models;
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using System; using System;
@ -17,8 +18,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
{ {
public partial class OldBoxFoamPageViewModel : ObservableObject public partial class OldBoxFoamPageViewModel : ObservableObject
{ {
public readonly IOldBoxFoamDataServices? _oldBoxFoamDataServices; IOldBoxFoamDataServices? _oldBoxFoamDataServices;
public OldBoxFoamPageViewModel() { public OldBoxFoamPageViewModel() {
_oldBoxFoamDataServices = App.ServiceProvider.GetService<IOldBoxFoamDataServices>(); _oldBoxFoamDataServices = App.ServiceProvider.GetService<IOldBoxFoamDataServices>();
OnLoad(); OnLoad();
@ -26,15 +26,25 @@ namespace Aucma.Core.BoxFoam.ViewModels
public async void OnLoad() public async void OnLoad()
{ {
bool r= _oldBoxFoamDataServices.GetConnectionState();
List<OldBoxFoamData> list = await _oldBoxFoamDataServices.QueryAsync(); List<OldBoxFoamData> list = await _oldBoxFoamDataServices.QueryAsync();
if (list == null) return; if (list == null) return;
foreach (var item in list) OldBoxFoamDataGrid.Add(item); foreach (var item in list)
{
OldBoxFoamDataModel model=new OldBoxFoamDataModel();
model.ObjId = item.ObjId;
model.Fixtureboxtype = item.Fixtureboxtype;
model.Fixturestatus = item.Fixturestatus;
model.Production = item.Production;
model.CuringTimeSettingValue = item.CuringTimeSettingValue;
model.ActualValue = item.ActualValue;
OldBoxFoamDataGrid.Add(model);
}
} }
#region 初始化datagrid #region 初始化datagrid
private ObservableCollection<OldBoxFoamData> oldBoxFoamDataGrid = new ObservableCollection<OldBoxFoamData>(); private ObservableCollection<OldBoxFoamDataModel> oldBoxFoamDataGrid = new ObservableCollection<OldBoxFoamDataModel>();
public ObservableCollection<OldBoxFoamData> OldBoxFoamDataGrid public ObservableCollection<OldBoxFoamDataModel> OldBoxFoamDataGrid
{ {
get { return oldBoxFoamDataGrid; } get { return oldBoxFoamDataGrid; }
set set

@ -84,18 +84,19 @@
</Border> </Border>
<!--信息展示--> <!--信息展示-->
<Border x:Name="HeightHelperPanel" Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="5"> <Border x:Name="HeightHelperPanel" Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="5">
<DataGrid Grid.Row="0" ItemsSource="{Binding PlanInfoDataGrid}" Background="#00000000" <DataGrid Grid.Row="0" ItemsSource="{Binding OldBoxFoamDataGrid}" Background="#00000000"
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}" ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20" RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto" GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True" ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White"> Foreground="White">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Obj_ID}" Header="编号" Width="auto" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/> <DataGridTextColumn Binding="{Binding Obj_ID}" Header="编号" Width="auto" />
<DataGridTextColumn Binding="{Binding Local}" Header="位置" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/> <DataGridTextColumn Binding="{Binding Fixtureboxtype}" Header="夹具箱型" Width="*" />
<DataGridTextColumn Binding="{Binding Obj_ID}" Header="货道" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" /> <DataGridTextColumn Binding="{Binding Fixturestatus}" Header="夹具状态" Width="*" />
<DataGridTextColumn Binding="{Binding BoxType}" Header="箱型" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/> <DataGridTextColumn Binding="{Binding Production}" Header="产量" Width="*" />
<DataGridTextColumn Binding="{Binding StoreAmount}" Header="库存数" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" /> <DataGridTextColumn Binding="{Binding CuringTimeSettingValue}" Header="设定时间" Width="*" />
<DataGridTextColumn Binding="{Binding ActualValue}" Header="固化时间实际值" Width="*"/>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
</Border> </Border>

@ -75,13 +75,13 @@
PostgreSQL = 4, PostgreSQL = 4,
Dm = 5,// Dm = 5,//
Kdbndp = 6,// Kdbndp = 6,//
*/ */ {
{
"ConnId": "AUCMA_SCADA", "ConnId": "AUCMA_SCADA",
"DBType": 3, "DBType": 3,
"Enabled": true, "Enabled": true,
"HitRate": 50, "HitRate": 50,
"Connection": "Data Source=10.100.72.20/ORCLCDB;User ID=c##aucma_sacda;Password=aucma;", //"Connection": "Data Source=localhost;Initial Catalog=Hsdb;User ID=sa;Password=sa;Integrated Security=false;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"Connection": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.100.72.20)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCLCDB)));User ID=c##aucma_scada;Password=aucma;",
"ProviderName": "System.Data.SqlClient" "ProviderName": "System.Data.SqlClient"
}, },
{ {
@ -100,13 +100,13 @@
"JobGroup": "DEFAULT", "JobGroup": "DEFAULT",
"Cron": "*/1 * * * * ?", "Cron": "*/1 * * * * ?",
"AssemblyName": "Admin.Core.Tasks", "AssemblyName": "Admin.Core.Tasks",
"ClassName": "Job_Admin_Quartz", "ClassName": "Job_AllState_Quartz",
"Remark": "执行任务调度系统", "Remark": "执行任务调度系统",
"RunTimes": 3881, "RunTimes": 3881,
"BeginTime": "2023-04-23 11:08:50.000", "BeginTime": "2023-04-23 11:08:50.000",
"EndTime": "2224-08-06 16:45:30.000", "EndTime": "2180-12-01 16:45:30.000",
"TriggerType": 1, "TriggerType": 1,
"IntervalSecond": 1, "IntervalSecond": 5,
"CycleRunTimes": 1, "CycleRunTimes": 1,
"IsStart": false, "IsStart": false,
"JobParams": null, "JobParams": null,
@ -115,59 +115,8 @@
"CreateTime": "2023-04-23 11:09:22.0000000", "CreateTime": "2023-04-23 11:09:22.0000000",
"UpdateBy": "admin", "UpdateBy": "admin",
"UpdateTime": "2023-08-07 16:45:45.0530000" "UpdateTime": "2023-08-07 16:45:45.0530000"
},
{
"ID": 2,
"Name": "TestTask",
"JobGroup": "DEFAULT",
"Cron": "*/1 * * * * ?",
"AssemblyName": "Admin.Core.Tasks",
"ClassName": "Job_BoxFoamInStoreTask_Quartz",
"Remark": "执行箱体入库任务调度系统,",
"RunTimes": 3881,
"BeginTime": "2023-04-23 11:08:50.000",
"EndTime": "2224-08-06 16:45:30.000",
"TriggerType": 1,
"IntervalSecond": 1,
"CycleRunTimes": 1,
"IsStart": false,
"JobParams": null,
"DelFlag": false,
"CreateBy": "admin",
"CreateTime": "2023-04-23 11:09:22.0000000",
"UpdateBy": "admin",
"UpdateTime": "2023-08-07 16:45:45.0530000"
},
{
"ID": 3,
"Name": "PQInStoreTask",
"JobGroup": "DEFAULT",
"Cron": "*/15 * * * * ?",
"AssemblyName": "Admin.Core.Tasks",
"ClassName": "Job_BoxFoamOutStore_Quartz",
"Remark": "泡前库入库调度任务",
"RunTimes": 3881,
"BeginTime": "2023-04-23 11:08:50.000",
"EndTime": "2224-08-06 16:45:30.000",
"TriggerType": 1,
"IntervalSecond": 1,
"CycleRunTimes": 1,
"IsStart": true,
"JobParams": null,
"DelFlag": false,
"CreateBy": "admin",
"CreateTime": "2023-04-23 11:09:22.0000000",
"UpdateBy": "admin",
"UpdateTime": "2023-08-07 16:45:45.0530000"
} }
], ],
"StoreInfo": {
"StationCode": "1001",
"LinerInventory": "NDJCK-001",
"ShellInventory": "XKJCK-001",
"BeforeStoreCode": "PBSCK-001",
"AfterStoreCode": "FPJCK-001"
},
"Startup": { "Startup": {
"Cors": { "Cors": {
"PolicyName": "CorsIpAccess", // "PolicyName": "CorsIpAccess", //
@ -215,30 +164,20 @@
"Enabled": true "Enabled": true
}, },
"QuartzNetJob": { "QuartzNetJob": {
"Enabled": true "Enabled": false
}, },
"Scanner": { // "Scanner": { //
"Enabled": true "Enabled":false
},
"Scanner1": { //1
"Ip": "192.168.1.19",
"Name": "扫码器1"
},
"Scanner2": { //2
"Ip": "192.168.1.20",
"Name": "扫码器2"
},
"ScannerGun": { //
"Enabled": false
} }
}, },
"PLCServer": [ "PLCServer": [
{ {
"Id": 1, "Id": 1,
"EquipName": "泡前库Plc", "EquipName": "OldPlc",
"IP": "127.0.0.1", "IP": "127.0.0.1",
"Port": 6000 "Port": 6000
} }
], ],
"IpRateLimiting": { "IpRateLimiting": {
"EnableEndpointRateLimiting": false, //False: globally executed, true: executed for each "EnableEndpointRateLimiting": false, //False: globally executed, true: executed for each
@ -287,4 +226,5 @@
} }
] ]
} }
} }

Loading…
Cancel
Save