|
@@ -218,11 +218,11 @@ namespace parkMonitor.server.CoreThread
|
|
|
{
|
|
|
if (!queueCmd.manual)
|
|
|
{
|
|
|
- ppp = aps.MallocParkingSpace(cEntrance, oper, queueCmd);//自动
|
|
|
+ ppp = aps.MallocParkingSpace(cEntrance, oper,queueCmd);//自动
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ppp = aps.MallocParkingSpace(cEntrance, locationOper, queueCmd);//手动
|
|
|
+ ppp = aps.MallocParkingSpace(cEntrance, locationOper,queueCmd);//手动
|
|
|
}
|
|
|
if (ppp != null)
|
|
|
{
|
|
@@ -475,6 +475,24 @@ namespace parkMonitor.server.CoreThread
|
|
|
int parkingSpaceX = ppp.parkingSpaceX;
|
|
|
int parkingSpaceY = ppp.parkingSpaceY;
|
|
|
int parkingSpaceZ = ppp.parkingSpaceZ;
|
|
|
+ if (!queueCmd.manual)
|
|
|
+ {
|
|
|
+ //更新云端车位表车位状态
|
|
|
+ oper.UpdateParkingSpaceState(parkingSpaceID, 1);
|
|
|
+ //更新车库表剩余车位数
|
|
|
+ int freeSpaceCount = oper.getGarageFreeSpace(garageID);
|
|
|
+ freeSpaceCount = freeSpaceCount - 1;
|
|
|
+ oper.UpdateGarageFreeSpace(freeSpaceCount, garageID);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //更新本地车位表车位状态
|
|
|
+ locationOper.UpdateParkingSpaceState(parkingSpaceID, 1);
|
|
|
+ //更新车库表剩余车位数
|
|
|
+ int freeSpaceCount = locationOper.getGarageFreeSpace(garageID);
|
|
|
+ freeSpaceCount = freeSpaceCount - 1;
|
|
|
+ locationOper.UpdateGarageFreeSpace(freeSpaceCount, garageID);
|
|
|
+ }
|
|
|
//激光数据
|
|
|
int centerX = dataReal.centerX;
|
|
|
int centerY = dataReal.centerY;
|
|
@@ -579,12 +597,7 @@ namespace parkMonitor.server.CoreThread
|
|
|
int parkingRecordsID = oper.InsertToParkingRecords(userID, numberPlate, parkingSpaceID, garageID, 3, realParkTime);
|
|
|
//车辆表更新车辆信息
|
|
|
oper.UpdateVehicle(numberPlate, 1, realParkTime, parkingRecordsID, parkingSpaceID, 1, frontWheelbase, rearWheelbase);
|
|
|
- //更新车库表剩余车位数
|
|
|
- int freeSpaceCount = oper.getGarageFreeSpace(garageID);
|
|
|
- freeSpaceCount = freeSpaceCount - 1;
|
|
|
- oper.UpdateGarageFreeSpace(freeSpaceCount, garageID);
|
|
|
- //更新车位表车位状态
|
|
|
- oper.UpdateParkingSpaceState(parkingSpaceID, 1);
|
|
|
+
|
|
|
//插入消息队列表
|
|
|
oper.InsertToMessageQueue(userID, "停车成功", 1);
|
|
|
|
|
@@ -612,12 +625,7 @@ namespace parkMonitor.server.CoreThread
|
|
|
//{
|
|
|
// locationOper.UpdateVehicle(numberPlate, 1, parkingRecordsID, parkingSpaceID, 1);
|
|
|
//}
|
|
|
- //更新车库表剩余车位数
|
|
|
- int freeSpaceCount = locationOper.getGarageFreeSpace(garageID);
|
|
|
- freeSpaceCount = freeSpaceCount - 1;
|
|
|
- locationOper.UpdateGarageFreeSpace(freeSpaceCount, garageID);
|
|
|
- //更新车位表车位状态
|
|
|
- locationOper.UpdateParkingSpaceState(parkingSpaceID, 1);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
//异常写入日志文件
|