Compare commits
No commits in common. "809c3b7ffe4fa4bcdf73590df8ad29e730867308" and "3c84472af5d1f4195c0258a579f91693fc3a6b43" have entirely different histories.
809c3b7ffe
...
3c84472af5
|
|
@ -6,10 +6,6 @@ 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}
|
||||||
|
|
@ -24,7 +20,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
|
||||||
|
|
@ -40,4 +36,3 @@ 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: 801
|
port: 80
|
||||||
debug: true
|
debug: true
|
||||||
|
|
@ -11,7 +11,6 @@ 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;
|
||||||
|
|
@ -46,11 +45,16 @@ 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<InspectionDeptInfoCO> getInfoById(@PathVariable("id") Long id) {
|
public SingleResponse<InspectionDeptCO> getInfoById(@PathVariable("id") Long id) {
|
||||||
return SingleResponse.of(inspectionDeptService.getInfoById( id));
|
return SingleResponse.of(new InspectionDeptCO());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
|
|
@ -60,6 +64,13 @@ 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) {
|
||||||
|
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
package com.zcloud.primeport.web;
|
|
||||||
import com.alibaba.cola.dto.MultiResponse;
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.alibaba.cola.dto.Response;
|
|
||||||
import com.alibaba.cola.dto.SingleResponse;
|
|
||||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
|
||||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
|
||||||
import com.zcloud.primeport.api.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,12 +83,5 @@ 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
package com.zcloud.primeport.web;
|
|
||||||
import com.alibaba.cola.dto.MultiResponse;
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.alibaba.cola.dto.Response;
|
|
||||||
import com.alibaba.cola.dto.SingleResponse;
|
|
||||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
|
||||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
|
||||||
import com.zcloud.primeport.api.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,13 +2,8 @@ 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;
|
||||||
|
|
@ -25,28 +20,14 @@ 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 {
|
||||||
InspectionDeptE insDeptAdd = inspectionDeptGateway.add(examTypeE);
|
res = 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,17 +2,10 @@ 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
|
||||||
|
|
@ -24,18 +17,10 @@ import java.util.Map;
|
||||||
@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,23 +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.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
|
||||||
|
|
@ -30,42 +20,12 @@ import java.util.Map;
|
||||||
@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("修改失败");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
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("修改失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
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,7 +1,6 @@
|
||||||
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;
|
||||||
|
|
||||||
|
|
@ -21,10 +20,5 @@ public interface InspectionDeptCoConvertor {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<InspectionDeptCO> converDOsToCOs(List<InspectionDeptDO> inspectionDeptDOs);
|
List<InspectionDeptCO> converDOsToCOs(List<InspectionDeptDO> inspectionDeptDOs);
|
||||||
|
|
||||||
|
|
||||||
InspectionDeptInfoCO converDoToCo (InspectionDeptDO inspectionDeptDO);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
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;
|
||||||
|
|
@ -21,12 +20,5 @@ public interface InspectionVehicleCoConvertor {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<InspectionVehicleCO> converDOsToCOs(List<InspectionVehicleDO> inspectionVehicleDOs);
|
List<InspectionVehicleCO> converDOsToCOs(List<InspectionVehicleDO> inspectionVehicleDOs);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param inspectionVehicleDO
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
InspectionVehicleE converDOToE( InspectionVehicleDO inspectionVehicleDO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
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,7 +1,6 @@
|
||||||
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;
|
||||||
|
|
@ -29,8 +28,5 @@ public interface VehicleMessageCoConvertor {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<VehicleCountByCorpCO> converCountDOsToCOs(List<VehicleCountByCorpDO> vehicleMessageDOs);
|
List<VehicleCountByCorpCO> converCountDOsToCOs(List<VehicleCountByCorpDO> vehicleMessageDOs);
|
||||||
|
|
||||||
|
|
||||||
List<VehicleDeptInfoCO> converDOsToDeptInfoCOs(List<VehicleMessageDO> vehicleMessageDOs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
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,18 +3,10 @@ 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;
|
||||||
|
|
||||||
|
|
@ -34,10 +26,6 @@ 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;
|
|
||||||
/**
|
/**
|
||||||
* 分页
|
* 分页
|
||||||
*
|
*
|
||||||
|
|
@ -50,24 +38,5 @@ 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
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,12 +68,5 @@ public class VehicleMessageQueryExe {
|
||||||
}
|
}
|
||||||
return vehicleMessageCOMap;
|
return vehicleMessageCOMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public VehicleMessageCO infoByLicenceNo(String licenceNo) {
|
|
||||||
|
|
||||||
VehicleMessageDO info = vehicleMessageRepository.getByLicenceNo(licenceNo);
|
|
||||||
VehicleMessageCO vehicleMessageCO = vehicleMessageCoConvertor.converDOsToCOs(info);
|
|
||||||
return vehicleMessageCO;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
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,7 +10,6 @@ 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;
|
||||||
|
|
||||||
|
|
@ -55,10 +54,5 @@ 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
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,11 +80,5 @@ 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
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,7 +6,6 @@ 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
|
||||||
|
|
@ -24,7 +23,5 @@ public interface InspectionDeptServiceI {
|
||||||
void remove(Long id);
|
void remove(Long id);
|
||||||
|
|
||||||
void removeBatch(Long[] ids);
|
void removeBatch(Long[] ids);
|
||||||
|
|
||||||
InspectionDeptInfoCO getInfoById(Long id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
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,8 +32,5 @@ public interface VehicleMessageServiceI {
|
||||||
|
|
||||||
|
|
||||||
PageResponse<VehicleCountByCorpCO> listFromCorp(VehicleMessagePageQry qry);
|
PageResponse<VehicleCountByCorpCO> listFromCorp(VehicleMessagePageQry qry);
|
||||||
|
|
||||||
|
|
||||||
VehicleMessageCO infoByLicenceNo(String licenceNo );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
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,7 +9,6 @@ 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
|
||||||
|
|
@ -22,13 +21,11 @@ import java.util.List;
|
||||||
@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,7 +9,6 @@ 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
|
||||||
|
|
@ -29,9 +28,5 @@ 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;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
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,9 +37,6 @@ 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,9 +34,6 @@ 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,9 +36,6 @@ 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;
|
||||||
|
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
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,7 +2,6 @@ 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;
|
||||||
|
|
||||||
|
|
@ -22,12 +21,5 @@ public class InspectionDeptCO extends ClientObject {
|
||||||
@ApiModelProperty(value = "名称")
|
@ApiModelProperty(value = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "检查部门下的车辆数量")
|
|
||||||
@TableField(exist = false)
|
|
||||||
private Integer vehicleCount;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
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,8 +30,6 @@ 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;
|
||||||
|
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
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 {
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
InspectionDeptE add(InspectionDeptE inspectionDeptE);
|
Boolean add(InspectionDeptE inspectionDeptE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@ 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
|
||||||
*
|
*
|
||||||
|
|
@ -29,6 +27,5 @@ public interface InspectionVehicleGateway {
|
||||||
Boolean deletedInspectionVehicleById(Long id);
|
Boolean deletedInspectionVehicleById(Long id);
|
||||||
|
|
||||||
Boolean deletedInspectionVehicleByIds(Long[] id);
|
Boolean deletedInspectionVehicleByIds(Long[] id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
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,12 +21,5 @@ 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;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
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,8 +29,7 @@ public class VehicleMessageE extends BaseE {
|
||||||
private String licenceNo;
|
private String licenceNo;
|
||||||
//车辆类型
|
//车辆类型
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
private String vehicleTypeName;
|
//车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆
|
||||||
//车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆 5 检查车
|
|
||||||
private Integer vehicleBelongType;
|
private Integer vehicleBelongType;
|
||||||
//所属车队ID
|
//所属车队ID
|
||||||
private Long motorcadeId;
|
private Long motorcadeId;
|
||||||
|
|
@ -78,14 +77,5 @@ 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
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,12 +22,11 @@ public class InspectionDeptGatewayImpl implements InspectionDeptGateway {
|
||||||
private final InspectionDeptRepository inspectionDeptRepository;
|
private final InspectionDeptRepository inspectionDeptRepository;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InspectionDeptE add(InspectionDeptE inspectionDeptE) {
|
public Boolean 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);
|
||||||
BeanUtils.copyProperties(d, inspectionDeptE);
|
return true;
|
||||||
return inspectionDeptE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
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;
|
||||||
|
|
@ -12,7 +9,6 @@ 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
|
||||||
|
|
@ -50,6 +46,5 @@ 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
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,9 +26,6 @@ public class InspectionDeptDO extends BaseDO {
|
||||||
@ApiModelProperty(value = "名称")
|
@ApiModelProperty(value = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "检查部门下的车辆数量")
|
|
||||||
@TableField(exist = false)
|
|
||||||
private Integer vehicleCount;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
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,8 +36,7 @@ public class VehicleMessageDO extends BaseDO {
|
||||||
//车辆类型
|
//车辆类型
|
||||||
@ApiModelProperty(value = "车辆类型")
|
@ApiModelProperty(value = "车辆类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
@ApiModelProperty(value = "车辆类型-名字")
|
//车辆所属类型 0-员工车辆 1- 单位车辆 2-相关方车辆3:货运车辆,4:临时车辆
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
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,7 +4,6 @@ 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;
|
||||||
|
|
@ -20,8 +19,5 @@ 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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
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,8 +3,6 @@ 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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15,7 +13,5 @@ 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
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,18 +4,16 @@ 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);
|
||||||
|
|
||||||
|
|
@ -24,8 +22,5 @@ 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
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,9 +31,6 @@ 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,7 +13,6 @@ 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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -36,16 +35,5 @@ 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
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,13 +9,14 @@ 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;
|
||||||
|
|
||||||
|
|
@ -52,23 +53,5 @@ 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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?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,19 +15,5 @@
|
||||||
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>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?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