Compare commits
8 Commits
3c84472af5
...
809c3b7ffe
| Author | SHA1 | Date |
|---|---|---|
|
|
809c3b7ffe | |
|
|
e5c0e4f9ba | |
|
|
b050ca0bd6 | |
|
|
8c52107808 | |
|
|
2d753fc63b | |
|
|
ccd008d33c | |
|
|
fd8e03cabb | |
|
|
30403abd28 |
|
|
@ -6,6 +6,10 @@ application:
|
||||||
version:
|
version:
|
||||||
gateway: primeport
|
gateway: primeport
|
||||||
cn-name: 一级口门管理
|
cn-name: 一级口门管理
|
||||||
|
server:
|
||||||
|
port: 801
|
||||||
|
debug: true
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: ${application.name}${application.version}
|
name: ${application.name}${application.version}
|
||||||
|
|
@ -20,7 +24,7 @@ spring:
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- config-common.yml
|
- config-common.yml
|
||||||
- config-port.yml
|
# - config-port.yml
|
||||||
- config-mq.yml
|
- config-mq.yml
|
||||||
- config-log.yml
|
- config-log.yml
|
||||||
- config-sdk-server.yml
|
- config-sdk-server.yml
|
||||||
|
|
@ -36,3 +40,4 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||||
namespace: ${spring.cloud.nacos.config.namespace}
|
namespace: ${spring.cloud.nacos.config.namespace}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
server:
|
server:
|
||||||
port: 80
|
port: 801
|
||||||
debug: true
|
debug: true
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.zcloud.primeport.dto.InspectionDeptAddCmd;
|
||||||
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
||||||
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptInfoCO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
|
@ -45,16 +46,11 @@ public class InspectionDeptController {
|
||||||
return inspectionDeptService.listPage(qry);
|
return inspectionDeptService.listPage(qry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("所有数据")
|
|
||||||
@GetMapping("/listAll")
|
|
||||||
public MultiResponse<InspectionDeptCO> listAll() {
|
|
||||||
return MultiResponse.of(new ArrayList<InspectionDeptCO>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("详情")
|
@ApiOperation("详情")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public SingleResponse<InspectionDeptCO> getInfoById(@PathVariable("id") Long id) {
|
public SingleResponse<InspectionDeptInfoCO> getInfoById(@PathVariable("id") Long id) {
|
||||||
return SingleResponse.of(new InspectionDeptCO());
|
return SingleResponse.of(inspectionDeptService.getInfoById( id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
|
|
@ -64,13 +60,6 @@ public class InspectionDeptController {
|
||||||
return SingleResponse.buildSuccess();
|
return SingleResponse.buildSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("删除多个")
|
|
||||||
@DeleteMapping("/ids")
|
|
||||||
public Response removeBatch(@RequestParam Long[] ids) {
|
|
||||||
inspectionDeptService.removeBatch(ids);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("修改")
|
@ApiOperation("修改")
|
||||||
@PutMapping("/edit")
|
@PutMapping("/edit")
|
||||||
public SingleResponse edit(@Validated @RequestBody InspectionDeptUpdateCmd inspectionDeptUpdateCmd) {
|
public SingleResponse edit(@Validated @RequestBody InspectionDeptUpdateCmd inspectionDeptUpdateCmd) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
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.VehicleBlackServiceI;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackAddCmd;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackPageQry;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackUpdateCmd;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleBlackCO;
|
||||||
|
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-21 16:34:08
|
||||||
|
*/
|
||||||
|
@Api(tags = "")
|
||||||
|
@RequestMapping("/${application.gateway}/vehicleBlack")
|
||||||
|
@RestController
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleBlackController {
|
||||||
|
private final VehicleBlackServiceI vehicleBlackService;
|
||||||
|
|
||||||
|
@ApiOperation("新增")
|
||||||
|
@PostMapping("/save")
|
||||||
|
public SingleResponse<VehicleBlackCO> add(@Validated @RequestBody VehicleBlackAddCmd cmd) {
|
||||||
|
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||||
|
return vehicleBlackService.add(cmd);
|
||||||
|
}
|
||||||
|
@ApiOperation("分页")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public PageResponse<VehicleBlackCO> page(@RequestBody VehicleBlackPageQry qry) {
|
||||||
|
return vehicleBlackService.listPage(qry);
|
||||||
|
}
|
||||||
|
@ApiOperation("删除")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public Response remove(@PathVariable("id") Long id) {
|
||||||
|
vehicleBlackService.remove(id);
|
||||||
|
return SingleResponse.buildSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -83,5 +83,12 @@ public class VehicleMessageController {
|
||||||
public PageResponse<VehicleCountByCorpCO> listFromCorp(@RequestBody VehicleMessagePageQry qry) {
|
public PageResponse<VehicleCountByCorpCO> listFromCorp(@RequestBody VehicleMessagePageQry qry) {
|
||||||
return vehicleMessageService.listFromCorp(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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
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.VehicleViolationsServiceI;
|
||||||
|
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;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-adapter
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Api(tags = "车辆违规记录")
|
||||||
|
@RequestMapping("/${application.gateway}/vehicleViolations")
|
||||||
|
@RestController
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleViolationsController {
|
||||||
|
private final VehicleViolationsServiceI vehicleViolationsService;
|
||||||
|
|
||||||
|
@ApiOperation("新增")
|
||||||
|
@PostMapping("/save")
|
||||||
|
public SingleResponse<VehicleViolationsCO> add(@Validated @RequestBody VehicleViolationsAddCmd cmd) {
|
||||||
|
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||||
|
return vehicleViolationsService.add(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("分页")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public PageResponse<VehicleViolationsCO> page(@RequestBody VehicleViolationsPageQry qry) {
|
||||||
|
return vehicleViolationsService.listPage(qry);
|
||||||
|
}
|
||||||
|
@ApiOperation("详情")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public SingleResponse<VehicleViolationsCO> getInfoById(@PathVariable("id") Long id) {
|
||||||
|
return SingleResponse.of(vehicleViolationsService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public Response remove(@PathVariable("id") Long id) {
|
||||||
|
vehicleViolationsService.remove(id);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -2,8 +2,13 @@ package com.zcloud.primeport.command;
|
||||||
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
import com.alibaba.cola.exception.BizException;
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
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.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.InspectionDeptAddCmd;
|
||||||
|
import com.zcloud.primeport.dto.VehicleInspectionAddCmd;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
@ -20,14 +25,28 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class InspectionDeptAddExe {
|
public class InspectionDeptAddExe {
|
||||||
private final InspectionDeptGateway inspectionDeptGateway;
|
private final InspectionDeptGateway inspectionDeptGateway;
|
||||||
|
private final InspectionVehicleGateway inspectionVehicleGateway;
|
||||||
|
private final VehicleMessageGateway vehicleMessageGateway;
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean execute(InspectionDeptAddCmd cmd) {
|
public boolean execute(InspectionDeptAddCmd cmd) {
|
||||||
InspectionDeptE examTypeE = new InspectionDeptE();
|
InspectionDeptE examTypeE = new InspectionDeptE();
|
||||||
BeanUtils.copyProperties(cmd, examTypeE);
|
BeanUtils.copyProperties(cmd, examTypeE);
|
||||||
boolean res = false;
|
boolean res = false;
|
||||||
try {
|
try {
|
||||||
res = inspectionDeptGateway.add(examTypeE);
|
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) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,17 @@ package com.zcloud.primeport.command;
|
||||||
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
import com.alibaba.cola.exception.BizException;
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
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 lombok.AllArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-app
|
* web-app
|
||||||
|
|
@ -17,10 +24,18 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class InspectionDeptRemoveExe {
|
public class InspectionDeptRemoveExe {
|
||||||
private final InspectionDeptGateway inspectionDeptGateway;
|
private final InspectionDeptGateway inspectionDeptGateway;
|
||||||
|
private final InspectionVehicleRepository inspectionVehicleRepository;
|
||||||
|
private final InspectionVehicleGateway inspectionVehicleGateway;
|
||||||
|
private final VehicleMessageGateway vehicleMessageGateway;
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean execute(Long id) {
|
public boolean execute(Long id) {
|
||||||
boolean res = inspectionDeptGateway.deletedInspectionDeptById(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) {
|
if (!res) {
|
||||||
throw new BizException("删除失败");
|
throw new BizException("删除失败");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,23 @@ package com.zcloud.primeport.command;
|
||||||
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
import com.alibaba.cola.exception.BizException;
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
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.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.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 lombok.AllArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-app
|
* web-app
|
||||||
|
|
@ -20,12 +30,42 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class InspectionDeptUpdateExe {
|
public class InspectionDeptUpdateExe {
|
||||||
private final InspectionDeptGateway inspectionDeptGateway;
|
private final InspectionDeptGateway inspectionDeptGateway;
|
||||||
|
private final InspectionVehicleGateway inspectionVehicleGateway;
|
||||||
|
private final VehicleMessageGateway vehicleMessageGateway;
|
||||||
|
|
||||||
|
private final InspectionVehicleRepository inspectionVehicleRepository;
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void execute(InspectionDeptUpdateCmd inspectionDeptUpdateCmd) {
|
public void execute(InspectionDeptUpdateCmd inspectionDeptUpdateCmd) {
|
||||||
InspectionDeptE inspectionDeptE = new InspectionDeptE();
|
InspectionDeptE inspectionDeptE = new InspectionDeptE();
|
||||||
BeanUtils.copyProperties(inspectionDeptUpdateCmd, inspectionDeptE);
|
BeanUtils.copyProperties(inspectionDeptUpdateCmd, inspectionDeptE);
|
||||||
boolean res = inspectionDeptGateway.update(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) {
|
if (!res) {
|
||||||
throw new BizException("修改失败");
|
throw new BizException("修改失败");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
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;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackAddCmd;
|
||||||
|
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-21 16:34:08
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleBlackAddExe {
|
||||||
|
private final VehicleBlackGateway vehicleBlackGateway;
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean execute(VehicleBlackAddCmd cmd) {
|
||||||
|
VehicleBlackE vehicleBlackE = new VehicleBlackE();
|
||||||
|
BeanUtils.copyProperties(cmd, vehicleBlackE);
|
||||||
|
boolean res = false;
|
||||||
|
try {
|
||||||
|
res = vehicleBlackGateway.add(vehicleBlackE);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("保存失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.zcloud.primeport.command;
|
||||||
|
|
||||||
|
import com.alibaba.cola.exception.BizException;
|
||||||
|
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:09
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleBlackRemoveExe {
|
||||||
|
private final VehicleBlackGateway vehicleBlackGateway;
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean execute(Long id) {
|
||||||
|
boolean res = vehicleBlackGateway.deletedVehicleBlackById(id);
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("删除失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean execute(Long[] ids) {
|
||||||
|
boolean res = vehicleBlackGateway.deletedVehicleBlackByIds(ids);
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("删除失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
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;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackUpdateCmd;
|
||||||
|
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-21 16:34:09
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleBlackUpdateExe {
|
||||||
|
private final VehicleBlackGateway vehicleBlackGateway;
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void execute(VehicleBlackUpdateCmd vehicleBlackUpdateCmd) {
|
||||||
|
VehicleBlackE vehicleBlackE = new VehicleBlackE();
|
||||||
|
BeanUtils.copyProperties(vehicleBlackUpdateCmd, vehicleBlackE);
|
||||||
|
boolean res = vehicleBlackGateway.update(vehicleBlackE);
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("修改失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
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;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34: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);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("保存失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.zcloud.primeport.command;
|
||||||
|
import com.alibaba.cola.exception.BizException;
|
||||||
|
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleViolationsRemoveExe {
|
||||||
|
private final VehicleViolationsGateway vehicleViolationsGateway;
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean execute(Long id) {
|
||||||
|
boolean res = vehicleViolationsGateway.deletedVehicleViolationsById(id);
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("删除失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean execute(Long[] ids) {
|
||||||
|
boolean res = vehicleViolationsGateway.deletedVehicleViolationsByIds(ids);
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("删除失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
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;
|
||||||
|
import com.zcloud.primeport.dto.VehicleViolationsUpdateCmd;
|
||||||
|
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-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleViolationsUpdateExe {
|
||||||
|
private final VehicleViolationsGateway vehicleViolationsGateway;
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void execute(VehicleViolationsUpdateCmd vehicleViolationsUpdateCmd) {
|
||||||
|
VehicleViolationsE vehicleViolationsE = new VehicleViolationsE();
|
||||||
|
BeanUtils.copyProperties(vehicleViolationsUpdateCmd, vehicleViolationsE);
|
||||||
|
boolean res = vehicleViolationsGateway.update(vehicleViolationsE);
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("修改失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.zcloud.primeport.command.convertor;
|
package com.zcloud.primeport.command.convertor;
|
||||||
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptInfoCO;
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
|
@ -20,5 +21,10 @@ public interface InspectionDeptCoConvertor {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<InspectionDeptCO> converDOsToCOs(List<InspectionDeptDO> inspectionDeptDOs);
|
List<InspectionDeptCO> converDOsToCOs(List<InspectionDeptDO> inspectionDeptDOs);
|
||||||
|
|
||||||
|
|
||||||
|
InspectionDeptInfoCO converDoToCo (InspectionDeptDO inspectionDeptDO);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.primeport.command.convertor;
|
package com.zcloud.primeport.command.convertor;
|
||||||
|
|
||||||
|
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionVehicleCO;
|
import com.zcloud.primeport.dto.clientobject.InspectionVehicleCO;
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
|
|
@ -20,5 +21,12 @@ public interface InspectionVehicleCoConvertor {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<InspectionVehicleCO> converDOsToCOs(List<InspectionVehicleDO> inspectionVehicleDOs);
|
List<InspectionVehicleCO> converDOsToCOs(List<InspectionVehicleDO> inspectionVehicleDOs);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param inspectionVehicleDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
InspectionVehicleE converDOToE( InspectionVehicleDO inspectionVehicleDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.zcloud.primeport.command.convertor;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleBlackCO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:08
|
||||||
|
*/
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
|
public interface VehicleBlackCoConvertor {
|
||||||
|
/**
|
||||||
|
* @param vehicleBlackDOs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VehicleBlackCO> converDOsToCOs(List<VehicleBlackDO> vehicleBlackDOs);
|
||||||
|
|
||||||
|
VehicleBlackCO converDOToCO(VehicleBlackDO vehicleBlackDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.zcloud.primeport.command.convertor;
|
package com.zcloud.primeport.command.convertor;
|
||||||
|
|
||||||
import com.zcloud.primeport.dto.clientobject.VehicleCountByCorpCO;
|
import com.zcloud.primeport.dto.clientobject.VehicleCountByCorpCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleDeptInfoCO;
|
||||||
import com.zcloud.primeport.dto.clientobject.VehicleMessageCO;
|
import com.zcloud.primeport.dto.clientobject.VehicleMessageCO;
|
||||||
import com.zcloud.primeport.persistence.dataobject.VehicleCountByCorpDO;
|
import com.zcloud.primeport.persistence.dataobject.VehicleCountByCorpDO;
|
||||||
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
||||||
|
|
@ -28,5 +29,8 @@ public interface VehicleMessageCoConvertor {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<VehicleCountByCorpCO> converCountDOsToCOs(List<VehicleCountByCorpDO> vehicleMessageDOs);
|
List<VehicleCountByCorpCO> converCountDOsToCOs(List<VehicleCountByCorpDO> vehicleMessageDOs);
|
||||||
|
|
||||||
|
|
||||||
|
List<VehicleDeptInfoCO> converDOsToDeptInfoCOs(List<VehicleMessageDO> vehicleMessageDOs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.zcloud.primeport.command.convertor;
|
||||||
|
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleViolationsCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleViolationsListCO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleCountFromViolationsDO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
|
public interface VehicleViolationsCoConvertor {
|
||||||
|
/**
|
||||||
|
* @param vehicleViolationsDOs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VehicleViolationsCO> converDOsToCOs(List<VehicleViolationsDO> vehicleViolationsDOs);
|
||||||
|
|
||||||
|
VehicleViolationsCO converDOToCO(VehicleViolationsDO vehicleViolationsDO);
|
||||||
|
|
||||||
|
|
||||||
|
List<VehicleViolationsListCO> converFromViolationsDOsToCOs(List<VehicleCountFromViolationsDO> vehicleViolationsDOs);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -3,10 +3,18 @@ package com.zcloud.primeport.command.query;
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
import com.zcloud.primeport.command.convertor.InspectionDeptCoConvertor;
|
import com.zcloud.primeport.command.convertor.InspectionDeptCoConvertor;
|
||||||
|
import com.zcloud.primeport.command.convertor.VehicleMessageCoConvertor;
|
||||||
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptInfoCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleDeptInfoCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleMessageCO;
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
||||||
import com.zcloud.primeport.persistence.repository.InspectionDeptRepository;
|
import com.zcloud.primeport.persistence.repository.InspectionDeptRepository;
|
||||||
|
import com.zcloud.primeport.persistence.repository.InspectionVehicleRepository;
|
||||||
|
import com.zcloud.primeport.persistence.repository.VehicleMessageRepository;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
@ -26,6 +34,10 @@ public class InspectionDeptQueryExe {
|
||||||
private final InspectionDeptRepository inspectionDeptRepository;
|
private final InspectionDeptRepository inspectionDeptRepository;
|
||||||
private final InspectionDeptCoConvertor inspectionDeptCoConvertor;
|
private final InspectionDeptCoConvertor inspectionDeptCoConvertor;
|
||||||
|
|
||||||
|
private final InspectionVehicleRepository inspectionVehicleRepository;
|
||||||
|
private final VehicleMessageRepository vehicleMessageRepository;
|
||||||
|
|
||||||
|
private final VehicleMessageCoConvertor vehicleMessageCoConvertor;
|
||||||
/**
|
/**
|
||||||
* 分页
|
* 分页
|
||||||
*
|
*
|
||||||
|
|
@ -38,5 +50,24 @@ public class InspectionDeptQueryExe {
|
||||||
List<InspectionDeptCO> examCenterCOS = inspectionDeptCoConvertor.converDOsToCOs(pageResponse.getData());
|
List<InspectionDeptCO> examCenterCOS = inspectionDeptCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id获取详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public InspectionDeptInfoCO executeById(Long id) {
|
||||||
|
InspectionDeptDO inspectionDeptDO = inspectionDeptRepository.getById(id);
|
||||||
|
InspectionDeptInfoCO deptInfoCO = inspectionDeptCoConvertor.converDoToCo(inspectionDeptDO); // 获取部门信息
|
||||||
|
List<InspectionVehicleDO> inspectionVehicleDOS = inspectionVehicleRepository.queryInspectionVehicleByDeptId(id); // 获取部门下的车辆信息
|
||||||
|
Long[] ids = new Long[inspectionVehicleDOS.size()];
|
||||||
|
for (int i = 0; i < inspectionVehicleDOS.size(); i++) {
|
||||||
|
ids[i] = inspectionVehicleDOS.get(i).getVehicleMessageId();
|
||||||
|
}
|
||||||
|
List<VehicleMessageDO> vehicleMessageDOS = vehicleMessageRepository.listAll(ids); // 获取车辆信息
|
||||||
|
List<VehicleDeptInfoCO> vehicleMessageCOS = vehicleMessageCoConvertor.converDOsToDeptInfoCOs(vehicleMessageDOS); // 获取车辆信息
|
||||||
|
deptInfoCO.setVehicleDeptInfoCOS(vehicleMessageCOS);
|
||||||
|
return deptInfoCO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.zcloud.primeport.command.query;
|
||||||
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.zcloud.primeport.command.convertor.VehicleBlackCoConvertor;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackPageQry;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleBlackCO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
||||||
|
import com.zcloud.primeport.persistence.repository.VehicleBlackRepository;
|
||||||
|
import com.zcloud.primeport.persistence.repository.VehicleMessageRepository;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:09
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleBlackQueryExe {
|
||||||
|
private final VehicleBlackRepository vehicleBlackRepository;
|
||||||
|
private final VehicleBlackCoConvertor vehicleBlackCoConvertor;
|
||||||
|
private final VehicleMessageRepository vehicleMessageRepository;
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public VehicleBlackCO queryById(Long id) {
|
||||||
|
return vehicleBlackCoConvertor.converDOToCO(vehicleBlackRepository.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页
|
||||||
|
*
|
||||||
|
* @param vehicleBlackPageQry
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public PageResponse<VehicleBlackCO> execute(VehicleBlackPageQry vehicleBlackPageQry) {
|
||||||
|
Map<String, Object> params = PageQueryHelper.toHashMap(vehicleBlackPageQry);
|
||||||
|
PageResponse<VehicleBlackDO> pageResponse = vehicleBlackRepository.listPage(params);
|
||||||
|
List<VehicleBlackCO> examCenterCOS = vehicleBlackCoConvertor.converDOsToCOs(pageResponse.getData()); //分页获取信息
|
||||||
|
Long[] vehicleIds = examCenterCOS.stream().map(VehicleBlackCO::getVehicleId).toArray(Long[]::new);
|
||||||
|
List<VehicleMessageDO> vehicleMessageDOS = vehicleMessageRepository.listAll(vehicleIds); // 根据id获取信息
|
||||||
|
Map<Long, VehicleMessageDO> vehicleMessageDOMap = new HashMap<>();
|
||||||
|
for (VehicleMessageDO vehicleMessageDO : vehicleMessageDOS) {
|
||||||
|
vehicleMessageDOMap.put(vehicleMessageDO.getId(), vehicleMessageDO);
|
||||||
|
}
|
||||||
|
for (VehicleBlackCO vehicleBlackCO : examCenterCOS) {
|
||||||
|
if (vehicleMessageDOMap.containsKey(vehicleBlackCO.getVehicleId())){
|
||||||
|
vehicleBlackCO.setVehicleId(vehicleMessageDOMap.get(vehicleBlackCO.getVehicleId()).getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -68,5 +68,12 @@ public class VehicleMessageQueryExe {
|
||||||
}
|
}
|
||||||
return vehicleMessageCOMap;
|
return vehicleMessageCOMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public VehicleMessageCO infoByLicenceNo(String licenceNo) {
|
||||||
|
|
||||||
|
VehicleMessageDO info = vehicleMessageRepository.getByLicenceNo(licenceNo);
|
||||||
|
VehicleMessageCO vehicleMessageCO = vehicleMessageCoConvertor.converDOsToCOs(info);
|
||||||
|
return vehicleMessageCO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.zcloud.primeport.command.query;
|
||||||
|
|
||||||
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.zcloud.primeport.command.convertor.VehicleViolationsCoConvertor;
|
||||||
|
import com.zcloud.primeport.dto.VehicleViolationsPageQry;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleViolationsCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleViolationsListCO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleCountFromViolationsDO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||||
|
import com.zcloud.primeport.persistence.repository.VehicleMessageRepository;
|
||||||
|
import com.zcloud.primeport.persistence.repository.VehicleViolationsRepository;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleViolationsQueryExe {
|
||||||
|
private final VehicleViolationsRepository vehicleViolationsRepository;
|
||||||
|
private final VehicleViolationsCoConvertor vehicleViolationsCoConvertor;
|
||||||
|
private final VehicleMessageRepository vehicleMessageRepository;
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public VehicleViolationsCO queryById(Long id) {
|
||||||
|
return vehicleViolationsCoConvertor.converDOToCO(vehicleViolationsRepository.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页
|
||||||
|
*
|
||||||
|
* @param vehicleViolationsPageQry
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public PageResponse<VehicleViolationsCO> execute(VehicleViolationsPageQry vehicleViolationsPageQry) {
|
||||||
|
Map<String, Object> params = PageQueryHelper.toHashMap(vehicleViolationsPageQry);
|
||||||
|
PageResponse<VehicleViolationsDO> pageResponse = vehicleViolationsRepository.listPage(params);
|
||||||
|
List<VehicleViolationsCO> examCenterCOS = vehicleViolationsCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||||
|
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public PageResponse<VehicleViolationsListCO> executeFromViolations(VehicleViolationsPageQry vehicleViolationsPageQry) {
|
||||||
|
Map<String, Object> params = PageQueryHelper.toHashMap(vehicleViolationsPageQry);
|
||||||
|
PageResponse<VehicleCountFromViolationsDO> pageResponse = vehicleMessageRepository.listPageFromViolations(params);
|
||||||
|
List<VehicleViolationsListCO> examCenterCOS = vehicleViolationsCoConvertor.converFromViolationsDOsToCOs(pageResponse.getData());
|
||||||
|
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.zcloud.primeport.dto.InspectionDeptAddCmd;
|
||||||
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
||||||
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptInfoCO;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
@ -54,5 +55,10 @@ public class InspectionDeptServiceImpl implements InspectionDeptServiceI {
|
||||||
public void removeBatch(Long[] ids) {
|
public void removeBatch(Long[] ids) {
|
||||||
inspectionDeptRemoveExe.execute(ids);
|
inspectionDeptRemoveExe.execute(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InspectionDeptInfoCO getInfoById(Long id) {
|
||||||
|
return inspectionDeptQueryExe.executeById( id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.zcloud.primeport.service;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.alibaba.cola.dto.SingleResponse;
|
||||||
|
import com.zcloud.primeport.api.VehicleBlackServiceI;
|
||||||
|
import com.zcloud.primeport.command.VehicleBlackAddExe;
|
||||||
|
import com.zcloud.primeport.command.VehicleBlackRemoveExe;
|
||||||
|
import com.zcloud.primeport.command.VehicleBlackUpdateExe;
|
||||||
|
import com.zcloud.primeport.command.query.VehicleBlackQueryExe;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackAddCmd;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackPageQry;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackUpdateCmd;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleBlackCO;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleBlackServiceImpl implements VehicleBlackServiceI {
|
||||||
|
private final VehicleBlackAddExe vehicleBlackAddExe;
|
||||||
|
private final VehicleBlackUpdateExe vehicleBlackUpdateExe;
|
||||||
|
private final VehicleBlackRemoveExe vehicleBlackRemoveExe;
|
||||||
|
private final VehicleBlackQueryExe vehicleBlackQueryExe;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VehicleBlackCO queryById(Long id) {
|
||||||
|
return vehicleBlackQueryExe.queryById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResponse<VehicleBlackCO> listPage(VehicleBlackPageQry qry) {
|
||||||
|
|
||||||
|
return vehicleBlackQueryExe.execute(qry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SingleResponse add(VehicleBlackAddCmd cmd) {
|
||||||
|
|
||||||
|
vehicleBlackAddExe.execute(cmd);
|
||||||
|
return SingleResponse.buildSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void edit(VehicleBlackUpdateCmd vehicleBlackUpdateCmd) {
|
||||||
|
vehicleBlackUpdateExe.execute(vehicleBlackUpdateCmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove(Long id) {
|
||||||
|
vehicleBlackRemoveExe.execute(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeBatch(Long[] ids) {
|
||||||
|
vehicleBlackRemoveExe.execute(ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -80,5 +80,11 @@ public class VehicleMessageServiceImpl implements VehicleMessageServiceI {
|
||||||
return vehicleMessageQueryExe.listFromCorp(qry);
|
return vehicleMessageQueryExe.listFromCorp(qry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VehicleMessageCO infoByLicenceNo(String licenceNo) {
|
||||||
|
VehicleMessageCO vehicleMessageCO = vehicleMessageQueryExe.infoByLicenceNo(licenceNo);
|
||||||
|
return vehicleMessageCO;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
package com.zcloud.primeport.service;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.alibaba.cola.dto.SingleResponse;
|
||||||
|
import com.zcloud.primeport.api.VehicleViolationsServiceI;
|
||||||
|
import com.zcloud.primeport.command.VehicleViolationsAddExe;
|
||||||
|
import com.zcloud.primeport.command.VehicleViolationsRemoveExe;
|
||||||
|
import com.zcloud.primeport.command.VehicleViolationsUpdateExe;
|
||||||
|
import com.zcloud.primeport.command.query.VehicleViolationsQueryExe;
|
||||||
|
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 lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleViolationsServiceImpl implements VehicleViolationsServiceI {
|
||||||
|
private final VehicleViolationsAddExe vehicleViolationsAddExe;
|
||||||
|
private final VehicleViolationsUpdateExe vehicleViolationsUpdateExe;
|
||||||
|
private final VehicleViolationsRemoveExe vehicleViolationsRemoveExe;
|
||||||
|
private final VehicleViolationsQueryExe vehicleViolationsQueryExe;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VehicleViolationsCO queryById(Long id) {
|
||||||
|
return vehicleViolationsQueryExe.queryById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResponse<VehicleViolationsCO> listPage(VehicleViolationsPageQry qry) {
|
||||||
|
|
||||||
|
return vehicleViolationsQueryExe.execute(qry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SingleResponse add(VehicleViolationsAddCmd cmd) {
|
||||||
|
|
||||||
|
vehicleViolationsAddExe.execute(cmd);
|
||||||
|
return SingleResponse.buildSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void edit(VehicleViolationsUpdateCmd vehicleViolationsUpdateCmd) {
|
||||||
|
vehicleViolationsUpdateExe.execute(vehicleViolationsUpdateCmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove(Long id) {
|
||||||
|
vehicleViolationsRemoveExe.execute(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeBatch(Long[] ids) {
|
||||||
|
vehicleViolationsRemoveExe.execute(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResponse<VehicleViolationsListCO> listAndCountPage(VehicleViolationsPageQry qry) {
|
||||||
|
return vehicleViolationsQueryExe.executeFromViolations(qry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -6,6 +6,7 @@ import com.zcloud.primeport.dto.InspectionDeptAddCmd;
|
||||||
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
||||||
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.InspectionDeptInfoCO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-client
|
* web-client
|
||||||
|
|
@ -23,5 +24,7 @@ public interface InspectionDeptServiceI {
|
||||||
void remove(Long id);
|
void remove(Long id);
|
||||||
|
|
||||||
void removeBatch(Long[] ids);
|
void removeBatch(Long[] ids);
|
||||||
|
|
||||||
|
InspectionDeptInfoCO getInfoById(Long id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.zcloud.primeport.api;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.alibaba.cola.dto.SingleResponse;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackAddCmd;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackPageQry;
|
||||||
|
import com.zcloud.primeport.dto.VehicleBlackUpdateCmd;
|
||||||
|
import com.zcloud.primeport.dto.clientobject.VehicleBlackCO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:09
|
||||||
|
*/
|
||||||
|
public interface VehicleBlackServiceI {
|
||||||
|
VehicleBlackCO queryById(Long id);
|
||||||
|
|
||||||
|
PageResponse<VehicleBlackCO> listPage(VehicleBlackPageQry qry);
|
||||||
|
|
||||||
|
SingleResponse<VehicleBlackCO> add(VehicleBlackAddCmd cmd);
|
||||||
|
|
||||||
|
void edit(VehicleBlackUpdateCmd cmd);
|
||||||
|
|
||||||
|
void remove(Long id);
|
||||||
|
|
||||||
|
void removeBatch(Long[] ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -32,5 +32,8 @@ public interface VehicleMessageServiceI {
|
||||||
|
|
||||||
|
|
||||||
PageResponse<VehicleCountByCorpCO> listFromCorp(VehicleMessagePageQry qry);
|
PageResponse<VehicleCountByCorpCO> listFromCorp(VehicleMessagePageQry qry);
|
||||||
|
|
||||||
|
|
||||||
|
VehicleMessageCO infoByLicenceNo(String licenceNo );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.zcloud.primeport.api;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.alibaba.cola.dto.SingleResponse;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
public interface VehicleViolationsServiceI {
|
||||||
|
VehicleViolationsCO queryById(Long id);
|
||||||
|
|
||||||
|
PageResponse<VehicleViolationsCO> listPage(VehicleViolationsPageQry qry);
|
||||||
|
|
||||||
|
SingleResponse<VehicleViolationsCO> add(VehicleViolationsAddCmd cmd);
|
||||||
|
|
||||||
|
void edit(VehicleViolationsUpdateCmd cmd);
|
||||||
|
|
||||||
|
void remove(Long id);
|
||||||
|
|
||||||
|
void removeBatch(Long[] ids);
|
||||||
|
|
||||||
|
|
||||||
|
PageResponse<VehicleViolationsListCO> listAndCountPage(VehicleViolationsPageQry qry);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -9,6 +9,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-client
|
* web-client
|
||||||
|
|
@ -21,11 +22,13 @@ import javax.validation.constraints.NotEmpty;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class InspectionDeptAddCmd extends Command {
|
public class InspectionDeptAddCmd extends Command {
|
||||||
@ApiModelProperty(value = "主键", name = "id", required = true)
|
|
||||||
@NotEmpty(message = "主键不能为空")
|
|
||||||
private Long id;
|
|
||||||
@ApiModelProperty(value = "名称", name = "name", required = true)
|
@ApiModelProperty(value = "名称", name = "name", required = true)
|
||||||
@NotEmpty(message = "名称不能为空")
|
@NotEmpty(message = "名称不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
@ApiModelProperty(value = "单位车辆信息部门为空", name = "VehicleMessageAddCmd", required = true)
|
||||||
|
@NotEmpty(message = "单位车辆信息部门为空")
|
||||||
|
List<VehicleInspectionAddCmd> VehicleMessageAddCmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-client
|
* web-client
|
||||||
|
|
@ -28,5 +29,9 @@ public class InspectionDeptUpdateCmd extends Command {
|
||||||
@NotEmpty(message = "名称不能为空")
|
@NotEmpty(message = "名称不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "单位车辆信息部门为空", name = "VehicleMessageAddCmd", required = true)
|
||||||
|
@NotEmpty(message = "单位车辆信息部门为空")
|
||||||
|
List<VehicleInspectionUpdateCmd> VehicleMessageAddCmd;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.zcloud.primeport.dto;
|
||||||
|
import com.alibaba.cola.dto.Command;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:08
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleBlackAddCmd extends Command {
|
||||||
|
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id", name = "vehicleId", required = true)
|
||||||
|
@NotNull(message = "车辆信息表(t_vehicle_message)的主键id不能为空")
|
||||||
|
private Long vehicleId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.zcloud.primeport.dto;
|
||||||
|
import com.alibaba.cola.dto.PageQuery;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleBlackPageQry extends PageQuery {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||||
|
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||||
|
* - `eq`: 等值查询,对应SQL的=操作符
|
||||||
|
* - `gt`: 大于比较查询
|
||||||
|
* - `lt`: 小于比较查询
|
||||||
|
* - `ge`: 大于等于比较查询
|
||||||
|
* - `le`: 小于等于比较查询
|
||||||
|
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||||
|
*/
|
||||||
|
private Long likeVehicleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.zcloud.primeport.dto;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.Command;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:09
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleBlackUpdateCmd extends Command {
|
||||||
|
@ApiModelProperty(value = "id", name = "id", required = true)
|
||||||
|
@NotNull(message = "id不能为空")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id", name = "vehicleId", required = true)
|
||||||
|
@NotNull(message = "车辆信息表(t_vehicle_message)的主键id不能为空")
|
||||||
|
private Long vehicleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.zcloud.primeport.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.Command;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-15 11:41:21
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleInspectionAddCmd extends Command {
|
||||||
|
@ApiModelProperty(value = "车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌", name = "licenceType", required = true)
|
||||||
|
@NotEmpty(message = "车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌不能为空")
|
||||||
|
private Integer licenceType;
|
||||||
|
@ApiModelProperty(value = "车牌号", name = "licenceNo", required = true)
|
||||||
|
@NotEmpty(message = "车牌号不能为空")
|
||||||
|
private String licenceNo;
|
||||||
|
@ApiModelProperty(value = "车辆类型", name = "vehicleType", required = true)
|
||||||
|
@NotEmpty(message = "车辆类型不能为空")
|
||||||
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字", name = "vehicleTypeName", required = true)
|
||||||
|
@NotEmpty(message = "车辆类型不能为空-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
|
@ApiModelProperty(value = "访问起始时间", name = "visitStartTime", required = true)
|
||||||
|
@NotEmpty(message = "访问起始时间不能为空")
|
||||||
|
private Date visitStartTime;
|
||||||
|
@ApiModelProperty(value = "访问结束时间", name = "visitEndTime", required = true)
|
||||||
|
@NotEmpty(message = "访问结束时间不能为空")
|
||||||
|
private Date visitEndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.zcloud.primeport.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.Command;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-15 11:41:21
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleInspectionUpdateCmd extends Command {
|
||||||
|
@ApiModelProperty(value = "车辆id", name = "id")
|
||||||
|
private Integer id;
|
||||||
|
@ApiModelProperty(value = "车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌", name = "licenceType", required = true)
|
||||||
|
@NotNull(message = "车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌不能为空")
|
||||||
|
private Integer licenceType;
|
||||||
|
@ApiModelProperty(value = "车牌号", name = "licenceNo", required = true)
|
||||||
|
@NotEmpty(message = "车牌号不能为空")
|
||||||
|
private String licenceNo;
|
||||||
|
@ApiModelProperty(value = "车辆类型", name = "vehicleType", required = true)
|
||||||
|
@NotEmpty(message = "车辆类型不能为空")
|
||||||
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字", name = "vehicleTypeName", required = true)
|
||||||
|
@NotEmpty(message = "车辆类型不能为空-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
|
@ApiModelProperty(value = "访问起始时间", name = "visitStartTime", required = true)
|
||||||
|
@NotEmpty(message = "访问起始时间不能为空")
|
||||||
|
private Date visitStartTime;
|
||||||
|
@ApiModelProperty(value = "访问结束时间", name = "visitEndTime", required = true)
|
||||||
|
@NotEmpty(message = "访问结束时间不能为空")
|
||||||
|
private Date visitEndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -37,6 +37,9 @@ public class VehicleMessageAddCmd extends Command {
|
||||||
@ApiModelProperty(value = "车辆类型", name = "vehicleType", required = true)
|
@ApiModelProperty(value = "车辆类型", name = "vehicleType", required = true)
|
||||||
@NotEmpty(message = "车辆类型不能为空")
|
@NotEmpty(message = "车辆类型不能为空")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字", name = "vehicleTypeName", required = true)
|
||||||
|
@NotEmpty(message = "车辆类型不能为空-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆", name = "vehicleBelongType", required = true)
|
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆", name = "vehicleBelongType", required = true)
|
||||||
@NotEmpty(message = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆不能为空")
|
@NotEmpty(message = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆不能为空")
|
||||||
private Integer vehicleBelongType;
|
private Integer vehicleBelongType;
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,9 @@ public class VehicleMessageForCorpAddCmd extends Command {
|
||||||
@ApiModelProperty(value = "车辆类型", name = "vehicleType", required = true)
|
@ApiModelProperty(value = "车辆类型", name = "vehicleType", required = true)
|
||||||
@NotEmpty(message = "车辆类型")
|
@NotEmpty(message = "车辆类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字", name = "vehicleTypeName", required = true)
|
||||||
|
@NotEmpty(message = "车辆类型不能为空-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-外部车辆3:货运车辆", name = "vehicleBelongType", required = true)
|
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-外部车辆3:货运车辆", name = "vehicleBelongType", required = true)
|
||||||
@NotNull(message = "车辆所属类型 0-员工车辆 1- 单位车辆 2-外部车辆3:货运车辆不能为空")
|
@NotNull(message = "车辆所属类型 0-员工车辆 1- 单位车辆 2-外部车辆3:货运车辆不能为空")
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,9 @@ public class VehicleMessageUpdateCmd extends Command {
|
||||||
@ApiModelProperty(value = "车辆类型 0-货车 1- 轿车 2-大巴客车", name = "vehicleType", required = true)
|
@ApiModelProperty(value = "车辆类型 0-货车 1- 轿车 2-大巴客车", name = "vehicleType", required = true)
|
||||||
@NotEmpty(message = "车辆类型 0-货车 1- 轿车 2-大巴客车不能为空")
|
@NotEmpty(message = "车辆类型 0-货车 1- 轿车 2-大巴客车不能为空")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字", name = "vehicleTypeName", required = true)
|
||||||
|
@NotEmpty(message = "车辆类型不能为空-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-外部车辆3:货运车辆", name = "vehicleBelongType", required = true)
|
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-外部车辆3:货运车辆", name = "vehicleBelongType", required = true)
|
||||||
@NotNull(message = "车辆所属类型 0-员工车辆 1- 单位车辆 2-外部车辆3:货运车辆不能为空")
|
@NotNull(message = "车辆所属类型 0-员工车辆 1- 单位车辆 2-外部车辆3:货运车辆不能为空")
|
||||||
private Integer vehicleBelongType;
|
private Integer vehicleBelongType;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.zcloud.primeport.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.Command;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:28
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleViolationsAddCmd extends Command {
|
||||||
|
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id", name = "vehicleId", required = true)
|
||||||
|
@NotNull(message = "车辆信息主键")
|
||||||
|
private Long vehicleId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "违规类型(0-未按规定车道行驶,1-违规停车)", name = "violationType", required = true)
|
||||||
|
@NotNull(message = "违规类型(0-未按规定车道行驶,1-违规停车)不能为空")
|
||||||
|
private Integer violationType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "违规区域(位置)", name = "location", required = true)
|
||||||
|
@NotEmpty(message = "违规区域(位置)不能为空")
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "违规图片的存储路径", name = "filepath", required = true)
|
||||||
|
@NotEmpty(message = "违规图片的存储路径不能为空")
|
||||||
|
private String filepath;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "违规说明", name = "describeMessage", required = true)
|
||||||
|
@NotEmpty(message = "违规说明不能为空")
|
||||||
|
private String describeMessage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "违规时间", name = "violationtime", required = true)
|
||||||
|
@NotNull(message = "违规时间不能为空")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date violationtime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.zcloud.primeport.dto;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.PageQuery;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleViolationsPageQry extends PageQuery {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||||
|
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||||
|
* - `eq`: 等值查询,对应SQL的=操作符
|
||||||
|
* - `gt`: 大于比较查询
|
||||||
|
* - `lt`: 小于比较查询
|
||||||
|
* - `ge`: 大于等于比较查询
|
||||||
|
* - `le`: 小于等于比较查询
|
||||||
|
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||||
|
*/
|
||||||
|
private Long likeVehicleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.zcloud.primeport.dto;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.Command;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleViolationsUpdateCmd extends Command {
|
||||||
|
@ApiModelProperty(value = "车辆违规记录表的id", name = "id", required = true)
|
||||||
|
@NotNull(message = "车辆违规记录表的id不能为空")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id", name = "vehicleId", required = true)
|
||||||
|
@NotNull(message = "车辆信息表(t_vehicle_message)的主键id不能为空")
|
||||||
|
private Long vehicleId;
|
||||||
|
@ApiModelProperty(value = "违规类型(0-未按规定车道行驶,1-违规停车)", name = "violationType", required = true)
|
||||||
|
@NotNull(message = "违规类型(0-未按规定车道行驶,1-违规停车)不能为空")
|
||||||
|
private Integer violationType;
|
||||||
|
@ApiModelProperty(value = "违规区域(位置)", name = "location", required = true)
|
||||||
|
@NotEmpty(message = "违规区域(位置)不能为空")
|
||||||
|
private String location;
|
||||||
|
@ApiModelProperty(value = "违规图片的存储路径", name = "filepath", required = true)
|
||||||
|
@NotEmpty(message = "违规图片的存储路径不能为空")
|
||||||
|
private String filepath;
|
||||||
|
@ApiModelProperty(value = "违规说明", name = "describeMessage", required = true)
|
||||||
|
@NotEmpty(message = "违规说明不能为空")
|
||||||
|
private String describeMessage;
|
||||||
|
@ApiModelProperty(value = "违规时间", name = "violationtime", required = true)
|
||||||
|
@NotNull(message = "违规时间不能为空")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date violationtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.zcloud.primeport.dto.clientobject;
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.ClientObject;
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -21,5 +22,12 @@ public class InspectionDeptCO extends ClientObject {
|
||||||
@ApiModelProperty(value = "名称")
|
@ApiModelProperty(value = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "检查部门下的车辆数量")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer vehicleCount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.zcloud.primeport.dto.clientobject;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.zcloud.primeport.dto.VehicleInspectionUpdateCmd;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-20 15:24:07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class InspectionDeptInfoCO extends ClientObject {
|
||||||
|
//主键
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Long id;
|
||||||
|
//名称
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "单位车辆信息部门为空", name = "VehicleMessageAddCmd", required = true)
|
||||||
|
@NotEmpty(message = "单位车辆信息部门为空")
|
||||||
|
List<VehicleDeptInfoCO> vehicleDeptInfoCOS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.zcloud.primeport.dto.clientobject;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleBlackCO extends ClientObject {
|
||||||
|
//id
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
//车辆信息表(t_vehicle_message)的主键id
|
||||||
|
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id")
|
||||||
|
private Long vehicleId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "车辆信息")
|
||||||
|
private VehicleMessageCO vehicleMessage;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.zcloud.primeport.dto.clientobject;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-15 11:41:21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleCountFromViolationsCO extends BaseDO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
//业务id
|
||||||
|
@ApiModelProperty(value = "业务id")
|
||||||
|
private String vehicleMessageId;
|
||||||
|
//车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌
|
||||||
|
@ApiModelProperty(value = "车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌")
|
||||||
|
private Integer licenceType;
|
||||||
|
//车牌号
|
||||||
|
@ApiModelProperty(value = "车牌号")
|
||||||
|
private String licenceNo;
|
||||||
|
//车辆类型
|
||||||
|
@ApiModelProperty(value = "车辆类型")
|
||||||
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
|
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆")
|
||||||
|
private Integer vehicleBelongType;
|
||||||
|
@ApiModelProperty(value = "违规数量")
|
||||||
|
private String violationsCount;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.zcloud.primeport.dto.clientobject;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-15 11:41:21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleDeptInfoCO extends ClientObject {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌", name = "licenceType", required = true)
|
||||||
|
@NotNull(message = "车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌不能为空")
|
||||||
|
private Integer licenceType;
|
||||||
|
@ApiModelProperty(value = "车牌号", name = "licenceNo", required = true)
|
||||||
|
@NotEmpty(message = "车牌号不能为空")
|
||||||
|
private String licenceNo;
|
||||||
|
@ApiModelProperty(value = "车辆类型", name = "vehicleType", required = true)
|
||||||
|
@NotEmpty(message = "车辆类型不能为空")
|
||||||
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字", name = "vehicleTypeName", required = true)
|
||||||
|
@NotEmpty(message = "车辆类型不能为空-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
|
@ApiModelProperty(value = "访问起始时间", name = "visitStartTime", required = true)
|
||||||
|
@NotEmpty(message = "访问起始时间不能为空")
|
||||||
|
private Date visitStartTime;
|
||||||
|
@ApiModelProperty(value = "访问结束时间", name = "visitEndTime", required = true)
|
||||||
|
@NotEmpty(message = "访问结束时间不能为空")
|
||||||
|
private Date visitEndTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -30,6 +30,8 @@ public class VehicleMessageCO extends ClientObject {
|
||||||
//车辆类型
|
//车辆类型
|
||||||
@ApiModelProperty(value = "车辆类型")
|
@ApiModelProperty(value = "车辆类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字", name = "vehicleTypeName", required = true)
|
||||||
|
private String vehicleTypeName;
|
||||||
//车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆
|
//车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆
|
||||||
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆")
|
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆")
|
||||||
private Integer vehicleBelongType;
|
private Integer vehicleBelongType;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.zcloud.primeport.dto.clientobject;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleViolationsCO extends ClientObject {
|
||||||
|
//车辆违规记录表的id
|
||||||
|
@ApiModelProperty(value = "车辆违规记录表的id")
|
||||||
|
private Long id;
|
||||||
|
//车辆信息表(t_vehicle_message)的主键id
|
||||||
|
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id")
|
||||||
|
private Long vehicleId;
|
||||||
|
//违规类型(0-未按规定车道行驶,1-违规停车)
|
||||||
|
@ApiModelProperty(value = "违规类型(0-未按规定车道行驶,1-违规停车)")
|
||||||
|
private Integer violationType;
|
||||||
|
//违规区域(位置)
|
||||||
|
@ApiModelProperty(value = "违规区域(位置)")
|
||||||
|
private String location;
|
||||||
|
//违规图片的存储路径
|
||||||
|
@ApiModelProperty(value = "违规图片的存储路径")
|
||||||
|
private String filepath;
|
||||||
|
//违规说明
|
||||||
|
@ApiModelProperty(value = "违规说明")
|
||||||
|
private String describeMessage;
|
||||||
|
//违规时间
|
||||||
|
@ApiModelProperty(value = "违规时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date violationtime;
|
||||||
|
//删除标识
|
||||||
|
@ApiModelProperty(value = "删除标识")
|
||||||
|
private String deleteEnum;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.zcloud.primeport.dto.clientobject;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleViolationsListCO extends ClientObject {
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
//业务id
|
||||||
|
@ApiModelProperty(value = "业务id")
|
||||||
|
private String vehicleMessageId;
|
||||||
|
//车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌
|
||||||
|
@ApiModelProperty(value = "车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌")
|
||||||
|
private Integer licenceType;
|
||||||
|
//车牌号
|
||||||
|
@ApiModelProperty(value = "车牌号")
|
||||||
|
private String licenceNo;
|
||||||
|
//车辆类型
|
||||||
|
@ApiModelProperty(value = "车辆类型")
|
||||||
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
|
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆")
|
||||||
|
private Integer vehicleBelongType;
|
||||||
|
@ApiModelProperty(value = "违规数量")
|
||||||
|
private String violationsCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -13,7 +13,7 @@ public interface InspectionDeptGateway {
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
Boolean add(InspectionDeptE inspectionDeptE);
|
InspectionDeptE add(InspectionDeptE inspectionDeptE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.zcloud.primeport.domain.gateway;
|
||||||
|
|
||||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-domain
|
* web-domain
|
||||||
*
|
*
|
||||||
|
|
@ -27,5 +29,6 @@ public interface InspectionVehicleGateway {
|
||||||
Boolean deletedInspectionVehicleById(Long id);
|
Boolean deletedInspectionVehicleById(Long id);
|
||||||
|
|
||||||
Boolean deletedInspectionVehicleByIds(Long[] id);
|
Boolean deletedInspectionVehicleByIds(Long[] id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.zcloud.primeport.domain.gateway;
|
||||||
|
|
||||||
|
|
||||||
|
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||||
|
/**
|
||||||
|
* web-domain
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:08
|
||||||
|
*/
|
||||||
|
public interface VehicleBlackGateway {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
Boolean add(VehicleBlackE vehicleBlackE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
Boolean update(VehicleBlackE vehicleBlackE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
Boolean deletedVehicleBlackById(Long id);
|
||||||
|
|
||||||
|
Boolean deletedVehicleBlackByIds(Long[] id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.zcloud.primeport.domain.gateway;
|
||||||
|
|
||||||
|
|
||||||
|
import com.zcloud.primeport.domain.model.VehicleViolationsE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-domain
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
public interface VehicleViolationsGateway {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
Boolean add(VehicleViolationsE vehicleViolationsE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
Boolean update(VehicleViolationsE vehicleViolationsE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
Boolean deletedVehicleViolationsById(Long id);
|
||||||
|
|
||||||
|
Boolean deletedVehicleViolationsByIds(Long[] id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询违规记录次数
|
||||||
|
* @param vehicleId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Long getCountByVehicleId(Long vehicleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -21,5 +21,12 @@ public class InspectionVehicleE extends BaseE {
|
||||||
//车辆id
|
//车辆id
|
||||||
private Long vehicleMessageId;
|
private Long vehicleMessageId;
|
||||||
|
|
||||||
|
|
||||||
|
public void addDeptInspection(Long inspectionDeptId, Long vehicleMessageId) {
|
||||||
|
this.inspectionDeptId = inspectionDeptId;
|
||||||
|
this.vehicleMessageId = vehicleMessageId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.zcloud.primeport.domain.model;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.cola.domain.Entity;
|
||||||
|
import com.jjb.saas.framework.domain.model.BaseE;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-domain
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleBlackE extends BaseE {
|
||||||
|
//车辆信息表(t_vehicle_message)的主键id
|
||||||
|
private Long vehicleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -29,7 +29,8 @@ public class VehicleMessageE extends BaseE {
|
||||||
private String licenceNo;
|
private String licenceNo;
|
||||||
//车辆类型
|
//车辆类型
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
//车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆
|
private String vehicleTypeName;
|
||||||
|
//车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆 5 检查车
|
||||||
private Integer vehicleBelongType;
|
private Integer vehicleBelongType;
|
||||||
//所属车队ID
|
//所属车队ID
|
||||||
private Long motorcadeId;
|
private Long motorcadeId;
|
||||||
|
|
@ -77,5 +78,14 @@ public class VehicleMessageE extends BaseE {
|
||||||
this.isAudit = 0;//未审核
|
this.isAudit = 0;//未审核
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void VehicleMessageForInspection( VehicleMessageE e) {
|
||||||
|
this.vehicleBelongType = 5;//未审核
|
||||||
|
this.isDangerous = 0;
|
||||||
|
this.portId = 0;
|
||||||
|
this.isAudit = 2 ;
|
||||||
|
this.mkmjPermission = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.zcloud.primeport.domain.model;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.cola.domain.Entity;
|
||||||
|
import com.jjb.saas.framework.domain.model.BaseE;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-domain
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleViolationsE extends BaseE {
|
||||||
|
//车辆信息表(t_vehicle_message)的主键id
|
||||||
|
private Long vehicleId;
|
||||||
|
//违规类型(0-未按规定车道行驶,1-违规停车)
|
||||||
|
private Integer violationType;
|
||||||
|
//违规区域(位置)
|
||||||
|
private String location;
|
||||||
|
//违规图片的存储路径
|
||||||
|
private String filepath;
|
||||||
|
//违规说明
|
||||||
|
private String describeMessage;
|
||||||
|
//违规时间
|
||||||
|
private Date violationtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -22,11 +22,12 @@ public class InspectionDeptGatewayImpl implements InspectionDeptGateway {
|
||||||
private final InspectionDeptRepository inspectionDeptRepository;
|
private final InspectionDeptRepository inspectionDeptRepository;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean add(InspectionDeptE inspectionDeptE) {
|
public InspectionDeptE add(InspectionDeptE inspectionDeptE) {
|
||||||
InspectionDeptDO d = new InspectionDeptDO();
|
InspectionDeptDO d = new InspectionDeptDO();
|
||||||
BeanUtils.copyProperties(inspectionDeptE, d);
|
BeanUtils.copyProperties(inspectionDeptE, d);
|
||||||
inspectionDeptRepository.save(d);
|
inspectionDeptRepository.save(d);
|
||||||
return true;
|
BeanUtils.copyProperties(d, inspectionDeptE);
|
||||||
|
return inspectionDeptE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package com.zcloud.primeport.gatewayimpl;
|
package com.zcloud.primeport.gatewayimpl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
||||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
||||||
|
|
@ -9,6 +12,7 @@ import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-infrastructure
|
* web-infrastructure
|
||||||
|
|
@ -46,5 +50,6 @@ public class InspectionVehicleGatewayImpl implements InspectionVehicleGateway {
|
||||||
public Boolean deletedInspectionVehicleByIds(Long[] ids) {
|
public Boolean deletedInspectionVehicleByIds(Long[] ids) {
|
||||||
return inspectionVehicleRepository.removeByIds(Arrays.asList(ids));
|
return inspectionVehicleRepository.removeByIds(Arrays.asList(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.zcloud.primeport.gatewayimpl;
|
||||||
|
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||||
|
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||||
|
import com.zcloud.primeport.persistence.repository.VehicleBlackRepository;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import com.zcloud.gbscommon.utils.Tools;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleBlackGatewayImpl implements VehicleBlackGateway {
|
||||||
|
private final VehicleBlackRepository vehicleBlackRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean add(VehicleBlackE vehicleBlackE) {
|
||||||
|
VehicleBlackDO d = new VehicleBlackDO();
|
||||||
|
BeanUtils.copyProperties(vehicleBlackE, d, "${uuid}");
|
||||||
|
vehicleBlackRepository.save(d);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean update(VehicleBlackE vehicleBlackE) {
|
||||||
|
VehicleBlackDO d = new VehicleBlackDO();
|
||||||
|
BeanUtils.copyProperties(vehicleBlackE, d);
|
||||||
|
vehicleBlackRepository.updateById(d);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean deletedVehicleBlackById(Long id) {
|
||||||
|
VehicleBlackDO d = new VehicleBlackDO();
|
||||||
|
d.setId(id);
|
||||||
|
d.setDeleteEnum("TRUE");
|
||||||
|
return vehicleBlackRepository.updateById(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean deletedVehicleBlackByIds(Long[] ids) {
|
||||||
|
return vehicleBlackRepository.removeByIds(Arrays.asList(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.zcloud.primeport.gatewayimpl;
|
||||||
|
|
||||||
|
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||||
|
import com.zcloud.primeport.domain.model.VehicleViolationsE;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||||
|
import com.zcloud.primeport.persistence.repository.VehicleViolationsRepository;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class VehicleViolationsGatewayImpl implements VehicleViolationsGateway {
|
||||||
|
private final VehicleViolationsRepository vehicleViolationsRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean add(VehicleViolationsE vehicleViolationsE) {
|
||||||
|
VehicleViolationsDO d = new VehicleViolationsDO();
|
||||||
|
BeanUtils.copyProperties(vehicleViolationsE, d, "${uuid}");
|
||||||
|
vehicleViolationsRepository.save(d);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean update(VehicleViolationsE vehicleViolationsE) {
|
||||||
|
VehicleViolationsDO d = new VehicleViolationsDO();
|
||||||
|
BeanUtils.copyProperties(vehicleViolationsE, d);
|
||||||
|
vehicleViolationsRepository.updateById(d);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean deletedVehicleViolationsById(Long id) {
|
||||||
|
VehicleViolationsDO d = new VehicleViolationsDO();
|
||||||
|
d.setId(id);
|
||||||
|
d.setDeleteEnum("TRUE");
|
||||||
|
boolean b = vehicleViolationsRepository.updateById(d);
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean deletedVehicleViolationsByIds(Long[] ids) {
|
||||||
|
return vehicleViolationsRepository.removeByIds(Arrays.asList(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getCountByVehicleId(Long vehicleId) {
|
||||||
|
long count = vehicleViolationsRepository.count(
|
||||||
|
vehicleViolationsRepository.lambdaQuery()
|
||||||
|
.eq(VehicleViolationsDO::getVehicleId, vehicleId)
|
||||||
|
);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -26,6 +26,9 @@ public class InspectionDeptDO extends BaseDO {
|
||||||
@ApiModelProperty(value = "名称")
|
@ApiModelProperty(value = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "检查部门下的车辆数量")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer vehicleCount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.zcloud.primeport.persistence.dataobject;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("vehicle_black")
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class VehicleBlackDO extends BaseDO {
|
||||||
|
//车辆信息表(t_vehicle_message)的主键id
|
||||||
|
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id")
|
||||||
|
private Long vehicleId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.zcloud.primeport.persistence.dataobject;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-15 11:41:21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehicleCountFromViolationsDO extends BaseDO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
//业务id
|
||||||
|
@ApiModelProperty(value = "业务id")
|
||||||
|
private String vehicleMessageId;
|
||||||
|
//车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌
|
||||||
|
@ApiModelProperty(value = "车牌类型 0-白牌 1- 蓝牌 2-黄牌 3-绿牌 4-黑牌")
|
||||||
|
private Integer licenceType;
|
||||||
|
//车牌号
|
||||||
|
@ApiModelProperty(value = "车牌号")
|
||||||
|
private String licenceNo;
|
||||||
|
//车辆类型
|
||||||
|
@ApiModelProperty(value = "车辆类型")
|
||||||
|
private String vehicleType;
|
||||||
|
@ApiModelProperty(value = "车辆类型-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
|
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆")
|
||||||
|
private Integer vehicleBelongType;
|
||||||
|
@ApiModelProperty(value = "违规数量")
|
||||||
|
private String violationsCount;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -36,7 +36,8 @@ public class VehicleMessageDO extends BaseDO {
|
||||||
//车辆类型
|
//车辆类型
|
||||||
@ApiModelProperty(value = "车辆类型")
|
@ApiModelProperty(value = "车辆类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
//车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆
|
@ApiModelProperty(value = "车辆类型-名字")
|
||||||
|
private String vehicleTypeName;
|
||||||
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆")
|
@ApiModelProperty(value = "车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆")
|
||||||
private Integer vehicleBelongType;
|
private Integer vehicleBelongType;
|
||||||
//所属车队ID
|
//所属车队ID
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.zcloud.primeport.persistence.dataobject;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("vehicle_violations")
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class VehicleViolationsDO extends BaseDO {
|
||||||
|
//车辆信息表(t_vehicle_message)的主键id
|
||||||
|
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id")
|
||||||
|
private Long vehicleId;
|
||||||
|
//违规类型(0-未按规定车道行驶,1-违规停车)
|
||||||
|
@ApiModelProperty(value = "违规类型(0-未按规定车道行驶,1-违规停车)")
|
||||||
|
private Integer violationType;
|
||||||
|
//违规区域(位置)
|
||||||
|
@ApiModelProperty(value = "违规区域(位置)")
|
||||||
|
private String location;
|
||||||
|
//违规图片的存储路径
|
||||||
|
@ApiModelProperty(value = "违规图片的存储路径")
|
||||||
|
private String filepath;
|
||||||
|
//违规说明
|
||||||
|
@ApiModelProperty(value = "违规说明")
|
||||||
|
private String describeMessage;
|
||||||
|
//违规时间
|
||||||
|
@ApiModelProperty(value = "违规时间")
|
||||||
|
private Date violationtime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.zcloud.primeport.persistence.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:08
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface VehicleBlackMapper extends BaseMapper<VehicleBlackDO> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zcloud.primeport.persistence.dataobject.VehicleCountByCorpDO;
|
import com.zcloud.primeport.persistence.dataobject.VehicleCountByCorpDO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleCountFromViolationsDO;
|
||||||
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
@ -19,5 +20,8 @@ import java.util.Map;
|
||||||
public interface VehicleMessageMapper extends BaseMapper<VehicleMessageDO> {
|
public interface VehicleMessageMapper extends BaseMapper<VehicleMessageDO> {
|
||||||
IPage<VehicleCountByCorpDO> listCountFromCorp(Page<Map<String, Object>> page, @Param("params") Map<String, Object> parmas);
|
IPage<VehicleCountByCorpDO> listCountFromCorp(Page<Map<String, Object>> page, @Param("params") Map<String, Object> parmas);
|
||||||
|
|
||||||
|
|
||||||
|
IPage<VehicleCountFromViolationsDO> listFroViolations(Page<Map<String, Object>> page, @Param("params") Map<String, Object> parmas);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.zcloud.primeport.persistence.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface VehicleViolationsMapper extends BaseMapper<VehicleViolationsDO> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.zcloud.primeport.persistence.repository;
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -13,5 +15,7 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public interface InspectionVehicleRepository extends BaseRepository<InspectionVehicleDO> {
|
public interface InspectionVehicleRepository extends BaseRepository<InspectionVehicleDO> {
|
||||||
PageResponse<InspectionVehicleDO> listPage(Map<String, Object> parmas);
|
PageResponse<InspectionVehicleDO> listPage(Map<String, Object> parmas);
|
||||||
|
|
||||||
|
List<InspectionVehicleDO> queryInspectionVehicleByDeptId(Long deptId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.zcloud.primeport.persistence.repository;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:09
|
||||||
|
*/
|
||||||
|
public interface VehicleBlackRepository extends BaseRepository<VehicleBlackDO> {
|
||||||
|
PageResponse<VehicleBlackDO> listPage(Map<String, Object> params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -4,16 +4,18 @@ import com.alibaba.cola.dto.PageResponse;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||||
import com.zcloud.primeport.persistence.dataobject.VehicleCountByCorpDO;
|
import com.zcloud.primeport.persistence.dataobject.VehicleCountByCorpDO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleCountFromViolationsDO;
|
||||||
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-infrastructure
|
* web-infrastructure
|
||||||
* @Author guoyuepeng
|
* @Author guoyuepeng
|
||||||
* @Date 2025-11-15 11:41:21
|
* @Date 2025-11-15 11:41:21
|
||||||
*/
|
*/
|
||||||
public interface VehicleMessageRepository extends BaseRepository<VehicleMessageDO> {
|
public interface VehicleMessageRepository extends BaseRepository<VehicleMessageDO> {
|
||||||
PageResponse<VehicleMessageDO> listPage(Map<String,Object> parmas);
|
PageResponse<VehicleMessageDO> listPage(Map<String,Object> parmas);
|
||||||
|
|
||||||
|
|
@ -22,5 +24,8 @@ public interface VehicleMessageRepository extends BaseRepository<VehicleMessageD
|
||||||
|
|
||||||
|
|
||||||
List<VehicleMessageDO> listAll(Long [] ids);
|
List<VehicleMessageDO> listAll(Long [] ids);
|
||||||
}
|
|
||||||
|
|
||||||
|
VehicleMessageDO getByLicenceNo(String licenceNo);
|
||||||
|
|
||||||
|
PageResponse<VehicleCountFromViolationsDO> listPageFromViolations(Map<String,Object> parmas);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.zcloud.primeport.persistence.repository;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
public interface VehicleViolationsRepository extends BaseRepository<VehicleViolationsDO> {
|
||||||
|
PageResponse<VehicleViolationsDO> listPage(Map<String, Object> params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -31,6 +31,9 @@ public class InspectionDeptRepositoryImpl extends BaseRepositoryImpl<InspectionD
|
||||||
IPage<InspectionDeptDO> iPage = new Query<InspectionDeptDO>().getPage(parmas);
|
IPage<InspectionDeptDO> iPage = new Query<InspectionDeptDO>().getPage(parmas);
|
||||||
QueryWrapper<InspectionDeptDO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<InspectionDeptDO> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
||||||
|
queryWrapper.select("inspection_dept.*",
|
||||||
|
"(SELECT COUNT(*) FROM inspection_vehicle WHERE inspection_vehicle.inspection_dept_id = inspection_dept.id)" +
|
||||||
|
" AS vehicle_count");
|
||||||
queryWrapper.orderByDesc("create_time");
|
queryWrapper.orderByDesc("create_time");
|
||||||
IPage<InspectionDeptDO> result = inspectionDeptMapper.selectPage(iPage, queryWrapper);
|
IPage<InspectionDeptDO> result = inspectionDeptMapper.selectPage(iPage, queryWrapper);
|
||||||
return PageHelper.pageToResponse(result, result.getRecords());
|
return PageHelper.pageToResponse(result, result.getRecords());
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import com.zcloud.primeport.persistence.repository.InspectionVehicleRepository;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -35,5 +36,16 @@ public class InspectionVehicleRepositoryImpl extends BaseRepositoryImpl<Inspecti
|
||||||
IPage<InspectionVehicleDO> result = inspectionVehicleMapper.selectPage(iPage, queryWrapper);
|
IPage<InspectionVehicleDO> result = inspectionVehicleMapper.selectPage(iPage, queryWrapper);
|
||||||
return PageHelper.pageToResponse(result, result.getRecords());
|
return PageHelper.pageToResponse(result, result.getRecords());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<InspectionVehicleDO> queryInspectionVehicleByDeptId(Long deptId) {
|
||||||
|
QueryWrapper<InspectionVehicleDO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("inspection_dept_id", deptId);
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
|
List<InspectionVehicleDO> list = inspectionVehicleMapper.selectList(queryWrapper);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.zcloud.primeport.persistence.repository.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||||
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
|
import com.zcloud.gbscommon.utils.Query;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||||
|
import com.zcloud.primeport.persistence.mapper.VehicleBlackMapper;
|
||||||
|
import com.zcloud.primeport.persistence.repository.VehicleBlackRepository;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class VehicleBlackRepositoryImpl extends BaseRepositoryImpl<VehicleBlackMapper, VehicleBlackDO> implements VehicleBlackRepository {
|
||||||
|
private final VehicleBlackMapper vehicleBlackMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResponse<VehicleBlackDO> listPage(Map<String, Object> params) {
|
||||||
|
IPage<VehicleBlackDO> iPage = new Query<VehicleBlackDO>().getPage(params);
|
||||||
|
QueryWrapper<VehicleBlackDO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
|
IPage<VehicleBlackDO> result = vehicleBlackMapper.selectPage(iPage, queryWrapper);
|
||||||
|
return PageHelper.pageToResponse(result, result.getRecords());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -9,14 +9,13 @@ import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
import com.zcloud.gbscommon.utils.Query;
|
import com.zcloud.gbscommon.utils.Query;
|
||||||
import com.zcloud.primeport.persistence.dataobject.VehicleCountByCorpDO;
|
import com.zcloud.primeport.persistence.dataobject.VehicleCountByCorpDO;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleCountFromViolationsDO;
|
||||||
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
||||||
import com.zcloud.primeport.persistence.mapper.VehicleMessageMapper;
|
import com.zcloud.primeport.persistence.mapper.VehicleMessageMapper;
|
||||||
import com.zcloud.primeport.persistence.repository.VehicleMessageRepository;
|
import com.zcloud.primeport.persistence.repository.VehicleMessageRepository;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
@ -53,5 +52,23 @@ public class VehicleMessageRepositoryImpl extends BaseRepositoryImpl<VehicleMess
|
||||||
return vehicleMessageMapper.selectList(queryWrapper);
|
return vehicleMessageMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VehicleMessageDO getByLicenceNo(String licenceNo) {
|
||||||
|
QueryWrapper<VehicleMessageDO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("licence_no", licenceNo);
|
||||||
|
return vehicleMessageMapper.selectOne(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取车辆违规记录数量
|
||||||
|
* @param parmas
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageResponse<VehicleCountFromViolationsDO> listPageFromViolations(Map<String,Object> parmas) {
|
||||||
|
Page<Map<String,Object>> page = new Page<>(Integer.parseInt(parmas.get("pageIndex").toString()),Integer.parseInt(parmas.get("pageSize").toString()));
|
||||||
|
IPage<VehicleCountFromViolationsDO> iPage = vehicleMessageMapper.listFroViolations(page, parmas);
|
||||||
|
return PageHelper.pageToResponse(iPage, iPage.getRecords());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.zcloud.primeport.persistence.repository.impl;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||||
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
|
import com.zcloud.gbscommon.utils.Query;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||||
|
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||||
|
import com.zcloud.primeport.persistence.mapper.VehicleViolationsMapper;
|
||||||
|
import com.zcloud.primeport.persistence.repository.VehicleViolationsRepository;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author guoyuepeng
|
||||||
|
* @Date 2025-11-21 16:34:29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class VehicleViolationsRepositoryImpl extends BaseRepositoryImpl<VehicleViolationsMapper, VehicleViolationsDO> implements VehicleViolationsRepository {
|
||||||
|
private final VehicleViolationsMapper vehicleViolationsMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResponse<VehicleViolationsDO> listPage(Map<String, Object> params) {
|
||||||
|
IPage<VehicleViolationsDO> iPage = new Query<VehicleViolationsDO>().getPage(params);
|
||||||
|
QueryWrapper<VehicleViolationsDO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
|
IPage<VehicleViolationsDO> result = vehicleViolationsMapper.selectPage(iPage, queryWrapper);
|
||||||
|
return PageHelper.pageToResponse(result, result.getRecords());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.zcloud.primeport.persistence.mapper.VehicleBlackMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
||||||
|
|
@ -15,5 +15,19 @@
|
||||||
1=1
|
1=1
|
||||||
GROUP BY f.id
|
GROUP BY f.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="listFroViolations" resultType="com.zcloud.primeport.persistence.dataobject.VehicleCountFromViolationsDO">
|
||||||
|
SELECT
|
||||||
|
f.*
|
||||||
|
count(m.id) as violationsCount
|
||||||
|
FROM
|
||||||
|
vehicle_message f
|
||||||
|
LEFT JOIN vehicle_violations m on m.vehicle_id = f.id
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
GROUP BY f.id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.zcloud.primeport.persistence.mapper.VehicleViolationsMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
||||||
Loading…
Reference in New Issue