feat:车辆拉黑与违规登记
parent
6eb57bfcbe
commit
9bfe085ebb
|
|
@ -35,6 +35,8 @@ spring:
|
|||
- config-mybatis.yml
|
||||
- config-sdk.yml
|
||||
- config-flyway.yml
|
||||
# 这个配置文件需要放到nacos里边
|
||||
- ${application.name}-conf.yml
|
||||
discovery:
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
namespace: ${spring.cloud.nacos.config.namespace}
|
||||
|
|
|
|||
|
|
@ -33,12 +33,12 @@ import java.util.ArrayList;
|
|||
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("/save")
|
||||
// public SingleResponse<VehicleBlackCO> add(@Validated @RequestBody VehicleBlackAddCmd cmd) {
|
||||
// SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
// return vehicleBlackService.add(cmd);
|
||||
// }
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
|
|
@ -46,16 +46,16 @@ public class VehicleBlackController {
|
|||
return vehicleBlackService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<VehicleBlackCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<VehicleBlackCO>());
|
||||
}
|
||||
// @ApiOperation("所有数据")
|
||||
// @GetMapping("/listAll")
|
||||
// public MultiResponse<VehicleBlackCO> listAll() {
|
||||
// return MultiResponse.of(new ArrayList<VehicleBlackCO>());
|
||||
// }
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<VehicleBlackCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new VehicleBlackCO());
|
||||
return SingleResponse.of(vehicleBlackService.getInfoById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
|
|
@ -65,18 +65,18 @@ public class VehicleBlackController {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
vehicleBlackService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody VehicleBlackUpdateCmd vehicleBlackUpdateCmd) {
|
||||
vehicleBlackService.edit(vehicleBlackUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
// @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();
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,26 +36,23 @@ public class VehicleViolationsController {
|
|||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<VehicleViolationsCO> add(@Validated @RequestBody VehicleViolationsAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return vehicleViolationsService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@ApiOperation("违规记录分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<VehicleViolationsCO> page(@RequestBody VehicleViolationsPageQry qry) {
|
||||
return vehicleViolationsService.violationRecordslistPage(qry);
|
||||
}
|
||||
@ApiOperation("违规详情记录分页")
|
||||
@PostMapping("/detailsRecordList")
|
||||
public PageResponse<VehicleViolationsCO> detailsRecordList(@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(new VehicleViolationsCO());
|
||||
return SingleResponse.of(vehicleViolationsService.getInfoById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
|
|
@ -65,13 +62,6 @@ public class VehicleViolationsController {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
vehicleViolationsService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody VehicleViolationsUpdateCmd vehicleViolationsUpdateCmd) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -17,10 +20,16 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
@AllArgsConstructor
|
||||
public class VehicleBlackRemoveExe {
|
||||
private final VehicleBlackGateway vehicleBlackGateway;
|
||||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
private final VehicleViolationsGateway vehicleViolationsGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
VehicleBlackE infoById = vehicleBlackGateway.getInfoById(id);
|
||||
boolean res = vehicleBlackGateway.deletedVehicleBlackById(id);
|
||||
// 把这个车牌的违规记录变成已处理.
|
||||
vehicleViolationsGateway.updateVehicleViolationsStatusByLicenceNo(infoById.getLicenceNo(), 1);
|
||||
vehicleApplyGateway.updateEvehicleBlockedByLicenceNo(infoById.getLicenceNo(),2);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,21 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleViolationsE;
|
||||
import com.zcloud.primeport.dto.VehicleViolationsAddCmd;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
|
|
@ -18,11 +25,26 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
@RefreshScope
|
||||
public class VehicleViolationsAddExe {
|
||||
private final VehicleViolationsGateway vehicleViolationsGateway;
|
||||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
private final VehicleBlackGateway vehicleBlackGateway;
|
||||
|
||||
@Value("${ciolation.limit}")
|
||||
private Integer limit;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(VehicleViolationsAddCmd cmd) {
|
||||
List<VehicleViolationsE> vehicleViolationsList = vehicleViolationsGateway.listVehicleViolationByLicenceNo(cmd.getLicenceNo());
|
||||
if (limit != null && (vehicleViolationsList.size() + 1) >= limit) {
|
||||
// 进入黑名单
|
||||
vehicleBlackGateway.saveIfAbsent(cmd.getLicenceNo());
|
||||
// 申请的车辆拉黑
|
||||
vehicleApplyGateway.updateEvehicleBlockedByLicenceNo(cmd.getLicenceNo(),1);
|
||||
// 对接表里进行车辆拉黑的处理。
|
||||
}
|
||||
|
||||
VehicleViolationsE examTypeE = new VehicleViolationsE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
boolean res = false;
|
||||
|
|
|
|||
|
|
@ -20,5 +20,6 @@ public interface VehicleBlackCoConvertor {
|
|||
* @return
|
||||
*/
|
||||
List<VehicleBlackCO> converDOsToCOs(List<VehicleBlackDO> vehicleBlackDOs);
|
||||
VehicleBlackCO converDOToCO(VehicleBlackDO vehicleBlackDOs);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,5 +20,6 @@ public interface VehicleViolationsCoConvertor {
|
|||
* @return
|
||||
*/
|
||||
List<VehicleViolationsCO> converDOsToCOs(List<VehicleViolationsDO> vehicleViolationsDOs);
|
||||
VehicleViolationsCO converDOToCO(VehicleViolationsDO vehicleViolationsDOs);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,5 +38,10 @@ public class VehicleBlackQueryExe {
|
|||
List<VehicleBlackCO> examCenterCOS = vehicleBlackCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
|
||||
public VehicleBlackCO getInfoById(Long id) {
|
||||
VehicleBlackDO data = vehicleBlackRepository.getInfoById(id);
|
||||
return vehicleBlackCoConvertor.converDOToCO(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ 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 io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
|
@ -38,5 +39,17 @@ public class VehicleViolationsQueryExe {
|
|||
List<VehicleViolationsCO> examCenterCOS = vehicleViolationsCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
|
||||
public PageResponse<VehicleViolationsCO> violationRecordslistPage(VehicleViolationsPageQry qry) {
|
||||
Map<String, Object> parmas = PageQueryHelper.toHashMap(qry);
|
||||
PageResponse<VehicleViolationsDO> pageResponse = vehicleViolationsRepository.violationRecordslistPage(parmas);
|
||||
List<VehicleViolationsCO> examCenterCOS = vehicleViolationsCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
|
||||
public VehicleViolationsCO getInfoById(Long id) {
|
||||
VehicleViolationsDO byId = vehicleViolationsRepository.getById(id);
|
||||
return vehicleViolationsCoConvertor.converDOToCO(byId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,5 +55,10 @@ public class VehicleBlackServiceImpl implements VehicleBlackServiceI {
|
|||
public void removeBatch(Long[] ids) {
|
||||
vehicleBlackRemoveExe.execute(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VehicleBlackCO getInfoById(Long id) {
|
||||
return vehicleBlackQueryExe.getInfoById(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ 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.beans.factory.annotation.Value;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
|
|
@ -55,5 +57,15 @@ public class VehicleViolationsServiceImpl implements VehicleViolationsServiceI {
|
|||
public void removeBatch(Long[] ids) {
|
||||
vehicleViolationsRemoveExe.execute(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResponse<VehicleViolationsCO> violationRecordslistPage(VehicleViolationsPageQry qry) {
|
||||
return vehicleViolationsQueryExe.violationRecordslistPage(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VehicleViolationsCO getInfoById(Long id) {
|
||||
return vehicleViolationsQueryExe.getInfoById(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,5 +23,7 @@ public interface VehicleBlackServiceI {
|
|||
void remove(Long id);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
|
||||
VehicleBlackCO getInfoById(Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,5 +23,9 @@ public interface VehicleViolationsServiceI {
|
|||
void remove(Long id);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
|
||||
PageResponse<VehicleViolationsCO> violationRecordslistPage(VehicleViolationsPageQry qry);
|
||||
|
||||
VehicleViolationsCO getInfoById(Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ import javax.validation.constraints.NotNull;
|
|||
@AllArgsConstructor
|
||||
public class MkmjGateAddCmd extends Command {
|
||||
@ApiModelProperty(value = "口门区域id", name = "mkmjId", required = true)
|
||||
@NotEmpty(message = "口门区域id不能为空")
|
||||
@NotNull(message = "口门区域id不能为空")
|
||||
private Long mkmjId;
|
||||
@ApiModelProperty(value = "通道id", name = "passageId", required = true)
|
||||
@NotEmpty(message = "通道id不能为空")
|
||||
@NotNull(message = "通道id不能为空")
|
||||
private Long passageId;
|
||||
@ApiModelProperty(value = "闸机标识", name = "gateNumber", required = true)
|
||||
@NotEmpty(message = "闸机标识不能为空")
|
||||
// @NotEmpty(message = "闸机标识不能为空")
|
||||
private String gateNumber;
|
||||
@ApiModelProperty(value = "闸机名称", name = "gateName", required = true)
|
||||
@NotEmpty(message = "闸机名称不能为空")
|
||||
|
|
|
|||
|
|
@ -22,12 +22,7 @@ import java.util.Date;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class VehicleViolationsAddCmd extends Command {
|
||||
@ApiModelProperty(value = "车辆信息表(vehicle_apply)的主键id", name = "vehicleId", required = true)
|
||||
@NotNull(message = "车辆信息表(vehicle_apply)的主键id不能为空")
|
||||
private Long vehicleId;
|
||||
@ApiModelProperty(value = "车辆所属人姓名(临时车)", name = "employeeVehicleUserName", required = true)
|
||||
@NotEmpty(message = "车辆所属人姓名(临时车)不能为空")
|
||||
private String employeeVehicleUserName;
|
||||
|
||||
@ApiModelProperty(value = "车牌号", name = "licenceNo", required = true)
|
||||
@NotEmpty(message = "车牌号不能为空")
|
||||
private String licenceNo;
|
||||
|
|
@ -48,9 +43,6 @@ public class VehicleViolationsAddCmd extends Command {
|
|||
private String describeMessage;
|
||||
@ApiModelProperty(value = "违规时间", name = "violationtime", required = true)
|
||||
@NotEmpty(message = "违规时间不能为空")
|
||||
private Date violationtime;
|
||||
@ApiModelProperty(value = "违规处理状态,1已处理2未处理", name = "violationProcessingStatus", required = true)
|
||||
@NotNull(message = "违规处理状态,1已处理2未处理不能为空")
|
||||
private Integer violationProcessingStatus;
|
||||
private String violationtime;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
|
|
@ -23,6 +24,9 @@ public class VehicleViolationsPageQry extends PageQuery {
|
|||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private Long likeVehicleId;
|
||||
@ApiModelProperty(value = "车牌号", name = "licenceNo")
|
||||
private String licenceNo;
|
||||
@ApiModelProperty(value = "违规类型", name = "violationType")
|
||||
private String violationType;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,6 @@ public class VehicleViolationsUpdateCmd extends Command {
|
|||
@ApiModelProperty(value = "车辆违规记录id", name = "id", required = true)
|
||||
@NotNull(message = "车辆违规记录id不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "车辆信息表(vehicle_apply)的主键id", name = "vehicleId", required = true)
|
||||
@NotNull(message = "车辆信息表(vehicle_apply)的主键id不能为空")
|
||||
private Long vehicleId;
|
||||
@ApiModelProperty(value = "车辆所属人姓名(临时车)", name = "employeeVehicleUserName", required = true)
|
||||
@NotEmpty(message = "车辆所属人姓名(临时车)不能为空")
|
||||
private String employeeVehicleUserName;
|
||||
@ApiModelProperty(value = "车牌号", name = "licenceNo", required = true)
|
||||
@NotEmpty(message = "车牌号不能为空")
|
||||
private String licenceNo;
|
||||
|
|
@ -51,13 +45,7 @@ public class VehicleViolationsUpdateCmd extends Command {
|
|||
private String describeMessage;
|
||||
@ApiModelProperty(value = "违规时间", name = "violationtime", required = true)
|
||||
@NotEmpty(message = "违规时间不能为空")
|
||||
private Date violationtime;
|
||||
@ApiModelProperty(value = "违规处理状态,1已处理2未处理", name = "violationProcessingStatus", required = true)
|
||||
@NotNull(message = "违规处理状态,1已处理2未处理不能为空")
|
||||
private Integer violationProcessingStatus;
|
||||
@ApiModelProperty(value = "删除标识", name = "deleteEnum", required = true)
|
||||
@NotEmpty(message = "删除标识不能为空")
|
||||
private String deleteEnum;
|
||||
private String violationtime;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.primeport.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -44,12 +45,37 @@ public class VehicleViolationsCO extends ClientObject {
|
|||
private String describeMessage;
|
||||
//违规时间
|
||||
@ApiModelProperty(value = "违规时间")
|
||||
private Date violationtime;
|
||||
private String violationtime;
|
||||
//违规处理状态,1已处理2未处理
|
||||
@ApiModelProperty(value = "违规处理状态,1已处理2未处理")
|
||||
private Integer violationProcessingStatus;
|
||||
@ApiModelProperty(value = "违规次数")
|
||||
private Integer violationCount;
|
||||
//备注
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
@ApiModelProperty(value = "车辆类型")
|
||||
private String vehicleType;
|
||||
//车辆类型-名字
|
||||
@ApiModelProperty(value = "车辆类型-名字")
|
||||
private String vehicleTypeName;
|
||||
//车辆所属类型 1-股份员工车辆,2-股份单位车辆,3-分公司员工车辆,4-分公司单位车辆 ,5-相关方车辆, 6:临时车辆,7检查部门车辆
|
||||
@ApiModelProperty(value = "车辆所属类型 1-股份员工车辆,2-股份单位车辆,3-分公司员工车辆,4-分公司单位车辆 ,5-相关方车辆, 6:临时车辆,7检查部门车辆")
|
||||
private String vehicleBelongType;
|
||||
@ApiModelProperty(value = "车辆所属企业ID")
|
||||
private Long vehicleCorpId;
|
||||
|
||||
//车辆所属企业名称
|
||||
@ApiModelProperty(value = "车辆所属企业名称")
|
||||
private String vehicleCorpName;
|
||||
//车辆所属部门id
|
||||
@ApiModelProperty(value = "车辆所属部门id")
|
||||
private Long vehicleDepartmentId;
|
||||
//车辆所属部门名称
|
||||
@ApiModelProperty(value = "车辆所属部门名称")
|
||||
private String vehicleDepartmentName;
|
||||
//车辆所属人id(员工车辆/驾驶人id)
|
||||
@ApiModelProperty(value = "车辆所属人id(员工车辆/驾驶人id)")
|
||||
private Long employeeVehicleUserId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.zcloud.primeport.domain.gateway;
|
|||
|
||||
import com.zcloud.primeport.domain.model.VehicleApplyE;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
|
|
@ -27,5 +29,7 @@ public interface VehicleApplyGateway {
|
|||
|
||||
Boolean deletedVehicleApplyByIds(Long[] id);
|
||||
VehicleApplyE getById(Long id);
|
||||
|
||||
void updateEvehicleBlockedByLicenceNo(String licenceNo, Integer blockedFlag);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.zcloud.primeport.domain.gateway;
|
|||
|
||||
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
|
|
@ -26,5 +28,8 @@ public interface VehicleBlackGateway {
|
|||
Boolean deletedVehicleBlackById(Long id);
|
||||
|
||||
Boolean deletedVehicleBlackByIds(Long[] id);
|
||||
|
||||
void saveIfAbsent(String licenceNo);
|
||||
VehicleBlackE getInfoById(Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.zcloud.primeport.domain.gateway;
|
|||
|
||||
import com.zcloud.primeport.domain.model.VehicleViolationsE;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
|
|
@ -26,5 +29,9 @@ public interface VehicleViolationsGateway {
|
|||
Boolean deletedVehicleViolationsById(Long id);
|
||||
|
||||
Boolean deletedVehicleViolationsByIds(Long[] id);
|
||||
|
||||
List<VehicleViolationsE> listVehicleViolationByLicenceNo(String licenceNo);
|
||||
|
||||
void updateVehicleViolationsStatusByLicenceNo(String licenceNo, int i);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.zcloud.primeport.domain.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.jjb.saas.framework.domain.model.BaseE;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -17,11 +19,34 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class VehicleBlackE extends BaseE {
|
||||
//车辆信息表(vehicle_apply)的主键id
|
||||
private Long vehicleId;
|
||||
//车辆所属人姓名(临时车)
|
||||
private String employeeVehicleUserName;
|
||||
//车牌号
|
||||
private String licenceNo;
|
||||
private String vehicleType;
|
||||
//车辆类型-名字
|
||||
private String vehicleTypeName;
|
||||
//车辆所属类型 1-股份员工车辆,2-股份单位车辆,3-分公司员工车辆,4-分公司单位车辆 ,5-相关方车辆, 6:临时车辆,7检查部门车辆
|
||||
private String vehicleBelongType;
|
||||
private Long vehicleCorpId;
|
||||
|
||||
//车辆所属企业名称
|
||||
private String vehicleCorpName;
|
||||
//车辆所属部门id
|
||||
private Long vehicleDepartmentId;
|
||||
//车辆所属部门名称
|
||||
private String vehicleDepartmentName;
|
||||
//车辆所属人id(员工车辆/驾驶人id)
|
||||
private Long employeeVehicleUserId;
|
||||
|
||||
//行驶证照片
|
||||
private Long drivingLicenseId;
|
||||
//车辆照片
|
||||
private Long attachmentId;
|
||||
//告知签字
|
||||
private Long informSignId;
|
||||
//项目id
|
||||
private Long projectId;
|
||||
//项目名称
|
||||
private String projectName;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class VehicleViolationsE extends BaseE {
|
|||
//违规说明
|
||||
private String describeMessage;
|
||||
//违规时间
|
||||
private Date violationtime;
|
||||
private String violationtime;
|
||||
//违规处理状态,1已处理2未处理
|
||||
private Integer violationProcessingStatus;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.primeport.gatewayimpl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleApplyE;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleApplyDO;
|
||||
|
|
@ -57,5 +58,13 @@ public class VehicleApplyGatewayImpl implements VehicleApplyGateway {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEvehicleBlockedByLicenceNo(String licenceNo, Integer blockedFlag) {
|
||||
UpdateWrapper<VehicleApplyDO> objectUpdateWrapper = new UpdateWrapper<>();
|
||||
objectUpdateWrapper.set("blocked_flag", blockedFlag);
|
||||
objectUpdateWrapper.eq("licence_no", licenceNo);
|
||||
vehicleApplyRepository.update(objectUpdateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.primeport.gatewayimpl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleBlackE;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||
|
|
@ -9,6 +10,7 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
|
|
@ -46,5 +48,23 @@ public class VehicleBlackGatewayImpl implements VehicleBlackGateway {
|
|||
public Boolean deletedVehicleBlackByIds(Long[] ids) {
|
||||
return vehicleBlackRepository.removeByIds(Collections.singletonList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveIfAbsent(String licenceNo) {
|
||||
List<VehicleBlackDO> licenceNoList = vehicleBlackRepository.list(new QueryWrapper<VehicleBlackDO>().eq("licence_no", licenceNo));
|
||||
VehicleBlackDO d = new VehicleBlackDO();
|
||||
d.setLicenceNo(licenceNo);
|
||||
if (licenceNoList.isEmpty()) {
|
||||
vehicleBlackRepository.save(d);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public VehicleBlackE getInfoById(Long id) {
|
||||
VehicleBlackE vehicleBlackE = new VehicleBlackE();
|
||||
BeanUtils.copyProperties(vehicleBlackRepository.getInfoById(id), vehicleBlackE);
|
||||
return vehicleBlackE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.primeport.gatewayimpl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleViolationsGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleViolationsE;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||
|
|
@ -9,6 +10,8 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
|
|
@ -46,5 +49,23 @@ public class VehicleViolationsGatewayImpl implements VehicleViolationsGateway {
|
|||
public Boolean deletedVehicleViolationsByIds(Long[] ids) {
|
||||
return vehicleViolationsRepository.removeByIds(Collections.singletonList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VehicleViolationsE> listVehicleViolationByLicenceNo(String licenceNo) {
|
||||
List<VehicleViolationsDO> vehicleViolationsDOS = vehicleViolationsRepository.listVehicleViolationByLicenceNo(licenceNo);
|
||||
return vehicleViolationsDOS.stream().map(d -> {
|
||||
VehicleViolationsE e = new VehicleViolationsE();
|
||||
BeanUtils.copyProperties(d, e);
|
||||
return e;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateVehicleViolationsStatusByLicenceNo(String licenceNo, int i) {
|
||||
UpdateWrapper<VehicleViolationsDO> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.set("violation_processing_status", i);
|
||||
updateWrapper.eq("licence_no", licenceNo);
|
||||
vehicleViolationsRepository.update(updateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.primeport.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
|
|
@ -19,16 +20,61 @@ import lombok.EqualsAndHashCode;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public class VehicleBlackDO extends BaseDO {
|
||||
|
||||
//车辆信息表(vehicle_apply)的主键id
|
||||
@ApiModelProperty(value = "车辆信息表(vehicle_apply)的主键id")
|
||||
private Long vehicleId;
|
||||
//车辆所属人姓名(临时车)
|
||||
@ApiModelProperty(value = "车辆所属人姓名(临时车)")
|
||||
private String employeeVehicleUserName;
|
||||
//车牌号
|
||||
@ApiModelProperty(value = "车牌号")
|
||||
private String licenceNo;
|
||||
|
||||
@ApiModelProperty(value = "车辆类型")
|
||||
@TableField(exist = false)
|
||||
private String vehicleType;
|
||||
//车辆类型-名字
|
||||
@ApiModelProperty(value = "车辆类型-名字")
|
||||
@TableField(exist = false)
|
||||
private String vehicleTypeName;
|
||||
//车辆所属类型 1-股份员工车辆,2-股份单位车辆,3-分公司员工车辆,4-分公司单位车辆 ,5-相关方车辆, 6:临时车辆,7检查部门车辆
|
||||
@ApiModelProperty(value = "车辆所属类型 1-股份员工车辆,2-股份单位车辆,3-分公司员工车辆,4-分公司单位车辆 ,5-相关方车辆, 6:临时车辆,7检查部门车辆")
|
||||
@TableField(exist = false)
|
||||
private String vehicleBelongType;
|
||||
@ApiModelProperty(value = "车辆所属企业ID")
|
||||
@TableField(exist = false)
|
||||
private Long vehicleCorpId;
|
||||
|
||||
//车辆所属企业名称
|
||||
@ApiModelProperty(value = "车辆所属企业名称")
|
||||
@TableField(exist = false)
|
||||
private String vehicleCorpName;
|
||||
//车辆所属部门id
|
||||
@ApiModelProperty(value = "车辆所属部门id")
|
||||
@TableField(exist = false)
|
||||
private Long vehicleDepartmentId;
|
||||
//车辆所属部门名称
|
||||
@ApiModelProperty(value = "车辆所属部门名称")
|
||||
@TableField(exist = false)
|
||||
private String vehicleDepartmentName;
|
||||
//车辆所属人id(员工车辆/驾驶人id)
|
||||
@ApiModelProperty(value = "车辆所属人id(员工车辆/驾驶人id)")
|
||||
@TableField(exist = false)
|
||||
private Long employeeVehicleUserId;
|
||||
|
||||
//行驶证照片
|
||||
@ApiModelProperty(value = "行驶证照片")
|
||||
@TableField(exist = false)
|
||||
private Long drivingLicenseId;
|
||||
//车辆照片
|
||||
@ApiModelProperty(value = "车辆照片")
|
||||
@TableField(exist = false)
|
||||
private Long attachmentId;
|
||||
//告知签字
|
||||
@ApiModelProperty(value = "告知签字")
|
||||
@TableField(exist = false)
|
||||
private Long informSignId;
|
||||
//项目id
|
||||
@ApiModelProperty(value = "项目id")
|
||||
@TableField(exist = false)
|
||||
private Long projectId;
|
||||
//项目名称
|
||||
@ApiModelProperty(value = "项目名称")
|
||||
@TableField(exist = false)
|
||||
private String projectName;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.primeport.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
|
|
@ -47,10 +48,43 @@ public class VehicleViolationsDO extends BaseDO {
|
|||
private String describeMessage;
|
||||
//违规时间
|
||||
@ApiModelProperty(value = "违规时间")
|
||||
private Date violationtime;
|
||||
private String violationtime;
|
||||
//违规处理状态,1已处理2未处理
|
||||
@ApiModelProperty(value = "违规处理状态,1已处理2未处理")
|
||||
private Integer violationProcessingStatus;
|
||||
@ApiModelProperty(value = "违规次数")
|
||||
@TableField(exist = false)
|
||||
private Integer violationCount;
|
||||
@ApiModelProperty(value = "车辆类型")
|
||||
@TableField(exist = false)
|
||||
private String vehicleType;
|
||||
//车辆类型-名字
|
||||
@ApiModelProperty(value = "车辆类型-名字")
|
||||
@TableField(exist = false)
|
||||
private String vehicleTypeName;
|
||||
//车辆所属类型 1-股份员工车辆,2-股份单位车辆,3-分公司员工车辆,4-分公司单位车辆 ,5-相关方车辆, 6:临时车辆,7检查部门车辆
|
||||
@ApiModelProperty(value = "车辆所属类型 1-股份员工车辆,2-股份单位车辆,3-分公司员工车辆,4-分公司单位车辆 ,5-相关方车辆, 6:临时车辆,7检查部门车辆")
|
||||
@TableField(exist = false)
|
||||
private String vehicleBelongType;
|
||||
@ApiModelProperty(value = "车辆所属企业ID")
|
||||
@TableField(exist = false)
|
||||
private Long vehicleCorpId;
|
||||
|
||||
//车辆所属企业名称
|
||||
@ApiModelProperty(value = "车辆所属企业名称")
|
||||
@TableField(exist = false)
|
||||
private String vehicleCorpName;
|
||||
//车辆所属部门id
|
||||
@ApiModelProperty(value = "车辆所属部门id")
|
||||
@TableField(exist = false)
|
||||
private Long vehicleDepartmentId;
|
||||
//车辆所属部门名称
|
||||
@ApiModelProperty(value = "车辆所属部门名称")
|
||||
@TableField(exist = false)
|
||||
private String vehicleDepartmentName;
|
||||
//车辆所属人id(员工车辆/驾驶人id)
|
||||
@ApiModelProperty(value = "车辆所属人id(员工车辆/驾驶人id)")
|
||||
@TableField(exist = false)
|
||||
private Long employeeVehicleUserId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,5 +13,6 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
@Mapper
|
||||
public interface VehicleBlackMapper extends BaseMapper<VehicleBlackDO> {
|
||||
|
||||
VehicleBlackDO getInfoById(Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
package com.zcloud.primeport.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
|
|
@ -13,5 +18,8 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
@Mapper
|
||||
public interface VehicleViolationsMapper extends BaseMapper<VehicleViolationsDO> {
|
||||
|
||||
IPage<VehicleViolationsDO> violationRecordslistPage(Page<Map<String, Object>> page, Map<String, Object> parmas);
|
||||
|
||||
List<VehicleViolationsDO> listVehicleViolationByLicenceNo(String licenceNo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,5 +13,7 @@ import java.util.Map;
|
|||
*/
|
||||
public interface VehicleBlackRepository extends BaseRepository<VehicleBlackDO> {
|
||||
PageResponse<VehicleBlackDO> listPage(Map<String, Object> parmas);
|
||||
|
||||
VehicleBlackDO getInfoById(Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ package com.zcloud.primeport.persistence.repository;
|
|||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
import com.zcloud.primeport.domain.model.VehicleViolationsE;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -14,5 +16,9 @@ import java.util.Map;
|
|||
*/
|
||||
public interface VehicleViolationsRepository extends BaseRepository<VehicleViolationsDO> {
|
||||
PageResponse<VehicleViolationsDO> listPage(Map<String, Object> parmas);
|
||||
|
||||
PageResponse<VehicleViolationsDO> violationRecordslistPage(Map<String, Object> parmas);
|
||||
|
||||
List<VehicleViolationsDO> listVehicleViolationByLicenceNo(String licenceNo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,5 +35,10 @@ public class VehicleBlackRepositoryImpl extends BaseRepositoryImpl<VehicleBlackM
|
|||
IPage<VehicleBlackDO> result = vehicleBlackMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public VehicleBlackDO getInfoById(Long id) {
|
||||
return vehicleBlackMapper.getInfoById(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,16 +3,21 @@ package com.zcloud.primeport.persistence.repository.impl;
|
|||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.zcloud.primeport.domain.enums.MenuEnum;
|
||||
import com.zcloud.primeport.persistence.dataobject.MkmjDO;
|
||||
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.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -32,8 +37,22 @@ public class VehicleViolationsRepositoryImpl extends BaseRepositoryImpl<VehicleV
|
|||
QueryWrapper<VehicleViolationsDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.groupBy("licence_no");
|
||||
IPage<VehicleViolationsDO> result = vehicleViolationsMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResponse<VehicleViolationsDO> violationRecordslistPage(Map<String, Object> parmas) {
|
||||
Page<Map<String, Object>> page = new Page<>(Integer.parseInt(parmas.get("pageIndex").toString()), Integer.parseInt(parmas.get("pageSize").toString()));
|
||||
|
||||
IPage<VehicleViolationsDO> iPage = vehicleViolationsMapper.violationRecordslistPage(page, parmas);
|
||||
return PageHelper.pageToResponse(iPage, iPage.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VehicleViolationsDO> listVehicleViolationByLicenceNo(String licenceNo) {
|
||||
return vehicleViolationsMapper.listVehicleViolationByLicenceNo(licenceNo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,36 @@
|
|||
|
||||
<mapper namespace="com.zcloud.primeport.persistence.mapper.VehicleBlackMapper">
|
||||
|
||||
<select id="getInfoById" resultType="com.zcloud.primeport.persistence.dataobject.VehicleBlackDO">
|
||||
SELECT
|
||||
a.licence_type,
|
||||
a.licence_type_name,
|
||||
a.licence_no,
|
||||
a.vehicle_type,
|
||||
a.vehicle_type_name,
|
||||
a.vehicle_belong_type,
|
||||
a.gate_level_auth_area,
|
||||
a.vehicle_corp_id,
|
||||
a.vehicle_corp_name,
|
||||
a.vehicle_department_id,
|
||||
a.vehicle_department_name,
|
||||
a.employee_vehicle_user_id,
|
||||
a.employee_vehicle_user_name,
|
||||
a.emission_standards,
|
||||
a.emission_standards_name,
|
||||
a.driving_license_id,
|
||||
a.attachment_id,
|
||||
a.inform_sign_id,
|
||||
a.project_id,
|
||||
a.project_name,
|
||||
a.ls_user_idcard,
|
||||
a.ls_user_phone,
|
||||
a.mkmj_id
|
||||
FROM
|
||||
vehicle_black AS b
|
||||
LEFT JOIN vehicle_apply AS a ON b.licence_no = a.licence_no
|
||||
WHERE
|
||||
b.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,37 @@
|
|||
|
||||
<mapper namespace="com.zcloud.primeport.persistence.mapper.VehicleViolationsMapper">
|
||||
|
||||
<select id="violationRecordslistPage"
|
||||
resultType="com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO">
|
||||
SELECT
|
||||
f.licence_no,
|
||||
a.id vehicle_id,
|
||||
a.vehicle_belong_type,
|
||||
a.employee_vehicle_user_name,
|
||||
a.employee_vehicle_user_id,
|
||||
a.vehicle_department_name,
|
||||
a.vehicle_department_id,
|
||||
a.vehicle_corp_name,
|
||||
a.vehicle_corp_id,
|
||||
a.vehicle_type,
|
||||
a.vehicle_type_name,
|
||||
a.licence_type_name,
|
||||
a.licence_type,
|
||||
COUNT(f.licence_no) violation_count
|
||||
FROM
|
||||
vehicle_violations AS f
|
||||
LEFT JOIN
|
||||
vehicle_apply AS a
|
||||
ON
|
||||
f.licence_no = a.licence_no AND
|
||||
a.delete_enum = 'FALSE'
|
||||
where f.delete_enum = 'FALSE'
|
||||
GROUP BY
|
||||
f.licence_no
|
||||
</select>
|
||||
<select id="listVehicleViolationByLicenceNo"
|
||||
resultType="com.zcloud.primeport.persistence.dataobject.VehicleViolationsDO">
|
||||
SELECT * FROM vehicle_violations WHERE licence_no = #{licenceNo} and delete_enum = 'FALSE' and violation_processing_status = 2
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue