change -五楼工位叫料ctu出库及背负式小车送料,修改过滤出库申请中没用目的工位code的

master
启龙 曹 7 months ago
parent 7107b1344e
commit 9b7ea3e840

@ -55,7 +55,7 @@ namespace Khd.Core.Wcs
plc = new Plc.S7.Plc(plcConfig.CpuType, plcConfig.IP, plcConfig.Port, plcConfig.Rack, plcConfig.Slot); plc = new Plc.S7.Plc(plcConfig.CpuType, plcConfig.IP, plcConfig.Port, plcConfig.Rack, plcConfig.Slot);
try try
{ {
plc.Open(); //plc.Open();
Console.WriteLine(DateTime.Now + ":连接PLC" + plcConfig.IP); Console.WriteLine(DateTime.Now + ":连接PLC" + plcConfig.IP);
} }
catch catch
@ -65,56 +65,56 @@ namespace Khd.Core.Wcs
StaticData.PlcDic.TryAdd(plcConfig.Code, plc); StaticData.PlcDic.TryAdd(plcConfig.Code, plc);
} }
} }
//创建定时器 ////创建定时器
SystemTimer systemTimer = new(_host); //SystemTimer systemTimer = new(_host);
systemTimer.Start(); //systemTimer.Start();
//创建任务 //创建任务
CreateTaskByRecord createTaskByRecord = new(_host); CreateTaskByRecord createTaskByRecord = new(_host);
createTaskByRecord.StartPoint(); createTaskByRecord.StartPoint();
//一楼提升机以及接驳位 ////一楼提升机以及接驳位
FirstFloor firstFloor = new(_host); //FirstFloor firstFloor = new(_host);
firstFloor.StartPoint(); //firstFloor.StartPoint();
//二层接驳位 ////二层接驳位
SecondFloorPoint secondFloorPoint = new(_host, 2); //SecondFloorPoint secondFloorPoint = new(_host, 2);
secondFloorPoint.StartPoint(); //secondFloorPoint.StartPoint();
////二层AGV //////二层AGV
SecondFloorAGV secondFloorAGV = new(_host, 2); //SecondFloorAGV secondFloorAGV = new(_host, 2);
secondFloorAGV.StartPoint(); //secondFloorAGV.StartPoint();
// //二楼线体 //// //二楼线体
SecondFloorLine secondFloorLine = new(_host, 2); //SecondFloorLine secondFloorLine = new(_host, 2);
secondFloorLine.StartPoint(); //secondFloorLine.StartPoint();
//三层接驳位 ////三层接驳位
ThirdFloorPoint thirdFloorPoint = new(_host, 3); //ThirdFloorPoint thirdFloorPoint = new(_host, 3);
thirdFloorPoint.StartPoint(); //thirdFloorPoint.StartPoint();
// 三层AGV //// 三层AGV
ThirdFloorAGV thirdFloorAGV = new(_host, 3); //ThirdFloorAGV thirdFloorAGV = new(_host, 3);
thirdFloorAGV.StartPoint(); //thirdFloorAGV.StartPoint();
//四楼接驳位 ////四楼接驳位
FourthFloorPoint fourthFloorPoint = new(_host, 4); //FourthFloorPoint fourthFloorPoint = new(_host, 4);
fourthFloorPoint.StartPoint(); //fourthFloorPoint.StartPoint();
//五层接驳位 ////五层接驳位
FiveFloorPoint fifthFloorPoint = new(_host, 5); //FiveFloorPoint fifthFloorPoint = new(_host, 5);
fifthFloorPoint.StartPoint(); //fifthFloorPoint.StartPoint();
//五层CTU ////五层CTU
FiveFloorCTU fiveFloorCTU = new(_host, 5); //FiveFloorCTU fiveFloorCTU = new(_host, 5);
fiveFloorCTU.StartPoint(); //fiveFloorCTU.StartPoint();
//五层AGV ////五层AGV
FiveFloorAGV fifthFloorAGV = new(_host, 5); //FiveFloorAGV fifthFloorAGV = new(_host, 5);
fifthFloorAGV.StartPoint(); //fifthFloorAGV.StartPoint();
////背负式Agv //////背负式Agv
FiveFloorBearAgv fiveFloorBearAgv = new(_host, 5); //FiveFloorBearAgv fiveFloorBearAgv = new(_host, 5);
fiveFloorBearAgv.StartPoint(); //fiveFloorBearAgv.StartPoint();
} }
catch (Exception ex) catch (Exception ex)
{ {

@ -41,80 +41,80 @@ namespace Khd.Core.Wcs.Wcs
//createRemoveThread.Name = "CreateRemoveLogic"; //createRemoveThread.Name = "CreateRemoveLogic";
//createRemoveThread.Start(); //createRemoveThread.Start();
//二楼、五楼人工指定库位成品出库任务 ////二楼、五楼人工指定库位成品出库任务
var CreateProductTaskByLocationCodeThread = new Thread(CreateProductTaskByLocationCodeLogic); //var CreateProductTaskByLocationCodeThread = new Thread(CreateProductTaskByLocationCodeLogic);
CreateProductTaskByLocationCodeThread.IsBackground = true; //CreateProductTaskByLocationCodeThread.IsBackground = true;
CreateProductTaskByLocationCodeThread.Name = "CreateFiveProductTaskLogic"; //CreateProductTaskByLocationCodeThread.Name = "CreateFiveProductTaskLogic";
CreateProductTaskByLocationCodeThread.Start(); //CreateProductTaskByLocationCodeThread.Start();
//创建退库任务 ////创建退库任务
var stockReturnThread = new Thread(StockReturnLogic); //var stockReturnThread = new Thread(StockReturnLogic);
stockReturnThread.IsBackground = true; //stockReturnThread.IsBackground = true;
stockReturnThread.Name = "StockReturnLogic"; //stockReturnThread.Name = "StockReturnLogic";
stockReturnThread.Start(); //stockReturnThread.Start();
// PDA移库 //// PDA移库
var moveThread = new Thread(MoveThreadLogic); //var moveThread = new Thread(MoveThreadLogic);
moveThread.IsBackground = true; //moveThread.IsBackground = true;
moveThread.Name = "MoveThreadLogic"; //moveThread.Name = "MoveThreadLogic";
moveThread.Start(); //moveThread.Start();
// 叫空托盘 3-2楼 //// 叫空托盘 3-2楼
var createEmtpyThread = new Thread(CreateEmptyLogic); //var createEmtpyThread = new Thread(CreateEmptyLogic);
createEmtpyThread.IsBackground = true; //createEmtpyThread.IsBackground = true;
createEmtpyThread.Name = "CreateEmptyLoic"; //createEmtpyThread.Name = "CreateEmptyLoic";
createEmtpyThread.Start(); //createEmtpyThread.Start();
//背负式Agv返库任务 ////背负式Agv返库任务
var createBearAgvReturnThread = new Thread(CreateBearAgvReturnLogic); //var createBearAgvReturnThread = new Thread(CreateBearAgvReturnLogic);
createBearAgvReturnThread.IsBackground = true; //createBearAgvReturnThread.IsBackground = true;
createBearAgvReturnThread.Name = "CreateBearAgvReturnLogic"; //createBearAgvReturnThread.Name = "CreateBearAgvReturnLogic";
createBearAgvReturnThread.Start(); //createBearAgvReturnThread.Start();
//五楼半成品入库任务 ////五楼半成品入库任务
var createFiveProductInTaskThread = new Thread(CreateFiveProductInTaskLogic); //var createFiveProductInTaskThread = new Thread(CreateFiveProductInTaskLogic);
createFiveProductInTaskThread.IsBackground = true; //createFiveProductInTaskThread.IsBackground = true;
createFiveProductInTaskThread.Name = "CreateFiveProductInTaskLogic"; //createFiveProductInTaskThread.Name = "CreateFiveProductInTaskLogic";
createFiveProductInTaskThread.Start(); //createFiveProductInTaskThread.Start();
//五楼成品出库任务 ////五楼成品出库任务
var createFiveProductTaskThread = new Thread(CreateFiveProductTaskLogic); //var createFiveProductTaskThread = new Thread(CreateFiveProductTaskLogic);
createFiveProductTaskThread.IsBackground = true; //createFiveProductTaskThread.IsBackground = true;
createFiveProductTaskThread.Name = "CreateFiveProductTaskLogic"; //createFiveProductTaskThread.Name = "CreateFiveProductTaskLogic";
createFiveProductTaskThread.Start(); //createFiveProductTaskThread.Start();
//五楼CTU出库任务以及原材料出库任务 //五楼CTU出库任务以及原材料出库任务
var createRawTaskThread = new Thread(CreateRawTaskLogic); var createRawTaskThread = new Thread(CreateRawTaskLogic);
createRawTaskThread.IsBackground = true; createRawTaskThread.IsBackground = true;
createRawTaskThread.Name = "CreateRawTaskLogic"; createRawTaskThread.Name = "CreateRawTaskLogic";
createRawTaskThread.Start(); createRawTaskThread.Start();
//五楼柜体拆分返库任务 ////五楼柜体拆分返库任务
var createRawInThread = new Thread(CreateRawInTaskLogic); //var createRawInThread = new Thread(CreateRawInTaskLogic);
createRawInThread.IsBackground = true; //createRawInThread.IsBackground = true;
createRawInThread.Name = "CreateRawInTaskLogic"; //createRawInThread.Name = "CreateRawInTaskLogic";
createRawInThread.Start(); //createRawInThread.Start();
//三楼去翻转机任务 ////三楼去翻转机任务
var createThirdOutTaskThread = new Thread(CreateThirdOutTaskLogic); //var createThirdOutTaskThread = new Thread(CreateThirdOutTaskLogic);
createThirdOutTaskThread.IsBackground = true; //createThirdOutTaskThread.IsBackground = true;
createThirdOutTaskThread.Name = "CreateThirdOutTaskLogic"; //createThirdOutTaskThread.Name = "CreateThirdOutTaskLogic";
createThirdOutTaskThread.Start(); //createThirdOutTaskThread.Start();
//二楼成品出库任务 ////二楼成品出库任务
var CreateSecondProductTaskThread = new Thread(CreateSecondProductTaskLogic); //var CreateSecondProductTaskThread = new Thread(CreateSecondProductTaskLogic);
CreateSecondProductTaskThread.IsBackground = true; //CreateSecondProductTaskThread.IsBackground = true;
CreateSecondProductTaskThread.Name = "CreateSecondProductTaskLogic"; //CreateSecondProductTaskThread.Name = "CreateSecondProductTaskLogic";
CreateSecondProductTaskThread.Start(); //CreateSecondProductTaskThread.Start();
//三楼托盘收集架满5个或10个时出库合盘任务 ////三楼托盘收集架满5个或10个时出库合盘任务
var createEmptyTrayThread = new Thread(CreateEmptyTrayLogic); //var createEmptyTrayThread = new Thread(CreateEmptyTrayLogic);
createEmptyTrayThread.IsBackground = true; //createEmptyTrayThread.IsBackground = true;
createEmptyTrayThread.Name = "CreateEmptyTrayLogic"; //createEmptyTrayThread.Name = "CreateEmptyTrayLogic";
createEmptyTrayThread.Start(); //createEmptyTrayThread.Start();
//二楼废品区人工调度任务 ////二楼废品区人工调度任务
var createThirdWasterTaskThread = new Thread(CreateThirdWasterTaskLogic); //var createThirdWasterTaskThread = new Thread(CreateThirdWasterTaskLogic);
createThirdWasterTaskThread.IsBackground = true; //createThirdWasterTaskThread.IsBackground = true;
createThirdWasterTaskThread.Name = "CreateThirdWasterTaskLogic"; //createThirdWasterTaskThread.Name = "CreateThirdWasterTaskLogic";
createThirdWasterTaskThread.Start(); //createThirdWasterTaskThread.Start();
//背负式退库 ////背负式退库
var BackReturnTaskThread = new Thread(BackReturnTaskLogic); //var BackReturnTaskThread = new Thread(BackReturnTaskLogic);
BackReturnTaskThread.IsBackground = true; //BackReturnTaskThread.IsBackground = true;
BackReturnTaskThread.Name = "BackReturnTaskLogic"; //BackReturnTaskThread.Name = "BackReturnTaskLogic";
BackReturnTaskThread.Start(); //BackReturnTaskThread.Start();
Console.WriteLine(DateTime.Now + ":出库任务监听启动成功"); Console.WriteLine(DateTime.Now + ":出库任务监听启动成功");
_logger.Info("出库任务监听启动成功"); _logger.Info("出库任务监听启动成功");
} }
@ -2862,7 +2862,9 @@ namespace Khd.Core.Wcs.Wcs
bool hasTask = dbContext.WcsTask.Where(t => t.nextPointId == 11).Any(); bool hasTask = dbContext.WcsTask.Where(t => t.nextPointId == 11).Any();
if (!hasTask) if (!hasTask)
{ {
rawOutStock =
rawOutStock.Where(x => !string.IsNullOrEmpty(x.endStationCode))
.ToList();
var orderList = rawOutStock.Where(t => endStationCodeEquip.endStationCode.Contains(t.endStationCode)).ToList(); var orderList = rawOutStock.Where(t => endStationCodeEquip.endStationCode.Contains(t.endStationCode)).ToList();
List<WcsTask> tasks = new(); List<WcsTask> tasks = new();

Loading…
Cancel
Save