feat:初始化门禁
parent
5dadfc06f1
commit
d0b74ef993
|
|
@ -7,7 +7,7 @@ application:
|
|||
gateway: primeport
|
||||
cn-name: 一级口门管理
|
||||
server:
|
||||
port: 801
|
||||
port: 80
|
||||
debug: true
|
||||
|
||||
spring:
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
management:
|
||||
endpoints:
|
||||
web:
|
||||
base-path: /${application.gateway}${application.version}/actuator
|
||||
enabled-by-default: true
|
||||
endpoint:
|
||||
health:
|
||||
enabled: true
|
||||
info:
|
||||
enabled: false
|
||||
auditevents:
|
||||
enabled: false
|
||||
metrics:
|
||||
enabled: false
|
||||
loggers:
|
||||
enabled: false
|
||||
logfile:
|
||||
enabled: false
|
||||
httptrace:
|
||||
enabled: false
|
||||
env:
|
||||
enabled: false
|
||||
flyway:
|
||||
enabled: false
|
||||
liquidbase:
|
||||
enabled: false
|
||||
shutdown:
|
||||
enabled: false
|
||||
mappings:
|
||||
enabled: false
|
||||
scheduledtasks:
|
||||
enabled: false
|
||||
threaddump:
|
||||
enabled: false
|
||||
heapdump:
|
||||
enabled: false
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
spring:
|
||||
cache:
|
||||
redis:
|
||||
time-to-live: 1800s
|
||||
|
||||
|
||||
# 二级缓存配置
|
||||
# 注:caffeine 不适用于数据量大,并且缓存命中率极低的业务场景,如用户维度的缓存。请慎重选择。
|
||||
l2cache:
|
||||
config:
|
||||
# 是否存储空值,默认true,防止缓存穿透
|
||||
allowNullValues: true
|
||||
# 组合缓存配置
|
||||
composite:
|
||||
# 是否全部启用一级缓存,默认false
|
||||
l1AllOpen: false
|
||||
# 一级缓存
|
||||
caffeine:
|
||||
# 是否自动刷新过期缓存 true 是 false 否
|
||||
autoRefreshExpireCache: false
|
||||
# 缓存刷新调度线程池的大小
|
||||
refreshPoolSize: 2
|
||||
# 缓存刷新的频率(秒)
|
||||
refreshPeriod: 10
|
||||
# 写入后过期时间(秒)
|
||||
expireAfterWrite: 180
|
||||
# 访问后过期时间(秒)
|
||||
expireAfterAccess: 180
|
||||
# 初始化大小
|
||||
initialCapacity: 1
|
||||
# 最大缓存对象个数,超过此数量时之前放入的缓存将失效
|
||||
maximumSize: 3
|
||||
|
||||
# 二级缓存
|
||||
redis:
|
||||
# 全局过期时间,单位毫秒,默认不过期
|
||||
defaultExpiration: 1800000
|
||||
# 缓存更新时通知其他节点的topic名称 默认 cache:redis:caffeine:topic
|
||||
topic: cache:redis:caffeine:topic
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
common:
|
||||
mysql:
|
||||
host: 192.168.2.166
|
||||
port: 3306
|
||||
username: root
|
||||
password: root
|
||||
redis:
|
||||
host: 10.43.253.4
|
||||
password: jjb123456
|
||||
port: 6379
|
||||
mq:
|
||||
host: 10.43.163.23:9876
|
||||
xxl-job:
|
||||
address: http://10.43.98.135:8080/xxl-job-admin/
|
||||
username: admin
|
||||
password: jjb123456
|
||||
gateway:
|
||||
network:
|
||||
http:
|
||||
#网关的外网访问地址 必须配置为HTTPS协议
|
||||
external: https://testdragon.cqjjb.cn
|
||||
#网关的内网访问地址 固定配置为http://jjb-saas-gateway
|
||||
intranet: http://10.43.250.65
|
||||
wx:
|
||||
#webSocket外网地址
|
||||
external: wx://testdragon.cqjjb.cn
|
||||
swagger:
|
||||
#是否打开swagger 测试及UAT配置为true,生产环境配置为false
|
||||
enabled: true
|
||||
base:
|
||||
# base应用访问外网访问地址
|
||||
host-url: http://10.43.12.158
|
||||
desk:
|
||||
# desk工程的外网地址
|
||||
host-url: http://10.43.12.158
|
||||
login:
|
||||
# login工程的外网访问地址
|
||||
host-url: http://10.43.12.158
|
||||
|
||||
#所有的前端域名配置 避免iframe跨域
|
||||
x-frame-options: ${common.desk.host-url}/ ${common.login.host-url}/ ${common.base.host-url}/ ${common.gateway.network.http.external}/ http://10.43.250.65/
|
||||
|
||||
k8s:
|
||||
namespace: test-dragon
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# JOB 配置
|
||||
xxl-job:
|
||||
admin:
|
||||
address: ${common.xxl-job.address}
|
||||
username: ${common.xxl-job.username}
|
||||
password: ${common.xxl-job.password}
|
||||
executor:
|
||||
app-name: ${spring.application.name}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
common:
|
||||
log:
|
||||
jjb-saas-system:
|
||||
- com.jjb:info
|
||||
jjb-saas-auth1:
|
||||
- com.jjb:info
|
||||
jjb-saas-user:
|
||||
- com.jjb:info
|
||||
gray:
|
||||
log:
|
||||
host: 192.168.1.1
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
mq:
|
||||
topic: springcloudStream-jjb-dragon-test
|
||||
server: ${common.mq.host}
|
||||
spring:
|
||||
cloud:
|
||||
stream:
|
||||
bindings:
|
||||
input:
|
||||
destination: springcloudStream-jjb-dragon-test
|
||||
group: ${spring.application.name}-${spring.profiles.active}
|
||||
output:
|
||||
destination: springcloudStream-jjb-dragon-test
|
||||
group: ${spring.application.name}-${spring.profiles.active}
|
||||
rocketmq:
|
||||
binder:
|
||||
name-server: ${common.mq.host}
|
||||
group: ${spring.application.name}-${spring.profiles.active}
|
||||
bindings:
|
||||
input:
|
||||
consumer:
|
||||
tags: a
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
mybatis-plus:
|
||||
mapper-locations: classpath*:mapper/*.xml,classpath*:mapper/**/*Mapper.xml
|
||||
type-handlers-package: com.jjb.saas.framework.datascope.handler
|
||||
global-config:
|
||||
banner: false
|
||||
db-config:
|
||||
id-type: assign_id
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
mysql:
|
||||
db: ${spring.application.name}
|
||||
spring:
|
||||
shardingsphere:
|
||||
druid:
|
||||
username: admin
|
||||
password: jjb123456
|
||||
allows:
|
||||
denys:
|
||||
props:
|
||||
sql:
|
||||
show: true
|
||||
enabled: true
|
||||
masterslave:
|
||||
name: ms # 名字,任意,需要保证唯一
|
||||
master-data-source-name: master # 主库数据源
|
||||
slave-data-source-names: slave-1 # 从库数据源
|
||||
datasource:
|
||||
names: master,slave-1
|
||||
master:
|
||||
#url: jdbc:mysql://10.43.123.226:3306/${spring.application.name}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://${common.mysql.host}:${common.mysql.port}/${mysql.db}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: ${common.mysql.username}
|
||||
password: ${common.mysql.password}
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
initial-size: 6
|
||||
min-idle: 4
|
||||
maxActive: 40
|
||||
# 配置获取连接等待超时的时间
|
||||
maxWait: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
#Oracle需要打开注释
|
||||
#validationQuery: SELECT 1 FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||
poolPreparedStatements: true
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
||||
filters: slf4j
|
||||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
wall:
|
||||
multi-statement-allow: true
|
||||
slave-1:
|
||||
# url: jdbc:mysql://10.43.123.226:3306/${spring.application.name}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://${common.mysql.host}:${common.mysql.port}/${mysql.db}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: ${common.mysql.username}
|
||||
password: ${common.mysql.password}
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
initial-size: 6
|
||||
min-idle: 4
|
||||
maxActive: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
maxWait: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
#Oracle需要打开注释
|
||||
#validationQuery: SELECT 1 FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||
poolPreparedStatements: true
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙,stat已去掉
|
||||
filters: slf4j
|
||||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
wall:
|
||||
multi-statement-allow: true
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
server:
|
||||
port: 801
|
||||
debug: true
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
spring:
|
||||
redis:
|
||||
host: ${common.redis.host}
|
||||
password: ${common.redis.password}
|
||||
port: ${common.redis.port}
|
||||
timeout: 15000
|
||||
database: 0
|
||||
prefix: dragon
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 600
|
||||
max-idle: 300
|
||||
max-wait: 15000
|
||||
min-idle: 10
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
sdk:
|
||||
server:
|
||||
symmetry-url: jjb-saas-application/application/applications/server/secure/
|
||||
app-key: jjb-saas-dragon
|
||||
client:
|
||||
security:
|
||||
gateway: ${gateway.network.http.external}
|
||||
appKey: ${sdk.client.app-key}
|
||||
desensitization:
|
||||
symmetric-key: 1234567887654321
|
||||
logging:
|
||||
gateway: ${sdk.client.security.gateway}
|
||||
appKey: ${sdk.client.security.app-key}
|
||||
clientLoggingEnable: true
|
||||
level: debug
|
||||
username: user
|
||||
password: 123456
|
||||
showConsoleLog: true
|
||||
formatConsoleLogJson: true
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
spring:
|
||||
zipkin:
|
||||
#zipkin服务所在地址
|
||||
base-url: http://jjb-saas-zipkin/
|
||||
sender:
|
||||
type: web #使用http的方式传输数据
|
||||
#配置采样百分比
|
||||
sleuth:
|
||||
sampler:
|
||||
probability: 1 # 将采样比例设置为 1.0,也就是全部都需要。默认是0.1也就是10%,一般情况下,10%就够用了
|
||||
web:
|
||||
resources:
|
||||
cache:
|
||||
cachecontrol:
|
||||
no-store: false
|
||||
max-age: 10000
|
||||
no-cache: false
|
||||
autoconfigure:
|
||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
messages:
|
||||
basename: i18n.message
|
||||
encoding: UTF-8
|
||||
flyway:
|
||||
# 是否启用flyway
|
||||
enabled: true
|
||||
# 编码格式,默认UTF-8
|
||||
encoding: UTF-8
|
||||
# 迁移sql脚本文件存放路径,默认db/migration
|
||||
locations: classpath:db/migration
|
||||
# 迁移sql脚本文件名称的前缀,默认V
|
||||
sql-migration-prefix: V
|
||||
# 迁移sql脚本文件名称的分隔符,默认2个下划线__
|
||||
sql-migration-separator: __
|
||||
# 迁移sql脚本文件名称的后缀
|
||||
sql-migration-suffixes: .sql
|
||||
# 迁移时是否进行校验,默认true
|
||||
validate-on-migrate: true
|
||||
# 当迁移发现数据库非空且存在没有元数据的表时,自动执行基准迁移,新建schema_version表
|
||||
baseline-on-migrate: true
|
||||
server:
|
||||
tomcat:
|
||||
max-http-post-size: 200MB
|
||||
connection-timeout: 180000
|
||||
fastjson:
|
||||
parser:
|
||||
safeMode: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ANT_PATH_MATCHER
|
||||
thymeleaf:
|
||||
prefix: classpath:/templates/
|
||||
cache: false
|
||||
dubbo:
|
||||
application:
|
||||
name: ${spring.application.name}
|
||||
registry:
|
||||
timeout: 20000
|
||||
address: nacos://${spring.cloud.nacos.config.server-addr}?namespace=${spring.cloud.nacos.config.namespace}-facade
|
||||
check: false
|
||||
filter: providerContextFilter
|
||||
protocol:
|
||||
port: -1
|
||||
name: dubbo
|
||||
consumer:
|
||||
timeout: 20000
|
||||
check: false
|
||||
filter: consumerContextFilter
|
||||
logging:
|
||||
config: classpath:jjb-saas-logback-spring.xml
|
||||
level:
|
||||
com.alibaba.nacos.client.naming: OFF
|
||||
com.alibaba.nacos.client.config.impl: OFF
|
||||
com.alibaba.nacos.common.remote.client: OFF
|
||||
|
||||
datapermssion:
|
||||
tenantcondition:
|
||||
defaultversion: NEWERSION
|
||||
|
||||
easy-retry:
|
||||
server:
|
||||
host: http://jjb-saas-config
|
||||
port: 1788
|
||||
|
||||
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
sdk:
|
||||
client:
|
||||
app-key: e6ab3c9abda747b39d7cc12b6dc0f5a0
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.intranet}
|
||||
swagger:
|
||||
enabled: ${common.swagger.enabled}
|
||||
title: 例子
|
||||
description: 这是例子项目
|
||||
version: ${application.version}
|
||||
group-name: 例子
|
||||
springfox:
|
||||
documentation:
|
||||
swagger-ui:
|
||||
base-url: ${application.gateway}
|
||||
swagger:
|
||||
v2:
|
||||
path: /${application.gateway}/v2/api-docs
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.EmployeeMessageServiceI;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageAddCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessagePageQry;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateStatusCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.EmployeeMessageCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
/**
|
||||
* web-adapter
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Api(tags = "用户的进入一级口门的信息")
|
||||
@RequestMapping("/${application.gateway}/employeeMessage")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageController {
|
||||
private final EmployeeMessageServiceI employeeMessageService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<EmployeeMessageCO> add(@Validated @RequestBody EmployeeMessageAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return employeeMessageService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<EmployeeMessageCO> page(@RequestBody EmployeeMessagePageQry qry) {
|
||||
return employeeMessageService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<EmployeeMessageCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<EmployeeMessageCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<EmployeeMessageCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(employeeMessageService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
employeeMessageService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
employeeMessageService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody EmployeeMessageUpdateCmd employeeMessageUpdateCmd) {
|
||||
employeeMessageService.edit(employeeMessageUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("更新状态")
|
||||
@PutMapping("/updateStatus")
|
||||
public SingleResponse updateStatus(@Validated @RequestBody EmployeeMessageUpdateStatusCmd cmd) {
|
||||
employeeMessageService.updateStatus(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.EnclosedAreaServiceI;
|
||||
import com.zcloud.primeport.dto.EnclosedAreaAddCmd;
|
||||
import com.zcloud.primeport.dto.EnclosedAreaPageQry;
|
||||
import com.zcloud.primeport.dto.EnclosedAreaUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.EnclosedAreaCO;
|
||||
import com.zcloud.primeport.dto.clientobject.EnclosedAreaTreeCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-12-12 16:49:31
|
||||
*/
|
||||
@Api(tags = "封闭区域")
|
||||
@RequestMapping("/${application.gateway}/enclosedArea")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class EnclosedAreaController {
|
||||
private final EnclosedAreaServiceI enclosedAreaService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<EnclosedAreaCO> add(@Validated @RequestBody EnclosedAreaAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
cmd.setCorpinfoId(ssoUser.getTenantId());
|
||||
cmd.setCorpinfoName(ssoUser.getTenantName());
|
||||
return enclosedAreaService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<EnclosedAreaCO> page(@RequestBody EnclosedAreaPageQry qry) {
|
||||
return enclosedAreaService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<EnclosedAreaCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<EnclosedAreaCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAllTree")
|
||||
public MultiResponse<EnclosedAreaTreeCO> listAllTree() {
|
||||
return MultiResponse.of(enclosedAreaService.listAllTree());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<EnclosedAreaCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(enclosedAreaService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
enclosedAreaService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
enclosedAreaService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody EnclosedAreaUpdateCmd enclosedAreaUpdateCmd) {
|
||||
enclosedAreaService.edit(enclosedAreaUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.primeport.api.GatePersonAuthLevelOneServiceI;
|
||||
import com.zcloud.primeport.dto.GatePersonAuthLevelOneAddCmd;
|
||||
import com.zcloud.primeport.dto.GatePersonAuthLevelOnePageQry;
|
||||
import com.zcloud.primeport.dto.GatePersonAuthLevelOneUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.GatePersonAuthLevelOneCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author dearLin
|
||||
* @Date 2025-12-31 10:51:44
|
||||
*/
|
||||
@Api(tags = "进出港信息管理-人员及车辆")
|
||||
@RequestMapping("/${application.gateway}/gatePersonAuthLevelOne")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class GatePersonAuthLevelOneController {
|
||||
private final GatePersonAuthLevelOneServiceI gatePersonAuthLevelOneService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<GatePersonAuthLevelOneCO> add(@Validated @RequestBody GatePersonAuthLevelOneAddCmd cmd) {
|
||||
return gatePersonAuthLevelOneService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@GetMapping("/list")
|
||||
public PageResponse<GatePersonAuthLevelOneCO> page(GatePersonAuthLevelOnePageQry qry) {
|
||||
return gatePersonAuthLevelOneService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("人员进出记录")
|
||||
@GetMapping("/personnelEntryAndExitRecords")
|
||||
public PageResponse<GatePersonAuthLevelOneCO> personnelEntryAndExitRecords(GatePersonAuthLevelOnePageQry qry) {
|
||||
return gatePersonAuthLevelOneService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<GatePersonAuthLevelOneCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(gatePersonAuthLevelOneService.getInfoById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
gatePersonAuthLevelOneService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody GatePersonAuthLevelOneUpdateCmd gatePersonAuthLevelOneUpdateCmd) {
|
||||
gatePersonAuthLevelOneService.edit(gatePersonAuthLevelOneUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.InspectionDeptServiceI;
|
||||
import com.zcloud.primeport.dto.InspectionDeptAddCmd;
|
||||
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
||||
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptInfoCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-20 15:24:07
|
||||
*/
|
||||
@Api(tags = "检查部门表")
|
||||
@RequestMapping("/${application.gateway}/inspectionDept")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class InspectionDeptController {
|
||||
private final InspectionDeptServiceI inspectionDeptService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<InspectionDeptCO> add(@Validated @RequestBody InspectionDeptAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return inspectionDeptService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<InspectionDeptCO> page(@RequestBody InspectionDeptPageQry qry) {
|
||||
return inspectionDeptService.listPage(qry);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<InspectionDeptInfoCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(inspectionDeptService.getInfoById( id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
inspectionDeptService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody InspectionDeptUpdateCmd inspectionDeptUpdateCmd) {
|
||||
inspectionDeptService.edit(inspectionDeptUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.InspectionVehicleServiceI;
|
||||
import com.zcloud.primeport.dto.InspectionVehicleAddCmd;
|
||||
import com.zcloud.primeport.dto.InspectionVehiclePageQry;
|
||||
import com.zcloud.primeport.dto.InspectionVehicleUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.InspectionVehicleCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-20 15:25:20
|
||||
*/
|
||||
@Api(tags = "检查部门对应车辆表")
|
||||
@RequestMapping("/${application.gateway}/inspectionVehicle")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class InspectionVehicleController {
|
||||
private final InspectionVehicleServiceI inspectionVehicleService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<InspectionVehicleCO> add(@Validated @RequestBody InspectionVehicleAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return inspectionVehicleService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<InspectionVehicleCO> page(@RequestBody InspectionVehiclePageQry qry) {
|
||||
return inspectionVehicleService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<InspectionVehicleCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<InspectionVehicleCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<InspectionVehicleCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new InspectionVehicleCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
inspectionVehicleService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
inspectionVehicleService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody InspectionVehicleUpdateCmd inspectionVehicleUpdateCmd) {
|
||||
inspectionVehicleService.edit(inspectionVehicleUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
|
|
@ -9,28 +10,22 @@ import com.jjb.saas.framework.auth.utils.AuthContext;
|
|||
import com.zcloud.primeport.api.MkmjApprovalUserServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjApprovalUserAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjApprovalUserPageQry;
|
||||
import com.zcloud.primeport.dto.MkmjApprovalUserQry;
|
||||
import com.zcloud.primeport.dto.MkmjApprovalUserUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjApprovalUserCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-14 10:09:22
|
||||
*/
|
||||
* web-adapter
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:16
|
||||
*/
|
||||
@Api(tags = "一级口门门禁审批人")
|
||||
@RequestMapping("/${application.gateway}/mkmjApprovalUser")
|
||||
@RestController
|
||||
|
|
@ -41,27 +36,27 @@ public class MkmjApprovalUserController {
|
|||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<MkmjApprovalUserCO> add(@Validated @RequestBody MkmjApprovalUserAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return mkmjApprovalUserService.add(cmd);
|
||||
}
|
||||
@ApiOperation("审批人列表-根据部门查询")
|
||||
@GetMapping("/listDeptUser")
|
||||
public MultiResponse<MkmjApprovalUserCO> listDeptUser(MkmjApprovalUserQry qry) {
|
||||
return mkmjApprovalUserService.listDeptUser(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@GetMapping("/list")
|
||||
public PageResponse<MkmjApprovalUserCO> page(MkmjApprovalUserPageQry qry) {
|
||||
@PostMapping("/list")
|
||||
public PageResponse<MkmjApprovalUserCO> page(@RequestBody MkmjApprovalUserPageQry qry) {
|
||||
return mkmjApprovalUserService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjApprovalUserCO> listAll(MkmjApprovalUserPageQry qry) {
|
||||
List<MkmjApprovalUserCO> mkmjApprovalUserCOS = mkmjApprovalUserService.listAll(qry);
|
||||
return MultiResponse.of(mkmjApprovalUserCOS);
|
||||
public MultiResponse<MkmjApprovalUserCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjApprovalUserCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjApprovalUserCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new MkmjApprovalUserCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
|
|
@ -69,11 +64,18 @@ public class MkmjApprovalUserController {
|
|||
mkmjApprovalUserService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
@GetMapping("/getDataSource")
|
||||
public Response getDataSource() {
|
||||
Map<String, DataSource> dataSources = applicationContext.getBeansOfType(DataSource.class);
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
mkmjApprovalUserService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjApprovalUserUpdateCmd mkmjApprovalUserUpdateCmd) {
|
||||
mkmjApprovalUserService.edit(mkmjApprovalUserUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,95 +0,0 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.zcloud.primeport.api.MkmjAreaServiceI;
|
||||
import com.zcloud.primeport.domain.model.MkmjStatisticsE;
|
||||
import com.zcloud.primeport.dto.MkmjAreaAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjAreaPageQry;
|
||||
import com.zcloud.primeport.dto.MkmjAreaUpdateCmd;
|
||||
import com.zcloud.primeport.dto.StatisticsByAreaCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjAreaCO;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjStatisticsCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:41
|
||||
*/
|
||||
@Api(tags = "门口门禁区域表")
|
||||
@RequestMapping("/${application.gateway}/mkmjArea")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class MkmjAreaController {
|
||||
private final MkmjAreaServiceI mkmjAreaService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<MkmjAreaCO> add(@Validated @RequestBody MkmjAreaAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if(ObjectUtil.isEmpty(cmd.getCorpinfoId())){
|
||||
cmd.setCorpinfoId(ssoUser.getTenantId());
|
||||
cmd.setCorpinfoName(ssoUser.getTenantName());
|
||||
}
|
||||
return mkmjAreaService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<MkmjAreaCO> page(@RequestBody MkmjAreaPageQry qry) {
|
||||
return mkmjAreaService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjAreaCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjAreaCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjAreaCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(mkmjAreaService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
mkmjAreaService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
mkmjAreaService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjAreaUpdateCmd mkmjAreaUpdateCmd) {
|
||||
mkmjAreaService.edit(mkmjAreaUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("统计")
|
||||
@PostMapping("/statistics")
|
||||
public MultiResponse<MkmjStatisticsCO> statistics(@RequestBody StatisticsByAreaCmd qry) {
|
||||
return MultiResponse.of(mkmjAreaService.statistics(qry.getIds()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.MkmjServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjPageQry;
|
||||
import com.zcloud.primeport.dto.MkmjUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:15
|
||||
*/
|
||||
@Api(tags = "门口信息管理表")
|
||||
@RequestMapping("/${application.gateway}/mkmj")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class MkmjController {
|
||||
private final MkmjServiceI mkmjService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<MkmjCO> add(@Validated @RequestBody MkmjAddCmd cmd) {
|
||||
return mkmjService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<MkmjCO> page(@RequestBody MkmjPageQry qry) {
|
||||
return mkmjService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(mkmjService.getInfoById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
mkmjService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
// @ApiOperation("删除多个")
|
||||
// @DeleteMapping("/ids")
|
||||
// public Response removeBatch(@RequestParam String ids) {
|
||||
// mkmjService.removeBatch(ids);
|
||||
// return SingleResponse.buildSuccess();
|
||||
// }
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjUpdateCmd mkmjUpdateCmd) {
|
||||
mkmjService.edit(mkmjUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.zcloud.primeport.api.MkmjGateVideoServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjGateVideoAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjGateVideoPageQry;
|
||||
import com.zcloud.primeport.dto.MkmjGateVideoUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjGateVideoCO;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.MkmjGateServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjGateAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjGatePageQry;
|
||||
import com.zcloud.primeport.dto.MkmjGateUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjGateCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -23,59 +23,59 @@ import java.util.ArrayList;
|
|||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:44
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:17
|
||||
*/
|
||||
@Api(tags = "门口门禁闸机摄像头表")
|
||||
@RequestMapping("/${application.gateway}/mkmjGateVideo")
|
||||
@Api(tags = "门口闸机表")
|
||||
@RequestMapping("/${application.gateway}/mkmjGate")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class MkmjGateVideoController {
|
||||
private final MkmjGateVideoServiceI mkmjGateVideoService;
|
||||
public class MkmjGateController {
|
||||
private final MkmjGateServiceI mkmjGateService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<MkmjGateVideoCO> add(@Validated @RequestBody MkmjGateVideoAddCmd cmd) {
|
||||
public SingleResponse<MkmjGateCO> add(@Validated @RequestBody MkmjGateAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return mkmjGateVideoService.add(cmd);
|
||||
return mkmjGateService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<MkmjGateVideoCO> page(@RequestBody MkmjGateVideoPageQry qry) {
|
||||
return mkmjGateVideoService.listPage(qry);
|
||||
public PageResponse<MkmjGateCO> page(@RequestBody MkmjGatePageQry qry) {
|
||||
return mkmjGateService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjGateVideoCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjGateVideoCO>());
|
||||
public MultiResponse<MkmjGateCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjGateCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjGateVideoCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(mkmjGateVideoService.queryById(id));
|
||||
public SingleResponse<MkmjGateCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new MkmjGateCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
mkmjGateVideoService.remove(id);
|
||||
mkmjGateService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
mkmjGateVideoService.removeBatch(ids);
|
||||
mkmjGateService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjGateVideoUpdateCmd mkmjGateVideoUpdateCmd) {
|
||||
mkmjGateVideoService.edit(mkmjGateVideoUpdateCmd);
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjGateUpdateCmd mkmjGateUpdateCmd) {
|
||||
mkmjGateService.edit(mkmjGateUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +1,17 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.zcloud.primeport.api.MkmjPassageServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjPassageAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjPassagePageQry;
|
||||
import com.zcloud.primeport.dto.MkmjPassageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.StatisticsByAreaCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjPassageCO;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjStatisticsCO;
|
||||
import com.zcloud.primeport.api.MkmjPassageServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjPassageAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjPassagePageQry;
|
||||
import com.zcloud.primeport.dto.MkmjPassageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjPassageCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -25,8 +23,8 @@ import java.util.ArrayList;
|
|||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:45
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Api(tags = "口门门禁通道表")
|
||||
@RequestMapping("/${application.gateway}/mkmjPassage")
|
||||
|
|
@ -38,7 +36,6 @@ public class MkmjPassageController {
|
|||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<MkmjPassageCO> add(@Validated @RequestBody MkmjPassageAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return mkmjPassageService.add(cmd);
|
||||
}
|
||||
|
||||
|
|
@ -57,12 +54,7 @@ public class MkmjPassageController {
|
|||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjPassageCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(mkmjPassageService.queryById(id));
|
||||
}
|
||||
@ApiOperation("是否重名")
|
||||
@GetMapping("/hasName/{name}")
|
||||
public SingleResponse<MkmjPassageCO> hasName(@PathVariable("name") String name) {
|
||||
return SingleResponse.of(mkmjPassageService.queryByName(name));
|
||||
return SingleResponse.of(new MkmjPassageCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
|
|
@ -85,11 +77,5 @@ public class MkmjPassageController {
|
|||
mkmjPassageService.edit(mkmjPassageUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("统计")
|
||||
@PostMapping("/statistics")
|
||||
public MultiResponse<MkmjStatisticsCO> statistics(@RequestBody StatisticsByAreaCmd qry) {
|
||||
return MultiResponse.of(mkmjPassageService.statistics(qry.getIds()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,82 +0,0 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.MkmjSwipeCardRecordServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjSwipeCardRecordAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjSwipeCardRecordPageQry;
|
||||
import com.zcloud.primeport.dto.MkmjSwipeCardRecordUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjSwipeCardRecordCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-17 13:42:10
|
||||
*/
|
||||
@Api(tags = "")
|
||||
@RequestMapping("/${application.gateway}/mkmjSwipeCardRecord")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class MkmjSwipeCardRecordController {
|
||||
private final MkmjSwipeCardRecordServiceI mkmjSwipeCardRecordService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<MkmjSwipeCardRecordCO> add(@Validated @RequestBody MkmjSwipeCardRecordAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return mkmjSwipeCardRecordService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<MkmjSwipeCardRecordCO> page(@RequestBody MkmjSwipeCardRecordPageQry qry) {
|
||||
return mkmjSwipeCardRecordService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjSwipeCardRecordCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjSwipeCardRecordCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjSwipeCardRecordCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(mkmjSwipeCardRecordService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
mkmjSwipeCardRecordService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
mkmjSwipeCardRecordService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjSwipeCardRecordUpdateCmd mkmjSwipeCardRecordUpdateCmd) {
|
||||
mkmjSwipeCardRecordService.edit(mkmjSwipeCardRecordUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.PersonApplyServiceI;
|
||||
import com.zcloud.primeport.dto.PersonApplyAddCmd;
|
||||
import com.zcloud.primeport.dto.PersonApplyPageQry;
|
||||
import com.zcloud.primeport.dto.PersonApplyUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.PersonApplyCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:21
|
||||
*/
|
||||
@Api(tags = "人员申请审批信息")
|
||||
@RequestMapping("/${application.gateway}/personApply")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class PersonApplyController {
|
||||
private final PersonApplyServiceI personApplyService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<PersonApplyCO> add(@Validated @RequestBody PersonApplyAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return personApplyService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<PersonApplyCO> page(@RequestBody PersonApplyPageQry qry) {
|
||||
return personApplyService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<PersonApplyCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<PersonApplyCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<PersonApplyCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new PersonApplyCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
personApplyService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
personApplyService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody PersonApplyUpdateCmd personApplyUpdateCmd) {
|
||||
personApplyService.edit(personApplyUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7,11 +7,11 @@ import com.alibaba.cola.dto.Response;
|
|||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.MkmjCarRecordServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjCarRecordAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjCarRecordPageQry;
|
||||
import com.zcloud.primeport.dto.MkmjCarRecordUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjCarRecordCO;
|
||||
import com.zcloud.primeport.api.PersonMessageServiceI;
|
||||
import com.zcloud.primeport.dto.PersonMessageAddCmd;
|
||||
import com.zcloud.primeport.dto.PersonMessagePageQry;
|
||||
import com.zcloud.primeport.dto.PersonMessageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.PersonMessageCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -23,59 +23,59 @@ import java.util.ArrayList;
|
|||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-17 13:42:09
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:20
|
||||
*/
|
||||
@Api(tags = "车辆进出港记录")
|
||||
@RequestMapping("/${application.gateway}/mkmjCarRecord")
|
||||
@Api(tags = "审批通过的人员信息用于与门禁系统对接")
|
||||
@RequestMapping("/${application.gateway}/personMessage")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class MkmjCarRecordController {
|
||||
private final MkmjCarRecordServiceI mkmjCarRecordService;
|
||||
public class PersonMessageController {
|
||||
private final PersonMessageServiceI personMessageService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<MkmjCarRecordCO> add(@Validated @RequestBody MkmjCarRecordAddCmd cmd) {
|
||||
public SingleResponse<PersonMessageCO> add(@Validated @RequestBody PersonMessageAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return mkmjCarRecordService.add(cmd);
|
||||
return personMessageService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<MkmjCarRecordCO> page(@RequestBody MkmjCarRecordPageQry qry) {
|
||||
return mkmjCarRecordService.listPage(qry);
|
||||
public PageResponse<PersonMessageCO> page(@RequestBody PersonMessagePageQry qry) {
|
||||
return personMessageService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjCarRecordCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjCarRecordCO>());
|
||||
public MultiResponse<PersonMessageCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<PersonMessageCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjCarRecordCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(mkmjCarRecordService.queryById(id));
|
||||
public SingleResponse<PersonMessageCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new PersonMessageCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
mkmjCarRecordService.remove(id);
|
||||
personMessageService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
mkmjCarRecordService.removeBatch(ids);
|
||||
personMessageService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjCarRecordUpdateCmd mkmjCarRecordUpdateCmd) {
|
||||
mkmjCarRecordService.edit(mkmjCarRecordUpdateCmd);
|
||||
public SingleResponse edit(@Validated @RequestBody PersonMessageUpdateCmd personMessageUpdateCmd) {
|
||||
personMessageService.edit(personMessageUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.TemporaryAccessEntourageServiceI;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessEntourageAddCmd;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessEntouragePageQry;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessEntourageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.TemporaryAccessEntourageCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-24 08:50:15
|
||||
*/
|
||||
@Api(tags = "临时车辆的其他人员表.同行人员表")
|
||||
@RequestMapping("/${application.gateway}/temporaryAccessEntourage")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class TemporaryAccessEntourageController {
|
||||
private final TemporaryAccessEntourageServiceI temporaryAccessEntourageService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<TemporaryAccessEntourageCO> add(@Validated @RequestBody TemporaryAccessEntourageAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return temporaryAccessEntourageService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<TemporaryAccessEntourageCO> page(@RequestBody TemporaryAccessEntouragePageQry qry) {
|
||||
return temporaryAccessEntourageService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<TemporaryAccessEntourageCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<TemporaryAccessEntourageCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<TemporaryAccessEntourageCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(temporaryAccessEntourageService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
temporaryAccessEntourageService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
temporaryAccessEntourageService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody TemporaryAccessEntourageUpdateCmd temporaryAccessEntourageUpdateCmd) {
|
||||
temporaryAccessEntourageService.edit(temporaryAccessEntourageUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.zcloud.primeport.api.MkmjAreaGateServiceI;
|
||||
import com.zcloud.primeport.dto.MkmjAreaGateAddCmd;
|
||||
import com.zcloud.primeport.dto.MkmjAreaGatePageQry;
|
||||
import com.zcloud.primeport.dto.MkmjAreaGateUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.MkmjAreaGateCO;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.VehicleApplyServiceI;
|
||||
import com.zcloud.primeport.dto.VehicleApplyAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleApplyPageQry;
|
||||
import com.zcloud.primeport.dto.VehicleApplyUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleApplyCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -23,59 +23,59 @@ import java.util.ArrayList;
|
|||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:43
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:23
|
||||
*/
|
||||
@Api(tags = "门口门禁区域闸机表")
|
||||
@RequestMapping("/${application.gateway}/mkmjAreaGate")
|
||||
@Api(tags = "车辆申请审批信息")
|
||||
@RequestMapping("/${application.gateway}/vehicleApply")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class MkmjAreaGateController {
|
||||
private final MkmjAreaGateServiceI mkmjAreaGateService;
|
||||
public class VehicleApplyController {
|
||||
private final VehicleApplyServiceI vehicleApplyService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<MkmjAreaGateCO> add(@Validated @RequestBody MkmjAreaGateAddCmd cmd) {
|
||||
public SingleResponse<VehicleApplyCO> add(@Validated @RequestBody VehicleApplyAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return mkmjAreaGateService.add(cmd);
|
||||
return vehicleApplyService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<MkmjAreaGateCO> page(@RequestBody MkmjAreaGatePageQry qry) {
|
||||
return mkmjAreaGateService.listPage(qry);
|
||||
public PageResponse<VehicleApplyCO> page(@RequestBody VehicleApplyPageQry qry) {
|
||||
return vehicleApplyService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<MkmjAreaGateCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<MkmjAreaGateCO>());
|
||||
public MultiResponse<VehicleApplyCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VehicleApplyCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<MkmjAreaGateCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(mkmjAreaGateService.queryById(id));
|
||||
public SingleResponse<VehicleApplyCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new VehicleApplyCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
mkmjAreaGateService.remove(id);
|
||||
vehicleApplyService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
mkmjAreaGateService.removeBatch(ids);
|
||||
vehicleApplyService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody MkmjAreaGateUpdateCmd mkmjAreaGateUpdateCmd) {
|
||||
mkmjAreaGateService.edit(mkmjAreaGateUpdateCmd);
|
||||
public SingleResponse edit(@Validated @RequestBody VehicleApplyUpdateCmd vehicleApplyUpdateCmd) {
|
||||
vehicleApplyService.edit(vehicleApplyUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +1,17 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.TemporaryAccessServiceI;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessAddCmd;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessPageQry;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.TemporaryAccessCO;
|
||||
import com.zcloud.primeport.api.VehicleAuditServiceI;
|
||||
import com.zcloud.primeport.dto.VehicleAuditAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleAuditPageQry;
|
||||
import com.zcloud.primeport.dto.VehicleAuditUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleAuditCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -22,59 +23,59 @@ import java.util.ArrayList;
|
|||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-24 08:50:14
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:24
|
||||
*/
|
||||
@Api(tags = "临时车辆表")
|
||||
@RequestMapping("/${application.gateway}/temporaryAccess")
|
||||
@Api(tags = "车辆审批")
|
||||
@RequestMapping("/${application.gateway}/vehicleAudit")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class TemporaryAccessController {
|
||||
private final TemporaryAccessServiceI temporaryAccessService;
|
||||
public class VehicleAuditController {
|
||||
private final VehicleAuditServiceI vehicleAuditService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<TemporaryAccessCO> add(@Validated @RequestBody TemporaryAccessAddCmd cmd) {
|
||||
public SingleResponse<VehicleAuditCO> add(@Validated @RequestBody VehicleAuditAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return temporaryAccessService.add(cmd);
|
||||
return vehicleAuditService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<TemporaryAccessCO> page(@RequestBody TemporaryAccessPageQry qry) {
|
||||
return temporaryAccessService.listPage(qry);
|
||||
public PageResponse<VehicleAuditCO> page(@RequestBody VehicleAuditPageQry qry) {
|
||||
return vehicleAuditService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<TemporaryAccessCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<TemporaryAccessCO>());
|
||||
public MultiResponse<VehicleAuditCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VehicleAuditCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<TemporaryAccessCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(temporaryAccessService.queryById(id));
|
||||
public SingleResponse<VehicleAuditCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new VehicleAuditCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
temporaryAccessService.remove(id);
|
||||
vehicleAuditService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
temporaryAccessService.removeBatch(ids);
|
||||
vehicleAuditService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody TemporaryAccessUpdateCmd temporaryAccessUpdateCmd) {
|
||||
temporaryAccessService.edit(temporaryAccessUpdateCmd);
|
||||
public SingleResponse edit(@Validated @RequestBody VehicleAuditUpdateCmd vehicleAuditUpdateCmd) {
|
||||
vehicleAuditService.edit(vehicleAuditUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.VehicleAuditLogServiceI;
|
||||
import com.zcloud.primeport.dto.VehicleAuditLogAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleAuditLogApprovalCmd;
|
||||
import com.zcloud.primeport.dto.VehicleAuditLogPageQry;
|
||||
import com.zcloud.primeport.dto.VehicleAuditLogUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleAuditLogCO;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleLogAndCarCO;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleMessageCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-18 14:07:46
|
||||
*/
|
||||
@Api(tags = "")
|
||||
@RequestMapping("/${application.gateway}/vehicleAuditLog")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class VehicleAuditLogController {
|
||||
private final VehicleAuditLogServiceI vehicleAuditLogService;
|
||||
|
||||
// @ApiOperation("新增")
|
||||
// @PostMapping("/save")
|
||||
// public SingleResponse<VehicleAuditLogCO> add(@Validated @RequestBody VehicleAuditLogAddCmd cmd) {
|
||||
// SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
// return vehicleAuditLogService.add(cmd);
|
||||
// }
|
||||
|
||||
|
||||
// @ApiOperation("所有数据")
|
||||
// @GetMapping("/listAll")
|
||||
// public MultiResponse<VehicleAuditLogCO> listAll() {
|
||||
// return MultiResponse.of(new ArrayList<VehicleAuditLogCO>());
|
||||
// }
|
||||
// @ApiOperation("详情")
|
||||
// @GetMapping("/{id}")
|
||||
// public SingleResponse<VehicleAuditLogCO> getInfoById(@PathVariable("id") Long id) {
|
||||
// return SingleResponse.of(new VehicleAuditLogCO());
|
||||
// }
|
||||
// @ApiOperation("删除")
|
||||
// @DeleteMapping("/{id}")
|
||||
// public Response remove(@PathVariable("id") Long id) {
|
||||
// vehicleAuditLogService.remove(id);
|
||||
// return SingleResponse.buildSuccess();
|
||||
// }
|
||||
// @ApiOperation("删除多个")
|
||||
// @DeleteMapping("/ids")
|
||||
// public Response removeBatch(@RequestParam Long[] ids) {
|
||||
// vehicleAuditLogService.removeBatch(ids);
|
||||
// return SingleResponse.buildSuccess();
|
||||
// }
|
||||
// @ApiOperation("修改")
|
||||
// @PutMapping("/edit")
|
||||
// public SingleResponse edit(@Validated @RequestBody VehicleAuditLogUpdateCmd vehicleAuditLogUpdateCmd) {
|
||||
// vehicleAuditLogService.edit(vehicleAuditLogUpdateCmd);
|
||||
// return SingleResponse.buildSuccess();
|
||||
// }
|
||||
|
||||
/**
|
||||
* 审批通过/不通过
|
||||
* @param auditLogApprovalCmd
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("通过/不通过")
|
||||
@PutMapping("/approval")
|
||||
public SingleResponse approval(@Validated @RequestBody VehicleAuditLogApprovalCmd auditLogApprovalCmd) {
|
||||
vehicleAuditLogService.approval(auditLogApprovalCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<VehicleAuditLogCO> page(@RequestBody VehicleAuditLogPageQry qry) {
|
||||
return vehicleAuditLogService.listPage(qry);
|
||||
}
|
||||
@ApiOperation("获取登录人的审批车辆信息")
|
||||
@PostMapping("/listFromUser")
|
||||
public PageResponse<VehicleLogAndCarCO> pageAndCarInfo(@RequestBody VehicleAuditLogPageQry qry) {
|
||||
return vehicleAuditLogService.listPageAndCarInfo(qry);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
|
|
@ -21,10 +23,10 @@ import java.util.ArrayList;
|
|||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:26
|
||||
*/
|
||||
@Api(tags = "")
|
||||
@Api(tags = "车辆黑名单管理")
|
||||
@RequestMapping("/${application.gateway}/vehicleBlack")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
|
|
@ -37,11 +39,25 @@ public class VehicleBlackController {
|
|||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return vehicleBlackService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<VehicleBlackCO> page(@RequestBody VehicleBlackPageQry qry) {
|
||||
return vehicleBlackService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<VehicleBlackCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VehicleBlackCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<VehicleBlackCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new VehicleBlackCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
|
|
@ -49,5 +65,18 @@ public class VehicleBlackController {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
vehicleBlackService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody VehicleBlackUpdateCmd vehicleBlackUpdateCmd) {
|
||||
vehicleBlackService.edit(vehicleBlackUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import com.zcloud.primeport.api.VehicleMessageServiceI;
|
||||
import com.zcloud.primeport.dto.*;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleCountByCorpCO;
|
||||
import com.zcloud.primeport.dto.VehicleMessageAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleMessagePageQry;
|
||||
import com.zcloud.primeport.dto.VehicleMessageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleMessageCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -18,74 +19,64 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
/**
|
||||
* web-adapter
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-15 11:41:21
|
||||
*/
|
||||
|
||||
/**
|
||||
* 车辆管理,相关方车辆.分子公司车辆.监管端车辆.临时访客车辆信息.
|
||||
* web-adapter
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:27
|
||||
*/
|
||||
@Api(tags = "车辆管理")
|
||||
@Api(tags = "审批通过的固化车辆信息用于与门禁系统对接")
|
||||
@RequestMapping("/${application.gateway}/vehicleMessage")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class VehicleMessageController {
|
||||
private final VehicleMessageServiceI vehicleMessageService;
|
||||
@ApiOperation("新增-监管端/分子公司人员车辆")
|
||||
@PostMapping("/saveForCorp")
|
||||
public SingleResponse<VehicleMessageCO> addForCorp(@Validated @RequestBody VehicleMessageForCorpAddCmd cmd) {
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<VehicleMessageCO> add(@Validated @RequestBody VehicleMessageAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
cmd.addLongiUserCorp(ssoUser.getTenantParentIds());
|
||||
return vehicleMessageService.addForCorp(cmd);
|
||||
return vehicleMessageService.add(cmd);
|
||||
}
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/editForCorp")
|
||||
public SingleResponse editForCorp(@Validated @RequestBody VehicleMessageUpdateCmd updateCmd) {
|
||||
vehicleMessageService.editForCorp(updateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<VehicleMessageCO> page(@RequestBody VehicleMessagePageQry qry) {
|
||||
return vehicleMessageService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<VehicleMessageCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VehicleMessageCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<VehicleMessageCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new VehicleMessageCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
vehicleMessageService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<VehicleMessageCO> getInfoById(@PathVariable("id") Long id) {
|
||||
VehicleMessageCO infoById = vehicleMessageService.getInfoById(id);
|
||||
return SingleResponse.of(infoById);
|
||||
}
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<VehicleMessageCO> page(@RequestBody VehicleMessagePageQry qry) {
|
||||
SSOUser currentUser = AuthContext.getCurrentUser();
|
||||
qry.setCorpByCorpType(currentUser.getTenantParentIds());
|
||||
return vehicleMessageService.listPage(qry);
|
||||
}
|
||||
/**
|
||||
* 开启/关闭
|
||||
* @param statusCmd
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("修改状态")
|
||||
@PutMapping("/editStatus")
|
||||
public SingleResponse editStatus(@Validated @RequestBody VehicleMessageStatusCmd statusCmd) {
|
||||
vehicleMessageService.updateStatus(statusCmd);
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
vehicleMessageService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
@ApiOperation("分页-根据企业ID获取企业车辆数量")
|
||||
@PostMapping("/listFromCorp")
|
||||
public PageResponse<VehicleCountByCorpCO> listFromCorp(@RequestBody VehicleMessagePageQry qry) {
|
||||
return vehicleMessageService.listFromCorp(qry);
|
||||
}
|
||||
@ApiOperation("根据车牌号获取车辆信息")
|
||||
@GetMapping("/{licenceNo}")
|
||||
public SingleResponse<VehicleMessageCO> getInfoByLicenceNo(@PathVariable("licenceNo") String licenceNo) {
|
||||
VehicleMessageCO infoById = vehicleMessageService.infoByLicenceNo(licenceNo);
|
||||
return SingleResponse.of(infoById);
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody VehicleMessageUpdateCmd vehicleMessageUpdateCmd) {
|
||||
vehicleMessageService.edit(vehicleMessageUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
|
|
@ -10,7 +12,6 @@ import com.zcloud.primeport.dto.VehicleViolationsAddCmd;
|
|||
import com.zcloud.primeport.dto.VehicleViolationsPageQry;
|
||||
import com.zcloud.primeport.dto.VehicleViolationsUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleViolationsCO;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleViolationsListCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -22,8 +23,8 @@ import java.util.ArrayList;
|
|||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:29
|
||||
*/
|
||||
@Api(tags = "车辆违规记录")
|
||||
@RequestMapping("/${application.gateway}/vehicleViolations")
|
||||
|
|
@ -44,10 +45,17 @@ public class VehicleViolationsController {
|
|||
public PageResponse<VehicleViolationsCO> page(@RequestBody VehicleViolationsPageQry qry) {
|
||||
return vehicleViolationsService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<VehicleViolationsCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VehicleViolationsCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<VehicleViolationsCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(vehicleViolationsService.queryById(id));
|
||||
return SingleResponse.of(new VehicleViolationsCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
|
|
@ -57,17 +65,18 @@ public class VehicleViolationsController {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
vehicleViolationsService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody VehicleViolationsUpdateCmd vehicleViolationsUpdateCmd) {
|
||||
vehicleViolationsService.edit(vehicleViolationsUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("分页-和违规次数")
|
||||
@PostMapping("/pageAncCount")
|
||||
public PageResponse<VehicleViolationsListCO> pageAncCount(@RequestBody VehicleViolationsPageQry qry) {
|
||||
return vehicleViolationsService.listAndCountPage(qry);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,82 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.VideoServiceI;
|
||||
import com.zcloud.primeport.dto.VideoAddCmd;
|
||||
import com.zcloud.primeport.dto.VideoPageQry;
|
||||
import com.zcloud.primeport.dto.VideoUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VideoCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:30
|
||||
*/
|
||||
@Api(tags = "摄像头表")
|
||||
@RequestMapping("/${application.gateway}/video")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class VideoController {
|
||||
private final VideoServiceI videoService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<VideoCO> add(@Validated @RequestBody VideoAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return videoService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<VideoCO> page(@RequestBody VideoPageQry qry) {
|
||||
return videoService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<VideoCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VideoCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<VideoCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new VideoCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
videoService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
videoService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody VideoUpdateCmd videoUpdateCmd) {
|
||||
videoService.edit(videoUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.EmployeeMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.EmployeeMessageE;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageAddExe {
|
||||
private final EmployeeMessageGateway employeeMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(EmployeeMessageAddCmd cmd) {
|
||||
EmployeeMessageE employeeMessageE = new EmployeeMessageE();
|
||||
BeanUtils.copyProperties(cmd, employeeMessageE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = employeeMessageGateway.add(employeeMessageE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.EmployeeMessageGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:15
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageRemoveExe {
|
||||
private final EmployeeMessageGateway employeeMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = employeeMessageGateway.deletedEmployeeMessageById(id);
|
||||
if(!res){
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = employeeMessageGateway.deletedEmployeeMessageByIds(ids);
|
||||
if(!res){
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.EmployeeMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.EmployeeMessageE;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateStatusCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:15
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageUpdateExe {
|
||||
private final EmployeeMessageGateway employeeMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(EmployeeMessageUpdateCmd employeeMessageUpdateCmd) {
|
||||
EmployeeMessageE employeeMessageE = new EmployeeMessageE();
|
||||
BeanUtils.copyProperties(employeeMessageUpdateCmd, employeeMessageE);
|
||||
boolean res = employeeMessageGateway.update(employeeMessageE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(EmployeeMessageUpdateStatusCmd cmd) {
|
||||
EmployeeMessageE employeeMessageE = new EmployeeMessageE();
|
||||
employeeMessageE.setId(cmd.getId());
|
||||
employeeMessageE.setStatus(cmd.getStatus());
|
||||
boolean res = employeeMessageGateway.updateStatus(employeeMessageE);
|
||||
if (!res) {
|
||||
throw new BizException("状态更新失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.EnclosedAreaGateway;
|
||||
import com.zcloud.primeport.domain.model.EnclosedAreaE;
|
||||
import com.zcloud.primeport.dto.EnclosedAreaUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-12-12 16:49:32
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EnclosedAreaUpdateExe {
|
||||
private final EnclosedAreaGateway enclosedAreaGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(EnclosedAreaUpdateCmd enclosedAreaUpdateCmd) {
|
||||
EnclosedAreaE enclosedAreaE = new EnclosedAreaE();
|
||||
BeanUtils.copyProperties(enclosedAreaUpdateCmd, enclosedAreaE);
|
||||
boolean res = enclosedAreaGateway.update(enclosedAreaE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.GatePersonAuthLevelOneGateway;
|
||||
import com.zcloud.primeport.domain.model.GatePersonAuthLevelOneE;
|
||||
import com.zcloud.primeport.dto.GatePersonAuthLevelOneAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author dearLin
|
||||
* @Date 2025-12-31 10:51:44
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class GatePersonAuthLevelOneAddExe {
|
||||
private final GatePersonAuthLevelOneGateway gatePersonAuthLevelOneGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(GatePersonAuthLevelOneAddCmd cmd) {
|
||||
GatePersonAuthLevelOneE examTypeE = new GatePersonAuthLevelOneE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = gatePersonAuthLevelOneGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.GatePersonAuthLevelOneGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author dearLin
|
||||
* @Date 2025-12-31 10:51:44
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class GatePersonAuthLevelOneRemoveExe {
|
||||
private final GatePersonAuthLevelOneGateway gatePersonAuthLevelOneGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = gatePersonAuthLevelOneGateway.deletedGatePersonAuthLevelOneById(id);
|
||||
if(!res){
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = gatePersonAuthLevelOneGateway.deletedGatePersonAuthLevelOneByIds(ids);
|
||||
if(!res){
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.GatePersonAuthLevelOneGateway;
|
||||
import com.zcloud.primeport.domain.model.GatePersonAuthLevelOneE;
|
||||
import com.zcloud.primeport.dto.GatePersonAuthLevelOneUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author dearLin
|
||||
* @Date 2025-12-31 10:51:45
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class GatePersonAuthLevelOneUpdateExe {
|
||||
private final GatePersonAuthLevelOneGateway gatePersonAuthLevelOneGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(GatePersonAuthLevelOneUpdateCmd gatePersonAuthLevelOneUpdateCmd) {
|
||||
GatePersonAuthLevelOneE gatePersonAuthLevelOneE = new GatePersonAuthLevelOneE();
|
||||
BeanUtils.copyProperties(gatePersonAuthLevelOneUpdateCmd, gatePersonAuthLevelOneE);
|
||||
boolean res = gatePersonAuthLevelOneGateway.update(gatePersonAuthLevelOneE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.InspectionDeptE;
|
||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
||||
import com.zcloud.primeport.domain.model.VehicleMessageE;
|
||||
import com.zcloud.primeport.dto.InspectionDeptAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleInspectionAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-20 15:24:07
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class InspectionDeptAddExe {
|
||||
private final InspectionDeptGateway inspectionDeptGateway;
|
||||
private final InspectionVehicleGateway inspectionVehicleGateway;
|
||||
private final VehicleMessageGateway vehicleMessageGateway;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(InspectionDeptAddCmd cmd) {
|
||||
InspectionDeptE examTypeE = new InspectionDeptE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
InspectionDeptE insDeptAdd = inspectionDeptGateway.add(examTypeE);
|
||||
/**
|
||||
* 1.增加车辆
|
||||
* 2.增加车辆和部门的关系
|
||||
*/
|
||||
for (VehicleInspectionAddCmd vehicleInspectionAddCmd : cmd.getVehicleMessageAddCmd()) {
|
||||
VehicleMessageE vehicleMessageE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(vehicleInspectionAddCmd, vehicleMessageE);
|
||||
vehicleMessageE.VehicleMessageForInspection(vehicleMessageE);
|
||||
VehicleMessageE vehicleAdd = vehicleMessageGateway.add(vehicleMessageE);// 添加车辆信息
|
||||
InspectionVehicleE inspectionVehicleE = new InspectionVehicleE();
|
||||
inspectionVehicleE.addDeptInspection(insDeptAdd.getId(),vehicleAdd.getId()); //车辆和部门之间的关系
|
||||
res = inspectionVehicleGateway.add(inspectionVehicleE);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleMessageGateway;
|
||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
||||
import com.zcloud.primeport.persistence.repository.InspectionVehicleRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-20 15:24:08
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class InspectionDeptRemoveExe {
|
||||
private final InspectionDeptGateway inspectionDeptGateway;
|
||||
private final InspectionVehicleRepository inspectionVehicleRepository;
|
||||
private final InspectionVehicleGateway inspectionVehicleGateway;
|
||||
private final VehicleMessageGateway vehicleMessageGateway;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = inspectionDeptGateway.deletedInspectionDeptById(id);
|
||||
List<InspectionVehicleDO> vehicleDOS = inspectionVehicleRepository.queryInspectionVehicleByDeptId(id); //获取这个部门下的车辆信息
|
||||
Map<Long, InspectionVehicleDO> vehicleMap = vehicleDOS.stream().collect(java.util.stream.Collectors.toMap(InspectionVehicleDO::getId, InspectionVehicleDO -> InspectionVehicleDO)); //循环一下
|
||||
for (InspectionVehicleDO vehicleDO : vehicleMap.values()){ ///删除车辆 删除关系
|
||||
inspectionVehicleGateway.deletedInspectionVehicleById(vehicleDO.getId());
|
||||
vehicleMessageGateway.deletedVehicleMessageById(vehicleDO.getVehicleMessageId());
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = inspectionDeptGateway.deletedInspectionDeptByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.InspectionDeptE;
|
||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
||||
import com.zcloud.primeport.domain.model.VehicleMessageE;
|
||||
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
||||
import com.zcloud.primeport.dto.VehicleInspectionUpdateCmd;
|
||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
||||
import com.zcloud.primeport.persistence.repository.InspectionVehicleRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-20 15:24:08
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class InspectionDeptUpdateExe {
|
||||
private final InspectionDeptGateway inspectionDeptGateway;
|
||||
private final InspectionVehicleGateway inspectionVehicleGateway;
|
||||
private final VehicleMessageGateway vehicleMessageGateway;
|
||||
|
||||
private final InspectionVehicleRepository inspectionVehicleRepository;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(InspectionDeptUpdateCmd inspectionDeptUpdateCmd) {
|
||||
InspectionDeptE inspectionDeptE = new InspectionDeptE();
|
||||
BeanUtils.copyProperties(inspectionDeptUpdateCmd, inspectionDeptE);
|
||||
boolean res = inspectionDeptGateway.update(inspectionDeptE);
|
||||
List<InspectionVehicleDO> vehicleDOS = inspectionVehicleRepository.queryInspectionVehicleByDeptId(inspectionDeptE.getId()); //获取这个部门下的车辆信息
|
||||
Map<Long, InspectionVehicleDO> vehicleMap = vehicleDOS.stream().collect(java.util.stream.Collectors.toMap(InspectionVehicleDO::getId, InspectionVehicleDO -> InspectionVehicleDO)); //循环一下
|
||||
for (VehicleInspectionUpdateCmd vehicleInspectionAddCmd : inspectionDeptUpdateCmd.getVehicleMessageAddCmd()) {
|
||||
if (vehicleInspectionAddCmd.getId() == null){ //新增
|
||||
VehicleMessageE vehicleMessageE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(vehicleInspectionAddCmd, vehicleMessageE);
|
||||
vehicleMessageE.VehicleMessageForInspection(vehicleMessageE);
|
||||
VehicleMessageE vehicleAdd = vehicleMessageGateway.add(vehicleMessageE);// 添加车辆信息
|
||||
InspectionVehicleE inspectionVehicleE = new InspectionVehicleE();
|
||||
inspectionVehicleE.addDeptInspection(inspectionDeptUpdateCmd.getId(),vehicleAdd.getId()); //车辆和部门之间的关系
|
||||
res = inspectionVehicleGateway.add(inspectionVehicleE);
|
||||
}else{
|
||||
//修改
|
||||
VehicleMessageE vehicleMessageE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(vehicleInspectionAddCmd, vehicleMessageE);
|
||||
vehicleMessageE.VehicleMessageForInspection(vehicleMessageE);
|
||||
vehicleMessageGateway.update(vehicleMessageE);// 添加车辆信息
|
||||
}
|
||||
if (vehicleMap.containsKey(vehicleInspectionAddCmd.getId())){
|
||||
vehicleMap.remove(vehicleInspectionAddCmd.getId());
|
||||
}
|
||||
}
|
||||
for (InspectionVehicleDO vehicleDO : vehicleMap.values()){ ///如果没返回回来,就删除车辆 删除关系
|
||||
inspectionVehicleGateway.deletedInspectionVehicleById(vehicleDO.getId());
|
||||
vehicleMessageGateway.deletedVehicleMessageById(vehicleDO.getVehicleMessageId());
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-20 15:25:20
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class InspectionVehicleRemoveExe {
|
||||
private final InspectionVehicleGateway inspectionVehicleGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = inspectionVehicleGateway.deletedInspectionVehicleById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = inspectionVehicleGateway.deletedInspectionVehicleByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
||||
import com.zcloud.primeport.dto.InspectionVehicleUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-20 15:25:20
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class InspectionVehicleUpdateExe {
|
||||
private final InspectionVehicleGateway inspectionVehicleGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(InspectionVehicleUpdateCmd inspectionVehicleUpdateCmd) {
|
||||
InspectionVehicleE inspectionVehicleE = new InspectionVehicleE();
|
||||
BeanUtils.copyProperties(inspectionVehicleUpdateCmd, inspectionVehicleE);
|
||||
boolean res = inspectionVehicleGateway.update(inspectionVehicleE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
||||
import com.zcloud.primeport.dto.InspectionVehicleAddCmd;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjE;
|
||||
import com.zcloud.primeport.dto.MkmjAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -12,21 +13,21 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-20 15:25:20
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:15
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class InspectionVehicleAddExe {
|
||||
private final InspectionVehicleGateway inspectionVehicleGateway;
|
||||
public class MkmjAddExe {
|
||||
private final MkmjGateway mkmjGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(InspectionVehicleAddCmd cmd) {
|
||||
InspectionVehicleE examTypeE = new InspectionVehicleE();
|
||||
public boolean execute(MkmjAddCmd cmd) {
|
||||
MkmjE examTypeE = new MkmjE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = inspectionVehicleGateway.add(examTypeE);
|
||||
res = mkmjGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
@ -10,13 +10,12 @@ import org.springframework.stereotype.Component;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-14 10:09:22
|
||||
*/
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:16
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjApprovalUserAddExe {
|
||||
|
|
@ -24,8 +23,6 @@ public class MkmjApprovalUserAddExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(MkmjApprovalUserAddCmd cmd) {
|
||||
// 查询下当前人是否已经存在,如存在无法新增
|
||||
|
||||
MkmjApprovalUserE examTypeE = new MkmjApprovalUserE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
|
|
@ -39,6 +36,5 @@ public class MkmjApprovalUserAddExe {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,13 +7,12 @@ import org.springframework.stereotype.Component;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-14 10:09:22
|
||||
*/
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:17
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjApprovalUserRemoveExe {
|
||||
|
|
@ -22,7 +21,7 @@ public class MkmjApprovalUserRemoveExe {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = mkmjApprovalUserGateway.deletedMkmjApprovalUserById(id);
|
||||
if(!res){
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
|
|
@ -31,7 +30,7 @@ public class MkmjApprovalUserRemoveExe {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = mkmjApprovalUserGateway.deletedMkmjApprovalUserByIds(ids);
|
||||
if(!res){
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -10,13 +10,12 @@ import org.springframework.stereotype.Component;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-14 10:09:22
|
||||
*/
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:17
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjApprovalUserUpdateExe {
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.zcloud.primeport.domain.gateway.MkmjAreaGateGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjAreaGateE;
|
||||
import com.zcloud.primeport.dto.MkmjAreaGateAddCmd;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:42
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjAreaGateAddExe {
|
||||
private final MkmjAreaGateGateway mkmjAreaGateGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(MkmjAreaGateAddCmd cmd) {
|
||||
MkmjAreaGateE mkmjAreaGateE = new MkmjAreaGateE();
|
||||
BeanUtils.copyProperties(cmd, mkmjAreaGateE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = mkmjAreaGateGateway.add(mkmjAreaGateE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjAreaGateGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjAreaGateE;
|
||||
import com.zcloud.primeport.dto.MkmjAreaGateUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:43
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjAreaGateUpdateExe {
|
||||
private final MkmjAreaGateGateway mkmjAreaGateGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(MkmjAreaGateUpdateCmd mkmjAreaGateUpdateCmd) {
|
||||
MkmjAreaGateE mkmjAreaGateE = new MkmjAreaGateE();
|
||||
BeanUtils.copyProperties(mkmjAreaGateUpdateCmd, mkmjAreaGateE);
|
||||
boolean res = mkmjAreaGateGateway.update(mkmjAreaGateE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjAreaGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjAreaE;
|
||||
import com.zcloud.primeport.dto.MkmjAreaUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:42
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjAreaUpdateExe {
|
||||
private final MkmjAreaGateway mkmjAreaGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(MkmjAreaUpdateCmd mkmjAreaUpdateCmd) {
|
||||
MkmjAreaE mkmjAreaE = new MkmjAreaE();
|
||||
BeanUtils.copyProperties(mkmjAreaUpdateCmd, mkmjAreaE);
|
||||
boolean res = mkmjAreaGateway.update(mkmjAreaE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjCarRecordGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjCarRecordE;
|
||||
import com.zcloud.primeport.dto.MkmjCarRecordAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-17 13:42:09
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjCarRecordAddExe {
|
||||
private final MkmjCarRecordGateway mkmjCarRecordGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(MkmjCarRecordAddCmd cmd) {
|
||||
MkmjCarRecordE mkmjCarRecordE = new MkmjCarRecordE();
|
||||
BeanUtils.copyProperties(cmd, mkmjCarRecordE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = mkmjCarRecordGateway.add(mkmjCarRecordE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjCarRecordGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjCarRecordE;
|
||||
import com.zcloud.primeport.dto.MkmjCarRecordUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-17 13:42:09
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjCarRecordUpdateExe {
|
||||
private final MkmjCarRecordGateway mkmjCarRecordGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(MkmjCarRecordUpdateCmd mkmjCarRecordUpdateCmd) {
|
||||
MkmjCarRecordE mkmjCarRecordE = new MkmjCarRecordE();
|
||||
BeanUtils.copyProperties(mkmjCarRecordUpdateCmd, mkmjCarRecordE);
|
||||
boolean res = mkmjCarRecordGateway.update(mkmjCarRecordE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.zcloud.primeport.domain.gateway.MkmjAreaGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjAreaE;
|
||||
import com.zcloud.primeport.dto.MkmjAreaAddCmd;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjGateE;
|
||||
import com.zcloud.primeport.dto.MkmjGateAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -13,21 +13,21 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:41
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:17
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjAreaAddExe {
|
||||
private final MkmjAreaGateway mkmjAreaGateway;
|
||||
public class MkmjGateAddExe {
|
||||
private final MkmjGateGateway mkmjGateGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(MkmjAreaAddCmd cmd) {
|
||||
MkmjAreaE mkmjAreaE = new MkmjAreaE();
|
||||
BeanUtils.copyProperties(cmd, mkmjAreaE);
|
||||
public boolean execute(MkmjGateAddCmd cmd) {
|
||||
MkmjGateE examTypeE = new MkmjGateE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = mkmjAreaGateway.add(mkmjAreaE);
|
||||
res = mkmjGateGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.zcloud.primeport.domain.gateway.MkmjAreaGateway;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -10,17 +10,17 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:42
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:18
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjAreaRemoveExe {
|
||||
private final MkmjAreaGateway mkmjAreaGateway;
|
||||
public class MkmjGateRemoveExe {
|
||||
private final MkmjGateGateway mkmjGateGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = mkmjAreaGateway.deletedMkmjAreaById(id);
|
||||
boolean res = mkmjGateGateway.deletedMkmjGateById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ public class MkmjAreaRemoveExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = mkmjAreaGateway.deletedMkmjAreaByIds(ids);
|
||||
boolean res = mkmjGateGateway.deletedMkmjGateByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjGateE;
|
||||
import com.zcloud.primeport.dto.MkmjGateUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:18
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjGateUpdateExe {
|
||||
private final MkmjGateGateway mkmjGateGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(MkmjGateUpdateCmd mkmjGateUpdateCmd) {
|
||||
MkmjGateE mkmjGateE = new MkmjGateE();
|
||||
BeanUtils.copyProperties(mkmjGateUpdateCmd, mkmjGateE);
|
||||
boolean res = mkmjGateGateway.update(mkmjGateE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateVideoGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjGateVideoE;
|
||||
import com.zcloud.primeport.dto.MkmjGateVideoAddCmd;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:44
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjGateVideoAddExe {
|
||||
private final MkmjGateVideoGateway mkmjGateVideoGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(MkmjGateVideoAddCmd cmd) {
|
||||
MkmjGateVideoE mkmjGateVideoE = new MkmjGateVideoE();
|
||||
BeanUtils.copyProperties(cmd, mkmjGateVideoE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = mkmjGateVideoGateway.add(mkmjGateVideoE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateVideoGateway;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:44
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjGateVideoRemoveExe {
|
||||
private final MkmjGateVideoGateway mkmjGateVideoGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = mkmjGateVideoGateway.deletedMkmjGateVideoById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = mkmjGateVideoGateway.deletedMkmjGateVideoByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateVideoGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjGateVideoE;
|
||||
import com.zcloud.primeport.dto.MkmjGateVideoUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:44
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjGateVideoUpdateExe {
|
||||
private final MkmjGateVideoGateway mkmjGateVideoGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(MkmjGateVideoUpdateCmd mkmjGateVideoUpdateCmd) {
|
||||
MkmjGateVideoE mkmjGateVideoE = new MkmjGateVideoE();
|
||||
BeanUtils.copyProperties(mkmjGateVideoUpdateCmd, mkmjGateVideoE);
|
||||
boolean res = mkmjGateVideoGateway.update(mkmjGateVideoE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjPassageGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjPassageE;
|
||||
import com.zcloud.primeport.dto.MkmjPassageAddCmd;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -13,8 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:45
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
|
|
@ -23,11 +23,11 @@ public class MkmjPassageAddExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(MkmjPassageAddCmd cmd) {
|
||||
MkmjPassageE mkmjPassageE = new MkmjPassageE();
|
||||
BeanUtils.copyProperties(cmd, mkmjPassageE);
|
||||
MkmjPassageE examTypeE = new MkmjPassageE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = mkmjPassageGateway.add(mkmjPassageE);
|
||||
res = mkmjPassageGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.zcloud.primeport.domain.gateway.MkmjPassageGateway;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjPassageGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -10,8 +10,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:45
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:19
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:45
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:20
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:16
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjRemoveExe {
|
||||
private final MkmjGateway mkmjGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = mkmjGateway.deletedMkmjById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = mkmjGateway.deletedMkmjByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjSwipeCardRecordGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjSwipeCardRecordE;
|
||||
import com.zcloud.primeport.dto.MkmjSwipeCardRecordAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-17 13:42:10
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjSwipeCardRecordAddExe {
|
||||
private final MkmjSwipeCardRecordGateway mkmjSwipeCardRecordGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(MkmjSwipeCardRecordAddCmd cmd) {
|
||||
MkmjSwipeCardRecordE mkmjSwipeCardRecordE = new MkmjSwipeCardRecordE();
|
||||
BeanUtils.copyProperties(cmd, mkmjSwipeCardRecordE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = mkmjSwipeCardRecordGateway.add(mkmjSwipeCardRecordE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjSwipeCardRecordGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-17 13:42:10
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjSwipeCardRecordRemoveExe {
|
||||
private final MkmjSwipeCardRecordGateway mkmjSwipeCardRecordGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = mkmjSwipeCardRecordGateway.deletedMkmjSwipeCardRecordById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = mkmjSwipeCardRecordGateway.deletedMkmjSwipeCardRecordByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjSwipeCardRecordGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjSwipeCardRecordE;
|
||||
import com.zcloud.primeport.dto.MkmjSwipeCardRecordUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-17 13:42:10
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjSwipeCardRecordUpdateExe {
|
||||
private final MkmjSwipeCardRecordGateway mkmjSwipeCardRecordGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(MkmjSwipeCardRecordUpdateCmd mkmjSwipeCardRecordUpdateCmd) {
|
||||
MkmjSwipeCardRecordE mkmjSwipeCardRecordE = new MkmjSwipeCardRecordE();
|
||||
BeanUtils.copyProperties(mkmjSwipeCardRecordUpdateCmd, mkmjSwipeCardRecordE);
|
||||
boolean res = mkmjSwipeCardRecordGateway.update(mkmjSwipeCardRecordE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateway;
|
||||
import com.zcloud.primeport.domain.model.MkmjE;
|
||||
import com.zcloud.primeport.dto.MkmjUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:16
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjUpdateExe {
|
||||
private final MkmjGateway mkmjGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(MkmjUpdateCmd mkmjUpdateCmd) {
|
||||
MkmjE mkmjE = new MkmjE();
|
||||
BeanUtils.copyProperties(mkmjUpdateCmd, mkmjE);
|
||||
boolean res = mkmjGateway.update(mkmjE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.EnclosedAreaGateway;
|
||||
import com.zcloud.primeport.domain.model.EnclosedAreaE;
|
||||
import com.zcloud.primeport.dto.EnclosedAreaAddCmd;
|
||||
import com.zcloud.primeport.domain.gateway.PersonApplyGateway;
|
||||
import com.zcloud.primeport.domain.model.PersonApplyE;
|
||||
import com.zcloud.primeport.dto.PersonApplyAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -13,21 +13,21 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-12-12 16:49:30
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:21
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EnclosedAreaAddExe {
|
||||
private final EnclosedAreaGateway enclosedAreaGateway;
|
||||
public class PersonApplyAddExe {
|
||||
private final PersonApplyGateway personApplyGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(EnclosedAreaAddCmd cmd) {
|
||||
EnclosedAreaE enclosedAreaE = new EnclosedAreaE();
|
||||
BeanUtils.copyProperties(cmd, enclosedAreaE);
|
||||
public boolean execute(PersonApplyAddCmd cmd) {
|
||||
PersonApplyE examTypeE = new PersonApplyE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = enclosedAreaGateway.add(enclosedAreaE);
|
||||
res = personApplyGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.PersonApplyGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:22
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class PersonApplyRemoveExe {
|
||||
private final PersonApplyGateway personApplyGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = personApplyGateway.deletedPersonApplyById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = personApplyGateway.deletedPersonApplyByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.PersonApplyGateway;
|
||||
import com.zcloud.primeport.domain.model.PersonApplyE;
|
||||
import com.zcloud.primeport.dto.PersonApplyUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:23
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class PersonApplyUpdateExe {
|
||||
private final PersonApplyGateway personApplyGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(PersonApplyUpdateCmd personApplyUpdateCmd) {
|
||||
PersonApplyE personApplyE = new PersonApplyE();
|
||||
BeanUtils.copyProperties(personApplyUpdateCmd, personApplyE);
|
||||
boolean res = personApplyGateway.update(personApplyE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditLogGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleAuditLogE;
|
||||
import com.zcloud.primeport.dto.VehicleAuditLogAddCmd;
|
||||
import com.zcloud.primeport.domain.gateway.PersonMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.PersonMessageE;
|
||||
import com.zcloud.primeport.dto.PersonMessageAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -13,21 +13,21 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-18 14:07:46
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:20
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleAuditLogAddExe {
|
||||
private final VehicleAuditLogGateway vehicleAuditLogGateway;
|
||||
public class PersonMessageAddExe {
|
||||
private final PersonMessageGateway personMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(VehicleAuditLogAddCmd cmd) {
|
||||
VehicleAuditLogE examTypeE = new VehicleAuditLogE();
|
||||
public boolean execute(PersonMessageAddCmd cmd) {
|
||||
PersonMessageE examTypeE = new PersonMessageE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = vehicleAuditLogGateway.add(examTypeE);
|
||||
res = personMessageGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjCarRecordGateway;
|
||||
import com.zcloud.primeport.domain.gateway.PersonMessageGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -10,17 +10,17 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-17 13:42:09
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:21
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjCarRecordRemoveExe {
|
||||
private final MkmjCarRecordGateway mkmjCarRecordGateway;
|
||||
public class PersonMessageRemoveExe {
|
||||
private final PersonMessageGateway personMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = mkmjCarRecordGateway.deletedMkmjCarRecordById(id);
|
||||
boolean res = personMessageGateway.deletedPersonMessageById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ public class MkmjCarRecordRemoveExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = mkmjCarRecordGateway.deletedMkmjCarRecordByIds(ids);
|
||||
boolean res = personMessageGateway.deletedPersonMessageByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.PersonMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.PersonMessageE;
|
||||
import com.zcloud.primeport.dto.PersonMessageUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:21
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class PersonMessageUpdateExe {
|
||||
private final PersonMessageGateway personMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(PersonMessageUpdateCmd personMessageUpdateCmd) {
|
||||
PersonMessageE personMessageE = new PersonMessageE();
|
||||
BeanUtils.copyProperties(personMessageUpdateCmd, personMessageE);
|
||||
boolean res = personMessageGateway.update(personMessageE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.TemporaryAccessGateway;
|
||||
import com.zcloud.primeport.domain.model.TemporaryAccessE;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-24 08:50:14
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class TemporaryAccessAddExe {
|
||||
private final TemporaryAccessGateway temporaryAccessGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(TemporaryAccessAddCmd cmd) {
|
||||
TemporaryAccessE temporaryAccessE = new TemporaryAccessE();
|
||||
BeanUtils.copyProperties(cmd, temporaryAccessE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = temporaryAccessGateway.add(temporaryAccessE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.TemporaryAccessEntourageGateway;
|
||||
import com.zcloud.primeport.domain.model.TemporaryAccessEntourageE;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessEntourageAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-24 08:50:15
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class TemporaryAccessEntourageAddExe {
|
||||
private final TemporaryAccessEntourageGateway temporaryAccessEntourageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(TemporaryAccessEntourageAddCmd cmd) {
|
||||
TemporaryAccessEntourageE temporaryAccessEntourageE = new TemporaryAccessEntourageE();
|
||||
BeanUtils.copyProperties(cmd, temporaryAccessEntourageE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = temporaryAccessEntourageGateway.add(temporaryAccessEntourageE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.TemporaryAccessEntourageGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-24 08:50:16
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class TemporaryAccessEntourageRemoveExe {
|
||||
private final TemporaryAccessEntourageGateway temporaryAccessEntourageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = temporaryAccessEntourageGateway.deletedTemporaryAccessEntourageById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = temporaryAccessEntourageGateway.deletedTemporaryAccessEntourageByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.TemporaryAccessEntourageGateway;
|
||||
import com.zcloud.primeport.domain.model.TemporaryAccessEntourageE;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessEntourageUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-24 08:50:16
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class TemporaryAccessEntourageUpdateExe {
|
||||
private final TemporaryAccessEntourageGateway temporaryAccessEntourageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(TemporaryAccessEntourageUpdateCmd temporaryAccessEntourageUpdateCmd) {
|
||||
TemporaryAccessEntourageE temporaryAccessEntourageE = new TemporaryAccessEntourageE();
|
||||
BeanUtils.copyProperties(temporaryAccessEntourageUpdateCmd, temporaryAccessEntourageE);
|
||||
boolean res = temporaryAccessEntourageGateway.update(temporaryAccessEntourageE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.TemporaryAccessGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-24 08:50:14
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class TemporaryAccessRemoveExe {
|
||||
private final TemporaryAccessGateway temporaryAccessGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = temporaryAccessGateway.deletedTemporaryAccessById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = temporaryAccessGateway.deletedTemporaryAccessByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.TemporaryAccessGateway;
|
||||
import com.zcloud.primeport.domain.model.TemporaryAccessE;
|
||||
import com.zcloud.primeport.dto.TemporaryAccessUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-24 08:50:15
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class TemporaryAccessUpdateExe {
|
||||
private final TemporaryAccessGateway temporaryAccessGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(TemporaryAccessUpdateCmd temporaryAccessUpdateCmd) {
|
||||
TemporaryAccessE temporaryAccessE = new TemporaryAccessE();
|
||||
BeanUtils.copyProperties(temporaryAccessUpdateCmd, temporaryAccessE);
|
||||
boolean res = temporaryAccessGateway.update(temporaryAccessE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleApplyE;
|
||||
import com.zcloud.primeport.dto.VehicleApplyAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:23
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleApplyAddExe {
|
||||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(VehicleApplyAddCmd cmd) {
|
||||
VehicleApplyE examTypeE = new VehicleApplyE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = vehicleApplyGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.EnclosedAreaGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -10,17 +10,17 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-12-12 16:49:31
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:24
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EnclosedAreaRemoveExe {
|
||||
private final EnclosedAreaGateway enclosedAreaGateway;
|
||||
public class VehicleApplyRemoveExe {
|
||||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = enclosedAreaGateway.deletedEnclosedAreaById(id);
|
||||
boolean res = vehicleApplyGateway.deletedVehicleApplyById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ public class EnclosedAreaRemoveExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = enclosedAreaGateway.deletedEnclosedAreaByIds(ids);
|
||||
boolean res = vehicleApplyGateway.deletedVehicleApplyByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleApplyE;
|
||||
import com.zcloud.primeport.dto.VehicleApplyUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:24
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleApplyUpdateExe {
|
||||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(VehicleApplyUpdateCmd vehicleApplyUpdateCmd) {
|
||||
VehicleApplyE vehicleApplyE = new VehicleApplyE();
|
||||
BeanUtils.copyProperties(vehicleApplyUpdateCmd, vehicleApplyE);
|
||||
boolean res = vehicleApplyGateway.update(vehicleApplyE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleAuditE;
|
||||
import com.zcloud.primeport.dto.VehicleAuditAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:24
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleAuditAddExe {
|
||||
private final VehicleAuditGateway vehicleAuditGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(VehicleAuditAddCmd cmd) {
|
||||
VehicleAuditE examTypeE = new VehicleAuditE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = vehicleAuditGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditLogGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-18 14:07:46
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleAuditLogRemoveExe {
|
||||
private final VehicleAuditLogGateway vehicleAuditLogGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = vehicleAuditLogGateway.deletedVehicleAuditLogById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = vehicleAuditLogGateway.deletedVehicleAuditLogByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditLogGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleAuditLogE;
|
||||
import com.zcloud.primeport.dto.VehicleAuditLogApprovalCmd;
|
||||
import com.zcloud.primeport.dto.VehicleAuditLogUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-18 14:07:47
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleAuditLogUpdateExe {
|
||||
private final VehicleAuditLogGateway vehicleAuditLogGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(VehicleAuditLogUpdateCmd vehicleAuditLogUpdateCmd) {
|
||||
VehicleAuditLogE vehicleAuditLogE = new VehicleAuditLogE();
|
||||
BeanUtils.copyProperties(vehicleAuditLogUpdateCmd, vehicleAuditLogE);
|
||||
boolean res = vehicleAuditLogGateway.update(vehicleAuditLogE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批功能
|
||||
* @param auditLogApprovalCmd
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(VehicleAuditLogApprovalCmd auditLogApprovalCmd) {
|
||||
boolean res = false;
|
||||
VehicleAuditLogE approval = new VehicleAuditLogE();
|
||||
VehicleAuditLogE vehicleAuditLogE = vehicleAuditLogGateway.queryVehicleAuditLogByVehicleMessageId(auditLogApprovalCmd.getVehicleMessageId()); //找到这个车辆未审批通过的记录
|
||||
if (vehicleAuditLogE == null){
|
||||
throw new BizException("未找到车辆审批记录!");
|
||||
}
|
||||
if (vehicleAuditLogE.getStatus() == 2){ //2通过
|
||||
approval = approval.approvalTongguo(vehicleAuditLogE.getId());
|
||||
}else if (vehicleAuditLogE.getStatus() == 3){ //3不通过
|
||||
approval = approval.approvalNoTongguo(vehicleAuditLogE.getId(),auditLogApprovalCmd.getComments());
|
||||
}else if (vehicleAuditLogE.getStatus() == 1){
|
||||
throw new BizException("车辆已审批通过!");
|
||||
}
|
||||
res = vehicleAuditLogGateway.update(approval);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.zcloud.primeport.domain.gateway.MkmjAreaGateGateway;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -10,17 +10,17 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author fangjiakai
|
||||
* @Date 2025-11-14 08:57:43
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:25
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class MkmjAreaGateRemoveExe {
|
||||
private final MkmjAreaGateGateway mkmjAreaGateGateway;
|
||||
public class VehicleAuditRemoveExe {
|
||||
private final VehicleAuditGateway vehicleAuditGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = mkmjAreaGateGateway.deletedMkmjAreaGateById(id);
|
||||
boolean res = vehicleAuditGateway.deletedVehicleAuditById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ public class MkmjAreaGateRemoveExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = mkmjAreaGateGateway.deletedMkmjAreaGateByIds(ids);
|
||||
boolean res = vehicleAuditGateway.deletedVehicleAuditByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleAuditE;
|
||||
import com.zcloud.primeport.dto.VehicleAuditUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:26
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleAuditUpdateExe {
|
||||
private final VehicleAuditGateway vehicleAuditGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(VehicleAuditUpdateCmd vehicleAuditUpdateCmd) {
|
||||
VehicleAuditE vehicleAuditE = new VehicleAuditE();
|
||||
BeanUtils.copyProperties(vehicleAuditUpdateCmd, vehicleAuditE);
|
||||
boolean res = vehicleAuditGateway.update(vehicleAuditE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||
import com.zcloud.primeport.domain.model.VehicleMessageE;
|
||||
import com.zcloud.primeport.dto.VehicleBlackAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleMessageForCorpAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -15,34 +13,21 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:26
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleBlackAddExe {
|
||||
private final VehicleBlackGateway vehicleBlackGateway;
|
||||
private final VehicleMessageGateway vehicleMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(VehicleBlackAddCmd cmd) {
|
||||
|
||||
VehicleBlackE examTypeE = new VehicleBlackE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
/**
|
||||
* 1.先把数据同步到车辆信息库中.
|
||||
* 2.在写入数据库中.
|
||||
*/
|
||||
VehicleBlackE vehicleBlackE = new VehicleBlackE();
|
||||
VehicleMessageE infoByLicenceNo = vehicleMessageGateway.getInfoByLicenceNo(cmd.getLicenceNo());
|
||||
if (infoByLicenceNo == null) { //如果车辆不存在.则新增车辆.再存入黑名单中
|
||||
VehicleMessageE vehicleMessageE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(cmd, vehicleMessageE);
|
||||
vehicleMessageE = vehicleMessageGateway.add(vehicleMessageE);
|
||||
BeanUtils.copyProperties(vehicleBlackE, vehicleMessageE);
|
||||
}else{ //如有车辆.则更新车辆信息.再存入黑名单中
|
||||
BeanUtils.copyProperties(vehicleBlackE, infoByLicenceNo);
|
||||
}
|
||||
res = vehicleBlackGateway.add(vehicleBlackE);
|
||||
res = vehicleBlackGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:09
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:27
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||
|
|
@ -12,8 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:09
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:27
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
|
|
|
|||
|
|
@ -1,17 +1,10 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditLogGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleAuditLogE;
|
||||
import com.zcloud.primeport.domain.model.VehicleMessageE;
|
||||
//import com.zcloud.primeport.dto.VehicleAddCheckResultDTO;
|
||||
import com.zcloud.primeport.dto.VehicleMessageAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleMessageForCorpAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.val;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -20,27 +13,21 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-15 11:41:21
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:27
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleMessageAddExe {
|
||||
private final VehicleMessageGateway vehicleMessageGateway;
|
||||
private final VehicleAuditLogGateway vehicleAuditLogGateway;
|
||||
private final VehicleBlackGateway vehicleBlackGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(VehicleMessageAddCmd cmd) {
|
||||
VehicleMessageE examTypeE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
|
||||
// 检查是否可以添加车辆
|
||||
|
||||
|
||||
boolean res = false;
|
||||
try {
|
||||
VehicleMessageE add = vehicleMessageGateway.add(examTypeE);
|
||||
res = vehicleMessageGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
@ -49,41 +36,5 @@ public class VehicleMessageAddExe {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean executeForCorp(VehicleMessageForCorpAddCmd cmd) {
|
||||
VehicleMessageE examTypeE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
examTypeE = examTypeE.VehicleMessageForCorpE(examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
/**
|
||||
* 1.判断是否重复
|
||||
* 2.判断是否在黑名单中
|
||||
*/
|
||||
// VehicleMessageE infoByLicenceNo = vehicleMessageGateway.getInfoByLicenceNo(examTypeE.getLicenceNo());
|
||||
// if (infoByLicenceNo != null){
|
||||
// throw new BizException("车辆已存在");
|
||||
// }
|
||||
// Integer licenceNoCount = vehicleMessageGateway.countEnabledByLicenceNo(examTypeE.getLicenceNo());
|
||||
// if (licenceNoCount > 0){
|
||||
// throw new BizException("车辆已存在");
|
||||
// }
|
||||
VehicleMessageE add = vehicleMessageGateway.add(examTypeE);
|
||||
if (Tools.isEmpty(cmd.getApprovalUserId())) throw new BizException("请选择审批人");
|
||||
VehicleAuditLogE vehicleAuditLogE = new VehicleAuditLogE();
|
||||
BeanUtils.copyProperties(cmd, vehicleAuditLogE);
|
||||
vehicleAuditLogE.addFroVehicleLog(vehicleAuditLogE, add.getId(), 1);
|
||||
// 添加审批信息
|
||||
res = vehicleAuditLogGateway.add(vehicleAuditLogE);
|
||||
// 添加审批信息
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,13 +7,12 @@ import org.springframework.stereotype.Component;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-15 11:41:21
|
||||
*/
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:28
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleMessageRemoveExe {
|
||||
|
|
@ -22,7 +21,7 @@ public class VehicleMessageRemoveExe {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = vehicleMessageGateway.deletedVehicleMessageById(id);
|
||||
if(!res){
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
|
|
@ -31,7 +30,7 @@ public class VehicleMessageRemoveExe {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = vehicleMessageGateway.deletedVehicleMessageByIds(ids);
|
||||
if(!res){
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,27 +1,26 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditLogGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleAuditLogE;
|
||||
import com.zcloud.primeport.domain.model.VehicleMessageE;
|
||||
import com.zcloud.primeport.dto.VehicleMessageStatusCmd;
|
||||
import com.zcloud.primeport.dto.VehicleMessageUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.val;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-15 11:41:21
|
||||
*/
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:28
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleMessageUpdateExe {
|
||||
private final VehicleMessageGateway vehicleMessageGateway;
|
||||
private final VehicleAuditLogGateway vehicleAuditLogGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(VehicleMessageUpdateCmd vehicleMessageUpdateCmd) {
|
||||
VehicleMessageE vehicleMessageE = new VehicleMessageE();
|
||||
|
|
@ -31,62 +30,5 @@ public class VehicleMessageUpdateExe {
|
|||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端和监管端修改车辆信息
|
||||
* @param vehicleMessageUpdateCmd
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void executeFormCorp(VehicleMessageUpdateCmd vehicleMessageUpdateCmd) {
|
||||
VehicleMessageE vehicleMessageE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(vehicleMessageUpdateCmd, vehicleMessageE);
|
||||
vehicleMessageE.updateFromCorp(vehicleMessageE); //修改车辆时候,初始化车辆信息
|
||||
|
||||
// VehicleMessageE infoById = vehicleMessageGateway.getInfoById(vehicleMessageUpdateCmd.getId());
|
||||
// if (infoById == null){
|
||||
// throw new BizException("车辆信息不存在");
|
||||
// }
|
||||
// if (infoById.getIsAudit() != 2){
|
||||
// throw new BizException("车辆信息正在审核");
|
||||
// }
|
||||
boolean res = vehicleMessageGateway.update(vehicleMessageE); //修改车辆信息
|
||||
if (!Tools.isEmpty(vehicleMessageUpdateCmd.getApprovalUserId())){ //新增一个审批记录
|
||||
VehicleAuditLogE vehicleAuditLogE = new VehicleAuditLogE();
|
||||
BeanUtils.copyProperties(vehicleMessageUpdateCmd, vehicleAuditLogE);
|
||||
// vehicleAuditLogE.addForVehicleLog(vehicleAuditLogE,vehicleMessageUpdateCmd.getId(),2); // 添加审批信息
|
||||
res = vehicleAuditLogGateway.add(vehicleAuditLogE); // 添加审批信息
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateStatus(VehicleMessageStatusCmd statusCmd) {
|
||||
VehicleMessageE vehicleMessageE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(statusCmd, vehicleMessageE);
|
||||
vehicleMessageE.updateFromCorp(vehicleMessageE);
|
||||
boolean res = false;
|
||||
if (statusCmd.getIsStatus() == 0){ //
|
||||
val licenceNo = vehicleMessageGateway.countEnabledByLicenceNo(vehicleMessageE.getLicenceNo());
|
||||
if (licenceNo > 0){
|
||||
throw new BizException("车辆已存在");
|
||||
}
|
||||
val countByUserId = vehicleMessageGateway.countByUserId(vehicleMessageE.getEmployeeVehicleUserId());
|
||||
if (countByUserId >= 2){
|
||||
throw new BizException("你已经添加两个车辆了.请先停用后在启用.");
|
||||
}
|
||||
res = vehicleMessageGateway.update(vehicleMessageE);
|
||||
}else if (statusCmd.getIsStatus() == 1){
|
||||
res = vehicleMessageGateway.update(vehicleMessageE); //如果是车辆停工,就直接修改车辆状态
|
||||
}else {
|
||||
throw new BizException("车辆状态错误");
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||
import com.zcloud.primeport.domain.model.VehicleViolationsE;
|
||||
import com.zcloud.primeport.dto.VehicleViolationsAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -14,28 +13,21 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:28
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:28
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleViolationsAddExe {
|
||||
private final VehicleViolationsGateway vehicleViolationsGateway;
|
||||
private final VehicleBlackGateway vehicleBlackGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(VehicleViolationsAddCmd cmd) {
|
||||
VehicleViolationsE vehicleViolationsE = new VehicleViolationsE();
|
||||
BeanUtils.copyProperties(cmd, vehicleViolationsE);
|
||||
VehicleViolationsE examTypeE = new VehicleViolationsE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = vehicleViolationsGateway.add(vehicleViolationsE);
|
||||
Long count = vehicleViolationsGateway.getCountByVehicleId(vehicleViolationsE.getVehicleId());
|
||||
if (count >= 5){ //如果超过5次违规,则加入黑名单
|
||||
VehicleBlackE vehicleBlackE = new VehicleBlackE();
|
||||
vehicleBlackE.setVehicleId(vehicleViolationsE.getVehicleId());
|
||||
res = vehicleBlackGateway.add(vehicleBlackE);
|
||||
}
|
||||
res = vehicleViolationsGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -9,8 +10,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:29
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleViolationsE;
|
||||
|
|
@ -12,8 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:30
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VideoGateway;
|
||||
import com.zcloud.primeport.domain.model.VideoE;
|
||||
import com.zcloud.primeport.dto.VideoAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author makejava
|
||||
* @Date 2026-03-05 11:33:30
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VideoAddExe {
|
||||
private final VideoGateway videoGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(VideoAddCmd cmd) {
|
||||
VideoE examTypeE = new VideoE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = videoGateway.add(examTypeE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue