|
|
@@ -159,7 +159,7 @@ namespace parkMonitor.server.CoreThread
|
|
|
Vehicle vehiclelist = oper.GetVehicle(queueCmd.LicenseNum);
|
|
|
int parkingSpaceID = vehiclelist.parkingSpaceID;
|
|
|
int garageID = vehiclelist.garageID;
|
|
|
- Fetching_Space fslist = oper.GetFetchingSpace(parkingSpaceID, garageID);
|
|
|
+ Fetching_Space fslist = oper.GetFetchingSpace(parkingSpaceID);
|
|
|
int parkingSpaceX = fslist.parkingSpaceX;
|
|
|
int parkingSpaceY = fslist.parkingSpaceY;
|
|
|
int parkingSpaceZ = fslist.parkingSpaceZ;
|
|
|
@@ -171,7 +171,7 @@ namespace parkMonitor.server.CoreThread
|
|
|
pm.parkingSpaceY = Convert.ToString(parkingSpaceY);
|
|
|
pm.parkingSpaceZ = Convert.ToString(parkingSpaceZ);
|
|
|
PLC.SetMessage(pm);
|
|
|
- Console.WriteLine("取车" + queueCmd.LicenseNum);
|
|
|
+ Console.WriteLine("取车" + queueCmd.LicenseNum);
|
|
|
//PLC.SetMessage(new PLCNode(startRobot_address, Convert.ToString(startRobot)));
|
|
|
//PLC.SetMessage(new PLCNode(parkingSpaceID_address, Convert.ToString(parkingSpaceID)));
|
|
|
//PLC.SetMessage(new PLCNode(parkingSpaceX_address, Convert.ToString(parkingSpaceX)));
|
|
|
@@ -198,6 +198,15 @@ namespace parkMonitor.server.CoreThread
|
|
|
//Task.WaitAll(signalFromPLC);
|
|
|
signalFromPLC.Wait();
|
|
|
//数据库更新
|
|
|
+ //更新车库表车位数
|
|
|
+ int freeSpaceCount = oper.getGarageFreeSpace(garageID);
|
|
|
+ freeSpaceCount = freeSpaceCount + 1;
|
|
|
+ oper.UpdateGarageFreeSpace(freeSpaceCount, garageID);
|
|
|
+ //更新车位表车位状态
|
|
|
+ oper.UpdateParkingSpaceState(parkingSpaceID,0);
|
|
|
+ //更新车辆表车辆停车状态
|
|
|
+ oper.UpdateVehicleParkState(queueCmd.LicenseNum, 0);
|
|
|
+ //更新停车记录表
|
|
|
}
|
|
|
|
|
|
if (queueCmd.commandType == 's')
|