停车场-迁移
This commit is contained in:
parent
4ab42970a3
commit
edb974c3ce
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.bluecardheartbeat;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -11,6 +12,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -37,8 +39,13 @@ public class BlueCardHeartbeatController {
|
||||
|
||||
@Resource
|
||||
private BlueCardHeartbeatService blueCardHeartbeatService;
|
||||
|
||||
@PostMapping("/doHeartbeat")
|
||||
public BlueCardResult Pong(@RequestBody BlueCardHeartbeatSaveReqVO blueCardHeartbeat){
|
||||
blueCardHeartbeatService.createBlueCardHeartbeat(blueCardHeartbeat);
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
@PostMapping("/create")
|
||||
|
||||
@Operation(summary = "创建蓝卡心跳")
|
||||
@PreAuthorize("@ss.hasPermission('parking:blue-card-heartbeat:create')")
|
||||
public CommonResult<Long> createBlueCardHeartbeat(@Valid @RequestBody BlueCardHeartbeatSaveReqVO createReqVO) {
|
||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.parking.controller.admin.channelinformation;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.channelinformation.vo.ChannelInformationPageReqVO;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.channelinformation.vo.ChannelInformationRespVO;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.channelinformation.vo.ChannelInformationSaveReqVO;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -41,7 +42,11 @@ public class ChannelInformationController {
|
||||
|
||||
@Resource
|
||||
private ChannelInformationService informationService;
|
||||
|
||||
@PostMapping("/insertChannelInformation")
|
||||
public BlueCardResult insertChannelInformation(@RequestBody ChannelInformationSaveReqVO channelInformation){
|
||||
informationService.createInformation(channelInformation);
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建通道信息")
|
||||
@PreAuthorize("@ss.hasPermission('channel:information:create')")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.chargeinformation;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -37,7 +38,11 @@ public class ChargeInformationController {
|
||||
|
||||
@Resource
|
||||
private ChargeInformationService informationService;
|
||||
|
||||
@PostMapping("/insertChargeInformation")
|
||||
public BlueCardResult insertChargeInformation(@RequestBody ChargeInformationSaveReqVO chargeInformation){
|
||||
informationService.createInformation(chargeInformation);
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建收费信息")
|
||||
@PreAuthorize("@ss.hasPermission('charge:information:create')")
|
||||
|
@ -1,5 +1,13 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.entryrecord;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.vehiclerecord.vo.VehicleRecordSaveReqVO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.accessrecordpicture.AccessRecordPictureDO;
|
||||
import cn.iocoder.yudao.module.parking.service.accessrecordpicture.AccessRecordPictureService;
|
||||
import cn.iocoder.yudao.module.parking.service.appearancerecord.AppearanceRecordService;
|
||||
import cn.iocoder.yudao.module.parking.service.revenue.RevenueService;
|
||||
import cn.iocoder.yudao.module.parking.service.vehiclerecord.VehicleRecordService;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -11,6 +19,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -34,10 +43,29 @@ import cn.iocoder.yudao.module.parking.service.entryrecord.EntryRecordService;
|
||||
@RequestMapping("/parking/entry-record")
|
||||
@Validated
|
||||
public class EntryRecordController {
|
||||
|
||||
@Autowired
|
||||
private AppearanceRecordService appearanceRecordService;
|
||||
@Resource
|
||||
private AccessRecordPictureService accessRecordPictureService;
|
||||
@Resource
|
||||
private VehicleRecordService vehicleRecordService;
|
||||
@Resource
|
||||
private RevenueService revenueService;
|
||||
@Resource
|
||||
private EntryRecordService entryRecordService;
|
||||
@PostMapping("/insertEntryRecord")
|
||||
public BlueCardResult insertEntryRecord(@RequestBody EntryRecordSaveReqVO entryRecord){
|
||||
|
||||
AccessRecordPictureDO imageData = accessRecordPictureService.findByImageName(entryRecord.getInImage());//入场图片数据
|
||||
VehicleRecordSaveReqVO vehicleRecord = new VehicleRecordSaveReqVO();
|
||||
vehicleRecord.setIntoOrOut("进");
|
||||
vehicleRecord.setPicture(imageData.getImgAddress());
|
||||
vehicleRecord.setTime(entryRecord.getInTime());
|
||||
vehicleRecord.setLicenseNumber(entryRecord.getPlate());
|
||||
vehicleRecordService.createVehicleRecord(vehicleRecord);
|
||||
entryRecordService.createEntryRecord(entryRecord);
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建入场记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:entry-record:create')")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.fixedvehiclerenewalrecord;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -37,7 +38,11 @@ public class FixedVehicleRenewalRecordController {
|
||||
|
||||
@Resource
|
||||
private FixedVehicleRenewalRecordService fixedVehicleRenewalRecordService;
|
||||
|
||||
@PostMapping("/insertFixedVehicleRenewalRecord")
|
||||
public BlueCardResult insertFixedVehicleRenewalRecord(@RequestBody FixedVehicleRenewalRecordSaveReqVO fixedVehicleRenewalRecord){
|
||||
fixedVehicleRenewalRecordService.createFixedVehicleRenewalRecord(fixedVehicleRenewalRecord);
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建固定车续费记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:fixed-vehicle-renewal-record:create')")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.liftingrod;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -37,7 +38,11 @@ public class LiftingRodController {
|
||||
|
||||
@Resource
|
||||
private LiftingRodService liftingRodService;
|
||||
|
||||
@PostMapping("/actionLiftingRod")
|
||||
public BlueCardResult actionLiftingRod(@RequestBody LiftingRodSaveReqVO liftingRodVo){
|
||||
liftingRodService.createLiftingRod(liftingRodVo);
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建远程抬杠")
|
||||
@PreAuthorize("@ss.hasPermission('parking:lifting-rod:create')")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.synchronizationofwhitelistinformation;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -37,7 +38,11 @@ public class SynchronizationOfWhitelistInformationController {
|
||||
|
||||
@Resource
|
||||
private SynchronizationOfWhitelistInformationService synchronizationOfWhitelistInformationService;
|
||||
|
||||
@PostMapping("/insertWhitelistInformation")
|
||||
public BlueCardResult insertSynchronizationOfWhitelistInformation(@RequestBody SynchronizationOfWhitelistInformationSaveReqVO synchronizationOfWhitelistInformation){
|
||||
synchronizationOfWhitelistInformationService.createSynchronizationOfWhitelistInformation(synchronizationOfWhitelistInformation);
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建同步白名单")
|
||||
@PreAuthorize("@ss.hasPermission('parking:synchronization-of-whitelist-information:create')")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.whitelistdelivery;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -37,7 +38,23 @@ public class WhitelistDeliveryController {
|
||||
|
||||
@Resource
|
||||
private WhitelistDeliveryService whitelistDeliveryService;
|
||||
//新增或修改
|
||||
@PostMapping("/insertWhitelistDelivery")
|
||||
public BlueCardResult insertWhitelistDelivery(@RequestBody WhitelistDeliverySaveReqVO whitelistDelivery){
|
||||
return whitelistDeliveryService.whitelistDeliveryService(whitelistDelivery);
|
||||
}
|
||||
|
||||
//删除白名单
|
||||
@PostMapping("/deleteWhitelist")
|
||||
public BlueCardResult deleteWhitelist(@RequestBody WhitelistDeliverySaveReqVO whitelistDelete){
|
||||
return whitelistDeliveryService.deleteWhitelistService(whitelistDelete);
|
||||
}
|
||||
|
||||
//查询白名单
|
||||
@PostMapping("/selectWhitelist")
|
||||
public CommonResult<String> selectWhitelist(@RequestBody WhitelistDeliverySaveReqVO selectWhitelistVo){
|
||||
return whitelistDeliveryService.findWhitelist(selectWhitelistVo);
|
||||
}
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建白名单配置")
|
||||
@PreAuthorize("@ss.hasPermission('parking:whitelist-delivery:create')")
|
||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.parking.controller.admin.bluecardheartbeat.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.bluecardheartbeat.BlueCardHeartbeatDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
|
||||
/**
|
||||
* 蓝卡心跳 Service 接口
|
||||
|
@ -2,10 +2,13 @@ package cn.iocoder.yudao.module.parking.service.whitelistdelivery;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.whitelistdelivery.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.whitelistdelivery.WhitelistDeliveryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
|
||||
/**
|
||||
* 白名单配置 Service 接口
|
||||
@ -52,4 +55,24 @@ public interface WhitelistDeliveryService {
|
||||
*/
|
||||
PageResult<WhitelistDeliveryDO> getWhitelistDeliveryPage(WhitelistDeliveryPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
* @param whitelistDelivery
|
||||
* @return cn.iocoder.yudao.module.parking.util.BlueCardResult
|
||||
*/
|
||||
BlueCardResult whitelistDeliveryService(WhitelistDeliverySaveReqVO whitelistDelivery);
|
||||
|
||||
/**
|
||||
* 删除白名单
|
||||
* @param whitelistDelete
|
||||
* @return cn.iocoder.yudao.module.parking.util.BlueCardResult
|
||||
*/
|
||||
BlueCardResult deleteWhitelistService(WhitelistDeliverySaveReqVO whitelistDelete);
|
||||
|
||||
/**
|
||||
* 查询白名单
|
||||
* @param selectWhitelistVo
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.String>
|
||||
*/
|
||||
CommonResult<String> findWhitelist(WhitelistDeliverySaveReqVO selectWhitelistVo);
|
||||
}
|
@ -1,5 +1,9 @@
|
||||
package cn.iocoder.yudao.module.parking.service.whitelistdelivery;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCarRequestUtil;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -28,7 +32,8 @@ public class WhitelistDeliveryServiceImpl implements WhitelistDeliveryService {
|
||||
|
||||
@Resource
|
||||
private WhitelistDeliveryMapper whitelistDeliveryMapper;
|
||||
|
||||
@Resource
|
||||
private BlueCarRequestUtil blueCarRequestUtil;
|
||||
@Override
|
||||
public Long createWhitelistDelivery(WhitelistDeliverySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
@ -71,4 +76,64 @@ public class WhitelistDeliveryServiceImpl implements WhitelistDeliveryService {
|
||||
return whitelistDeliveryMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlueCardResult whitelistDeliveryService(WhitelistDeliverySaveReqVO whitelistDelivery) {
|
||||
this.createWhitelistDelivery(whitelistDelivery);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", whitelistDelivery.getId());
|
||||
map.put("parkNumber", whitelistDelivery.getParkNumber());
|
||||
List<Map<String, Object>> datasList = new ArrayList<>();
|
||||
Map<String, Object> datasMap = new HashMap<>();
|
||||
datasMap.put("plate", whitelistDelivery.getPlate());
|
||||
datasMap.put("chargeType", whitelistDelivery.getChargeType());
|
||||
datasMap.put("name", whitelistDelivery.getName());
|
||||
datasMap.put("certificate", whitelistDelivery.getCertificate());
|
||||
datasMap.put("address", whitelistDelivery.getAddress());
|
||||
datasMap.put("phone", whitelistDelivery.getPhone());
|
||||
datasMap.put("plateColor", whitelistDelivery.getPlateColor());
|
||||
datasMap.put("start", whitelistDelivery.getStart());
|
||||
datasMap.put("end", whitelistDelivery.getEnd());
|
||||
datasMap.put("dept", whitelistDelivery.getDept());
|
||||
datasMap.put("carType", whitelistDelivery.getCarType());
|
||||
if (whitelistDelivery.getMemo() != null){
|
||||
datasMap.put("memo", whitelistDelivery.getMemo());
|
||||
}
|
||||
List<Map<String, Object>> areasAndValidityList = new ArrayList<>();
|
||||
Map<String, Object> areasAndValidityMap = new HashMap<>();
|
||||
areasAndValidityMap.put("areaId", whitelistDelivery.getAreaId());
|
||||
areasAndValidityMap.put("start", whitelistDelivery.getAreaStart());
|
||||
areasAndValidityMap.put("end", whitelistDelivery.getAreaEnd());
|
||||
areasAndValidityList.add(areasAndValidityMap);
|
||||
datasMap.put("areasAndValidity", areasAndValidityList);
|
||||
map.put("datas", datasMap);
|
||||
blueCarRequestUtil.doBlueCarPost(map, "bcopenapi/out/synWhite");
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlueCardResult deleteWhitelistService(WhitelistDeliverySaveReqVO whitelistDelete) {
|
||||
//查询白名单列表
|
||||
WhitelistDeliveryDO byParkNumber = whitelistDeliveryMapper.selectOne(WhitelistDeliveryDO::getParkNumber, whitelistDelete.getParkNumber());
|
||||
if (byParkNumber != null){
|
||||
whitelistDeliveryMapper.delete(WhitelistDeliveryDO::getPlate, whitelistDelete.getPlate());
|
||||
}
|
||||
// TODO 未对whitelistDelete进行初始化
|
||||
//调用接口
|
||||
blueCarRequestUtil.doBlueCarPost(whitelistDelete, "bcopenapi/out/delWhite");
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<String> findWhitelist(WhitelistDeliverySaveReqVO selectWhitelistVo) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("parkNumber", selectWhitelistVo.getParkNumber());
|
||||
map.put("size", selectWhitelistVo.getSize());
|
||||
List<Map<String, String>> datasList = new ArrayList<>();
|
||||
Map<String, String> datasMap = new HashMap<>();
|
||||
datasMap.put("plate", selectWhitelistVo.getPlate());
|
||||
datasList.add(datasMap);
|
||||
map.put("datas", datasList);
|
||||
return blueCarRequestUtil.doBlueCarPost(map, "bcopenapi/out/queryWhite");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user