修改打印Model

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

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

@ -22,8 +22,8 @@ namespace Admin.Core.Model.Model_New
/// <summary>
/// 订单号
/// </summary>
[SugarColumn(ColumnName = "PRODUCT_CODE")]
public string ProductCode { get; set; }
[SugarColumn(ColumnName = "ORDER_CODE")]
public string OrderCode { get; set; }
/// <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.ViewModels;
using Admin.Core.Service;
using Aucma.Core.BoxFoam.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using Microsoft.Extensions.DependencyInjection;
using System;
@ -17,8 +18,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
{
public partial class OldBoxFoamPageViewModel : ObservableObject
{
public readonly IOldBoxFoamDataServices? _oldBoxFoamDataServices;
IOldBoxFoamDataServices? _oldBoxFoamDataServices;
public OldBoxFoamPageViewModel() {
_oldBoxFoamDataServices = App.ServiceProvider.GetService<IOldBoxFoamDataServices>();
OnLoad();
@ -26,15 +26,25 @@ namespace Aucma.Core.BoxFoam.ViewModels
public async void OnLoad()
{
bool r= _oldBoxFoamDataServices.GetConnectionState();
List<OldBoxFoamData> list = await _oldBoxFoamDataServices.QueryAsync();
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
private ObservableCollection<OldBoxFoamData> oldBoxFoamDataGrid = new ObservableCollection<OldBoxFoamData>();
public ObservableCollection<OldBoxFoamData> OldBoxFoamDataGrid
private ObservableCollection<OldBoxFoamDataModel> oldBoxFoamDataGrid = new ObservableCollection<OldBoxFoamDataModel>();
public ObservableCollection<OldBoxFoamDataModel> OldBoxFoamDataGrid
{
get { return oldBoxFoamDataGrid; }
set

@ -84,18 +84,19 @@
</Border>
<!--信息展示-->
<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}"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Obj_ID}" Header="编号" Width="auto" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding Local}" Header="位置" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding Obj_ID}" Header="货道" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding BoxType}" Header="箱型" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding StoreAmount}" Header="库存数" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding Obj_ID}" Header="编号" Width="auto" />
<DataGridTextColumn Binding="{Binding Fixtureboxtype}" Header="夹具箱型" Width="*" />
<DataGridTextColumn Binding="{Binding Fixturestatus}" Header="夹具状态" Width="*" />
<DataGridTextColumn Binding="{Binding Production}" Header="产量" Width="*" />
<DataGridTextColumn Binding="{Binding CuringTimeSettingValue}" Header="设定时间" Width="*" />
<DataGridTextColumn Binding="{Binding ActualValue}" Header="固化时间实际值" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Border>

@ -75,13 +75,13 @@
PostgreSQL = 4,
Dm = 5,//
Kdbndp = 6,//
*/
{
*/ {
"ConnId": "AUCMA_SCADA",
"DBType": 3,
"Enabled": true,
"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"
},
{
@ -100,13 +100,13 @@
"JobGroup": "DEFAULT",
"Cron": "*/1 * * * * ?",
"AssemblyName": "Admin.Core.Tasks",
"ClassName": "Job_Admin_Quartz",
"ClassName": "Job_AllState_Quartz",
"Remark": "执行任务调度系统",
"RunTimes": 3881,
"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,
"IntervalSecond": 1,
"IntervalSecond": 5,
"CycleRunTimes": 1,
"IsStart": false,
"JobParams": null,
@ -115,59 +115,8 @@
"CreateTime": "2023-04-23 11:09:22.0000000",
"UpdateBy": "admin",
"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": {
"Cors": {
"PolicyName": "CorsIpAccess", //
@ -215,30 +164,20 @@
"Enabled": true
},
"QuartzNetJob": {
"Enabled": true
"Enabled": false
},
"Scanner": { //
"Enabled": true
},
"Scanner1": { //1
"Ip": "192.168.1.19",
"Name": "扫码器1"
},
"Scanner2": { //2
"Ip": "192.168.1.20",
"Name": "扫码器2"
},
"ScannerGun": { //
"Enabled": false
"Enabled":false
}
},
"PLCServer": [
{
"Id": 1,
"EquipName": "泡前库Plc",
"EquipName": "OldPlc",
"IP": "127.0.0.1",
"Port": 6000
}
],
"IpRateLimiting": {
"EnableEndpointRateLimiting": false, //False: globally executed, true: executed for each
@ -287,4 +226,5 @@
}
]
}
}

Loading…
Cancel
Save