liuwf 1 year ago
commit c387512c5a

@ -1,3 +1,3 @@
is_global = true is_global = true
build_property.RootNamespace = Admin.Core.FrameWork build_property.RootNamespace = Admin.Core.FrameWork
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.FrameWork\ build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.FrameWork\

@ -16,8 +16,8 @@ namespace Admin.Core.Model
/// <summary> /// <summary>
/// 主键标识 /// 主键标识
///</summary> ///</summary>
//[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, OracleSequenceName = "SEQ_RECORD_SIDEPANEL_COMPLATE")] [SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, OracleSequenceName = "SEQ_RECORD_SIDEPANEL_COMPLATE")]
[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)] //[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)]
public int ObjId { get; set; } public int ObjId { get; set; }
/// <summary> /// <summary>
/// 计划编号 /// 计划编号
@ -53,10 +53,10 @@ namespace Admin.Core.Model
public int OutPutAmount { get; set; } public int OutPutAmount { get; set; }
[SugarColumn(ColumnName = "DEVICE_STATUS")] [SugarColumn(ColumnName = "DEVICE_STATUS")]
public string DeviceStatus { get; set; } public decimal? DeviceStatus { get; set; }
[SugarColumn(ColumnName = "PRODUCTION_BEAT")] [SugarColumn(ColumnName = "PRODUCTION_BEAT")]
public string ProductionBeat { get; set; } public decimal? ProductionBeat { get; set; }
/// <summary> /// <summary>
/// 记录时间 /// 记录时间
@ -67,6 +67,6 @@ namespace Admin.Core.Model
/// 是否标识 /// 是否标识
///</summary> ///</summary>
[SugarColumn(ColumnName = "IS_FLAG")] [SugarColumn(ColumnName = "IS_FLAG")]
public string IsFlag { get; set; } public decimal? IsFlag { get; set; }
} }
} }

@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules = build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.RealTimeService build_property.RootNamespace = Admin.Core.RealTimeService
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.RealTimeService\ build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.RealTimeService\

@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules = build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.Serilog.Es build_property.RootNamespace = Admin.Core.Serilog.Es
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.Serilog.Es\ build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.Serilog.Es\

@ -76,7 +76,7 @@ namespace Aucma.Core.HwPLc
/// <returns></returns> /// <returns></returns>
public bool Connect(string iP, int port) public bool Connect(string iP, int port)
{ {
melsecMcNet.IpAddress = iP;//正式环境开启 //melsecMcNet.IpAddress = iP;//正式环境开启
melsecMcNet.Port = port; melsecMcNet.Port = port;
// 如果网络不太理想,配置了两个端口,一个有问题,立即切换另一个的话,可以配置如下的代码 // 如果网络不太理想,配置了两个端口,一个有问题,立即切换另一个的话,可以配置如下的代码

@ -226,7 +226,7 @@
"Enabled": true, "Enabled": true,
"EquipName": "OldMelsecPlc4", "EquipName": "OldMelsecPlc4",
"IP": "10.10.93.154", "IP": "10.10.93.154",
"Port": 5002 "Port": 5003
} }
], ],
"IpRateLimiting": { "IpRateLimiting": {

@ -371,7 +371,7 @@ namespace Aucma.Core.PrintTo.ViewModels
select c; select c;
foreach (var item in query) foreach (var item in query)
{ {
if ( = null) { } if ( item == null) { }
GetParentID(treeNodes, item.MaterialCode); GetParentID(treeNodes, item.MaterialCode);
treeNodes.Add(item); treeNodes.Add(item);
} }

@ -365,7 +365,7 @@ public class SheetMetalPlanTaskHandle
} }
//先查询该计划编号下的前一条完工记录如果不存在本条记录产量为0 //先查询该计划编号下的前一条完工记录如果不存在本条记录产量为0
List<RecordSidePanelComplate> sidePanelComplates = _sidePanelComplateServices.Query(x => x.ProductlineCode == "1001" && x.PlanCode == planCode.Substring(0, 16)); List<RecordSidePanelComplate> sidePanelComplates = _sidePanelComplateServices.QueryAsync(x => x.ProductlineCode == "1001" && x.PlanCode == planCode.Substring(0, 16)).Result;
int lastComplateAmount = 0; //前一条完成记录的计划完成数量 int lastComplateAmount = 0; //前一条完成记录的计划完成数量
int sumComplateAmount = 0; //当前计划总产量 int sumComplateAmount = 0; //当前计划总产量
if (sidePanelComplates != null) if (sidePanelComplates != null)
@ -551,7 +551,7 @@ public class SheetMetalPlanTaskHandle
} }
else else
{ {
List<ExecutePlanInfo> planInfos = _executePlanInfoServices.Query(x => x.TaskCode == planCode.Substring(0, 16) && x.ExecuteStatus == 2); List<ExecutePlanInfo> planInfos = _executePlanInfoServices.QueryAsync(x => x.TaskCode == planCode.Substring(0, 16) && x.ExecuteStatus == 2).Result;
if (planInfos != null) if (planInfos != null)
{ {
if (planInfos.Count > 0) if (planInfos.Count > 0)

@ -65,10 +65,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
} }
SelectLocation = ReadFile(); SelectLocation = ReadFile();
_taskHandle.RefreshCurrentPlanInfoEvent += RefreshCurrentPlanInfo; _taskHandle.RefreshCurrentPlanInfoEvent += RefreshCurrentPlanInfo;
Task.Run(() =>
{
_taskHandle.InitSendPlan();
});
} }
#endregion #endregion

@ -13,6 +13,8 @@ using System.IO;
using Aucma.Core.PLc; using Aucma.Core.PLc;
using Aucma.Core.Scanner; using Aucma.Core.Scanner;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
using Aucma.Core.SheetMetal.Business;
namespace Aucma.Core.SheetMetal.ViewModels namespace Aucma.Core.SheetMetal.ViewModels
{ {
@ -22,11 +24,18 @@ namespace Aucma.Core.SheetMetal.ViewModels
private IndexPageView firstPage = new IndexPageView();//首页 private IndexPageView firstPage = new IndexPageView();//首页
private LogPageView logPage = new LogPageView();//日志 private LogPageView logPage = new LogPageView();//日志
private StatisticsPageView statisticsPage = new StatisticsPageView();//统计 private StatisticsPageView statisticsPage = new StatisticsPageView();//统计
private SheetMetalPlanTaskHandle _taskHandle = new SheetMetalPlanTaskHandle();
public MainWindowViewModel() public MainWindowViewModel()
{ {
UserContent = firstPage; UserContent = firstPage;
init(); init();
Task.Run(() =>
{
//_taskHandle.InitSendPlanData();
_taskHandle.InitSendPlan();
});
} }
public void init() public void init()
{ {

@ -134,7 +134,7 @@
"Id": 2, "Id": 2,
"EquipName": "BackPanelPLC", "EquipName": "BackPanelPLC",
"PlcType": "Melsec", "PlcType": "Melsec",
"Enabled": false, "Enabled": true,
"IP": "127.0.0.1", "IP": "127.0.0.1",
"Port": 6001 "Port": 6001
} }

Loading…
Cancel
Save