You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aucma.Scada/HighWayIot/Program.cs

48 lines
1.7 KiB
C#

using HighWayIot.Log4net;
using HighWayIot.Repository.domain;
using HighWayIot.Repository.service;
using HighWayIot.Repository.service.Impl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HighWayIot
{
internal class Program
{
private static LogHelper logger = LogHelper.Instance;
1 year ago
private static ISysUserInfoService mysqlTest = new SysUserInfoServiceImpl();
private static IBaseBomInfoService oracleTest = new BaseBomInfoServiceImpl();
private static readonly IBaseSpaceInfoService spaceInfoService = new BaseSpaceInfoServiceImpl();
private static IRealTaskInfoService _taskInfoService = new RealTaskInfoServiceImpl();
static void Main(string[] args)
{
logger.Info("初始化启动");
var info = spaceInfoService.InStoreGetSpaceInfoByMaterialType("X-001", "SC232");
if (info != null)
{
//生成入库任务依次下发至PLC
RealTaskInfo realTaskInfo = new RealTaskInfo();
realTaskInfo.taskType = 1;
realTaskInfo.taskCode = System.Guid.NewGuid().ToString("N");
realTaskInfo.storeCode = info.storeCode;
realTaskInfo.spaceCode = info.spaceCode;
realTaskInfo.materialType = "SC232";
realTaskInfo.planAmount = 1;
realTaskInfo.taskStatus = 1;
_taskInfoService.AddTaskInfo(realTaskInfo);
}
else
{
//报警停线
}
}
}
}