1.口门门禁-违规记录和黑名单初始化
parent
8c52107808
commit
b050ca0bd6
|
|
@ -0,0 +1,80 @@
|
|||
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("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<VehicleBlackCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VehicleBlackCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<VehicleBlackCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(vehicleBlackService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
vehicleBlackService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
vehicleBlackService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody VehicleBlackUpdateCmd vehicleBlackUpdateCmd) {
|
||||
vehicleBlackService.edit(vehicleBlackUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
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 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("/listAll")
|
||||
public MultiResponse<VehicleViolationsCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VehicleViolationsCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<VehicleViolationsCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(vehicleViolationsService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
vehicleViolationsService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
vehicleViolationsService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody VehicleViolationsUpdateCmd vehicleViolationsUpdateCmd) {
|
||||
vehicleViolationsService.edit(vehicleViolationsUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.zcloud.primeport.command;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||
import com.zcloud.primeport.dto.VehicleBlackAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleBlackAddExe {
|
||||
private final VehicleBlackGateway vehicleBlackGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(VehicleBlackAddCmd cmd) {
|
||||
VehicleBlackE vehicleBlackE = new VehicleBlackE();
|
||||
BeanUtils.copyProperties(cmd, vehicleBlackE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = vehicleBlackGateway.add(vehicleBlackE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:09
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleBlackRemoveExe {
|
||||
private final VehicleBlackGateway vehicleBlackGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = vehicleBlackGateway.deletedVehicleBlackById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = vehicleBlackGateway.deletedVehicleBlackByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.zcloud.primeport.command;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||
import com.zcloud.primeport.dto.VehicleBlackUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:09
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleBlackUpdateExe {
|
||||
private final VehicleBlackGateway vehicleBlackGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(VehicleBlackUpdateCmd vehicleBlackUpdateCmd) {
|
||||
VehicleBlackE vehicleBlackE = new VehicleBlackE();
|
||||
BeanUtils.copyProperties(vehicleBlackUpdateCmd, vehicleBlackE);
|
||||
boolean res = vehicleBlackGateway.update(vehicleBlackE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
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.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;
|
||||
|
||||
@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);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.primeport.command;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleViolationsRemoveExe {
|
||||
private final VehicleViolationsGateway vehicleViolationsGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = vehicleViolationsGateway.deletedVehicleViolationsById(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = vehicleViolationsGateway.deletedVehicleViolationsByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.zcloud.primeport.command;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleViolationsE;
|
||||
import com.zcloud.primeport.dto.VehicleViolationsUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleViolationsUpdateExe {
|
||||
private final VehicleViolationsGateway vehicleViolationsGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(VehicleViolationsUpdateCmd vehicleViolationsUpdateCmd) {
|
||||
VehicleViolationsE vehicleViolationsE = new VehicleViolationsE();
|
||||
BeanUtils.copyProperties(vehicleViolationsUpdateCmd, vehicleViolationsE);
|
||||
boolean res = vehicleViolationsGateway.update(vehicleViolationsE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.zcloud.primeport.command.convertor;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleBlackCO;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface VehicleBlackCoConvertor {
|
||||
/**
|
||||
* @param vehicleBlackDOs
|
||||
* @return
|
||||
*/
|
||||
List<VehicleBlackCO> converDOsToCOs(List<VehicleBlackDO> vehicleBlackDOs);
|
||||
|
||||
VehicleBlackCO converDOToCO(VehicleBlackDO vehicleBlackDO);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.zcloud.primeport.command.convertor;
|
||||
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleViolationsCO;
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
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.repository.VehicleBlackRepository;
|
||||
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:09
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class VehicleBlackQueryExe {
|
||||
private final VehicleBlackRepository vehicleBlackRepository;
|
||||
private final VehicleBlackCoConvertor vehicleBlackCoConvertor;
|
||||
|
||||
/**
|
||||
* 根据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());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
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.persistence.dataobject.VehicleViolationsDO;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 根据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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.zcloud.primeport.service;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.primeport.api.VehicleBlackServiceI;
|
||||
import com.zcloud.primeport.command.VehicleBlackAddExe;
|
||||
import com.zcloud.primeport.command.VehicleBlackRemoveExe;
|
||||
import com.zcloud.primeport.command.VehicleBlackUpdateExe;
|
||||
import com.zcloud.primeport.command.query.VehicleBlackQueryExe;
|
||||
import com.zcloud.primeport.dto.VehicleBlackAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleBlackPageQry;
|
||||
import com.zcloud.primeport.dto.VehicleBlackUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleBlackCO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:09
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class VehicleBlackServiceImpl implements VehicleBlackServiceI {
|
||||
private final VehicleBlackAddExe vehicleBlackAddExe;
|
||||
private final VehicleBlackUpdateExe vehicleBlackUpdateExe;
|
||||
private final VehicleBlackRemoveExe vehicleBlackRemoveExe;
|
||||
private final VehicleBlackQueryExe vehicleBlackQueryExe;
|
||||
|
||||
@Override
|
||||
public VehicleBlackCO queryById(Long id) {
|
||||
return vehicleBlackQueryExe.queryById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResponse<VehicleBlackCO> listPage(VehicleBlackPageQry qry) {
|
||||
|
||||
return vehicleBlackQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse add(VehicleBlackAddCmd cmd) {
|
||||
|
||||
vehicleBlackAddExe.execute(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(VehicleBlackUpdateCmd vehicleBlackUpdateCmd) {
|
||||
vehicleBlackUpdateExe.execute(vehicleBlackUpdateCmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
vehicleBlackRemoveExe.execute(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBatch(Long[] ids) {
|
||||
vehicleBlackRemoveExe.execute(ids);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
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 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.primeport.api;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.primeport.dto.VehicleBlackAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleBlackPageQry;
|
||||
import com.zcloud.primeport.dto.VehicleBlackUpdateCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleBlackCO;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:09
|
||||
*/
|
||||
public interface VehicleBlackServiceI {
|
||||
VehicleBlackCO queryById(Long id);
|
||||
|
||||
PageResponse<VehicleBlackCO> listPage(VehicleBlackPageQry qry);
|
||||
|
||||
SingleResponse<VehicleBlackCO> add(VehicleBlackAddCmd cmd);
|
||||
|
||||
void edit(VehicleBlackUpdateCmd cmd);
|
||||
|
||||
void remove(Long id);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class VehicleBlackAddCmd extends Command {
|
||||
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id", name = "vehicleId", required = true)
|
||||
@NotNull(message = "车辆信息表(t_vehicle_message)的主键id不能为空")
|
||||
private Long vehicleId;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
*/
|
||||
@Data
|
||||
public class VehicleBlackPageQry extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private Long likeVehicleId;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:09
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class VehicleBlackUpdateCmd extends Command {
|
||||
@ApiModelProperty(value = "id", name = "id", required = true)
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id", name = "vehicleId", required = true)
|
||||
@NotNull(message = "车辆信息表(t_vehicle_message)的主键id不能为空")
|
||||
private Long vehicleId;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:28
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class VehicleViolationsAddCmd extends Command {
|
||||
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id", name = "vehicleId", required = true)
|
||||
@NotNull(message = "车辆信息表(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;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
*/
|
||||
@Data
|
||||
public class VehicleViolationsPageQry extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private Long likeVehicleId;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class VehicleViolationsUpdateCmd extends Command {
|
||||
@ApiModelProperty(value = "车辆违规记录表的id", name = "id", required = true)
|
||||
@NotNull(message = "车辆违规记录表的id不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id", name = "vehicleId", required = true)
|
||||
@NotNull(message = "车辆信息表(t_vehicle_message)的主键id不能为空")
|
||||
private Long vehicleId;
|
||||
@ApiModelProperty(value = "违规类型(0-未按规定车道行驶,1-违规停车)", name = "violationType", required = true)
|
||||
@NotNull(message = "违规类型(0-未按规定车道行驶,1-违规停车)不能为空")
|
||||
private Integer violationType;
|
||||
@ApiModelProperty(value = "违规区域(位置)", name = "location", required = true)
|
||||
@NotEmpty(message = "违规区域(位置)不能为空")
|
||||
private String location;
|
||||
@ApiModelProperty(value = "违规图片的存储路径", name = "filepath", required = true)
|
||||
@NotEmpty(message = "违规图片的存储路径不能为空")
|
||||
private String filepath;
|
||||
@ApiModelProperty(value = "违规说明", name = "describeMessage", required = true)
|
||||
@NotEmpty(message = "违规说明不能为空")
|
||||
private String describeMessage;
|
||||
@ApiModelProperty(value = "违规时间", name = "violationtime", required = true)
|
||||
@NotNull(message = "违规时间不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date violationtime;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
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;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.zcloud.primeport.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.sql.Date;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:28
|
||||
*/
|
||||
@Data
|
||||
public class VehicleViolationsCO extends ClientObject {
|
||||
//车辆违规记录表的id
|
||||
@ApiModelProperty(value = "车辆违规记录表的id")
|
||||
private Long id;
|
||||
//车辆信息表(t_vehicle_message)的主键id
|
||||
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id")
|
||||
private Long vehicleId;
|
||||
//违规类型(0-未按规定车道行驶,1-违规停车)
|
||||
@ApiModelProperty(value = "违规类型(0-未按规定车道行驶,1-违规停车)")
|
||||
private Integer violationType;
|
||||
//违规区域(位置)
|
||||
@ApiModelProperty(value = "违规区域(位置)")
|
||||
private String location;
|
||||
//违规图片的存储路径
|
||||
@ApiModelProperty(value = "违规图片的存储路径")
|
||||
private String filepath;
|
||||
//违规说明
|
||||
@ApiModelProperty(value = "违规说明")
|
||||
private String describeMessage;
|
||||
//违规时间
|
||||
@ApiModelProperty(value = "违规时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date violationtime;
|
||||
//删除标识
|
||||
@ApiModelProperty(value = "删除标识")
|
||||
private String deleteEnum;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.zcloud.primeport.domain.gateway;
|
||||
|
||||
|
||||
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
*/
|
||||
public interface VehicleBlackGateway {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
Boolean add(VehicleBlackE vehicleBlackE);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
Boolean update(VehicleBlackE vehicleBlackE);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
Boolean deletedVehicleBlackById(Long id);
|
||||
|
||||
Boolean deletedVehicleBlackByIds(Long[] id);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.zcloud.primeport.domain.model;
|
||||
|
||||
|
||||
import com.alibaba.cola.domain.Entity;
|
||||
import com.jjb.saas.framework.domain.model.BaseE;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
*/
|
||||
@Data
|
||||
public class VehicleBlackE extends BaseE {
|
||||
//车辆信息表(t_vehicle_message)的主键id
|
||||
private Long vehicleId;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.zcloud.primeport.domain.model;
|
||||
|
||||
|
||||
|
||||
import com.alibaba.cola.domain.Entity;
|
||||
import com.jjb.saas.framework.domain.model.BaseE;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
*/
|
||||
@Data
|
||||
public class VehicleViolationsE extends BaseE {
|
||||
//车辆信息表(t_vehicle_message)的主键id
|
||||
private Long vehicleId;
|
||||
//违规类型(0-未按规定车道行驶,1-违规停车)
|
||||
private Integer violationType;
|
||||
//违规区域(位置)
|
||||
private String location;
|
||||
//违规图片的存储路径
|
||||
private String filepath;
|
||||
//违规说明
|
||||
private String describeMessage;
|
||||
//违规时间
|
||||
private Date violationtime;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
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.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) {
|
||||
return vehicleBlackRepository.removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedVehicleBlackByIds(Long[] ids) {
|
||||
return vehicleBlackRepository.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.zcloud.primeport.gatewayimpl;
|
||||
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
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) {
|
||||
return vehicleViolationsRepository.removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedVehicleViolationsByIds(Long[] ids) {
|
||||
return vehicleViolationsRepository.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.zcloud.primeport.persistence.dataobject;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
*/
|
||||
@Data
|
||||
@TableName("vehicle_black")
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class VehicleBlackDO extends BaseDO {
|
||||
//车辆信息表(t_vehicle_message)的主键id
|
||||
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id")
|
||||
private Long vehicleId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.zcloud.primeport.persistence.dataobject;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
*/
|
||||
@Data
|
||||
@TableName("vehicle_violations")
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class VehicleViolationsDO extends BaseDO {
|
||||
//车辆信息表(t_vehicle_message)的主键id
|
||||
@ApiModelProperty(value = "车辆信息表(t_vehicle_message)的主键id")
|
||||
private Long vehicleId;
|
||||
//违规类型(0-未按规定车道行驶,1-违规停车)
|
||||
@ApiModelProperty(value = "违规类型(0-未按规定车道行驶,1-违规停车)")
|
||||
private Integer violationType;
|
||||
//违规区域(位置)
|
||||
@ApiModelProperty(value = "违规区域(位置)")
|
||||
private String location;
|
||||
//违规图片的存储路径
|
||||
@ApiModelProperty(value = "违规图片的存储路径")
|
||||
private String filepath;
|
||||
//违规说明
|
||||
@ApiModelProperty(value = "违规说明")
|
||||
private String describeMessage;
|
||||
//违规时间
|
||||
@ApiModelProperty(value = "违规时间")
|
||||
private Date violationtime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.zcloud.primeport.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:08
|
||||
*/
|
||||
@Mapper
|
||||
public interface VehicleBlackMapper extends BaseMapper<VehicleBlackDO> {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.zcloud.primeport.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
*/
|
||||
@Mapper
|
||||
public interface VehicleViolationsMapper extends BaseMapper<VehicleViolationsDO> {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.zcloud.primeport.persistence.repository;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:09
|
||||
*/
|
||||
public interface VehicleBlackRepository extends BaseRepository<VehicleBlackDO> {
|
||||
PageResponse<VehicleBlackDO> listPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.zcloud.primeport.persistence.repository;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
*/
|
||||
public interface VehicleViolationsRepository extends BaseRepository<VehicleViolationsDO> {
|
||||
PageResponse<VehicleViolationsDO> listPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.primeport.persistence.repository.impl;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||
import com.zcloud.primeport.persistence.mapper.VehicleBlackMapper;
|
||||
import com.zcloud.primeport.persistence.repository.VehicleBlackRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:09
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class VehicleBlackRepositoryImpl extends BaseRepositoryImpl<VehicleBlackMapper, VehicleBlackDO> implements VehicleBlackRepository {
|
||||
private final VehicleBlackMapper vehicleBlackMapper;
|
||||
|
||||
@Override
|
||||
public PageResponse<VehicleBlackDO> listPage(Map<String, Object> params) {
|
||||
IPage<VehicleBlackDO> iPage = new Query<VehicleBlackDO>().getPage(params);
|
||||
QueryWrapper<VehicleBlackDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<VehicleBlackDO> result = vehicleBlackMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.primeport.persistence.repository.impl;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||
import com.zcloud.primeport.persistence.mapper.VehicleViolationsMapper;
|
||||
import com.zcloud.primeport.persistence.repository.VehicleViolationsRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-11-21 16:34:29
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class VehicleViolationsRepositoryImpl extends BaseRepositoryImpl<VehicleViolationsMapper, VehicleViolationsDO> implements VehicleViolationsRepository {
|
||||
private final VehicleViolationsMapper vehicleViolationsMapper;
|
||||
|
||||
@Override
|
||||
public PageResponse<VehicleViolationsDO> listPage(Map<String, Object> params) {
|
||||
IPage<VehicleViolationsDO> iPage = new Query<VehicleViolationsDO>().getPage(params);
|
||||
QueryWrapper<VehicleViolationsDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<VehicleViolationsDO> result = vehicleViolationsMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.primeport.persistence.mapper.VehicleBlackMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.primeport.persistence.mapper.VehicleViolationsMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue