|
@@ -136,7 +136,7 @@ public class BackParkingRecordController {
|
|
@RequestMapping(value = "pageList", method = RequestMethod.POST)
|
|
@RequestMapping(value = "pageList", method = RequestMethod.POST)
|
|
public MessageResult<Map> pageList(
|
|
public MessageResult<Map> pageList(
|
|
String carNum, String parkId, String inParkingTimeRange,
|
|
String carNum, String parkId, String inParkingTimeRange,
|
|
- String outParkingTimeRange,
|
|
|
|
|
|
+ String outParkingTimeRange,String area,
|
|
String status,
|
|
String status,
|
|
@RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
@RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
@RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
|
|
@RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
|
|
@@ -160,7 +160,20 @@ public class BackParkingRecordController {
|
|
if (StringUtils.isNotEmpty(parkId)) {
|
|
if (StringUtils.isNotEmpty(parkId)) {
|
|
searchParams.put("parkId", parkId);
|
|
searchParams.put("parkId", parkId);
|
|
}
|
|
}
|
|
|
|
+ if (StringUtils.isNotEmpty(area)&&"1".equals(parkId)) {
|
|
|
|
+
|
|
|
|
+ QueryWrapper<ParkingChannel> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.eq("park_id", parkId);
|
|
|
|
+ queryWrapper.eq("area_", area);
|
|
|
|
+ queryWrapper.eq("channel_type", "1");
|
|
|
|
+ queryWrapper.last("LIMIT 2");
|
|
|
|
+ List<ParkingChannel> listParkingChannel= parkingChannelService.list(queryWrapper);
|
|
|
|
+ // ParkingChannel parkingChannel = parkingChannelService.getOne(queryWrapper);
|
|
|
|
+ if(listParkingChannel!=null&&listParkingChannel.size()>0){
|
|
|
|
+ searchParams.put("listParkingChannel", listParkingChannel);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ }
|
|
if (StringUtils.isNotEmpty(status)) {
|
|
if (StringUtils.isNotEmpty(status)) {
|
|
searchParams.put("status", status);
|
|
searchParams.put("status", status);
|
|
}
|
|
}
|
|
@@ -205,9 +218,9 @@ public class BackParkingRecordController {
|
|
searchParams.put("filterParkingList", parkingUserRelationService.findByUserId(subject));
|
|
searchParams.put("filterParkingList", parkingUserRelationService.findByUserId(subject));
|
|
}
|
|
}
|
|
|
|
|
|
- com.github.pagehelper.Page<ParkingRecord> page = parkingRecordService.pageSearch(searchParams, pageIndex, pageSize, sortList);
|
|
|
|
-
|
|
|
|
|
|
+ com.github.pagehelper.Page<ParkingRecord> page = parkingRecordService.pageSearch(searchParams, pageIndex, pageSize, sortList);
|
|
|
|
|
|
|
|
+ // com.github.pagehelper.Page<ParkingRecord> page ="";
|
|
for (ParkingRecord parkingRecord : page) {
|
|
for (ParkingRecord parkingRecord : page) {
|
|
DataDictionary dataDictionary = dataDictionaryService.findByValue(parkingRecord.getCarType());
|
|
DataDictionary dataDictionary = dataDictionaryService.findByValue(parkingRecord.getCarType());
|
|
parkingRecord.setCarTypeN(dataDictionary.getName());
|
|
parkingRecord.setCarTypeN(dataDictionary.getName());
|
|
@@ -243,7 +256,8 @@ public class BackParkingRecordController {
|
|
return msgResult;
|
|
return msgResult;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ParkingAreaService parkingAreaService;
|
|
@ApiOperation(value = "pc端手动出场")
|
|
@ApiOperation(value = "pc端手动出场")
|
|
@PostMapping("manualOutParking")
|
|
@PostMapping("manualOutParking")
|
|
public MessageResult<ParkingRecord> manualOutParking(String id,String channelId) {
|
|
public MessageResult<ParkingRecord> manualOutParking(String id,String channelId) {
|
|
@@ -277,6 +291,19 @@ public class BackParkingRecordController {
|
|
parkingRecordInfo.setOutType("1");
|
|
parkingRecordInfo.setOutType("1");
|
|
//同时开门
|
|
//同时开门
|
|
parkingChannelService.remoteOpen(channelId);
|
|
parkingChannelService.remoteOpen(channelId);
|
|
|
|
+ if("1".equals(parkingChannel.getParkId())){
|
|
|
|
+ QueryWrapper<ParkingArea> parkingAreaQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ parkingAreaQueryWrapper.eq("park_id", parkingChannel.getParkId());
|
|
|
|
+ parkingAreaQueryWrapper.eq("area_", parkingChannel.getArea());
|
|
|
|
+ parkingAreaQueryWrapper.last("LIMIT 1");
|
|
|
|
+ ParkingArea parkingArea =parkingAreaService.getOne(parkingAreaQueryWrapper);
|
|
|
|
+ parkingArea.setSurplusParkingNumber(parkingArea.getSurplusParkingNumber()+ 1);
|
|
|
|
+ if(parkingArea.getSurplusParkingNumber()>parkingArea.getTotalParkingNumber()){
|
|
|
|
+ parkingArea.setSurplusParkingNumber(parkingArea.getTotalParkingNumber());
|
|
|
|
+ }
|
|
|
|
+ parkingAreaService.updateById(parkingArea);
|
|
|
|
+ }
|
|
|
|
+
|
|
}else{
|
|
}else{
|
|
parkingRecordInfo.setOutType("2");
|
|
parkingRecordInfo.setOutType("2");
|
|
}
|
|
}
|