Merge branch 'master' of http://101.43.112.107:3000/root/ludu-cloud into zzw-one
This commit is contained in:
commit
e732a112f4
72
.drone.yml
72
.drone.yml
@ -81,30 +81,46 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
script:
|
||||
|
||||
|
||||
- echo "start run.sh"
|
||||
- cd /ludu/maven/build/yudao-gateway/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "yudao-gateway build failed" # 运行脚本打包应用镜像并运行
|
||||
# - echo "start run.sh"
|
||||
# - cd /ludu/maven/build/yudao-gateway/
|
||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||
# - ./run.sh || echo "yudao-gateway build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
- cd /ludu/maven/build/yudao-module-system/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "yudao-module-system build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
- cd /ludu/maven/build/yudao-module-infra/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "yudao-module-infra build failed" # 运行脚本打包应用镜像并运行
|
||||
# - cd /ludu/maven/build/yudao-module-infra/
|
||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||
# - ./run.sh || echo "yudao-module-infra build failed" # 运行脚本打包应用镜像并运行
|
||||
#
|
||||
# - cd /ludu/maven/build/ludu-job-admin/
|
||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||
# - ./run.sh || echo "ludu-job-admin build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
- cd /ludu/maven/build/ludu-job-admin/
|
||||
- cd /ludu/maven/build/ludu-module-datacenter/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "ludu-job-admin build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
- ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
- cd /ludu/maven/build/ludu-module-ticketing/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
- cd /ludu/maven/build/ludu-module-parking/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
- echo "start copy"
|
||||
- scp -r /ludu/maven/build/ludu-module-ticketing root@120.46.37.243:/ludu/maven/build
|
||||
- echo "ticket done"
|
||||
- scp -r /ludu/maven/build/ludu-module-parking root@120.46.37.243:/ludu/maven/build
|
||||
- echo "park done"
|
||||
- scp -r /ludu/maven/build/ludu-module-datacenter root@120.46.37.243:/ludu/maven/build
|
||||
- echo "datecenter done"
|
||||
- scp -r /ludu/maven/build/yudao-gateway root@120.46.37.243:/ludu/maven/build
|
||||
- echo "gateway done"
|
||||
|
||||
# - echo "start copy"
|
||||
# - scp -r /ludu/maven/build/ludu-module-ticketing root@120.46.37.243:/ludu/maven/build
|
||||
# - echo "ticket done"
|
||||
# - scp -r /ludu/maven/build/ludu-module-parking root@120.46.37.243:/ludu/maven/build
|
||||
# - echo "park done"
|
||||
# - scp -r /ludu/maven/build/ludu-module-datacenter root@120.46.37.243:/ludu/maven/build
|
||||
# - echo "datecenter done"
|
||||
|
||||
- name: build-other-service
|
||||
|
||||
@ -116,26 +132,30 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
password:
|
||||
|
||||
from_secret: ssh_password2 # 从Secret中读取SSH密码
|
||||
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
|
||||
command_timeout: 5m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- cd /ludu/maven/build/ludu-module-ticketing/
|
||||
- cd /ludu/maven/build/yudao-gateway/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "ludu-module-ticketing build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
- cd /ludu/maven/build/ludu-module-parking/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "ludu-module-parking build failed" # 运行脚本打包应用镜像并运行
|
||||
# - cd /ludu/maven/build/ludu-module-ticketing/
|
||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||
# - ./run.sh || echo "ludu-module-ticketing build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
- cd /ludu/maven/build/ludu-module-datacenter/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
||||
# - cd /ludu/maven/build/ludu-module-parking/
|
||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||
# - ./run.sh || echo "ludu-module-parking build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
# - cd /ludu/maven/build/ludu-module-datacenter/
|
||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||
# - ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
volumes: # 定义流水线挂载目录,用于共享数据
|
||||
|
||||
|
@ -4,6 +4,7 @@ spring:
|
||||
autoconfigure:
|
||||
exclude:
|
||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
||||
datasource:
|
||||
druid: # Druid 【监控】相关的全局配置
|
||||
web-stat-filter:
|
||||
@ -25,8 +26,8 @@ spring:
|
||||
multi-statement-allow: true
|
||||
dynamic: # 多数据源配置
|
||||
druid: # Druid 【连接池】相关的全局配置
|
||||
initial-size: 5 # 初始连接数
|
||||
min-idle: 10 # 最小连接池数量
|
||||
initial-size: 1 # 初始连接数
|
||||
min-idle: 1 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
||||
@ -39,15 +40,66 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
url: jdbc:mysql://101.43.112.107:3306/ludu_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
||||
username: root
|
||||
password: 123456
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
password: xpower1234
|
||||
# username: sa # SQL Server 连接的示例
|
||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
||||
# username: SYSDBA # DM 连接的示例
|
||||
# password: SYSDBA # DM 连接的示例
|
||||
slave: # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: 123456
|
||||
### datasource-pool
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
hikari:
|
||||
minimum-idle: 10
|
||||
maximum-pool-size: 30
|
||||
auto-commit: true
|
||||
idle-timeout: 30000
|
||||
pool-name: HikariCP
|
||||
max-lifetime: 900000
|
||||
connection-timeout: 10000
|
||||
connection-test-query: SELECT 1
|
||||
validation-timeout: 1000
|
||||
### xxl-job, email
|
||||
mail:
|
||||
host: smtp.qq.com
|
||||
port: 25
|
||||
username: xxx@qq.com
|
||||
from: xxx@qq.com
|
||||
password: xxx
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
auth: true
|
||||
starttls:
|
||||
enable: true
|
||||
required: true
|
||||
socketFactory:
|
||||
class: javax.net.ssl.SSLSocketFactory
|
||||
|
||||
### xxl-job, access token
|
||||
xxl:
|
||||
job:
|
||||
accessToken:
|
||||
### xxl-job, i18n (default is zh_CN, and you can choose "zh_CN", "zh_TC" and "en")
|
||||
i18n: zh_CN
|
||||
## xxl-job, triggerpool max size
|
||||
triggerpool:
|
||||
fast:
|
||||
max: 200
|
||||
slow:
|
||||
max: 100
|
||||
### xxl-job, log retention days
|
||||
logretentiondays: 30
|
||||
|
||||
--- #################### 服务保障相关配置 ####################
|
||||
|
||||
@ -74,16 +126,28 @@ spring:
|
||||
client:
|
||||
instance:
|
||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
||||
# Spring Boot Admin Server 服务端的相关配置
|
||||
context-path: /admin # 配置 Spring
|
||||
|
||||
# 日志文件配置
|
||||
logging:
|
||||
level:
|
||||
# 配置自己写的 MyBatis Mapper 打印日志
|
||||
cn.iocoder.yudao.module.system.dal.mysql: debug
|
||||
cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
||||
cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
yudao:
|
||||
xss:
|
||||
enable: false
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
demo: true # 开启演示模式
|
||||
security:
|
||||
mock-enable: true
|
||||
xss:
|
||||
enable: false
|
||||
access-log: # 访问日志的配置项
|
||||
enable: false
|
||||
demo: false # 关闭演示模式
|
||||
|
@ -40,7 +40,7 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://120.46.37.243:3306/ludu_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
url: jdbc:mysql://101.43.112.107:3306/ludu_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||
|
@ -3,7 +3,7 @@
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: crm.fjptzykj.com:8849
|
||||
discovery:
|
||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
||||
metadata:
|
||||
@ -16,7 +16,7 @@ spring:
|
||||
nacos:
|
||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
||||
config:
|
||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
||||
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
||||
|
@ -3,7 +3,7 @@ spring:
|
||||
name: job-server
|
||||
|
||||
profiles:
|
||||
active: local
|
||||
active: dev
|
||||
|
||||
server:
|
||||
port: 9090
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.asset;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.asset;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.asset.vo.AssetRespVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.asset.vo.AssetRespVO;
|
||||
import cn.iocoder.yudao.module.datacenter.service.asset.AssetService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -15,14 +14,12 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* @Description 设备
|
||||
*/
|
||||
@Tag(name = "大屏服务 - 设备")
|
||||
@RestController
|
||||
@RequestMapping("/datacenter/asset")
|
||||
@RequestMapping("/asset")
|
||||
@Validated
|
||||
public class AssetApi {
|
||||
@Resource
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.asset.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.asset.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.checkticket;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.checkticket;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.datacenter.service.checkticket.CheckTicketService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -11,8 +10,6 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* @Description 检票
|
||||
*/
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.checkticket.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.checkticket.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.checkticket.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.checkticket.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.checkticket.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.checkticket.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.saledata;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.saledata;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.datacenter.service.saledata.SaleDataService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -14,14 +13,12 @@ import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* @Description 售票
|
||||
*/
|
||||
@Tag(name = "大屏服务 - 售票")
|
||||
@RestController
|
||||
@RequestMapping("/datacenter/saledata")
|
||||
@RequestMapping("/saledata")
|
||||
@Validated
|
||||
public class SaleDataApi {
|
||||
@Resource
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.saledata.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.saledata.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.saledata.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.saledata.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.saledata.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.ticssrMachine;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.ticssrMachine;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.asset.vo.AssetRespVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.asset.vo.AssetRespVO;
|
||||
import cn.iocoder.yudao.module.datacenter.service.asset.AssetService;
|
||||
import cn.iocoder.yudao.module.datacenter.service.passengerInformation.PassengerInformationService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -17,7 +17,7 @@ import java.util.List;
|
||||
*/
|
||||
@Tag(name = "大屏服务 - 临时身份证自助补办机")
|
||||
@RestController
|
||||
@RequestMapping("/datacenter/ticssrMachine")
|
||||
@RequestMapping("/ticssrMachine")
|
||||
@Validated
|
||||
public class TicssrMachineApi {
|
||||
@Autowired
|
@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.transitionflight;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.transitionflight;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.transitionflight.vo.FerryData;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.transitionflight.vo.FerryData;
|
||||
import cn.iocoder.yudao.module.datacenter.utlis.ResponseVO;
|
||||
import com.alibaba.nacos.shaded.com.google.gson.Gson;
|
||||
import com.alibaba.nacos.shaded.com.google.gson.JsonObject;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.transitionflight.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.transitionflight.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.AreaDataVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.ParkingLotDataVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.RevenueVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.AreaDataVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.ParkingLotDataVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.RevenueVO;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.dataobject.vehicleaccess.*;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.mongodb.vehicleaccess.*;
|
||||
import cn.iocoder.yudao.module.datacenter.utlis.ResponseVO;
|
||||
@ -21,6 +21,7 @@ import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Tag(name = "大屏服务 - 停车场接口")
|
||||
@RestController
|
||||
@RequestMapping("/datacenter/h5/vehicleAccess")
|
||||
@ -45,7 +46,7 @@ public class VehicleAccessApi {
|
||||
RevenueRepository revenueRepository;
|
||||
|
||||
@GetMapping("/list")
|
||||
public ResponseVO list(){
|
||||
public ResponseVO list() {
|
||||
// 获取今天的日期
|
||||
LocalDate today = LocalDate.now();
|
||||
LocalDateTime startOfDay = LocalDateTime.of(today, LocalTime.MIN);
|
||||
@ -61,13 +62,13 @@ public class VehicleAccessApi {
|
||||
revenue.setPlate("京A 88888");
|
||||
revenueRepository.insert(revenue);
|
||||
|
||||
return ResponseVO.success(200,"添加成功",null,0);
|
||||
return ResponseVO.success(200, "添加成功", null, 0);
|
||||
}
|
||||
|
||||
|
||||
//获取实时车辆进出数据和今日车位统计
|
||||
@GetMapping("/parkingLotData")
|
||||
public ResponseVO parkAndVacancy(){
|
||||
public ResponseVO parkAndVacancy() {
|
||||
|
||||
|
||||
//时间最新的一条数据
|
||||
@ -79,7 +80,7 @@ public class VehicleAccessApi {
|
||||
ParkingLotDataVO parkingLotDataVO = new ParkingLotDataVO();
|
||||
|
||||
int parkingNum = heartbeat.getSpaceCount() - heartbeat.getFreeSpaceCount();
|
||||
int residualStopNum = heartbeat.getSpaceCount() - parkingNum ;
|
||||
int residualStopNum = heartbeat.getSpaceCount() - parkingNum;
|
||||
|
||||
//车辆进出实时数据
|
||||
parkingLotDataVO.setParkingNum(parkingNum);//实时停车数
|
||||
@ -99,28 +100,28 @@ public class VehicleAccessApi {
|
||||
parkingLotDataVO.setTotalParkingSpace(heartbeat.getSpaceCount());//车位总数
|
||||
parkingLotDataVO.setResidualTotal(residualStopNum);//余位总数
|
||||
// 计算利用率
|
||||
int useRatio = (parkingNum / residualStopNum) * 100;
|
||||
Double useRatio = Math.round(((parkingNum * 1.0 / heartbeat.getSpaceCount()) * 10000)) / 100.0;
|
||||
parkingLotDataVO.setUseRatio(useRatio);//总利用率
|
||||
|
||||
//设置区域停车场数据
|
||||
for (int i = 0; i < heartbeat.getAreaList().size(); i++) {
|
||||
AreaDataVO areaDataVO = new AreaDataVO();
|
||||
areaDataVO.setAreaName(heartbeat.getAreaList().get(i).getAreaName());
|
||||
areaDataVO.setParkingCount(heartbeat.getAreaList().get(i).getSpaceCount());
|
||||
areaDataVO.setLastSpaceCount(heartbeat.getAreaList().get(i).getLastSpaceCount());
|
||||
areaDataVO.setUseRatio((heartbeat.getAreaList().get(i).getLastSpaceCount() / heartbeat.getAreaList().get(i).getSpaceCount()) * 100);
|
||||
// 计算利用率
|
||||
areaDataVO.setUseRatio(Math.round((heartbeat.getAreaList().get(i).getLastSpaceCount() * 1.0 / heartbeat.getAreaList().get(i).getSpaceCount()) * 10000) / 100.0);
|
||||
parkingLotDataVO.getAreaDataVOList().add(areaDataVO);
|
||||
}
|
||||
|
||||
return ResponseVO.success(200,"",parkingLotDataVO,0);
|
||||
return ResponseVO.success(200, "", parkingLotDataVO, 0);
|
||||
}
|
||||
return ResponseVO.error(500,"");
|
||||
return ResponseVO.error(500, "");
|
||||
}
|
||||
|
||||
|
||||
//车辆进出趋势数据
|
||||
@GetMapping("/tendencyChart")
|
||||
public ResponseVO tendencyChart(){
|
||||
public ResponseVO tendencyChart() {
|
||||
|
||||
ParkingLotDataVO parkingLotDataVO = new ParkingLotDataVO();
|
||||
|
||||
@ -156,27 +157,27 @@ public class VehicleAccessApi {
|
||||
for (int i = 0; i < entryRecordList.size(); i++) {
|
||||
EntryRecord entryRecord = entryRecordList.get(i);
|
||||
|
||||
if (entryRecord.getCreateTime().isAfter(startTime1) && entryRecord.getCreateTime().isBefore(endTime1)){
|
||||
if (entryRecord.getCreateTime().isAfter(startTime1) && entryRecord.getCreateTime().isBefore(endTime1)) {
|
||||
count1++;
|
||||
continue;
|
||||
}
|
||||
if (entryRecord.getCreateTime().isAfter(startTime2) && entryRecord.getCreateTime().isBefore(endTime2)){
|
||||
if (entryRecord.getCreateTime().isAfter(startTime2) && entryRecord.getCreateTime().isBefore(endTime2)) {
|
||||
count2++;
|
||||
continue;
|
||||
}
|
||||
if (entryRecord.getCreateTime().isAfter(startTime3) && entryRecord.getCreateTime().isBefore(endTime3)){
|
||||
if (entryRecord.getCreateTime().isAfter(startTime3) && entryRecord.getCreateTime().isBefore(endTime3)) {
|
||||
count3++;
|
||||
continue;
|
||||
}
|
||||
if (entryRecord.getCreateTime().isAfter(startTime4) && entryRecord.getCreateTime().isBefore(endTime4)){
|
||||
if (entryRecord.getCreateTime().isAfter(startTime4) && entryRecord.getCreateTime().isBefore(endTime4)) {
|
||||
count4++;
|
||||
continue;
|
||||
}
|
||||
if (entryRecord.getCreateTime().isAfter(startTime5) && entryRecord.getCreateTime().isBefore(endTime5)){
|
||||
if (entryRecord.getCreateTime().isAfter(startTime5) && entryRecord.getCreateTime().isBefore(endTime5)) {
|
||||
count5++;
|
||||
continue;
|
||||
}
|
||||
if (entryRecord.getCreateTime().isAfter(startTime6) && entryRecord.getCreateTime().isBefore(endTime6)){
|
||||
if (entryRecord.getCreateTime().isAfter(startTime6) && entryRecord.getCreateTime().isBefore(endTime6)) {
|
||||
count6++;
|
||||
}
|
||||
}
|
||||
@ -198,27 +199,27 @@ public class VehicleAccessApi {
|
||||
for (int i = 0; i < appearanceRecordList.size(); i++) {
|
||||
AppearanceRecord appearanceRecord = appearanceRecordList.get(i);
|
||||
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime1) && appearanceRecord.getCreateTime().isBefore(endTime1)){
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime1) && appearanceRecord.getCreateTime().isBefore(endTime1)) {
|
||||
count1++;
|
||||
continue;
|
||||
}
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime2) && appearanceRecord.getCreateTime().isBefore(endTime2)){
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime2) && appearanceRecord.getCreateTime().isBefore(endTime2)) {
|
||||
count2++;
|
||||
continue;
|
||||
}
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime3) && appearanceRecord.getCreateTime().isBefore(endTime3)){
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime3) && appearanceRecord.getCreateTime().isBefore(endTime3)) {
|
||||
count3++;
|
||||
continue;
|
||||
}
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime4) && appearanceRecord.getCreateTime().isBefore(endTime4)){
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime4) && appearanceRecord.getCreateTime().isBefore(endTime4)) {
|
||||
count4++;
|
||||
continue;
|
||||
}
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime5) && appearanceRecord.getCreateTime().isBefore(endTime5)){
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime5) && appearanceRecord.getCreateTime().isBefore(endTime5)) {
|
||||
count5++;
|
||||
continue;
|
||||
}
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime6) && appearanceRecord.getCreateTime().isBefore(endTime6)){
|
||||
if (appearanceRecord.getCreateTime().isAfter(startTime6) && appearanceRecord.getCreateTime().isBefore(endTime6)) {
|
||||
count6++;
|
||||
}
|
||||
}
|
||||
@ -230,13 +231,13 @@ public class VehicleAccessApi {
|
||||
parkingLotDataVO.getOutCount().add(count5);
|
||||
parkingLotDataVO.getOutCount().add(count6);
|
||||
|
||||
return ResponseVO.success(200,"",parkingLotDataVO,0);
|
||||
return ResponseVO.success(200, "", parkingLotDataVO, 0);
|
||||
}
|
||||
|
||||
|
||||
//车辆出入实时记录图
|
||||
@GetMapping("/recordOfAccess")
|
||||
public ResponseVO recordOfAccess(int page){
|
||||
public ResponseVO recordOfAccess(int page) {
|
||||
|
||||
// 获取今天的日期
|
||||
LocalDate today = LocalDate.now();
|
||||
@ -249,13 +250,13 @@ public class VehicleAccessApi {
|
||||
Pageable pageable = PageRequest.of(page, 4);
|
||||
// Page<VehicleRecord> recordOfAccessList = vehicleRecordRepository.findByCreateTimeBetweenOrderByCreateTimeAsc(startOfDay, endOfDay, pageable);
|
||||
Page<VehicleRecord> recordOfAccessList = vehicleRecordRepository.findAll(pageable); // TODO 暂时获取全部数据分页
|
||||
return ResponseVO.success(200,"",recordOfAccessList,total);
|
||||
return ResponseVO.success(200, "", recordOfAccessList, total);
|
||||
}
|
||||
|
||||
|
||||
//车辆营收统计
|
||||
@GetMapping("/revenue")
|
||||
public ResponseVO revenue(String date,String areaName){
|
||||
public ResponseVO revenue(String date, String areaName) {
|
||||
|
||||
List<Revenue> revenueList;
|
||||
|
||||
@ -263,25 +264,25 @@ public class VehicleAccessApi {
|
||||
LocalDateTime endOfDay = null;
|
||||
|
||||
|
||||
if (date.equals("今日")){
|
||||
if (date.equals("今日")) {
|
||||
// 获取今天的日期
|
||||
LocalDate today = LocalDate.now();
|
||||
startOfDay = LocalDateTime.of(today, LocalTime.MIN);
|
||||
endOfDay = LocalDateTime.of(today, LocalTime.MAX);
|
||||
}
|
||||
if (date.equals("近一周")){
|
||||
if (date.equals("近一周")) {
|
||||
endOfDay = LocalDateTime.now(); // 结束时间为当前时间
|
||||
startOfDay = endOfDay.minusDays(7); // 开始时间为当前时间的前7天
|
||||
|
||||
}
|
||||
if (date.equals("近一月")){
|
||||
if (date.equals("近一月")) {
|
||||
endOfDay = LocalDateTime.now(); // 结束时间为当前时间
|
||||
startOfDay = endOfDay.minusMonths(1); // 开始时间为当前时间的前一个月
|
||||
}
|
||||
|
||||
if (areaName.equals("全部")){
|
||||
if (areaName.equals("全部")) {
|
||||
revenueList = revenueRepository.findByCreateTimeBetween(startOfDay, endOfDay);
|
||||
}else {
|
||||
} else {
|
||||
revenueList = revenueRepository.findByCreateTimeAndAreaName(startOfDay, endOfDay, areaName);
|
||||
}
|
||||
|
||||
@ -297,15 +298,15 @@ public class VehicleAccessApi {
|
||||
for (int i = 0; i < revenueList.size(); i++) {
|
||||
Revenue revenue = revenueList.get(i);
|
||||
BigDecimal charge = new BigDecimal(revenue.getPayCharge());
|
||||
if (revenue.getPayKind().equals("现金")){
|
||||
if (revenue.getPayKind().equals("现金")) {
|
||||
xj = xj.add(charge);
|
||||
} else if (revenue.getPayKind().equals("微信")){
|
||||
} else if (revenue.getPayKind().equals("微信")) {
|
||||
wx = wx.add(charge);
|
||||
} else if (revenue.getPayKind().equals("支付宝")){
|
||||
} else if (revenue.getPayKind().equals("支付宝")) {
|
||||
zfb = zfb.add(charge);
|
||||
} else if (revenue.getPayKind().equals("银联")){
|
||||
} else if (revenue.getPayKind().equals("银联")) {
|
||||
yl = yl.add(charge);
|
||||
} else if (revenue.getPayKind().equals("公交卡")){
|
||||
} else if (revenue.getPayKind().equals("公交卡")) {
|
||||
gjk = gjk.add(charge);
|
||||
}
|
||||
}
|
||||
@ -322,18 +323,15 @@ public class VehicleAccessApi {
|
||||
revenueVO.setZfb(zfb);
|
||||
|
||||
|
||||
|
||||
return ResponseVO.success(200,"",revenueVO ,0);
|
||||
return ResponseVO.success(200, "", revenueVO, 0);
|
||||
}
|
||||
|
||||
|
||||
//预警信息栏
|
||||
@GetMapping("/warning_information_bar")
|
||||
public ResponseVO warningInformation(){
|
||||
return ResponseVO.success(200,"今日实时客流人数125,同比上月实时人数提升12%。今日车辆数量135,同比上月实时人数提升13%。今日沿海阵风3级.....",null ,0);
|
||||
public ResponseVO warningInformation() {
|
||||
return ResponseVO.success(200, "今日实时客流人数125,同比上月实时人数提升12%。今日车辆数量135,同比上月实时人数提升13%。今日沿海阵风3级.....", null, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -15,5 +15,5 @@ public class AreaDataVO {
|
||||
private int lastSpaceCount;
|
||||
|
||||
//区域利用率
|
||||
private int useRatio;
|
||||
private Double useRatio;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -30,7 +30,7 @@ public class ParkingLotDataVO {
|
||||
private int residualTotal;
|
||||
|
||||
//总利用率
|
||||
private int useRatio;
|
||||
private Double useRatio;
|
||||
|
||||
//区域停车场数据集合
|
||||
private List<AreaDataVO> areaDataVOList = new ArrayList<>();
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.weather;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.weather;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.weather.vo.WeatherInfoVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.weather.vo.WeatherInfoVO;
|
||||
import cn.iocoder.yudao.module.datacenter.utlis.GoodWeatherUtil;
|
||||
import cn.iocoder.yudao.module.datacenter.utlis.ResponseVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.admin.weather.vo;
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.weather.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.datacenter.dal.dataobject.vehicleaccess;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.AppearanceRecordVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.AppearanceRecordVo;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.mongodb.core.index.Indexed;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.datacenter.dal.dataobject.vehicleaccess;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.BlueCardHeartbeatVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.BlueCardHeartbeatVo;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.mongodb.core.index.Indexed;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.datacenter.dal.dataobject.vehicleaccess;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.EntryRecordVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.EntryRecordVo;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.mongodb.core.index.Indexed;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package cn.iocoder.yudao.module.datacenter.dal.mongodb.saledata;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.saledata.vo.AgeVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.saledata.vo.AggregationVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.AgeVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.AggregationVO;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.dataobject.saledata.SaleData;
|
||||
import org.springframework.data.mongodb.repository.Aggregation;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.datacenter.service.asset;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.asset.vo.AssetRespVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.asset.vo.AssetRespVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -1,12 +1,10 @@
|
||||
package cn.iocoder.yudao.module.datacenter.service.asset;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.asset.vo.AssetRespVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.asset.vo.AssetRespVO;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.dataobject.asset.Asset;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.mongodb.asset.AssetRepository;
|
||||
import com.baomidou.dynamic.datasource.annotation.Slave;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
|
@ -2,18 +2,15 @@ package cn.iocoder.yudao.module.datacenter.service.saledata;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.ticket.IdCardUtil;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.saledata.vo.AgeVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.saledata.vo.AggregationVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.AgeVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.AggregationVO;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.dataobject.saledata.SaleData;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.mongodb.saledata.SaleDataRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.datacenter.utlis;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.admin.weather.vo.WeatherInfoVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.weather.vo.WeatherInfoVO;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
|
@ -1,9 +1,15 @@
|
||||
--- #################### 数据库相关配置 ####################
|
||||
spring:
|
||||
# mongodb数据源
|
||||
data:
|
||||
mongodb:
|
||||
uri: mongodb://root:123456@120.46.37.243:27017/admin?authMechanism=SCRAM-SHA-256
|
||||
database: sn-lundu-db
|
||||
# 数据源配置项
|
||||
autoconfigure:
|
||||
exclude:
|
||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
||||
datasource:
|
||||
druid: # Druid 【监控】相关的全局配置
|
||||
web-stat-filter:
|
||||
@ -25,8 +31,8 @@ spring:
|
||||
multi-statement-allow: true
|
||||
dynamic: # 多数据源配置
|
||||
druid: # Druid 【连接池】相关的全局配置
|
||||
initial-size: 5 # 初始连接数
|
||||
min-idle: 10 # 最小连接池数量
|
||||
initial-size: 1 # 初始连接数
|
||||
min-idle: 1 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
||||
@ -39,27 +45,38 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
||||
username: root
|
||||
password: 123456
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
password: xpower1234
|
||||
# username: sa # SQL Server 连接的示例
|
||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
||||
# username: SYSDBA # DM 连接的示例
|
||||
# password: SYSDBA # DM 连接的示例
|
||||
slave: # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: 123456
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
redis:
|
||||
host: 400-infra.server.iocoder.cn # 地址
|
||||
host: crm.fjptzykj.com # 地址
|
||||
port: 6379 # 端口
|
||||
database: 1 # 数据库索引
|
||||
database: 0 # 数据库索引
|
||||
# password: 123456 # 密码,建议生产环境开启
|
||||
|
||||
--- #################### MQ 消息队列相关配置 ####################
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
xxl:
|
||||
job:
|
||||
enabled: false # 是否开启调度中心,默认为 true 开启
|
||||
admin:
|
||||
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
|
||||
|
||||
@ -88,16 +105,28 @@ spring:
|
||||
client:
|
||||
instance:
|
||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
||||
# Spring Boot Admin Server 服务端的相关配置
|
||||
context-path: /admin # 配置 Spring
|
||||
|
||||
# 日志文件配置
|
||||
logging:
|
||||
level:
|
||||
# 配置自己写的 MyBatis Mapper 打印日志
|
||||
cn.iocoder.yudao.module.system.dal.mysql: debug
|
||||
cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
||||
cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
yudao:
|
||||
xss:
|
||||
enable: false
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
demo: true # 开启演示模式
|
||||
security:
|
||||
mock-enable: true
|
||||
xss:
|
||||
enable: false
|
||||
access-log: # 访问日志的配置项
|
||||
enable: false
|
||||
demo: false # 关闭演示模式
|
||||
|
@ -45,7 +45,7 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://120.46.37.243:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||
|
@ -3,7 +3,7 @@
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: crm.fjptzykj.com:8849
|
||||
discovery:
|
||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
||||
metadata:
|
||||
@ -16,7 +16,7 @@ spring:
|
||||
nacos:
|
||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
||||
config:
|
||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
||||
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
||||
|
@ -3,7 +3,7 @@ spring:
|
||||
name: datacenter-server
|
||||
|
||||
profiles:
|
||||
active: local
|
||||
active: dev
|
||||
|
||||
server:
|
||||
port: 48092
|
||||
|
@ -16,4 +16,11 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode PARK_NOT_EXISTS = new ErrorCode(1_005_001_027, "场库列表不存在");
|
||||
// ========== 区域列表 1_005_001_028 ==========
|
||||
ErrorCode AREA_NOT_EXISTS = new ErrorCode(1_005_001_028, "区域列表不存在");
|
||||
ErrorCode VEHICLE_RENEWAL_RECORD_NOT_EXISTS = new ErrorCode(22222, "固定车续费记录不存在");
|
||||
ErrorCode WARNING_NOT_EXISTS = new ErrorCode(33333, "告警记录不存在");
|
||||
ErrorCode WHITE_NOT_EXISTS = new ErrorCode(444444, "白名单管理不存在");
|
||||
// ========== 收费信息 1_005_001_029 ==========
|
||||
ErrorCode CHARGE_INFO_NOT_EXISTS = new ErrorCode(1_005_001_029, "收费信息不存在");
|
||||
// ========== 远程抬杠日志 1_005_001_030 ==========
|
||||
ErrorCode LIFTING_ROD_NOT_EXISTS = new ErrorCode(1_005_001_030, "远程抬杠日志不存在");
|
||||
}
|
||||
|
@ -0,0 +1,102 @@
|
||||
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;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.liftingrod.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.liftingrod.LiftingRodDO;
|
||||
import cn.iocoder.yudao.module.parking.service.liftingrod.LiftingRodService;
|
||||
|
||||
@Tag(name = "管理后台 - 远程抬杠日志")
|
||||
@RestController
|
||||
@RequestMapping("/parking/lifting-rod")
|
||||
@Validated
|
||||
public class LiftingRodController {
|
||||
|
||||
@Resource
|
||||
private LiftingRodService liftingRodService;
|
||||
@PostMapping("/actionLiftingRod")
|
||||
@Operation(summary = "下发远程抬杠指令")
|
||||
@PreAuthorize("@ss.hasPermission('parking:lifting-rod:create')")
|
||||
public BlueCardResult actionLiftingRod(@RequestBody LiftingRodVo liftingRodVo){
|
||||
return liftingRodService.doLiftingRod(liftingRodVo);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建远程抬杠日志")
|
||||
@PreAuthorize("@ss.hasPermission('parking:lifting-rod:create')")
|
||||
public CommonResult<Long> createLiftingRod(@Valid @RequestBody LiftingRodSaveReqVO createReqVO) {
|
||||
return success(liftingRodService.createLiftingRod(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新远程抬杠日志")
|
||||
@PreAuthorize("@ss.hasPermission('parking:lifting-rod:update')")
|
||||
public CommonResult<Boolean> updateLiftingRod(@Valid @RequestBody LiftingRodSaveReqVO updateReqVO) {
|
||||
liftingRodService.updateLiftingRod(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除远程抬杠日志")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('parking:lifting-rod:delete')")
|
||||
public CommonResult<Boolean> deleteLiftingRod(@RequestParam("id") Long id) {
|
||||
liftingRodService.deleteLiftingRod(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得远程抬杠日志")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('parking:lifting-rod:query')")
|
||||
public CommonResult<LiftingRodRespVO> getLiftingRod(@RequestParam("id") Long id) {
|
||||
LiftingRodDO liftingRod = liftingRodService.getLiftingRod(id);
|
||||
return success(BeanUtils.toBean(liftingRod, LiftingRodRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得远程抬杠日志分页")
|
||||
@PreAuthorize("@ss.hasPermission('parking:lifting-rod:query')")
|
||||
public CommonResult<PageResult<LiftingRodRespVO>> getLiftingRodPage(@Valid LiftingRodPageReqVO pageReqVO) {
|
||||
PageResult<LiftingRodDO> pageResult = liftingRodService.getLiftingRodPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, LiftingRodRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出远程抬杠日志 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('parking:lifting-rod:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportLiftingRodExcel(@Valid LiftingRodPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<LiftingRodDO> list = liftingRodService.getLiftingRodPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "远程抬杠日志.xls", "数据", LiftingRodRespVO.class,
|
||||
BeanUtils.toBean(list, LiftingRodRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -1,30 +1,29 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.group.vo;
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.liftingrod.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户分组分页 Request VO")
|
||||
@Schema(description = "管理后台 - 远程抬杠日志分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class MemberGroupPageReqVO extends PageParam {
|
||||
public class LiftingRodPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "名称", example = "购物达人")
|
||||
private String name;
|
||||
@Schema(description = "停车场编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private Integer status;
|
||||
@Schema(description = "通道Id", example = "10415")
|
||||
private String passagewayId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@Schema(description = "状态", example = "1")
|
||||
private Integer status;
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.liftingrod.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 远程抬杠日志 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class LiftingRodRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19179")
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "停车场编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("停车场编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "通道Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "10415")
|
||||
@ExcelProperty("通道Id")
|
||||
private String passagewayId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@Schema(description = "状态", example = "2")
|
||||
@ExcelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.liftingrod.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 远程抬杠日志新增/修改 Request VO")
|
||||
@Data
|
||||
public class LiftingRodSaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19179")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "停车场编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "停车场编号不能为空")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "通道Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "10415")
|
||||
@NotEmpty(message = "通道Id不能为空")
|
||||
private String passagewayId;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
private Integer status;
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.liftingrod.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LiftingRodVo {
|
||||
private String parkNumber;
|
||||
private String passagewayId;
|
||||
}
|
@ -38,16 +38,15 @@ public class PassagewayController {
|
||||
|
||||
@Resource
|
||||
private PassagewayService passagewayService;
|
||||
@PostMapping("/passagewayUpload")
|
||||
public BlueCardResult passagewayUpload(@RequestBody PassagewayReqDataVO passagewayReqDataVO){
|
||||
|
||||
@PostMapping("/insertPassageway")
|
||||
public BlueCardResult insertPassageway(@RequestBody PassagewayReqDataVO passagewayReqDataVO){
|
||||
return passagewayService.passagewayUpload(passagewayReqDataVO);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建通道信息")
|
||||
@PreAuthorize("@ss.hasPermission('parking:passageway:create')")
|
||||
public CommonResult<String> createPassageway(@Valid @RequestBody PassagewaySaveReqVO createReqVO) {
|
||||
public CommonResult<Long> createPassageway(@Valid @RequestBody PassagewaySaveReqVO createReqVO) {
|
||||
return success(passagewayService.createPassageway(createReqVO));
|
||||
}
|
||||
|
||||
@ -63,7 +62,7 @@ public class PassagewayController {
|
||||
@Operation(summary = "删除通道信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('parking:passageway:delete')")
|
||||
public CommonResult<Boolean> deletePassageway(@RequestParam("id") String id) {
|
||||
public CommonResult<Boolean> deletePassageway(@RequestParam("id") Long id) {
|
||||
passagewayService.deletePassageway(id);
|
||||
return success(true);
|
||||
}
|
||||
@ -72,7 +71,7 @@ public class PassagewayController {
|
||||
@Operation(summary = "获得通道信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('parking:passageway:query')")
|
||||
public CommonResult<PassagewayRespVO> getPassageway(@RequestParam("id") String id) {
|
||||
public CommonResult<PassagewayRespVO> getPassageway(@RequestParam("id") Long id) {
|
||||
PassagewayDO passageway = passagewayService.getPassageway(id);
|
||||
return success(BeanUtils.toBean(passageway, PassagewayRespVO.class));
|
||||
}
|
||||
@ -90,12 +89,12 @@ public class PassagewayController {
|
||||
@PreAuthorize("@ss.hasPermission('parking:passageway:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPassagewayExcel(@Valid PassagewayPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PassagewayDO> list = passagewayService.getPassagewayPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "通道信息.xls", "数据", PassagewayRespVO.class,
|
||||
BeanUtils.toBean(list, PassagewayRespVO.class));
|
||||
BeanUtils.toBean(list, PassagewayRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -14,6 +14,8 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PassagewayPageReqVO extends PageParam {
|
||||
@Schema(description = "通道 Id", example = "4961")
|
||||
private String passagewayId;
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
|
@ -12,6 +12,9 @@ import com.alibaba.excel.annotation.*;
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PassagewayRespVO {
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9494")
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "通道 Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7099")
|
||||
@ExcelProperty("通道 Id")
|
||||
|
@ -8,7 +8,8 @@ import javax.validation.constraints.*;
|
||||
@Schema(description = "管理后台 - 通道信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class PassagewaySaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9494")
|
||||
private Long id;
|
||||
@Schema(description = "通道 Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7099")
|
||||
private String passagewayId;
|
||||
|
||||
|
@ -0,0 +1,121 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.vehiclerenewalrecord.VehicleRenewalRecordDO;
|
||||
import cn.iocoder.yudao.module.parking.service.vehiclerenewalrecord.VehicleRenewalRecordService;
|
||||
|
||||
@Tag(name = "管理后台 - 固定车续费记录")
|
||||
@RestController
|
||||
@RequestMapping("/parking/vehicle-renewal-record")
|
||||
@Validated
|
||||
public class VehicleRenewalRecordController {
|
||||
|
||||
@Resource
|
||||
private VehicleRenewalRecordService vehicleRenewalRecordService;
|
||||
|
||||
/**
|
||||
* 固定车续费记录上传
|
||||
* @param vehicleRenewalRecordDO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/UpRenewalRecord")
|
||||
public BlueCardResult UpRenewalRecord(@RequestBody VehicleRenewalRecordDO vehicleRenewalRecordDO) {
|
||||
VehicleRenewalRecordDO vehicleRenewalRecordDOs = new VehicleRenewalRecordDO();
|
||||
VehicleRenewalRecordDO datas = vehicleRenewalRecordDO.getDatas().get(0);
|
||||
vehicleRenewalRecordDOs.setParkNumber(vehicleRenewalRecordDO.getParkNumber());
|
||||
vehicleRenewalRecordDOs.setMethod(vehicleRenewalRecordDO.getMethod());
|
||||
vehicleRenewalRecordDOs.setPlate(datas.getPlate());
|
||||
vehicleRenewalRecordDOs.setCarGroupName(datas.getCarGroupName());
|
||||
vehicleRenewalRecordDOs.setPayTime(datas.getPayTime());
|
||||
vehicleRenewalRecordDOs.setPayCharge(datas.getPayCharge());
|
||||
vehicleRenewalRecordDOs.setNumber(datas.getNumber());
|
||||
vehicleRenewalRecordDOs.setFeeMonth(datas.getFeeMonth());
|
||||
vehicleRenewalRecordDOs.setEnd(datas.getEnd());
|
||||
// vehicleRenewalRecordDOs.setPlaceFeeOrderRecId
|
||||
vehicleRenewalRecordDO.setCarOwnerName(datas.getCarOwnerName());
|
||||
vehicleRenewalRecordDOs.setPayType(datas.getPayType());
|
||||
vehicleRenewalRecordDOs.setOrderNo(datas.getOrderNo());
|
||||
return vehicleRenewalRecordService.UpRenewalRecord(vehicleRenewalRecordDOs);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建固定车续费记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:create')")
|
||||
public CommonResult<String> createVehicleRenewalRecord(@Valid @RequestBody VehicleRenewalRecordSaveReqVO createReqVO) {
|
||||
return success(vehicleRenewalRecordService.createVehicleRenewalRecord(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新固定车续费记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:update')")
|
||||
public CommonResult<Boolean> updateVehicleRenewalRecord(@Valid @RequestBody VehicleRenewalRecordSaveReqVO updateReqVO) {
|
||||
vehicleRenewalRecordService.updateVehicleRenewalRecord(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除固定车续费记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:delete')")
|
||||
public CommonResult<Boolean> deleteVehicleRenewalRecord(@RequestParam("id") String id) {
|
||||
vehicleRenewalRecordService.deleteVehicleRenewalRecord(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得固定车续费记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:query')")
|
||||
public CommonResult<VehicleRenewalRecordRespVO> getVehicleRenewalRecord(@RequestParam("id") String id) {
|
||||
VehicleRenewalRecordDO vehicleRenewalRecord = vehicleRenewalRecordService.getVehicleRenewalRecord(id);
|
||||
return success(BeanUtils.toBean(vehicleRenewalRecord, VehicleRenewalRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得固定车续费记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:query')")
|
||||
public CommonResult<PageResult<VehicleRenewalRecordRespVO>> getVehicleRenewalRecordPage(@Valid VehicleRenewalRecordPageReqVO pageReqVO) {
|
||||
PageResult<VehicleRenewalRecordDO> pageResult = vehicleRenewalRecordService.getVehicleRenewalRecordPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, VehicleRenewalRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出固定车续费记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportVehicleRenewalRecordExcel(@Valid VehicleRenewalRecordPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<VehicleRenewalRecordDO> list = vehicleRenewalRecordService.getVehicleRenewalRecordPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "固定车续费记录.xls", "数据", VehicleRenewalRecordRespVO.class,
|
||||
BeanUtils.toBean(list, VehicleRenewalRecordRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 固定车续费记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class VehicleRenewalRecordPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "接口名称")
|
||||
private String method;
|
||||
|
||||
@Schema(description = "车牌")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "固定车组名称", example = "张三")
|
||||
private String carGroupName;
|
||||
|
||||
@Schema(description = "支付时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] payTime;
|
||||
|
||||
@Schema(description = "续费金额")
|
||||
private String payCharge;
|
||||
|
||||
@Schema(description = "车位号")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "续费时长")
|
||||
private String feeMonth;
|
||||
|
||||
@Schema(description = "过期日期")
|
||||
private String end;
|
||||
|
||||
@Schema(description = "车主名称", example = "李四")
|
||||
private String carOwnerName;
|
||||
|
||||
@Schema(description = "支付类型", example = "1")
|
||||
private String payType;
|
||||
|
||||
@Schema(description = "支付流水号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 固定车续费记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class VehicleRenewalRecordRespVO {
|
||||
|
||||
@Schema(description = "续费订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24242")
|
||||
@ExcelProperty("续费订单号")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("接口名称")
|
||||
private String method;
|
||||
|
||||
@Schema(description = "车牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("车牌")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "固定车组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("固定车组名称")
|
||||
private String carGroupName;
|
||||
|
||||
@Schema(description = "支付时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("支付时间")
|
||||
private String payTime;
|
||||
|
||||
@Schema(description = "续费金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("续费金额")
|
||||
private String payCharge;
|
||||
|
||||
@Schema(description = "车位号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("车位号")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "续费时长", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("续费时长")
|
||||
private String feeMonth;
|
||||
|
||||
@Schema(description = "过期日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("过期日期")
|
||||
private String end;
|
||||
|
||||
@Schema(description = "车主名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("车主名称")
|
||||
private String carOwnerName;
|
||||
|
||||
@Schema(description = "支付类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty(value = "支付类型", converter = DictConvert.class)
|
||||
@DictFormat("pay_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String payType;
|
||||
|
||||
@Schema(description = "支付流水号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("支付流水号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 固定车续费记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class VehicleRenewalRecordSaveReqVO {
|
||||
|
||||
@Schema(description = "续费订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24242")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "场库编号不能为空")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "接口名称不能为空")
|
||||
private String method;
|
||||
|
||||
@Schema(description = "车牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "车牌不能为空")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "固定车组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "固定车组名称不能为空")
|
||||
private String carGroupName;
|
||||
|
||||
@Schema(description = "支付时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "支付时间不能为空")
|
||||
private String payTime;
|
||||
|
||||
@Schema(description = "续费金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "续费金额不能为空")
|
||||
private String payCharge;
|
||||
|
||||
@Schema(description = "车位号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "车位号不能为空")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "续费时长", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "续费时长不能为空")
|
||||
private String feeMonth;
|
||||
|
||||
@Schema(description = "过期日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "过期日期不能为空")
|
||||
private String end;
|
||||
|
||||
@Schema(description = "车主名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "车主名称不能为空")
|
||||
private String carOwnerName;
|
||||
|
||||
@Schema(description = "支付类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "支付类型不能为空")
|
||||
private String payType;
|
||||
|
||||
@Schema(description = "支付流水号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "支付流水号不能为空")
|
||||
private String orderNo;
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.warning;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.warning.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.warning.WarningDO;
|
||||
import cn.iocoder.yudao.module.parking.service.warning.WarningService;
|
||||
|
||||
@Tag(name = "管理后台 - 告警记录")
|
||||
@RestController
|
||||
@RequestMapping("/parking/warning")
|
||||
@Validated
|
||||
public class WarningController {
|
||||
|
||||
@Resource
|
||||
private WarningService warningService;
|
||||
|
||||
/**
|
||||
* 设备告警信息上传
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/upWarning")
|
||||
public BlueCardResult upWarning(@RequestBody WarningDO warningDO) {
|
||||
WarningDO warningDOs = new WarningDO();
|
||||
warningDOs.setParkNumber(warningDO.getParkNumber());
|
||||
// warningDOs.setmethod
|
||||
WarningDO datas = warningDO.getDatas().get(0);
|
||||
warningDOs.setAreaCode(datas.getAreaCode());
|
||||
warningDOs.setPortCode(datas.getPortCode());
|
||||
warningDOs.setObjectId(datas.getObjectId());
|
||||
warningDOs.setObjectName(datas.getObjectName());
|
||||
warningDOs.setObjectCode(datas.getObjectCode());
|
||||
warningDOs.setObjectType(datas.getObjectType());
|
||||
warningDOs.setWarningTime(datas.getWarningTime());
|
||||
warningDOs.setReportTime(datas.getReportTime());
|
||||
warningDOs.setWarningType(datas.getWarningType());
|
||||
warningDOs.setWarningDetail(datas.getWarningDetail());
|
||||
return warningService.upWarning(warningDOs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建告警记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:warning:create')")
|
||||
public CommonResult<String> createWarning(@Valid @RequestBody WarningSaveReqVO createReqVO) {
|
||||
return success(warningService.createWarning(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新告警记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:warning:update')")
|
||||
public CommonResult<Boolean> updateWarning(@Valid @RequestBody WarningSaveReqVO updateReqVO) {
|
||||
warningService.updateWarning(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除告警记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('parking:warning:delete')")
|
||||
public CommonResult<Boolean> deleteWarning(@RequestParam("id") String id) {
|
||||
warningService.deleteWarning(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得告警记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('parking:warning:query')")
|
||||
public CommonResult<WarningRespVO> getWarning(@RequestParam("id") String id) {
|
||||
WarningDO warning = warningService.getWarning(id);
|
||||
return success(BeanUtils.toBean(warning, WarningRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得告警记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('parking:warning:query')")
|
||||
public CommonResult<PageResult<WarningRespVO>> getWarningPage(@Valid WarningPageReqVO pageReqVO) {
|
||||
PageResult<WarningDO> pageResult = warningService.getWarningPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, WarningRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出告警记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('parking:warning:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportWarningExcel(@Valid WarningPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<WarningDO> list = warningService.getWarningPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "告警记录.xls", "数据", WarningRespVO.class,
|
||||
BeanUtils.toBean(list, WarningRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.warning.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 告警记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class WarningPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "停车区域 ")
|
||||
private String areaCode;
|
||||
|
||||
@Schema(description = "车位编码")
|
||||
private String portCode;
|
||||
|
||||
@Schema(description = "告警对象 Id", example = "31270")
|
||||
private String objectId;
|
||||
|
||||
@Schema(description = "告警对象编码")
|
||||
private String objectCode;
|
||||
|
||||
@Schema(description = "告警对象名称", example = "芋艿")
|
||||
private String objectName;
|
||||
|
||||
@Schema(description = "告警对象类型", example = "1")
|
||||
private String objectType;
|
||||
|
||||
@Schema(description = "告警时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] warningTime;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] reportTime;
|
||||
|
||||
@Schema(description = "告警类型", example = "1")
|
||||
private String warningType;
|
||||
|
||||
@Schema(description = "告警详情")
|
||||
private String warningDetail;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.warning.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 告警记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WarningRespVO {
|
||||
|
||||
@Schema(description = "表自增 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21274")
|
||||
@ExcelProperty("表自增 id")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "停车区域 ")
|
||||
@ExcelProperty("停车区域 ")
|
||||
private String areaCode;
|
||||
|
||||
@Schema(description = "车位编码")
|
||||
@ExcelProperty("车位编码")
|
||||
private String portCode;
|
||||
|
||||
@Schema(description = "告警对象 Id", example = "31270")
|
||||
@ExcelProperty("告警对象 Id")
|
||||
private String objectId;
|
||||
|
||||
@Schema(description = "告警对象编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("告警对象编码")
|
||||
private String objectCode;
|
||||
|
||||
@Schema(description = "告警对象名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("告警对象名称")
|
||||
private String objectName;
|
||||
|
||||
@Schema(description = "告警对象类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty(value = "告警对象类型", converter = DictConvert.class)
|
||||
@DictFormat("object_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String objectType;
|
||||
|
||||
@Schema(description = "告警时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("告警时间")
|
||||
private String warningTime;
|
||||
|
||||
@Schema(description = "上报时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("上报时间")
|
||||
private String reportTime;
|
||||
|
||||
@Schema(description = "告警类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty(value = "告警类型", converter = DictConvert.class)
|
||||
@DictFormat("warning_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String warningType;
|
||||
|
||||
@Schema(description = "告警详情")
|
||||
@ExcelProperty("告警详情")
|
||||
private String warningDetail;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.warning.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 告警记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class WarningSaveReqVO {
|
||||
|
||||
@Schema(description = "表自增 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21274")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "场库编号不能为空")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "停车区域 ")
|
||||
private String areaCode;
|
||||
|
||||
@Schema(description = "车位编码")
|
||||
private String portCode;
|
||||
|
||||
@Schema(description = "告警对象 Id", example = "31270")
|
||||
private String objectId;
|
||||
|
||||
@Schema(description = "告警对象编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "告警对象编码不能为空")
|
||||
private String objectCode;
|
||||
|
||||
@Schema(description = "告警对象名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "告警对象名称不能为空")
|
||||
private String objectName;
|
||||
|
||||
@Schema(description = "告警对象类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "告警对象类型不能为空")
|
||||
private String objectType;
|
||||
|
||||
@Schema(description = "告警时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "告警时间不能为空")
|
||||
private String warningTime;
|
||||
|
||||
@Schema(description = "上报时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "上报时间不能为空")
|
||||
private String reportTime;
|
||||
|
||||
@Schema(description = "告警类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "告警类型不能为空")
|
||||
private String warningType;
|
||||
|
||||
@Schema(description = "告警详情")
|
||||
private String warningDetail;
|
||||
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.white;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.white.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.white.WhiteDO;
|
||||
import cn.iocoder.yudao.module.parking.service.white.WhiteService;
|
||||
|
||||
@Tag(name = "管理后台 - 白名单管理")
|
||||
@RestController
|
||||
@RequestMapping("/parking/white")
|
||||
@Validated
|
||||
public class WhiteController {
|
||||
|
||||
@Resource
|
||||
private WhiteService whiteService;
|
||||
|
||||
|
||||
/**
|
||||
* 同步白名单信息
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/upWhite")
|
||||
public BlueCardResult upWhite(@RequestBody WhiteUtilDO whiteUtilDO) {
|
||||
|
||||
return whiteService.upWhite(whiteUtilDO);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建白名单管理")
|
||||
@PreAuthorize("@ss.hasPermission('parking:white:create')")
|
||||
public CommonResult<Integer> createWhite(@Valid @RequestBody WhiteSaveReqVO createReqVO) {
|
||||
return success(whiteService.createWhite(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新白名单管理")
|
||||
@PreAuthorize("@ss.hasPermission('parking:white:update')")
|
||||
public CommonResult<Boolean> updateWhite(@Valid @RequestBody WhiteSaveReqVO updateReqVO) {
|
||||
whiteService.updateWhite(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除白名单管理")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('parking:white:delete')")
|
||||
public CommonResult<Boolean> deleteWhite(@RequestParam("id") Integer id) {
|
||||
whiteService.deleteWhite(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得白名单管理")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('parking:white:query')")
|
||||
public CommonResult<WhiteRespVO> getWhite(@RequestParam("id") Integer id) {
|
||||
WhiteDO white = whiteService.getWhite(id);
|
||||
return success(BeanUtils.toBean(white, WhiteRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得白名单管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('parking:white:query')")
|
||||
public CommonResult<PageResult<WhiteRespVO>> getWhitePage(@Valid WhitePageReqVO pageReqVO) {
|
||||
PageResult<WhiteDO> pageResult = whiteService.getWhitePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, WhiteRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出白名单管理 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('parking:white:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportWhiteExcel(@Valid WhitePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<WhiteDO> list = whiteService.getWhitePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "白名单管理.xls", "数据", WhiteRespVO.class,
|
||||
BeanUtils.toBean(list, WhiteRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.white.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.areasandvalidity.AreasAndValidityDO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class WhiteDatasDO {
|
||||
private String plate;
|
||||
private Integer fixedId;
|
||||
private String chargeType;
|
||||
private String name;
|
||||
private String certificate;
|
||||
private String address;
|
||||
private String phone;
|
||||
private String plateColor;
|
||||
private String start;
|
||||
private String end;
|
||||
private String dept;
|
||||
private String carType;
|
||||
private String memo;
|
||||
private String timeStamp;
|
||||
private String source;
|
||||
private List<AreasAndValidityDO> areasAndValidity;
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.white.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 白名单管理分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class WhitePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "收费类型", example = "2")
|
||||
private String chargeType;
|
||||
|
||||
@Schema(description = "身份证信息")
|
||||
private String certificate;
|
||||
|
||||
@Schema(description = "生效日期")
|
||||
private String start;
|
||||
|
||||
@Schema(description = "失效日期")
|
||||
private String end;
|
||||
|
||||
@Schema(description = "部门")
|
||||
private String dept;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.white.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 白名单管理 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WhiteRespVO {
|
||||
|
||||
@Schema(description = "白名单记录流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19660")
|
||||
@ExcelProperty("白名单记录流水号")
|
||||
private Integer fixedId;
|
||||
|
||||
@Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("车牌号")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "收费类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty(value = "收费类型", converter = DictConvert.class)
|
||||
@DictFormat("charge_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String chargeType;
|
||||
|
||||
@Schema(description = "身份证信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("身份证信息")
|
||||
private String certificate;
|
||||
|
||||
@Schema(description = "生效日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("生效日期")
|
||||
private String start;
|
||||
|
||||
@Schema(description = "失效日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("失效日期")
|
||||
private String end;
|
||||
|
||||
@Schema(description = "部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("部门")
|
||||
private String dept;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
|
||||
@ExcelProperty("备注")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "来源", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.white.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 白名单管理新增/修改 Request VO")
|
||||
@Data
|
||||
public class WhiteSaveReqVO {
|
||||
|
||||
@Schema(description = "白名单记录流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19660")
|
||||
private Integer fixedId;
|
||||
|
||||
@Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "场库编号不能为空")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "车牌号不能为空")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "收费类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "收费类型不能为空")
|
||||
private String chargeType;
|
||||
|
||||
@Schema(description = "身份证信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "身份证信息不能为空")
|
||||
private String certificate;
|
||||
|
||||
@Schema(description = "生效日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "生效日期不能为空")
|
||||
private String start;
|
||||
|
||||
@Schema(description = "失效日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "失效日期不能为空")
|
||||
private String end;
|
||||
|
||||
@Schema(description = "部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "部门不能为空")
|
||||
private String dept;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "来源", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "来源不能为空")
|
||||
private String source;
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.white.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class WhiteUtilDO {
|
||||
private String parkNumber;
|
||||
private String method;
|
||||
private List<WhiteDatasDO> datas;
|
||||
private Integer size;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.areasandvalidity;
|
||||
|
||||
import lombok.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 区域时间信息 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("areas_and_validity")
|
||||
@KeySequence("areas_and_validity_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AreasAndValidityDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 区域Id
|
||||
*/
|
||||
private Integer areaId;
|
||||
/**
|
||||
* 生效日期
|
||||
*/
|
||||
private String start;
|
||||
/**
|
||||
* 失效日期
|
||||
*/
|
||||
private String end;
|
||||
/**
|
||||
* 白名单记录流水号
|
||||
*/
|
||||
private Integer fixedId;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.carinfo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 车辆信息 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("car_info")
|
||||
@KeySequence("car_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CarInfoDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 车牌
|
||||
*/
|
||||
private String plate;
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
private String plateColor;
|
||||
/**
|
||||
* 无牌车票号
|
||||
*/
|
||||
private String ticketCode;
|
||||
/**
|
||||
* 车类型
|
||||
*/
|
||||
private String carType;
|
||||
/**
|
||||
* 车牌识别可信度
|
||||
*/
|
||||
private Integer confidence;
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.liftingrod;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 远程抬杠日志 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("lifting_rod")
|
||||
@KeySequence("lifting_rod_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class LiftingRodDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 停车场编号
|
||||
*/
|
||||
private String parkNumber;
|
||||
/**
|
||||
* 通道Id
|
||||
*/
|
||||
private String passagewayId;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
@ -22,11 +22,6 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
@AllArgsConstructor
|
||||
public class PassagewayDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 通道 Id
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String passagewayId;
|
||||
/**
|
||||
* 场库编号
|
||||
*/
|
||||
@ -43,5 +38,14 @@ public class PassagewayDO extends BaseDO {
|
||||
* 目标区域 Id
|
||||
*/
|
||||
private String targetAreaId;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 通道 Id
|
||||
*/
|
||||
private String passagewayId;
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.userinfo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 车主信息 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("user_info")
|
||||
@KeySequence("user_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserInfoDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
// @TableId(type = IdType.INPUT)
|
||||
private String idCard;
|
||||
/**
|
||||
* 车主姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.vehiclerenewalrecord;
|
||||
|
||||
import lombok.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 固定车续费记录 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("fixed_vehicle_renewal_record")
|
||||
@KeySequence("fixed_vehicle_renewal_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class VehicleRenewalRecordDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 续费订单号
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 场库编号
|
||||
*/
|
||||
private String parkNumber;
|
||||
/**
|
||||
* 接口名称
|
||||
*/
|
||||
private String method;
|
||||
/**
|
||||
* 车牌
|
||||
*/
|
||||
private String plate;
|
||||
/**
|
||||
* 固定车组名称
|
||||
*/
|
||||
private String carGroupName;
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private String payTime;
|
||||
/**
|
||||
* 续费金额
|
||||
*/
|
||||
private String payCharge;
|
||||
/**
|
||||
* 车位号
|
||||
*/
|
||||
private Integer number;
|
||||
/**
|
||||
* 续费时长
|
||||
*/
|
||||
private String feeMonth;
|
||||
/**
|
||||
* 过期日期
|
||||
*/
|
||||
private String end;
|
||||
/**
|
||||
* 车主名称
|
||||
*/
|
||||
private String carOwnerName;
|
||||
/**
|
||||
* 支付类型
|
||||
*
|
||||
* 枚举 {@link TODO pay_type 对应的类}
|
||||
*/
|
||||
private String payType;
|
||||
/**
|
||||
* 支付流水号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
|
||||
private List<VehicleRenewalRecordDO> datas;
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.warning;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 告警记录 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("device_warning")
|
||||
@KeySequence("device_warning_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WarningDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 表自增 id
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 场库编号
|
||||
*/
|
||||
private String parkNumber;
|
||||
/**
|
||||
* 停车区域
|
||||
*/
|
||||
private String areaCode;
|
||||
/**
|
||||
* 车位编码
|
||||
*/
|
||||
private String portCode;
|
||||
/**
|
||||
* 告警对象 Id
|
||||
*/
|
||||
private String objectId;
|
||||
/**
|
||||
* 告警对象编码
|
||||
*/
|
||||
private String objectCode;
|
||||
/**
|
||||
* 告警对象名称
|
||||
*/
|
||||
private String objectName;
|
||||
/**
|
||||
* 告警对象类型
|
||||
*
|
||||
* 枚举 {@link TODO object_type 对应的类}
|
||||
*/
|
||||
private String objectType;
|
||||
/**
|
||||
* 告警时间
|
||||
*/
|
||||
private String warningTime;
|
||||
/**
|
||||
* 上报时间
|
||||
*/
|
||||
private String reportTime;
|
||||
/**
|
||||
* 告警类型
|
||||
*
|
||||
* 枚举 {@link TODO warning_type 对应的类}
|
||||
*/
|
||||
private String warningType;
|
||||
/**
|
||||
* 告警详情
|
||||
*/
|
||||
private String warningDetail;
|
||||
|
||||
private List<WarningDO> datas;
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.white;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 白名单管理 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("white")
|
||||
@KeySequence("white_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WhiteDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 白名单记录流水号
|
||||
*/
|
||||
@TableId
|
||||
private Integer fixedId;
|
||||
/**
|
||||
* 场库编号
|
||||
*/
|
||||
private String parkNumber;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String plate;
|
||||
/**
|
||||
* 收费类型
|
||||
*
|
||||
* 枚举 {@link TODO charge_type 对应的类}
|
||||
*/
|
||||
private String chargeType;
|
||||
/**
|
||||
* 身份证信息
|
||||
*/
|
||||
private String certificate;
|
||||
/**
|
||||
* 生效日期
|
||||
*/
|
||||
private String start;
|
||||
/**
|
||||
* 失效日期
|
||||
*/
|
||||
private String end;
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
private String dept;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
private String source;
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.areasandvalidity;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.areasandvalidity.AreasAndValidityDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 区域时间信息 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface AreasAndValidityMapper extends BaseMapperX<AreasAndValidityDO> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.carinfo;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 车辆信息 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface CarInfoMapper extends BaseMapperX<CarInfoDO> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.liftingrod;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.liftingrod.LiftingRodDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.liftingrod.vo.*;
|
||||
|
||||
/**
|
||||
* 远程抬杠日志 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface LiftingRodMapper extends BaseMapperX<LiftingRodDO> {
|
||||
|
||||
default PageResult<LiftingRodDO> selectPage(LiftingRodPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<LiftingRodDO>()
|
||||
.eqIfPresent(LiftingRodDO::getParkNumber, reqVO.getParkNumber())
|
||||
.eqIfPresent(LiftingRodDO::getPassagewayId, reqVO.getPassagewayId())
|
||||
.betweenIfPresent(LiftingRodDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(LiftingRodDO::getStatus, reqVO.getStatus())
|
||||
.orderByDesc(LiftingRodDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -6,8 +6,10 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.passageway.PassagewayDO;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.passageway.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 通道信息 Mapper
|
||||
@ -24,7 +26,10 @@ public interface PassagewayMapper extends BaseMapperX<PassagewayDO> {
|
||||
.eqIfPresent(PassagewayDO::getSourceAreaId, reqVO.getSourceAreaId())
|
||||
.eqIfPresent(PassagewayDO::getTargetAreaId, reqVO.getTargetAreaId())
|
||||
.betweenIfPresent(PassagewayDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(PassagewayDO::getPassagewayId));
|
||||
.eqIfPresent(PassagewayDO::getPassagewayId, reqVO.getPassagewayId())
|
||||
.orderByDesc(PassagewayDO::getId));
|
||||
}
|
||||
|
||||
@Delete("DELETE FROM `passageway` WHERE `park_number` = #{parkNumber}")
|
||||
int physicalDeleteByParkNumber(@Param("parkNumber") String parkNumber);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.userinfo;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.userinfo.UserInfoDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 车主信息 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserInfoMapper extends BaseMapperX<UserInfoDO> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.vehiclerenewalrecord;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.vehiclerenewalrecord.VehicleRenewalRecordDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo.*;
|
||||
|
||||
/**
|
||||
* 固定车续费记录 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface VehicleRenewalRecordMapper extends BaseMapperX<VehicleRenewalRecordDO> {
|
||||
|
||||
default PageResult<VehicleRenewalRecordDO> selectPage(VehicleRenewalRecordPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<VehicleRenewalRecordDO>()
|
||||
.eqIfPresent(VehicleRenewalRecordDO::getParkNumber, reqVO.getParkNumber())
|
||||
.eqIfPresent(VehicleRenewalRecordDO::getMethod, reqVO.getMethod())
|
||||
.eqIfPresent(VehicleRenewalRecordDO::getPlate, reqVO.getPlate())
|
||||
.likeIfPresent(VehicleRenewalRecordDO::getCarGroupName, reqVO.getCarGroupName())
|
||||
.betweenIfPresent(VehicleRenewalRecordDO::getPayTime, reqVO.getPayTime())
|
||||
.eqIfPresent(VehicleRenewalRecordDO::getPayCharge, reqVO.getPayCharge())
|
||||
.eqIfPresent(VehicleRenewalRecordDO::getNumber, reqVO.getNumber())
|
||||
.eqIfPresent(VehicleRenewalRecordDO::getFeeMonth, reqVO.getFeeMonth())
|
||||
.eqIfPresent(VehicleRenewalRecordDO::getEnd, reqVO.getEnd())
|
||||
.likeIfPresent(VehicleRenewalRecordDO::getCarOwnerName, reqVO.getCarOwnerName())
|
||||
.eqIfPresent(VehicleRenewalRecordDO::getPayType, reqVO.getPayType())
|
||||
.eqIfPresent(VehicleRenewalRecordDO::getOrderNo, reqVO.getOrderNo())
|
||||
.betweenIfPresent(VehicleRenewalRecordDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(VehicleRenewalRecordDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.warning;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.warning.WarningDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.warning.vo.*;
|
||||
|
||||
/**
|
||||
* 告警记录 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface WarningMapper extends BaseMapperX<WarningDO> {
|
||||
|
||||
default PageResult<WarningDO> selectPage(WarningPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<WarningDO>()
|
||||
.eqIfPresent(WarningDO::getParkNumber, reqVO.getParkNumber())
|
||||
.eqIfPresent(WarningDO::getAreaCode, reqVO.getAreaCode())
|
||||
.eqIfPresent(WarningDO::getPortCode, reqVO.getPortCode())
|
||||
.eqIfPresent(WarningDO::getObjectId, reqVO.getObjectId())
|
||||
.eqIfPresent(WarningDO::getObjectCode, reqVO.getObjectCode())
|
||||
.likeIfPresent(WarningDO::getObjectName, reqVO.getObjectName())
|
||||
.eqIfPresent(WarningDO::getObjectType, reqVO.getObjectType())
|
||||
.betweenIfPresent(WarningDO::getWarningTime, reqVO.getWarningTime())
|
||||
.betweenIfPresent(WarningDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(WarningDO::getWarningType, reqVO.getWarningType())
|
||||
.eqIfPresent(WarningDO::getWarningDetail, reqVO.getWarningDetail())
|
||||
.betweenIfPresent(WarningDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(WarningDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.white;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.white.WhiteDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.white.vo.*;
|
||||
|
||||
/**
|
||||
* 白名单管理 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface WhiteMapper extends BaseMapperX<WhiteDO> {
|
||||
|
||||
default PageResult<WhiteDO> selectPage(WhitePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<WhiteDO>()
|
||||
.eqIfPresent(WhiteDO::getParkNumber, reqVO.getParkNumber())
|
||||
.eqIfPresent(WhiteDO::getPlate, reqVO.getPlate())
|
||||
.eqIfPresent(WhiteDO::getChargeType, reqVO.getChargeType())
|
||||
.eqIfPresent(WhiteDO::getCertificate, reqVO.getCertificate())
|
||||
.eqIfPresent(WhiteDO::getStart, reqVO.getStart())
|
||||
.eqIfPresent(WhiteDO::getEnd, reqVO.getEnd())
|
||||
.eqIfPresent(WhiteDO::getDept, reqVO.getDept())
|
||||
.eqIfPresent(WhiteDO::getMemo, reqVO.getMemo())
|
||||
.eqIfPresent(WhiteDO::getSource, reqVO.getSource())
|
||||
.betweenIfPresent(WhiteDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(WhiteDO::getFixedId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.iocoder.yudao.module.parking.service.areasandvalidity;
|
||||
|
||||
|
||||
/**
|
||||
* 区域时间信息 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface AreasAndValidityService {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.parking.service.areasandvalidity;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.areasandvalidity.AreasAndValidityMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* 区域时间信息 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class AreasAndValidityServiceImpl implements AreasAndValidityService {
|
||||
|
||||
@Resource
|
||||
private AreasAndValidityMapper andValidityMapper;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.iocoder.yudao.module.parking.service.carinfo;
|
||||
|
||||
|
||||
/**
|
||||
* 车辆信息 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface CarInfoService {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.parking.service.carinfo;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.carinfo.CarInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 车辆信息 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class CarInfoServiceImpl implements CarInfoService {
|
||||
|
||||
@Resource
|
||||
private CarInfoMapper carInfoMapper;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.parking.service.liftingrod;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.liftingrod.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.liftingrod.LiftingRodDO;
|
||||
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 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface LiftingRodService {
|
||||
|
||||
/**
|
||||
* 创建远程抬杠日志
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createLiftingRod(@Valid LiftingRodSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新远程抬杠日志
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateLiftingRod(@Valid LiftingRodSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除远程抬杠日志
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteLiftingRod(Long id);
|
||||
|
||||
/**
|
||||
* 获得远程抬杠日志
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 远程抬杠日志
|
||||
*/
|
||||
LiftingRodDO getLiftingRod(Long id);
|
||||
|
||||
/**
|
||||
* 获得远程抬杠日志分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 远程抬杠日志分页
|
||||
*/
|
||||
PageResult<LiftingRodDO> getLiftingRodPage(LiftingRodPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 下发远程抬杠指令
|
||||
* @param liftingRodVo
|
||||
* @return cn.iocoder.yudao.module.parking.util.BlueCardResult
|
||||
*/
|
||||
BlueCardResult doLiftingRod(LiftingRodVo liftingRodVo);
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package cn.iocoder.yudao.module.parking.service.liftingrod;
|
||||
|
||||
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.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.liftingrod.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.liftingrod.LiftingRodDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.liftingrod.LiftingRodMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.parking.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 远程抬杠日志 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class LiftingRodServiceImpl implements LiftingRodService {
|
||||
|
||||
@Resource
|
||||
private LiftingRodMapper liftingRodMapper;
|
||||
|
||||
@Resource
|
||||
private BlueCarRequestUtil blueCarRequestUtil;
|
||||
@Override
|
||||
public Long createLiftingRod(LiftingRodSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
LiftingRodDO liftingRod = BeanUtils.toBean(createReqVO, LiftingRodDO.class);
|
||||
liftingRodMapper.insert(liftingRod);
|
||||
// 返回
|
||||
return liftingRod.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLiftingRod(LiftingRodSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateLiftingRodExists(updateReqVO.getId());
|
||||
// 更新
|
||||
LiftingRodDO updateObj = BeanUtils.toBean(updateReqVO, LiftingRodDO.class);
|
||||
liftingRodMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteLiftingRod(Long id) {
|
||||
// 校验存在
|
||||
validateLiftingRodExists(id);
|
||||
// 删除
|
||||
liftingRodMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateLiftingRodExists(Long id) {
|
||||
if (liftingRodMapper.selectById(id) == null) {
|
||||
throw exception(LIFTING_ROD_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LiftingRodDO getLiftingRod(Long id) {
|
||||
return liftingRodMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<LiftingRodDO> getLiftingRodPage(LiftingRodPageReqVO pageReqVO) {
|
||||
return liftingRodMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlueCardResult doLiftingRod(LiftingRodVo liftingRodVo) {
|
||||
// 下发抬杠指令
|
||||
CommonResult<String> stringCommonResult = blueCarRequestUtil.doBlueCarPost(liftingRodVo, "bcopenapi/out/RemoteLiftRod");
|
||||
LiftingRodDO liftingRod = new LiftingRodDO();
|
||||
liftingRod.setParkNumber(liftingRodVo.getParkNumber());
|
||||
liftingRod.setPassagewayId(liftingRodVo.getPassagewayId());
|
||||
//具体逻辑到联调时实现
|
||||
// liftingRod.setStatus();
|
||||
// 记录抬杠记录
|
||||
liftingRodMapper.insert(liftingRod);
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -21,7 +21,7 @@ public interface PassagewayService {
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createPassageway(@Valid PassagewaySaveReqVO createReqVO);
|
||||
Long createPassageway(@Valid PassagewaySaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新通道信息
|
||||
@ -35,7 +35,7 @@ public interface PassagewayService {
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePassageway(String id);
|
||||
void deletePassageway(Long id);
|
||||
|
||||
/**
|
||||
* 获得通道信息
|
||||
@ -43,7 +43,7 @@ public interface PassagewayService {
|
||||
* @param id 编号
|
||||
* @return 通道信息
|
||||
*/
|
||||
PassagewayDO getPassageway(String id);
|
||||
PassagewayDO getPassageway(Long id);
|
||||
|
||||
/**
|
||||
* 获得通道信息分页
|
||||
|
@ -31,39 +31,39 @@ public class PassagewayServiceImpl implements PassagewayService {
|
||||
private PassagewayMapper passagewayMapper;
|
||||
|
||||
@Override
|
||||
public String createPassageway(PassagewaySaveReqVO createReqVO) {
|
||||
public Long createPassageway(PassagewaySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
PassagewayDO passageway = BeanUtils.toBean(createReqVO, PassagewayDO.class);
|
||||
passagewayMapper.insert(passageway);
|
||||
// 返回
|
||||
return passageway.getPassagewayId();
|
||||
return passageway.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePassageway(PassagewaySaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validatePassagewayExists(updateReqVO.getPassagewayId());
|
||||
validatePassagewayExists(updateReqVO.getId());
|
||||
// 更新
|
||||
PassagewayDO updateObj = BeanUtils.toBean(updateReqVO, PassagewayDO.class);
|
||||
passagewayMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePassageway(String id) {
|
||||
public void deletePassageway(Long id) {
|
||||
// 校验存在
|
||||
validatePassagewayExists(id);
|
||||
// 删除
|
||||
passagewayMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validatePassagewayExists(String id) {
|
||||
private void validatePassagewayExists(Long id) {
|
||||
if (passagewayMapper.selectById(id) == null) {
|
||||
throw exception(PASSAGEWAY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PassagewayDO getPassageway(String id) {
|
||||
public PassagewayDO getPassageway(Long id) {
|
||||
return passagewayMapper.selectById(id);
|
||||
}
|
||||
|
||||
@ -75,7 +75,10 @@ public class PassagewayServiceImpl implements PassagewayService {
|
||||
@Override
|
||||
public BlueCardResult passagewayUpload(PassagewayReqDataVO passagewayReqDataVO) {
|
||||
List<PassagewaySaveReqVO> passagewaySaveReqVOList = passagewayReqDataVO.getDatas();
|
||||
// TODO 判断重复覆盖
|
||||
// 先物理删除对应场库编号的通道信息
|
||||
passagewayMapper.physicalDeleteByParkNumber(passagewayReqDataVO.getParkNumber());
|
||||
// 批量插入数据
|
||||
passagewayMapper.insertBatch(BeanUtils.toBean(passagewaySaveReqVOList, PassagewayDO.class));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
package cn.iocoder.yudao.module.parking.service.userinfo;
|
||||
|
||||
|
||||
/**
|
||||
* 车主信息 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface UserInfoService {
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.parking.service.userinfo;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.userinfo.UserInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 车主信息 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class UserInfoServiceImpl implements UserInfoService {
|
||||
|
||||
@Resource
|
||||
private UserInfoMapper userInfoMapper;
|
||||
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user