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; 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 { //报警停线 } } } }