所有注释补全
parent
07a60444aa
commit
fa36d029af
|
@ -0,0 +1,41 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆报文所属类型
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain.car
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarMessage
|
||||
* @Date:2024/9/22 下午3:07
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆报文所属类型")
|
||||
public class CarMessageType {
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Integer messageTypeId ;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode ;
|
||||
/**
|
||||
* 报文名称
|
||||
*/
|
||||
private String messageTypeName ;
|
||||
/**
|
||||
* 报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs ;
|
||||
|
||||
}
|
|
@ -49,7 +49,7 @@ public class CarFenceController {
|
|||
}
|
||||
|
||||
/**
|
||||
* add
|
||||
* 电子围栏添加
|
||||
*/
|
||||
@PostMapping("/addCarFence")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
|
@ -65,7 +65,7 @@ public class CarFenceController {
|
|||
}
|
||||
|
||||
/**
|
||||
* add
|
||||
* 添加电子围栏和车辆中间表
|
||||
*/
|
||||
@PostMapping("/carAddList")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
|
@ -81,7 +81,7 @@ public class CarFenceController {
|
|||
}
|
||||
|
||||
/**
|
||||
* add
|
||||
* 添加围栏和围栏组中间表
|
||||
*/
|
||||
@PostMapping("/selectFenceMiddleGroup")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
|
@ -97,7 +97,7 @@ public class CarFenceController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询中间围栏
|
||||
* 查询围栏和围栏组中间围栏
|
||||
*/
|
||||
@PostMapping("/selectCarFenceGroupList")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
|
|
|
@ -31,7 +31,7 @@ public class CarMiddleController {
|
|||
private CarMiddleSerivce carMiddleSerivce;
|
||||
|
||||
/**
|
||||
* add中间表
|
||||
* 添加车辆和电子围栏组中间表
|
||||
*/
|
||||
@PostMapping("/carAddList")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
|
|
|
@ -108,12 +108,21 @@ public class WarnStrategyController extends BaseController
|
|||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找车辆类型
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("platform:strategy:cartype")
|
||||
@PostMapping("/findByCarType")
|
||||
public Result<List<CarType>> findByCarType(){
|
||||
return Result.success(warnStrategyService.findByCarType());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据Id查找车辆信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("platform:strategy:strategytype")
|
||||
@PostMapping("/strategyType/{ids}")
|
||||
public Result<List<WarnStrategyReq>> selectStrategyType(@PathVariable("ids") Long ids){
|
||||
|
|
|
@ -24,15 +24,29 @@ public interface CarFenceService extends IService<CarFence> {
|
|||
*/
|
||||
public Page<CarFenceResp> selectCarFence(CarFenceReq req);
|
||||
|
||||
/**
|
||||
* 电子围栏添加
|
||||
*/
|
||||
Boolean addCarFence(CarFence carFence);
|
||||
|
||||
/**
|
||||
* 添加电子围栏和车辆中间表
|
||||
*/
|
||||
Boolean addCarGroup(CarGroupReq req);
|
||||
|
||||
/**
|
||||
* 添加围栏和围栏组中间表
|
||||
*/
|
||||
Boolean addFenceGroup(FenceGroupReq req);
|
||||
|
||||
/**
|
||||
* 查询围栏和围栏组中间围栏
|
||||
*/
|
||||
List<CarFenceGroupResp> selectCarFenceGroupList(Integer id);
|
||||
|
||||
/**
|
||||
* 查询中间围栏
|
||||
*/
|
||||
Boolean carFenceGroupDel(CarGroupIdReq carGroupIdReq);
|
||||
|
||||
/**
|
||||
* 查询车辆围栏组信息
|
||||
*/
|
||||
List<CarFenceGroupsResp> carGroupList(CarFenceGroupReq req);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,15 @@ public interface WarnStrategyService extends IService<WarnStrategy> {
|
|||
*/
|
||||
Boolean checkIdUnique(WarnStrategy warnStrategy);
|
||||
|
||||
/**
|
||||
* 查找车辆类型
|
||||
* @return
|
||||
*/
|
||||
List<CarType> findByCarType();
|
||||
|
||||
/**
|
||||
* 根据Id查找车辆信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<WarnStrategyReq> selectStrategyType(Long ids);
|
||||
}
|
||||
|
|
|
@ -102,6 +102,9 @@ public class CarFenceServiceImpl
|
|||
}};
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子围栏添加
|
||||
*/
|
||||
@Override
|
||||
public Boolean addCarFence(CarFence carFence) {
|
||||
boolean connects = this.save(carFence);
|
||||
|
@ -118,6 +121,9 @@ public class CarFenceServiceImpl
|
|||
return connects;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加电子围栏和车辆中间表
|
||||
*/
|
||||
@Override
|
||||
public Boolean addCarGroup(CarGroupReq req) {
|
||||
List<CarInformation> carInformations = req.getCarInformations();
|
||||
|
@ -134,6 +140,9 @@ public class CarFenceServiceImpl
|
|||
return carMiddleSerivce.saveBatch(carMiddles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加围栏和围栏组中间表
|
||||
*/
|
||||
@Override
|
||||
public Boolean addFenceGroup(FenceGroupReq req) {
|
||||
List<CarFence> carInformations = req.getCarFences();
|
||||
|
@ -150,6 +159,9 @@ public class CarFenceServiceImpl
|
|||
return carMiddleGroupService.saveBatch(carMiddles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询围栏和围栏组中间围栏
|
||||
*/
|
||||
@Override
|
||||
public List<CarFenceGroupResp> selectCarFenceGroupList(Integer id) {
|
||||
List<CarMiddleGroup> list = carMiddleGroupService.list(
|
||||
|
@ -164,7 +176,9 @@ public class CarFenceServiceImpl
|
|||
});
|
||||
return carFenceGroupResps;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询中间围栏
|
||||
*/
|
||||
@Override
|
||||
public Boolean carFenceGroupDel(CarGroupIdReq carGroupIdReq) {
|
||||
|
||||
|
@ -243,6 +257,9 @@ public class CarFenceServiceImpl
|
|||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询车辆围栏组信息
|
||||
*/
|
||||
@Override
|
||||
public List<CarFenceGroupsResp> carGroupList(CarFenceGroupReq req) {
|
||||
|
||||
|
|
|
@ -28,6 +28,23 @@ public class CarInformationServiceImpl implements CarInformationService {
|
|||
private HttpServletResponse response;
|
||||
|
||||
|
||||
/**
|
||||
* 企业车辆管理列表
|
||||
* 联查--> 车辆管理--车辆类型表--车辆电子围栏
|
||||
* 搜索-->(车辆唯一VIN carInformationVIN 精确查
|
||||
* 车辆类型ID carTypeId 精确查
|
||||
* 车辆电子围栏外键ID carInformationFence 精确查
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
* carInformationState 精确查
|
||||
* 车辆电机厂商 carInformationMotorManufacturer 模糊查
|
||||
* 车辆电机型号 carInformationMotorModel 精确查
|
||||
* 车辆电池厂商 carInformationBatteryManufacturer 模糊查
|
||||
* 车辆电池型号 carInformationBatteryModel 精确查
|
||||
* )
|
||||
* 分页--> 分页页数 pageNum 分页条数 pageSize
|
||||
* @param carInformationListReq
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PageInfo<CarInformationResp> selectCarInformationList(CarInformationListReq carInformationListReq) {
|
||||
PageHelper.startPage(carInformationListReq.getPageNum(),carInformationListReq.getPageSize());
|
||||
|
@ -36,6 +53,11 @@ public class CarInformationServiceImpl implements CarInformationService {
|
|||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业车辆添加管理
|
||||
* @param carInformationAddReq
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result addCarInformation(CarInformationAddReq carInformationAddReq) {
|
||||
Integer addCarInformation = carInformationMapper.addCarInformation(carInformationAddReq);
|
||||
|
@ -45,6 +67,11 @@ public class CarInformationServiceImpl implements CarInformationService {
|
|||
return Result.error(402,"添加车辆失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业车辆删除
|
||||
* @param carInformationId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result delBycarInformationId(Integer carInformationId) {
|
||||
Integer delBycarInformationId = carInformationMapper.delBycarInformationId(carInformationId);
|
||||
|
@ -55,6 +82,11 @@ public class CarInformationServiceImpl implements CarInformationService {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业车辆修改管理
|
||||
* @param carInformationUpdReq
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result updatecarInformation(CarInformationUpdReq carInformationUpdReq) {
|
||||
Integer updatecarInformation = carInformationMapper.updatecarInformation(carInformationUpdReq);
|
||||
|
@ -65,7 +97,12 @@ public class CarInformationServiceImpl implements CarInformationService {
|
|||
return Result.error( 402,"修改失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To 电子围栏负责人
|
||||
* 查询企业车辆 carInformationID 和 carInformationLicensePlate
|
||||
* 无参
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarInformationResp> selectBycarInformationIDAndLicensePlate() {
|
||||
return carInformationMapper.selectBycarInformationIDAndLicensePlate();
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package com.muyu.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarMessage;
|
||||
import com.muyu.domain.CarMessageType;
|
||||
import com.muyu.domain.resp.CarMessageResp;
|
||||
import com.muyu.server.mapper.CarMessageMapper;
|
||||
import com.muyu.server.service.CarMessageService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -19,11 +23,18 @@ public class CarMessageServiceImpl
|
|||
@Resource
|
||||
private CarMessageMapper carMessageMapper;
|
||||
|
||||
/**
|
||||
* 根据所属车类别 解析 车辆报文模板
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarMessage> selectCarMessageList() {
|
||||
return carMessageMapper.selectCarMessageList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加车辆报文规则
|
||||
*/
|
||||
@Override
|
||||
public Result insertCarMessage(CarMessage carMessage) {
|
||||
Integer inserted = carMessageMapper.insertCarMessage(carMessage);
|
||||
|
@ -32,7 +43,9 @@ public class CarMessageServiceImpl
|
|||
}
|
||||
return Result.error(402,"添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆报文规则
|
||||
*/
|
||||
@Override
|
||||
public Result delectByCarMessageId(Integer carMessageId) {
|
||||
Integer deleteByCarMessageId = carMessageMapper.deleteByCarMessageId(carMessageId);
|
||||
|
@ -41,7 +54,9 @@ public class CarMessageServiceImpl
|
|||
}
|
||||
return Result.error(402,"删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆报文规则
|
||||
*/
|
||||
@Override
|
||||
public Result updateCarMessage(CarMessage carMessage) {
|
||||
Integer integer = carMessageMapper.updateCarMessage(carMessage);
|
||||
|
@ -51,7 +66,11 @@ public class CarMessageServiceImpl
|
|||
}
|
||||
return Result.error( 402,"修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarMessageResp> selectJoinList(Long id) {
|
||||
return carMessageMapper.selectJoinList(CarMessageResp.class, new MPJLambdaWrapper<CarMessage>()
|
||||
|
|
|
@ -76,7 +76,10 @@ public class WarnStrategyServiceImpl
|
|||
queryWrapper.eq(WarnStrategy::getId, warnStrategy.getId());
|
||||
return this.count(queryWrapper) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找车辆类型
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarType> findByCarType() {
|
||||
List<WarnStrategy> list = this.list();
|
||||
|
@ -91,6 +94,11 @@ public class WarnStrategyServiceImpl
|
|||
return carTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据Id查找车辆信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<WarnStrategyReq> selectStrategyType(Long ids) {
|
||||
List<WarnStrategy> warnStrategyReqs = this.list(new LambdaQueryWrapper<WarnStrategy>()
|
||||
|
|
Loading…
Reference in New Issue