Merge branch 'dev.carManage' of https://gitea.qinmian.online/six-vehicle/cloud-server into dev
# Conflicts: # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-common/src/main/java/com/muyu/enterprise/domain/CarCompany.java # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-common/src/main/java/com/muyu/enterprise/domain/CarMessage.java # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-common/src/main/java/com/muyu/enterprise/domain/CarMessageType.java # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-common/src/main/java/com/muyu/enterprise/domain/CarTemplate.java # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-common/src/main/java/com/muyu/enterprise/domain/CarType.java # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-server/src/main/java/com/muyu/enterprise/mapper/SysCarCompanyMapper.java # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-server/src/main/java/com/muyu/enterprise/service/CarCompanyService.java # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-server/src/main/java/com/muyu/enterprise/service/SysCarService.java # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-server/src/main/java/com/muyu/enterprise/service/impl/SysCarCompanyServiceImpl.java # cloud-modules/cloud-modules-enterprise/cloud-modules-enterprise-server/src/main/java/com/muyu/enterprise/service/impl/SysCarServiceImpl.javadev.eventProcess
commit
c8fd288cc4
|
@ -9,17 +9,18 @@ import lombok.Builder;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
/**
|
||||
* 企业表
|
||||
* @Author: chenruijia
|
||||
* @Date 2024/9/28 16.06
|
||||
* @Description CarCompany:企业表
|
||||
* 企业表--实体类
|
||||
* @ClassName CarCompany
|
||||
* @Description 企业表
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@TableName(value = "t_company")
|
||||
@Tag(name = "")
|
||||
@TableName(value = "car_company")
|
||||
@Tag(name = "企业表")
|
||||
public class CarCompany {
|
||||
/**
|
||||
* 企业表
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package com.muyu.enterprise.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆配置表--实体类
|
||||
* @ClassName CarConfig
|
||||
* @Description 车辆配置表
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆配置表")
|
||||
@TableName(value = "car_config")
|
||||
public class CarConfig {
|
||||
/**
|
||||
* 车辆配置类
|
||||
*/
|
||||
@TableId(value = "config_id",type = IdType.AUTO)
|
||||
private Long configId;
|
||||
/**
|
||||
* 车辆配置 1.电动 2.纯油 3.混动
|
||||
*/
|
||||
private String configName;
|
||||
/**
|
||||
* 能源类型
|
||||
*/
|
||||
private String energyType;
|
||||
/**
|
||||
* 档的类型 1.手动 2.自动
|
||||
*/
|
||||
private Integer gearType;
|
||||
/**
|
||||
* 报文id
|
||||
*/
|
||||
private Integer companyId;
|
||||
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package com.muyu.enterprise.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 车辆表--实体类
|
||||
* @ClassName CarManage
|
||||
* @Description 车辆表
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "车辆表")
|
||||
@Builder
|
||||
@TableName(value = "car_manage",autoResultMap = true)
|
||||
public class CarManage {
|
||||
/**
|
||||
* 车辆表
|
||||
*/
|
||||
@TableId(value = "car_id",type = IdType.AUTO)
|
||||
private Long carId;
|
||||
/**
|
||||
* 车架号
|
||||
*/
|
||||
private String carFrame;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carCode;
|
||||
/**
|
||||
* 车牌颜色 1.白色 2.绿色 3.黑色 4.银色 5.红色
|
||||
*/
|
||||
private Integer carColor;
|
||||
/**
|
||||
* VIN码
|
||||
*/
|
||||
private String carVin;
|
||||
/**
|
||||
* 驾驶员
|
||||
*/
|
||||
private long userId;
|
||||
/**
|
||||
* 车辆配置
|
||||
*/
|
||||
private long configId;
|
||||
/**
|
||||
* 年审日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date audditTime;
|
||||
/**
|
||||
* 行驶证到期日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date licenseTime;
|
||||
/**
|
||||
* 保险到期日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date insuranceTime;
|
||||
/**
|
||||
* 在线状态 1.无信号 2.行驶中 3.已停止
|
||||
*/
|
||||
private Integer carStayus;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createdTime;
|
||||
/**
|
||||
* 当前档位
|
||||
*/
|
||||
private Integer carGears;
|
||||
/**
|
||||
* 车辆品牌
|
||||
*/
|
||||
private String carModel;
|
||||
/**
|
||||
* 车辆型号
|
||||
*/
|
||||
private String cardDrand;
|
||||
|
||||
/** 最后一次连线时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "最后一次连线时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date carLastJoinTime;
|
||||
|
||||
/** 最后一次离线时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "最后一次离线时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date carLastOfflineTime;
|
||||
|
||||
/**
|
||||
* 汽车所属企业id
|
||||
*/
|
||||
private Long companyId;
|
||||
/**
|
||||
* 车辆类型 1.轿车 2.跑车 3.越野 4.客车 5.公交 6.其他
|
||||
*/
|
||||
private Integer carType;
|
||||
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package com.muyu.enterprise.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,22 +10,24 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 报文表
|
||||
* @Author: chenruijia
|
||||
* @Date 2024/9/28 16.06
|
||||
* @Description CarMessage:报文表
|
||||
* 报文表--实体类
|
||||
* @ClassName CarMessage
|
||||
* @Description 报文表
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "报文表")
|
||||
@TableName(value = "t_car_message")
|
||||
@TableName(value = "car_message")
|
||||
public class CarMessage {
|
||||
|
||||
/**
|
||||
* 报文表
|
||||
*/
|
||||
@TableId(value = "message_id" ,type = IdType.AUTO)
|
||||
private Long messageId;
|
||||
/**
|
||||
* 车辆报文类别
|
||||
|
|
|
@ -3,21 +3,24 @@ package com.muyu.enterprise.domain;
|
|||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
/**
|
||||
* 报文类型表
|
||||
* @Author: chenruijia
|
||||
* @Date 2024/9/28 12.23
|
||||
* @Description CarMessageType:报文类型表
|
||||
* 报文类型表--实体类
|
||||
* @ClassName CarMessageType
|
||||
* @Description 报文类型表
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@TableName(value = "t_message_type")
|
||||
@TableName(value = "car_message_type")
|
||||
@Tag(name = "报文类型表")
|
||||
public class CarMessageType {
|
||||
/**
|
||||
* 报文
|
||||
|
|
|
@ -3,22 +3,24 @@ package com.muyu.enterprise.domain;
|
|||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 故障规则
|
||||
* @Author: chenruijia
|
||||
* @Date 2024/9/28 12.23
|
||||
* @Description FaultrRule:故障规则
|
||||
* 报文模版表--实体类
|
||||
* @ClassName CarTemplate
|
||||
* @Description 报文模版表
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@TableName(value = "t_template")
|
||||
@TableName(value = "car_template")
|
||||
@Tag(name = "报文模版表")
|
||||
public class CarTemplate {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.muyu.enterprise.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -8,23 +10,24 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆类型表
|
||||
* 车辆类型表--实体类
|
||||
* @ClassName CarType
|
||||
* @Description 描述
|
||||
* @Author YiBo.Liu
|
||||
* @Date 2024/9/22 16:53
|
||||
* @Description 车辆类型表
|
||||
* @author YiBo.Liu
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆类型表")
|
||||
@TableName(value = "t_car_type")
|
||||
@TableName(value = "car_type")
|
||||
public class CarType {
|
||||
|
||||
/**
|
||||
* 车辆类型id
|
||||
*/
|
||||
@TableId(value = "car_type_id",type = IdType.AUTO)
|
||||
private Integer carTypeId;
|
||||
|
||||
/**
|
||||
|
|
|
@ -82,6 +82,13 @@
|
|||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-modules-enterprise-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MyBatisPlus - 依赖包 -->
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join</artifactId>
|
||||
<version>1.4.13</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.enterprise.controller;
|
||||
|
||||
import com.muyu.enterprise.domain.CarCompany;
|
||||
import com.muyu.enterprise.service.CarCompanyService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆企业--控制层
|
||||
* @ClassName CarCompanyController
|
||||
* @Description 车辆企业 Controller 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/company")
|
||||
@Tag(name = "CarCompanyController", description = "企业表")
|
||||
public class CarCompanyController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CarCompanyService sysCarCompanyService;
|
||||
|
||||
/**
|
||||
* 查询企业表
|
||||
*/
|
||||
@PostMapping("selectCompany")
|
||||
public Result<List<CarCompany>> selectCompany(){
|
||||
return Result.success(sysCarCompanyService.list());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询企业
|
||||
*/
|
||||
@PostMapping("selectCompanyByCompanyId")
|
||||
public Result<CarCompany> selectCompanyByCompanyId(@RequestParam("companyId") Long companyId){
|
||||
return Result.success(sysCarCompanyService.getById(companyId));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +1,13 @@
|
|||
package com.muyu.enterprise.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.enterprise.domain.CarManage;
|
||||
import com.muyu.enterprise.domain.dto.CarDTO;
|
||||
import com.muyu.enterprise.domain.vo.CarVO;
|
||||
import com.muyu.enterprise.service.SysCarCompanyService;
|
||||
import com.muyu.enterprise.service.SysCarService;
|
||||
import com.muyu.enterprise.service.CarCompanyService;
|
||||
import com.muyu.enterprise.service.CarManageService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
@ -17,19 +20,22 @@ import org.springframework.web.bind.annotation.*;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 参数配置 信息操作处理
|
||||
*
|
||||
* @author muyu
|
||||
* 车辆管理--控制层
|
||||
* @ClassName CarManageController
|
||||
* @Description 车辆管理 Controller 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage")
|
||||
@Tag(name = "SysCarController", description = "系统参数配置")
|
||||
public class SysCarController extends BaseController {
|
||||
@RequestMapping("/carManage")
|
||||
@Tag(name = "CarManageController", description = "车辆管理")
|
||||
public class CarManageController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private SysCarCompanyService sysCarCompanyService;
|
||||
private CarCompanyService sysCarCompanyService;
|
||||
@Autowired
|
||||
private SysCarService sysCarService;
|
||||
private CarManageService sysCarService;
|
||||
|
||||
|
||||
/**
|
||||
* 车辆列表2
|
||||
|
@ -37,7 +43,7 @@ public class SysCarController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("CarListShow")
|
||||
public Result<List<CarVO>> CarListShow(@RequestBody CarDTO carDTO){
|
||||
public Result<List<CarManage>> CarListShow(@RequestBody CarDTO carDTO){
|
||||
return Result.success(sysCarService.CarListShow(carDTO));
|
||||
}
|
||||
|
||||
|
@ -46,22 +52,22 @@ public class SysCarController extends BaseController {
|
|||
* @param carId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("CarListShowByCarId")
|
||||
public Result<List<CarVO>> CarListShowByCarId(@RequestParam("carId") Long carId){
|
||||
return Result.success(sysCarService.CarListShowByCarId(carId));
|
||||
@PostMapping("CarManageShowByCarId")
|
||||
public Result CarManageShowByCarId(@RequestParam("carId") Long carId){
|
||||
return Result.success(sysCarService.getById(carId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆列表1
|
||||
* @param carVO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("CarList")
|
||||
@Operation(summary = "查询列表",description = "车辆管理列表")
|
||||
public Result<TableDataInfo<CarVO>> CarList(@RequestBody CarVO carVO){
|
||||
startPage();
|
||||
return getDataTable(sysCarService.carList(carVO));
|
||||
}
|
||||
// /**
|
||||
// * 车辆列表1
|
||||
// * @param carVO
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("CarList")
|
||||
// @Operation(summary = "查询列表",description = "车辆管理列表")
|
||||
// public Result<TableDataInfo<CarManage>> CarList(@RequestBody CarVO carVO){
|
||||
// startPage();
|
||||
// return getDataTable(sysCarService.carList(carVO));
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
|
@ -70,14 +76,14 @@ public class SysCarController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("insertCar")
|
||||
public Result insertCar(@RequestBody CarVO carVO){
|
||||
public Result insertCar(@RequestBody CarManage carVO){
|
||||
String key = RandomUtil.randomNumbers(9);
|
||||
// 随机生成车架号
|
||||
carVO.setCarFrame(key);
|
||||
// 随机生成VIN码
|
||||
String key2 = RandomUtil.randomNumbers(17);
|
||||
carVO.setCarVin(key2);
|
||||
sysCarService.insertCar(carVO);
|
||||
sysCarService.save(carVO);
|
||||
return Result.success("车辆添加成功");
|
||||
}
|
||||
|
||||
|
@ -88,7 +94,7 @@ public class SysCarController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("updataCar")
|
||||
public Result updataCar(@RequestBody CarVO carVO){
|
||||
public Result updataCar(@RequestBody CarManage carVO){
|
||||
//
|
||||
carVO.setUserId(SecurityUtils.getUserId());
|
||||
sysCarService.updateById(carVO);
|
||||
|
@ -102,7 +108,7 @@ public class SysCarController extends BaseController {
|
|||
*/
|
||||
@PostMapping("deleteCar")
|
||||
public Result deleteCar(@RequestParam("ids") List<Long> ids){
|
||||
sysCarService.deleteCar(ids);
|
||||
sysCarService.removeBatchByIds(ids);
|
||||
return Result.success("车辆删除成功");
|
||||
}
|
||||
|
|
@ -2,28 +2,37 @@ package com.muyu.enterprise.controller;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.enterprise.domain.CarMessage;
|
||||
import com.muyu.enterprise.service.CarMessageService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
* @ClassName CarMessageController
|
||||
* @Description 描述
|
||||
* @Author YiBo.Liu
|
||||
* @Date 2024/9/22 22:28
|
||||
* 车辆报文--控制层
|
||||
* @ClassName carMessageController
|
||||
* @Description 车辆类型 Controller 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/carMessage")
|
||||
public class CarMessageController {
|
||||
@Tag(name = "报文",description = "报文模块")
|
||||
public class CarMessageController extends BaseController {
|
||||
@Autowired
|
||||
private CarMessageService carMessageService;
|
||||
private CarMessageService sysCarMessageService;
|
||||
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("selectMessageShow")
|
||||
public List<CarMessage> selectMessageShow(@RequestParam("templateId") Long templateId){
|
||||
return sysCarMessageService.selectMessageShow(templateId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据报文模板id查询报文
|
||||
|
@ -32,8 +41,46 @@ public class CarMessageController {
|
|||
*/
|
||||
@GetMapping("/selectByTemplateId")
|
||||
private Result<List<CarMessage>> selectByTemplateId(@RequestParam("templateId") Integer templateId) {
|
||||
return Result.success(carMessageService.list
|
||||
return Result.success(sysCarMessageService.list
|
||||
(new LambdaQueryWrapper<CarMessage>().eq(CarMessage::getTemplateId, templateId)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询报文信息
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("selectMessageByMessageId")
|
||||
public CarMessage selectMessageByMessageId(@RequestParam("messageId") Long messageId){
|
||||
return sysCarMessageService.selectMessageByMessageId(messageId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加报文信息
|
||||
* @return carMessage
|
||||
*/
|
||||
@PostMapping("insertMessage")
|
||||
public Result insertMessage(@RequestBody CarMessage carMessage){
|
||||
sysCarMessageService.save(carMessage);
|
||||
return Result.success("添加成功");
|
||||
}
|
||||
/**
|
||||
* 修改报文信息
|
||||
* @return carMessage
|
||||
*/
|
||||
@PostMapping("updataMessage")
|
||||
public Result updataMessage(@RequestBody CarMessage carMessage){
|
||||
sysCarMessageService.updateById(carMessage);
|
||||
return Result.success("修改成功");
|
||||
}
|
||||
/**
|
||||
* 删除报文信息
|
||||
* @return carMessage
|
||||
*/
|
||||
@PostMapping("deleteMessage")
|
||||
public Result deleteMessage(@RequestParam("ids") List<Long> ids){
|
||||
sysCarMessageService.removeBatchByIds(ids);
|
||||
return Result.success("删除成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
package com.muyu.enterprise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.enterprise.domain.CarMessageType;
|
||||
import com.muyu.enterprise.service.CarMessageTypeService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文类型--控制层
|
||||
* @ClassName CarMessageTypeController
|
||||
* @Description 报文类型 Controller 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("carMessageType")
|
||||
@Tag(name = "报文类型" ,description = "报文类型")
|
||||
public class CarMessageTypeController extends BaseController {
|
||||
@Autowired
|
||||
private CarMessageTypeService sysCarMessageTypeService;
|
||||
|
||||
/**
|
||||
* 查询报文类型
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("messageTypeList")
|
||||
public Result messageTypeList(){
|
||||
sysCarMessageTypeService.messageTypeList();
|
||||
List<CarMessageType> list = sysCarMessageTypeService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("inserMessageType")
|
||||
public Result inserMessageType(@RequestBody CarMessageType carMessageType){
|
||||
/** id 检验 */
|
||||
if(carMessageType.getMessageTypeId()>0){
|
||||
return Result.error("添加要什么id");
|
||||
}
|
||||
/** token 检验 */
|
||||
if(SecurityUtils.getToken().isEmpty()){
|
||||
return Result.error("token不为空");
|
||||
}
|
||||
/** 报文类型 */
|
||||
if(StringUtils.isEmpty(carMessageType.getMessageType())){
|
||||
return Result.error("报文类型不能为空");
|
||||
}
|
||||
/** 报文 */
|
||||
if(StringUtils.isEmpty(carMessageType.getMessageName())){
|
||||
return Result.error("报文不能为空");
|
||||
}
|
||||
/** 报文编码 */
|
||||
if(StringUtils.isEmpty(carMessageType.getMessageCode())){
|
||||
return Result.error("报文编码不能为空");
|
||||
}
|
||||
/** 报文字段类型 */
|
||||
if(StringUtils.isEmpty(carMessageType.getMessageClass())){
|
||||
return Result.error("报文字段类型不能为空");
|
||||
}
|
||||
sysCarMessageTypeService.save(carMessageType);
|
||||
return Result.success("添加成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报文类型
|
||||
* @param carMessageType
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("updateMessageType")
|
||||
public Result updateMessageType(@RequestBody CarMessageType carMessageType){
|
||||
/** id */
|
||||
if(carMessageType.getMessageTypeId() < 0 ){
|
||||
return Result.error("修改需要id");
|
||||
}
|
||||
/** 报文编号 */
|
||||
if(StringUtils.isEmpty(carMessageType.getMessageCode())){
|
||||
return Result.error("");
|
||||
}
|
||||
sysCarMessageTypeService.updateById(carMessageType);
|
||||
return Result.success("修改成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.enterprise.controller;
|
||||
|
||||
import com.muyu.enterprise.domain.CarTemplate;
|
||||
import com.muyu.enterprise.service.SysCarTemplateService;
|
||||
import com.muyu.enterprise.service.CarTemplateService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
@ -9,13 +9,19 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文模版--控制层
|
||||
* @ClassName CarTemplateController
|
||||
* @Description 报文模版 Controller 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/template") // 报文
|
||||
@RequestMapping("/carTemplate") // 报文模版
|
||||
@Tag(name = "模版模块",description = "报文模版模块")
|
||||
public class SysCarTemplateController extends BaseController {
|
||||
public class CarTemplateController extends BaseController {
|
||||
@Autowired
|
||||
private SysCarTemplateService sysCarTemplateService;
|
||||
private CarTemplateService sysCarTemplateService;
|
||||
|
||||
/**
|
||||
* 查询所有模版信息
|
|
@ -3,6 +3,7 @@ package com.muyu.enterprise.controller;
|
|||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.enterprise.domain.CarType;
|
||||
import com.muyu.enterprise.service.CarTypeService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -17,6 +18,7 @@ import java.util.List;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/carType")
|
||||
@Tag(name = "CarTypeController",description = "车辆类型")
|
||||
public class CarTypeController {
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
package com.muyu.enterprise.controller;
|
||||
|
||||
import com.muyu.enterprise.service.SysCarCompanyService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 参数配置 信息操作处理
|
||||
*
|
||||
* @author muyu
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/company")
|
||||
@Tag(name = "SysCarCompanyController", description = "系统参数配置")
|
||||
public class SysCarCompanyController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private SysCarCompanyService sysCarCompanyService;
|
||||
|
||||
/**
|
||||
* 查询企业表
|
||||
*/
|
||||
@PostMapping("selectCompany")
|
||||
public Result selectCompany(){
|
||||
return Result.success(sysCarCompanyService.list());
|
||||
}
|
||||
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
package com.muyu.enterprise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.enterprise.domain.CarMessage;
|
||||
import com.muyu.enterprise.service.SysCarMessageService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/car-message")
|
||||
@Tag(name = "报文",description = "报文模块")
|
||||
public class SysCarMessageController extends BaseController {
|
||||
@Autowired
|
||||
private SysCarMessageService sysCarMessageService;
|
||||
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("selectMessageShow")
|
||||
public List<CarMessage> selectMessageShow(@RequestParam("templateId") Long templateId){
|
||||
return sysCarMessageService.selectMessageShow(templateId);
|
||||
}
|
||||
/**
|
||||
* 通过id查询报文信息
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("selectMessageByMessageId")
|
||||
public CarMessage selectMessageByMessageId(@RequestParam("messageId") Long messageId){
|
||||
return sysCarMessageService.selectMessageByMessageId(messageId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加报文信息
|
||||
* @return carMessage
|
||||
*/
|
||||
@PostMapping("insertMessage")
|
||||
public Result insertMessage(@RequestBody CarMessage carMessage){
|
||||
sysCarMessageService.save(carMessage);
|
||||
return Result.success("添加成功");
|
||||
}
|
||||
/**
|
||||
* 修改报文信息
|
||||
* @return carMessage
|
||||
*/
|
||||
@PostMapping("updataMessage")
|
||||
public Result updataMessage(@RequestBody CarMessage carMessage){
|
||||
sysCarMessageService.updateById(carMessage);
|
||||
return Result.success("修改成功");
|
||||
}
|
||||
/**
|
||||
* 删除报文信息
|
||||
* @return carMessage
|
||||
*/
|
||||
@PostMapping("deleteMessage")
|
||||
public Result deleteMessage(@RequestParam("ids") List<Long> ids){
|
||||
sysCarMessageService.removeBatchByIds(ids);
|
||||
return Result.success("删除成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.muyu.enterprise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.enterprise.domain.CarCompany;
|
||||
|
||||
|
||||
/**
|
||||
* 车辆企业--持久层
|
||||
* @ClassName CarCompanyMapper
|
||||
* @Description 车辆企业 Mapper 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
public interface CarCompanyMapper extends BaseMapper<CarCompany> {
|
||||
|
||||
}
|
|
@ -2,19 +2,22 @@ package com.muyu.enterprise.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.enterprise.domain.CarManage;
|
||||
import com.muyu.enterprise.domain.dto.CarDTO;
|
||||
import com.muyu.enterprise.domain.vo.CarVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author zmw
|
||||
* @description: 配置mybatis配置
|
||||
* @Date 2023-11-13 上午 10:05
|
||||
* 车辆管理--持久层
|
||||
* @ClassName CarManageMapper
|
||||
* @Description 车辆管理 Mapper 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
public interface SysCarMapper extends BaseMapper<CarVO> {
|
||||
|
||||
public interface CarManageMapper extends BaseMapper<CarManage> {
|
||||
/**
|
||||
* 车辆列表
|
||||
* @param queryWrapper
|
|
@ -4,6 +4,20 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
import com.muyu.enterprise.domain.CarMessage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 车辆报文--持久层
|
||||
* @ClassName CarMessageMapper
|
||||
* @Description 车辆类型 Mapper 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Mapper
|
||||
public interface CarMessageMapper extends BaseMapper<CarMessage> {
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @param templateId
|
||||
* @return
|
||||
*/
|
||||
List<CarMessage> selectMessageShow(Long templateId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.muyu.enterprise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.enterprise.domain.CarMessageType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 报文类型--持久层
|
||||
* @ClassName CarMessageTypeMapper
|
||||
* @Description 报文类型 Mapper 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Mapper
|
||||
public interface CarMessageTypeMapper extends BaseMapper<CarMessageType> {
|
||||
}
|
|
@ -5,9 +5,15 @@ import com.muyu.enterprise.domain.CarTemplate;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文模版--持久层
|
||||
* @ClassName CarTemplateMapper
|
||||
* @Description 报文模版 Mapper 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Mapper
|
||||
public interface SysCarTemplateMapper extends BaseMapper<CarTemplate> {
|
||||
public interface CarTemplateMapper extends BaseMapper<CarTemplate> {
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @return
|
|
@ -4,10 +4,15 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
import com.muyu.enterprise.domain.CarType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 车辆类型--持久层
|
||||
* @ClassName CarTypeMapper
|
||||
* @Description 车辆类型 Mapper 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Mapper
|
||||
public interface CarTypeMapper extends BaseMapper<CarType> {
|
||||
|
||||
CarType findById(@Param("catTypeId") Integer catTypeId);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
package com.muyu.enterprise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.enterprise.domain.CarCompany;
|
||||
|
||||
|
||||
/**
|
||||
* 配置mybatis配置
|
||||
* @author zmw
|
||||
* @description: 配置mybatis配置
|
||||
* @Date 2023-11-13 上午 10:05
|
||||
*/
|
||||
public interface SysCarCompanyMapper extends BaseMapper<CarCompany> {
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package com.muyu.enterprise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.enterprise.domain.CarMessage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface SysCarMessageMapper extends BaseMapper<CarMessage> {
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @param templateId
|
||||
* @return
|
||||
*/
|
||||
List<CarMessage> selectMessageShow(Long templateId);
|
||||
}
|
|
@ -3,12 +3,13 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.muyu.enterprise.domain.CarCompany;
|
||||
|
||||
/**
|
||||
* 配置plus业务层
|
||||
* @author zmw
|
||||
* @description: 配置plus业务层
|
||||
* @Date 2023-11-13 上午 10:06
|
||||
* 车辆企业--业务层
|
||||
* @ClassName CarCompanyService
|
||||
* @Description 车辆企业 Service 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
public interface SysCarCompanyService extends IService<CarCompany> {
|
||||
public interface CarCompanyService extends IService<CarCompany> {
|
||||
|
||||
/**
|
||||
* 查询企业表
|
|
@ -0,0 +1,50 @@
|
|||
package com.muyu.enterprise.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.enterprise.domain.CarManage;
|
||||
import com.muyu.enterprise.domain.dto.CarDTO;
|
||||
import com.muyu.enterprise.domain.vo.CarVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆管理--业务层
|
||||
* @ClassName CarManageService
|
||||
* @Description 车辆管理 Service 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
public interface CarManageService extends IService<CarManage> {
|
||||
// /**
|
||||
// * 车辆列表
|
||||
// * @param carVO
|
||||
// * @return
|
||||
// */
|
||||
// List<CarManage> carList(CarVO carVO);
|
||||
//
|
||||
// /**
|
||||
// * 车辆添加
|
||||
// * @param carVO
|
||||
// */
|
||||
// void insertCar(CarVO carVO);
|
||||
//
|
||||
// /**
|
||||
// * 车辆删除
|
||||
// * @param ids
|
||||
// */
|
||||
// void deleteCar(List<Long> ids);
|
||||
//
|
||||
//
|
||||
/**
|
||||
* 车辆列表2
|
||||
* @param carDTO
|
||||
* @return
|
||||
*/
|
||||
List<CarManage> CarListShow(CarDTO carDTO);
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// * @param carId
|
||||
// * @return
|
||||
// */
|
||||
// List<CarVO> CarListShowByCarId(Long carId);
|
||||
}
|
|
@ -3,5 +3,26 @@ package com.muyu.enterprise.service;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.enterprise.domain.CarMessage;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 车辆报文--业务层
|
||||
* @ClassName CarMessageService
|
||||
* @Description 车辆类型 Service 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
public interface CarMessageService extends IService<CarMessage> {
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @param templateId
|
||||
* @return
|
||||
*/
|
||||
List<CarMessage> selectMessageShow(Long templateId);
|
||||
|
||||
/**
|
||||
* 通过id查询报文信息
|
||||
* @param messageId
|
||||
* @return
|
||||
*/
|
||||
CarMessage selectMessageByMessageId(Long messageId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.muyu.enterprise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.enterprise.domain.CarMessageType;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 报文类型--业务层
|
||||
* @ClassName CarMessageTypeService
|
||||
* @Description 报文类型 Service 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
public interface CarMessageTypeService extends IService<CarMessageType> {
|
||||
List<CarMessageType> messageTypeList();
|
||||
}
|
|
@ -4,8 +4,14 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.muyu.enterprise.domain.CarTemplate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SysCarTemplateService extends IService<CarTemplate> {
|
||||
/**
|
||||
* 报文模版--业务层
|
||||
* @ClassName CarTemplateService
|
||||
* @Description 报文模版 Service 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
public interface CarTemplateService extends IService<CarTemplate> {
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @return
|
|
@ -2,7 +2,13 @@ package com.muyu.enterprise.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.enterprise.domain.CarType;
|
||||
|
||||
/**
|
||||
* 车辆类型--业务层
|
||||
* @ClassName CarTypeService
|
||||
* @Description 车辆类型 Service 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
public interface CarTypeService extends IService<CarType> {
|
||||
CarType findById(Integer catTypeId);
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
package com.muyu.enterprise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.enterprise.domain.CarMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SysCarMessageService extends IService<CarMessage> {
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @param templateId
|
||||
* @return
|
||||
*/
|
||||
List<CarMessage> selectMessageShow(Long templateId);
|
||||
|
||||
/**
|
||||
* 通过id查询报文信息
|
||||
* @param messageId
|
||||
* @return
|
||||
*/
|
||||
CarMessage selectMessageByMessageId(Long messageId);
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
package com.muyu.enterprise.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.enterprise.domain.dto.CarDTO;
|
||||
import com.muyu.enterprise.domain.vo.CarVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配置plus业务层
|
||||
* @author zmw
|
||||
* @description: 配置plus业务层
|
||||
* @Date 2023-11-13 上午 10:06
|
||||
*/
|
||||
public interface SysCarService extends IService<CarVO> {
|
||||
/**
|
||||
* 车辆列表
|
||||
* @param carVO
|
||||
* @return
|
||||
*/
|
||||
List<CarVO> carList(CarVO carVO);
|
||||
|
||||
/**
|
||||
* 车辆添加
|
||||
* @param carVO
|
||||
*/
|
||||
void insertCar(CarVO carVO);
|
||||
|
||||
/**
|
||||
* 车辆删除
|
||||
* @param ids
|
||||
*/
|
||||
void deleteCar(List<Long> ids);
|
||||
|
||||
// /**
|
||||
// * 车辆修改
|
||||
// * @param carVO
|
||||
// */
|
||||
// void updataCar(CarVO carVO);
|
||||
|
||||
/**
|
||||
* 车辆列表2
|
||||
* @param carDTO
|
||||
* @return
|
||||
*/
|
||||
List<CarVO> CarListShow(CarDTO carDTO);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @param carId
|
||||
* @return
|
||||
*/
|
||||
List<CarVO> CarListShowByCarId(Long carId);
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.muyu.enterprise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.enterprise.domain.CarCompany;
|
||||
import com.muyu.enterprise.mapper.CarCompanyMapper;
|
||||
import com.muyu.enterprise.service.CarCompanyService;
|
||||
import com.muyu.common.redis.service.RedisService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 车辆企业--业务实现层
|
||||
* @ClassName CarCompanyServiceImpl
|
||||
* @Description 车辆企业 ServiceImpl 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
/**
|
||||
* 车辆企业--业务层
|
||||
* @ClassName CarCompanyService
|
||||
* @Description 车辆企业 Service 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Service
|
||||
public class CarCompanyServiceImpl extends ServiceImpl<CarCompanyMapper, CarCompany>
|
||||
implements CarCompanyService {
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
@Autowired
|
||||
private CarCompanyMapper sysCarCompanyMapper;
|
||||
|
||||
|
||||
// @Override
|
||||
// public List<CarCompany> selectCompany() {
|
||||
// return sysCarCompanyMapper.;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
package com.muyu.enterprise.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.enterprise.controller.CarCompanyController;
|
||||
import com.muyu.enterprise.domain.CarCompany;
|
||||
import com.muyu.enterprise.domain.CarManage;
|
||||
import com.muyu.enterprise.domain.dto.CarDTO;
|
||||
import com.muyu.enterprise.domain.vo.CarVO;
|
||||
import com.muyu.enterprise.mapper.CarManageMapper;
|
||||
import com.muyu.enterprise.service.CarCompanyService;
|
||||
import com.muyu.enterprise.service.CarManageService;
|
||||
import com.muyu.common.redis.service.RedisService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆管理--业务实现层
|
||||
* @ClassName CarManageServiceImpl
|
||||
* @Description 车辆管理 ServiceImpl 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Service
|
||||
public class CarManageServiceImpl extends ServiceImpl<CarManageMapper, CarManage>
|
||||
implements CarManageService {
|
||||
|
||||
// @Autowired
|
||||
// private RedisService redisService;
|
||||
// @Autowired
|
||||
// private CarManageMapper carMapper;
|
||||
// // 企业 service
|
||||
// @Autowired
|
||||
// private CarCompanyService carCompanyService;
|
||||
// /**
|
||||
// * 车辆列表
|
||||
// * @param carVO
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public List<CarVO> carList(CarVO carVO) {
|
||||
//
|
||||
//// MPJLambdaWrapper<CarVO> queryWrapper = new MPJLambdaWrapper<>();
|
||||
//// carMapper.selectJoinList(CarVO.class,
|
||||
//// queryWrapper.selectAll(CarVO.class)// 主表查询所有
|
||||
//// .select(Type::getTypeName)// 获取附表的字段
|
||||
//// .select(Type::getEnergyType)
|
||||
//// .select(Type::getGearType)
|
||||
//// .leftJoin(Type.class,Type::getTypeId,Car::getTypeId)// 左链接
|
||||
//// );
|
||||
//// // vin码--精确
|
||||
//// if(StringUtils.isNotEmpty(carVO.getCarVin())){
|
||||
//// queryWrapper.eq(CarVO::getCarVin,carVO.getCarVin());
|
||||
//// }
|
||||
//// // 车辆型号
|
||||
//// if(StringUtils.isNotEmpty(carVO.getTypeName())){
|
||||
//// queryWrapper.like(CarVO::getTypeName,carVO.getTypeName());
|
||||
//// }
|
||||
//// // 能源类型 1.电动 2.纯油 3.混动
|
||||
//// if(carVO.getEnergyType()>0){
|
||||
//// queryWrapper.eq(CarVO::getEnergyType,carVO.getEnergyType());
|
||||
//// }
|
||||
//// // 档的类型 1.手动 2.自动
|
||||
//// if(carVO.getGearType()>0){
|
||||
//// queryWrapper.eq(CarVO::getGearType,carVO.getGearType());
|
||||
//// }
|
||||
//// // 自定义列表查询
|
||||
////// @Select("")
|
||||
////// this.list(queryWrapper);
|
||||
//// // mybatis列表查询
|
||||
//// //return carMapper.carList(queryWrapper);
|
||||
//// // 单表的列表查询
|
||||
//// this.list(
|
||||
//// new LambdaQueryWrapper<CarVO>()
|
||||
//// .eq(StringUtils.isNotEmpty(carVO.getCarVin()),CarVO::getCarVin,carVO.getCarVin())
|
||||
//// .eq(carVO.getEnergyType()>0,CarVO::getEnergyType,carVO.getEnergyType())
|
||||
//// .eq(carVO.getGearType()>0,CarVO::getGearType,carVO.getGearType())
|
||||
//// .like(StringUtils.isNotEmpty(carVO.getTypeName()),CarVO::getTypeName,carVO.getTypeName())
|
||||
//// );
|
||||
//// return this.list(queryWrapper);
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 车辆添加
|
||||
// * @param carVO
|
||||
// */
|
||||
// @Override
|
||||
// public void insertCar(CarVO carVO) {
|
||||
// carMapper.insert(carVO);
|
||||
// }
|
||||
//
|
||||
//// /**
|
||||
//// * 车辆修改
|
||||
//// * @param carVO
|
||||
//// */
|
||||
//// @Override
|
||||
//// public void updataCar(CarVO carVO) {
|
||||
//// carMapper.updateById(carVO);
|
||||
//// }
|
||||
//
|
||||
/**
|
||||
* 车辆列表2
|
||||
* @param carDTO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarManage> CarListShow(CarDTO carDTO) {
|
||||
// 获取 企业
|
||||
// CarCompanyController carCompanyController = new CarCompanyController();
|
||||
CarManage carManage = BeanUtil.copyProperties(carDTO, CarManage.class);
|
||||
return lambdaQuery()
|
||||
.eq(StringUtils.isNotEmpty(carManage.getCarVin()), CarManage::getCarVin, carManage.getCarVin())
|
||||
.eq(carManage.getConfigId() > 0, CarManage::getCarVin, carManage.getConfigId())
|
||||
.list();
|
||||
// list.forEach(carManage1 -> {
|
||||
// // 获取 企业 id
|
||||
// carCompanyController.selectCompanyByCompanyId(carManage1.getCompanyId());
|
||||
// });
|
||||
//
|
||||
// List<CarCompany> data = carCompanyController.selectCompany().getData();
|
||||
// getById()
|
||||
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// * @param carId
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public CarManage CarListShowByCarId(Long carId) {
|
||||
// return carMapper.CarListShowByCarId(carId);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 车辆删除
|
||||
// * @param ids
|
||||
// */
|
||||
// @Override
|
||||
// public void deleteCar(List<Long> ids) {
|
||||
// carMapper.deleteBatchIds(ids);
|
||||
// }
|
||||
|
||||
}
|
|
@ -7,18 +7,36 @@ import com.muyu.enterprise.service.CarMessageService;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 车辆报文--业务实现层
|
||||
* @ClassName CarMessageServiceImpl
|
||||
* @Description 描述
|
||||
* @Author YiBo.Liu
|
||||
* @Date 2024/9/22 22:29
|
||||
* @Description 车辆类型 ServiceImpl 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Service
|
||||
public class CarMessageServiceImpl
|
||||
extends ServiceImpl<CarMessageMapper, CarMessage>
|
||||
implements CarMessageService {
|
||||
public class CarMessageServiceImpl extends ServiceImpl<CarMessageMapper, CarMessage> implements CarMessageService {
|
||||
|
||||
@Autowired
|
||||
private CarMessageMapper carMessageMapper;
|
||||
|
||||
private CarMessageMapper sysCarMessageMapper;
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @param templateId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarMessage> selectMessageShow(Long templateId) {
|
||||
return sysCarMessageMapper.selectMessageShow(templateId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询报文信息
|
||||
* @param messageId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public CarMessage selectMessageByMessageId(Long messageId) {
|
||||
return sysCarMessageMapper.selectById(messageId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package com.muyu.enterprise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.enterprise.domain.CarMessageType;
|
||||
import com.muyu.enterprise.mapper.CarMessageTypeMapper;
|
||||
import com.muyu.enterprise.service.CarMessageTypeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文类型--业务实现层
|
||||
* @ClassName CarMessageTypeServiceImpl
|
||||
* @Description 报文类型 ServiceImpl 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Service
|
||||
public class CarMessageTypeServiceImpl extends ServiceImpl<CarMessageTypeMapper, CarMessageType> implements CarMessageTypeService {
|
||||
|
||||
@Override
|
||||
public List<CarMessageType> messageTypeList() {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -2,18 +2,24 @@ package com.muyu.enterprise.service.impl;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.enterprise.domain.CarTemplate;
|
||||
import com.muyu.enterprise.mapper.SysCarTemplateMapper;
|
||||
import com.muyu.enterprise.service.SysCarTemplateService;
|
||||
import com.muyu.enterprise.mapper.CarTemplateMapper;
|
||||
import com.muyu.enterprise.service.CarTemplateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文模版--业务实现层
|
||||
* @ClassName CarTemplateServiceImpl
|
||||
* @Description 报文模版 ServiceImpl 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Service
|
||||
public class SysCarTemplateServiceImpl extends ServiceImpl<SysCarTemplateMapper, CarTemplate> implements SysCarTemplateService {
|
||||
public class CarTemplateServiceImpl extends ServiceImpl<CarTemplateMapper, CarTemplate> implements CarTemplateService {
|
||||
|
||||
@Autowired
|
||||
private SysCarTemplateMapper sysCarTemplateMapper;
|
||||
private CarTemplateMapper sysCarTemplateMapper;
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @return
|
|
@ -8,10 +8,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @ClassName CarServiceImpl
|
||||
* @Description 描述
|
||||
* @Author YiBo.Liu
|
||||
* @Date 2024/9/22 16:52
|
||||
* 车辆类型--业务实现层
|
||||
* @ClassName CarTypeTypeServiceImpl
|
||||
* @Description 车辆类型 ServiceImpl 层
|
||||
* @author MingWei.Zong
|
||||
* @Date 2024/9/28 16:52
|
||||
*/
|
||||
@Service
|
||||
public class CarTypeTypeServiceImpl
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
package com.muyu.enterprise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.enterprise.domain.CarCompany;
|
||||
import com.muyu.enterprise.mapper.SysCarCompanyMapper;
|
||||
import com.muyu.enterprise.service.SysCarCompanyService;
|
||||
import com.muyu.common.redis.service.RedisService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 配置plus业务实现层
|
||||
* @author zmw
|
||||
* @description: 配置plus业务实现层
|
||||
* @Date 2023-11-13 上午 10:06
|
||||
*/
|
||||
@Service
|
||||
public class SysCarCompanyServiceImpl extends ServiceImpl<SysCarCompanyMapper, CarCompany>
|
||||
implements SysCarCompanyService {
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
@Autowired
|
||||
private SysCarCompanyMapper sysCarCompanyMapper;
|
||||
|
||||
|
||||
// @Override
|
||||
// public List<CarCompany> selectCompany() {
|
||||
// return sysCarCompanyMapper.;
|
||||
// }
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
package com.muyu.enterprise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.enterprise.domain.CarMessage;
|
||||
import com.muyu.enterprise.mapper.SysCarMessageMapper;
|
||||
import com.muyu.enterprise.service.SysCarMessageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SysCarMessageServiceImpl extends ServiceImpl<SysCarMessageMapper, CarMessage> implements SysCarMessageService {
|
||||
|
||||
@Autowired
|
||||
private SysCarMessageMapper sysCarMessageMapper;
|
||||
/**
|
||||
* 查询所有报文信息
|
||||
* @param templateId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarMessage> selectMessageShow(Long templateId) {
|
||||
return sysCarMessageMapper.selectMessageShow(templateId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询报文信息
|
||||
* @param messageId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public CarMessage selectMessageByMessageId(Long messageId) {
|
||||
return sysCarMessageMapper.selectById(messageId);
|
||||
}
|
||||
}
|
|
@ -1,127 +0,0 @@
|
|||
package com.muyu.enterprise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.enterprise.domain.dto.CarDTO;
|
||||
import com.muyu.enterprise.domain.vo.CarVO;
|
||||
import com.muyu.enterprise.mapper.SysCarMapper;
|
||||
import com.muyu.enterprise.service.SysCarService;
|
||||
import com.muyu.common.redis.service.RedisService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配置plus业务实现层
|
||||
* @author zmw
|
||||
* @description: 配置plus业务实现层
|
||||
* @Date 2023-11-13 上午 10:06
|
||||
*/
|
||||
@Service
|
||||
public class SysCarServiceImpl extends ServiceImpl<SysCarMapper, CarVO>
|
||||
implements SysCarService {
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
@Autowired
|
||||
private SysCarMapper carMapper;
|
||||
|
||||
/**
|
||||
* 车辆列表
|
||||
* @param carVO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarVO> carList(CarVO carVO) {
|
||||
|
||||
// MPJLambdaWrapper<CarVO> queryWrapper = new MPJLambdaWrapper<>();
|
||||
// carMapper.selectJoinList(CarVO.class,
|
||||
// queryWrapper.selectAll(CarVO.class)// 主表查询所有
|
||||
// .select(Type::getTypeName)// 获取附表的字段
|
||||
// .select(Type::getEnergyType)
|
||||
// .select(Type::getGearType)
|
||||
// .leftJoin(Type.class,Type::getTypeId,Car::getTypeId)// 左链接
|
||||
// );
|
||||
// // vin码--精确
|
||||
// if(StringUtils.isNotEmpty(carVO.getCarVin())){
|
||||
// queryWrapper.eq(CarVO::getCarVin,carVO.getCarVin());
|
||||
// }
|
||||
// // 车辆型号
|
||||
// if(StringUtils.isNotEmpty(carVO.getTypeName())){
|
||||
// queryWrapper.like(CarVO::getTypeName,carVO.getTypeName());
|
||||
// }
|
||||
// // 能源类型 1.电动 2.纯油 3.混动
|
||||
// if(carVO.getEnergyType()>0){
|
||||
// queryWrapper.eq(CarVO::getEnergyType,carVO.getEnergyType());
|
||||
// }
|
||||
// // 档的类型 1.手动 2.自动
|
||||
// if(carVO.getGearType()>0){
|
||||
// queryWrapper.eq(CarVO::getGearType,carVO.getGearType());
|
||||
// }
|
||||
// // 自定义列表查询
|
||||
//// @Select("")
|
||||
//// this.list(queryWrapper);
|
||||
// // mybatis列表查询
|
||||
// //return carMapper.carList(queryWrapper);
|
||||
// // 单表的列表查询
|
||||
// this.list(
|
||||
// new LambdaQueryWrapper<CarVO>()
|
||||
// .eq(StringUtils.isNotEmpty(carVO.getCarVin()),CarVO::getCarVin,carVO.getCarVin())
|
||||
// .eq(carVO.getEnergyType()>0,CarVO::getEnergyType,carVO.getEnergyType())
|
||||
// .eq(carVO.getGearType()>0,CarVO::getGearType,carVO.getGearType())
|
||||
// .like(StringUtils.isNotEmpty(carVO.getTypeName()),CarVO::getTypeName,carVO.getTypeName())
|
||||
// );
|
||||
// return this.list(queryWrapper);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆添加
|
||||
* @param carVO
|
||||
*/
|
||||
@Override
|
||||
public void insertCar(CarVO carVO) {
|
||||
carMapper.insert(carVO);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 车辆修改
|
||||
// * @param carVO
|
||||
// */
|
||||
// @Override
|
||||
// public void updataCar(CarVO carVO) {
|
||||
// carMapper.updateById(carVO);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 车辆列表2
|
||||
* @param carDTO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarVO> CarListShow(CarDTO carDTO) {
|
||||
return carMapper.CarListShow(carDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @param carId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarVO> CarListShowByCarId(Long carId) {
|
||||
return carMapper.CarListShowByCarId(carId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 车辆删除
|
||||
* @param ids
|
||||
*/
|
||||
@Override
|
||||
public void deleteCar(List<Long> ids) {
|
||||
carMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
}
|
|
@ -2,30 +2,30 @@
|
|||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.enterprise.mapper.SysCarMapper">
|
||||
<mapper namespace="com.muyu.enterprise.mapper.CarManageMapper">
|
||||
|
||||
<!-- 车辆列表 -->
|
||||
<select id="carList" resultType="com.muyu.enterprise.domain.vo.CarVO">
|
||||
SELECT
|
||||
tc.*,
|
||||
tt.energy_type,
|
||||
tt.gear_type,
|
||||
tt.type_name
|
||||
cman.*,
|
||||
cc.config_name,
|
||||
cc.energy_type,
|
||||
cc.gear_type
|
||||
FROM
|
||||
`t_car` tc
|
||||
LEFT JOIN `t_type` tt ON tc.type_id = tt.type_id
|
||||
`car_manage` cman
|
||||
LEFT JOIN `car_config` cc ON cman.config_id = cc.config_id
|
||||
<where>
|
||||
<if test="carVin != null and carVin != ''">
|
||||
and tc.car_vin = #{carVin}
|
||||
and cman.car_vin = #{carVin}
|
||||
</if>
|
||||
<if test="typeName != null and typeName != ''">
|
||||
and tt.type_name like concat('%',#{typeName},'%')
|
||||
and cc.config_name like concat('%',#{typeName},'%')
|
||||
</if>
|
||||
<if test="energyType != null and energyType > 0 ">
|
||||
and tt.energy_type = #{energyType}
|
||||
and cc.energy_type = #{energyType}
|
||||
</if>
|
||||
<if test="gearType != null and gearType > 0 ">
|
||||
and tt.gear_type = #{gearType}
|
||||
and cc.gear_type = #{gearType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.enterprise.mapper.SysCarMessageMapper">
|
||||
<mapper namespace="com.muyu.enterprise.mapper.CarMessageMapper">
|
||||
|
||||
<!-- 查询所有报文信息 -->
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.enterprise.mapper.SysCarTemplateMapper">
|
||||
<mapper namespace="com.muyu.enterprise.mapper.CarTemplateMapper">
|
||||
|
||||
<!-- 查询所有报文信息 -->
|
||||
|
Loading…
Reference in New Issue