Compare commits

..

No commits in common. "aedee04643e2f6bff4933ba09dfee0230dbe80e6" and "fa3b9b22448a9f9b4a94c9da624a68d465047463" have entirely different histories.

29 changed files with 135 additions and 133 deletions

View File

@ -4,7 +4,7 @@ server:
# nacos线上地址 # nacos线上地址
nacos: nacos:
addr: 127.0.0.1:8848 addr: 159.75.188.178:8848
user-name: nacos user-name: nacos
password: nacos password: nacos
namespace: eight namespace: eight

View File

@ -4,7 +4,7 @@ server:
# nacos线上地址 # nacos线上地址
nacos: nacos:
addr: 127.0.0.1:8848 addr: 159.75.188.178:8848
user-name: nacos user-name: nacos
password: nacos password: nacos
namespace: eight namespace: eight

View File

@ -46,7 +46,7 @@ public class CarInformation {
*/ */
// @TableName(value = "car_information_VIN") // @TableName(value = "car_information_VIN")
@TableField(value = "car_information_VIN") @TableField(value = "car_information_VIN")
private String carInformationVIN; private String carInformationVin;
/** /**
* *
*/ */
@ -76,9 +76,9 @@ public class CarInformation {
@Schema(title = "车辆类型外键ID", type = "Integer") @Schema(title = "车辆类型外键ID", type = "Integer")
private Integer carInformationType; private Integer carInformationType;
/** /**
* * ID
*/ */
private String carInformationBrand; private Integer carInformationBrand;
/** /**
* (0 1 ) * (0 1 )
*/ */
@ -135,7 +135,7 @@ public class CarInformation {
public static CarInformation carInformationAddBuilder(CarInformationAddReq carInformation) { public static CarInformation carInformationAddBuilder(CarInformationAddReq carInformation) {
return CarInformation.builder() return CarInformation.builder()
.carInformationVIN(carInformation.getCarInformationVin()) .carInformationVin(carInformation.getCarInformationVin())
.carInformationLicensePlate(carInformation.getCarInformationLicensePlate()) .carInformationLicensePlate(carInformation.getCarInformationLicensePlate())
.carInformationBrand(carInformation.getCarInformationBrand()) .carInformationBrand(carInformation.getCarInformationBrand())
.carInformationColor(carInformation.getCarInformationColor()) .carInformationColor(carInformation.getCarInformationColor())

View File

@ -1,11 +1,11 @@
package com.muyu.domain; package com.muyu.domain;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.tags.Tag; import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import java.util.function.Supplier; import java.util.function.Supplier;
@ -16,10 +16,9 @@ import java.util.function.Supplier;
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Builder @SuperBuilder
@Tag(name = "车辆报文模板实体类") @TableName(value = "车辆报文模板实体类",autoResultMap = true)
@TableName(value = "car_message",autoResultMap = true) public class CarMessage extends BaseEntity {
public class CarMessage {
//报文类型模块表 //报文类型模块表
/** /**
* *
@ -46,7 +45,7 @@ public class CarMessage {
/** /**
* *
*/ */
private Integer carMessageCartype; private Integer carMessageCarType;
/** /**
* *
*/ */
@ -81,7 +80,7 @@ public class CarMessage {
.messageTypeName(carMessage.messageTypeName) .messageTypeName(carMessage.messageTypeName)
.messageTypeBelongs(carMessage.messageTypeBelongs) .messageTypeBelongs(carMessage.messageTypeBelongs)
.carMessageId(carMessage.carMessageId) .carMessageId(carMessage.carMessageId)
.carMessageCartype(carMessage.carMessageCartype) .carMessageCarType(carMessage.carMessageCarType)
.carMessageType(carMessage.carMessageType) .carMessageType(carMessage.carMessageType)
.carMessageStartIndex(carMessage.carMessageStartIndex) .carMessageStartIndex(carMessage.carMessageStartIndex)
.carMessageEndIndex(carMessage.carMessageEndIndex) .carMessageEndIndex(carMessage.carMessageEndIndex)
@ -101,7 +100,7 @@ public class CarMessage {
.messageTypeName(carMessage.messageTypeName) .messageTypeName(carMessage.messageTypeName)
.messageTypeBelongs(carMessage.messageTypeBelongs) .messageTypeBelongs(carMessage.messageTypeBelongs)
.carMessageId(carMessage.carMessageId) .carMessageId(carMessage.carMessageId)
.carMessageCartype(carMessage.carMessageCartype) .carMessageCarType(carMessage.carMessageCarType)
.carMessageType(carMessage.carMessageType) .carMessageType(carMessage.carMessageType)
.carMessageStartIndex(carMessage.carMessageStartIndex) .carMessageStartIndex(carMessage.carMessageStartIndex)
.carMessageEndIndex(carMessage.carMessageEndIndex) .carMessageEndIndex(carMessage.carMessageEndIndex)

View File

@ -1,6 +1,5 @@
package com.muyu.domain; package com.muyu.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
@ -20,7 +19,6 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Tag(name = "车辆报文所属类型") @Tag(name = "车辆报文所属类型")
@TableName(value = "car_message_type",autoResultMap = true)
public class CarMessageType { public class CarMessageType {
/** /**

View File

@ -60,22 +60,7 @@ public class FaultCode {
* *
*/ */
private Integer isWarning; private Integer isWarning;
/**
*
*/
private String faulttypeName;
/**
*
*/
private String messageTypeName;
/**
*
*/
private String messageTypeCode;
/**
*
*/
private String messageTypeBelongs;
public static FaultCode addfaultcode(FaultCodeAddReq faultCodeAddReq){ public static FaultCode addfaultcode(FaultCodeAddReq faultCodeAddReq){

View File

@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.muyu.domain.req.FaultCodeAddReq; import com.muyu.domain.req.FaultCodeAddReq;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder; import lombok.experimental.SuperBuilder;
@ -51,7 +50,6 @@ public class FaultLabel {
return FaultLabel.builder() return FaultLabel.builder()
.messageTypeId(0) .messageTypeId(0)
.messageTypeId(faultCodeAddReq.getMessageTypeId()) .messageTypeId(faultCodeAddReq.getMessageTypeId())
.messageTypeCode(faultCodeAddReq.getMessageTypeCode())
.messageTypeName(faultCodeAddReq.getMessageTypeName()) .messageTypeName(faultCodeAddReq.getMessageTypeName())
.messageTypeBelongs(faultCodeAddReq.getMessageTypeBelongs()) .messageTypeBelongs(faultCodeAddReq.getMessageTypeBelongs())
.build(); .build();

View File

@ -55,7 +55,7 @@ public class FaultLog {
/** /**
* VIN * VIN
*/ */
private String carInformationVIN; private String carInformationVin;
/** /**
* *
*/ */

View File

@ -31,7 +31,7 @@ public class CarInformationAddReq {
/** /**
* *
*/ */
private String carInformationBrand; private Integer carInformationBrand;
/** /**
* *

View File

@ -26,8 +26,8 @@ public class CarInformationUpdReq {
/** /**
* *
*/ */
@Schema(title = "车辆品牌", type = "String") @Schema(title = "车辆品牌", type = "Integer")
private String carInformationBrand; private Integer carInformationBrand;
/** /**
* *

View File

@ -21,7 +21,6 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
@Builder @Builder
public class FaultCodeListReq { public class FaultCodeListReq {
/** /**
* *
*/ */

View File

@ -54,7 +54,7 @@ public class CarInformationResp {
/** /**
* ID * ID
*/ */
private Integer carInformationFence; private String carInformationFence;
/** /**
* *
*/ */
@ -66,9 +66,9 @@ public class CarInformationResp {
*/ */
private Integer carInformationType; private Integer carInformationType;
/** /**
* * ID
*/ */
private String carInformationBrand; private Integer carInformationBrand;
/** /**
* (0 1 ) * (0 1 )
*/ */
@ -119,10 +119,10 @@ public class CarInformationResp {
/** /**
*ID *ID
*/ */
private Integer id; private Integer fenceid;
/** /**
* *
*/ */
private String name; private String fencename;
} }

View File

@ -1,12 +1,11 @@
package com.muyu.domain.resp; package com.muyu.domain.resp;
import com.muyu.domain.FaultCode; import com.muyu.domain.vo.FaultCodeVO;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
/** /**
* *
@ -20,7 +19,6 @@ import lombok.NoArgsConstructor;
@Data @Data
@Builder @Builder
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor
@Tag(name="故障码信息响应对象",description = "故障码查询的响应结果") @Tag(name="故障码信息响应对象",description = "故障码查询的响应结果")
public class FaultCodeListResp { public class FaultCodeListResp {
@ -57,13 +55,13 @@ public class FaultCodeListResp {
*/ */
private String faulttypeName; private String faulttypeName;
/** /**
* *
*/
private String messageTypeCode;
/**
*
*/ */
private String messageTypeName; private String messageTypeName;
/**
*
*/
private String messageTypeCode;
/** /**
* *
*/ */
@ -71,22 +69,22 @@ public class FaultCodeListResp {
/** /**
* *
* @param faultCode * @param faultCodeVO
* @return * @return
*/ */
public static FaultCodeListResp faultCodeListResp(FaultCode faultCode){ public static FaultCodeListResp faultCodeListResp(FaultCodeVO faultCodeVO){
return FaultCodeListResp.builder() return FaultCodeListResp.builder()
.faultcodeId(faultCode.getFaultcodeId()) .faultcodeId(faultCodeVO.getFaultcodeId())
.messageTypeId(faultCode.getMessageTypeId()) .messageTypeId(faultCodeVO.getMessageTypeId())
.faultcodeNumber(faultCode.getFaultcodeNumber()) .faultcodeNumber(faultCodeVO.getFaultcodeNumber())
.faultGroup(faultCode.getFaultGroup()) .faultGroup(faultCodeVO.getFaultGroup())
.faultBit(faultCode.getFaultBit()) .faultBit(faultCodeVO.getFaultBit())
.faultValue(faultCode.getFaultValue()) .faultValue(faultCodeVO.getFaultValue())
.isWarning(faultCode.getIsWarning()) .isWarning(faultCodeVO.getIsWarning())
.faulttypeName(faultCode.getFaulttypeName()) .faulttypeName(faultCodeVO.getFaulttypeName())
.messageTypeName(faultCode.getMessageTypeName()) .messageTypeName(faultCodeVO.getMessageTypeName())
.messageTypeCode(faultCode.getMessageTypeCode()) .messageTypeCode(faultCodeVO.getMessageTypeCode())
.messageTypeBelongs(faultCode.getMessageTypeBelongs()) .messageTypeBelongs(faultCodeVO.getMessageTypeBelongs())
.build(); .build();
} }
} }

View File

@ -77,7 +77,7 @@ public class FaultLogListResp {
.startwarningTime(faultLog.getStartwarningTime()) .startwarningTime(faultLog.getStartwarningTime())
.endwarningTime(faultLog.getEndwarningTime()) .endwarningTime(faultLog.getEndwarningTime())
.faultcodeNumber(faultLog.getFaultcodeNumber()) .faultcodeNumber(faultLog.getFaultcodeNumber())
.carInformationVIN(faultLog.getCarInformationVIN()) .carInformationVIN(faultLog.getCarInformationVin())
.build(); .build();
} }
} }

View File

@ -0,0 +1,44 @@
package com.muyu.domain.vo;
import com.muyu.domain.FaultCode;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* ()
* @Authorweiran
* @Packagecom.muyu.cloud.faultmanage.domain.vo
* @Projectcloud-faultmanage
* @nameFaultCodeVO
* @Date2024/9/17 15:14
*/
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Tag(name = "故障码视图")
public class FaultCodeVO extends FaultCode {
/**
*
*/
private String faulttypeName;
/**
*
*/
private String messageTypeName;
/**
*
*/
private String messageTypeCode;
/**
*
*/
private String messageTypeBelongs;
}

View File

@ -95,7 +95,7 @@ public class CarInformationController {
*/ */
@GetMapping("/delBycarInformationId/{carInformationId}") @GetMapping("/delBycarInformationId/{carInformationId}")
@Operation(summary = "企业车辆删除") @Operation(summary = "企业车辆删除")
public Result delBycarInformationId(@Validated @RequestParam(name = "carInformationId") Integer carInformationId){ public Result delBycarInformationId(@Validated @PathVariable("carInformationId") Integer carInformationId){
boolean delBycarInformationId = carInformationService.delBycarInformationId(carInformationId); boolean delBycarInformationId = carInformationService.delBycarInformationId(carInformationId);
if (delBycarInformationId){ if (delBycarInformationId){
return Result.success(delBycarInformationId ,"删除车辆成功"); return Result.success(delBycarInformationId ,"删除车辆成功");

View File

@ -1,15 +0,0 @@
package com.muyu.server.mapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.muyu.domain.CarMessageType;
import com.thoughtworks.xstream.mapper.SecurityMapper;
/**
* @Authoryang
* @Packagecom.muyu.server.mapper
* @Projectcloud-server-8
* @nameCarMessageTypeMapper
* @Date2024/9/29 16:48
*/
public interface CarMessageTypeMapper extends MPJBaseMapper<CarMessageType> {
}

View File

@ -1,9 +1,19 @@
package com.muyu.server.mapper; package com.muyu.server.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper; import com.github.yulichang.base.MPJBaseMapper;
import com.muyu.domain.FaultCode; import com.muyu.domain.FaultCode;
import com.muyu.domain.FaultLabel;
import com.muyu.domain.req.FaultCodeAddReq;
import com.muyu.domain.req.FaultCodeListReq;
import com.muyu.domain.req.FaultCodeUpdReq;
import com.muyu.domain.resp.FaultCodeListResp;
import com.muyu.domain.vo.FaultCodeVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* *

View File

@ -6,7 +6,9 @@ import com.muyu.domain.FaultCode;
import com.muyu.domain.req.FaultCodeAddReq; import com.muyu.domain.req.FaultCodeAddReq;
import com.muyu.domain.req.FaultCodeListReq; import com.muyu.domain.req.FaultCodeListReq;
import com.muyu.domain.req.FaultCodeUpdReq; import com.muyu.domain.req.FaultCodeUpdReq;
import com.muyu.domain.resp.FaultCodeListResp;
import com.muyu.domain.resp.FaultCodeTotalListResp; import com.muyu.domain.resp.FaultCodeTotalListResp;
import com.muyu.domain.vo.FaultCodeVO;
/** /**

View File

@ -58,18 +58,17 @@ public class CarInformationServiceImpl
*/ */
@Override @Override
public Page<CarInformationResp> selectCarInformationList(CarInformationListReq carInformationListReq) { public Page<CarInformationResp> selectCarInformationList(CarInformationListReq carInformationListReq) {
return carInformationMapper.selectJoinPage( Page<CarInformationResp> carInformationRespPage = carInformationMapper.selectJoinPage(
new Page<>(carInformationListReq.getPageNum(), carInformationListReq.getPageSize()), new Page<>(carInformationListReq.getPageNum(), carInformationListReq.getPageSize()),
CarInformationResp.class, CarInformationResp.class,
new MPJLambdaWrapper<CarInformation>() new MPJLambdaWrapper<CarInformation>()
.selectAll(CarInformation.class) .selectAll(CarInformation.class)
.select(CarType::getCarTypeId, CarType::getCarTypeName) .select(CarType::getCarTypeId, CarType::getCarTypeName)
.select(CarFence::getId, CarFence::getName) .select(CarFence::getId, CarFence::getName)
.leftJoin(CarFence.class, CarFence::getId, CarInformation::getCarInformationFence)
.leftJoin(CarType.class, CarType::getCarTypeId, CarInformation::getCarInformationType) .leftJoin(CarType.class, CarType::getCarTypeId, CarInformation::getCarInformationType)
.leftJoin(CarFence.class, CarFence::getId, CarInformation::getCarInformationFence)
.eq(StringUtils.isNotEmpty(carInformationListReq.getCarInformationVIN()) .eq(StringUtils.isNotEmpty(carInformationListReq.getCarInformationVIN())
,CarInformation::getCarInformationVIN ,CarInformation::getCarInformationVin
, carInformationListReq.getCarInformationVIN()) , carInformationListReq.getCarInformationVIN())
.eq(StringUtils.isNotNull(carInformationListReq.getCarTypeId()) .eq(StringUtils.isNotNull(carInformationListReq.getCarTypeId())
,CarType::getCarTypeId, carInformationListReq.getCarTypeId()) ,CarType::getCarTypeId, carInformationListReq.getCarTypeId())
@ -80,7 +79,7 @@ public class CarInformationServiceImpl
,CarInformation::getCarInformationState ,CarInformation::getCarInformationState
, carInformationListReq.getCarInformationState()) , carInformationListReq.getCarInformationState())
.like(StringUtils.isNotEmpty(carInformationListReq.getCarInformationVIN()) .like(StringUtils.isNotEmpty(carInformationListReq.getCarInformationVIN())
,CarInformation::getCarInformationVIN ,CarInformation::getCarInformationVin
, carInformationListReq.getCarInformationVIN()) , carInformationListReq.getCarInformationVIN())
.eq(StringUtils.isNotEmpty( carInformationListReq.getCarInformationMotorModel()) .eq(StringUtils.isNotEmpty( carInformationListReq.getCarInformationMotorModel())
,CarInformation::getCarInformationMotorModel ,CarInformation::getCarInformationMotorModel
@ -92,6 +91,7 @@ public class CarInformationServiceImpl
,CarInformation::getCarInformationBatteryModel ,CarInformation::getCarInformationBatteryModel
,carInformationListReq.getCarInformationBatteryModel()) ,carInformationListReq.getCarInformationBatteryModel())
); );
return carInformationRespPage;
} }
/** /**
@ -113,7 +113,8 @@ public class CarInformationServiceImpl
*/ */
@Override @Override
public boolean delBycarInformationId(Integer carInformationId) { public boolean delBycarInformationId(Integer carInformationId) {
return this.removeById(carInformationId); boolean delBycarInformationId = this.removeById(carInformationId);
return delBycarInformationId;
} }

View File

@ -1,5 +1,6 @@
package com.muyu.server.service.impl; package com.muyu.server.service.impl;
import cn.hutool.db.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.muyu.common.core.utils.StringUtils; import com.muyu.common.core.utils.StringUtils;
@ -35,7 +36,7 @@ public class CarMessageServiceImpl
CarMessage.class CarMessage.class
,new MPJLambdaWrapper<CarMessage>() ,new MPJLambdaWrapper<CarMessage>()
.select(CarMessage::getCarMessageId .select(CarMessage::getCarMessageId
,CarMessage::getCarMessageCartype ,CarMessage::getCarMessageCarType
,CarMessage::getCarMessageType ,CarMessage::getCarMessageType
,CarMessage::getCarMessageStartIndex ,CarMessage::getCarMessageStartIndex
,CarMessage::getCarMessageEndIndex ,CarMessage::getCarMessageEndIndex
@ -47,7 +48,7 @@ public class CarMessageServiceImpl
.select(CarType::getCarTypeId .select(CarType::getCarTypeId
,CarType::getCarTypeName) ,CarType::getCarTypeName)
.leftJoin(CarMessageType.class,CarMessageType::getMessageTypeId,CarMessage::getCarMessageType) .leftJoin(CarMessageType.class,CarMessageType::getMessageTypeId,CarMessage::getCarMessageType)
.leftJoin(CarType.class,CarType::getCarTypeId,CarMessage::getCarMessageCartype)); .leftJoin(CarType.class,CarType::getCarTypeId,CarMessage::getCarMessageCarType));
} }
/** /**
* *
@ -81,14 +82,14 @@ public class CarMessageServiceImpl
public List<CarMessageResp> selectJoinList(Long id) { public List<CarMessageResp> selectJoinList(Long id) {
return carMessageMapper.selectJoinList(CarMessageResp.class, new MPJLambdaWrapper<CarMessage>() return carMessageMapper.selectJoinList(CarMessageResp.class, new MPJLambdaWrapper<CarMessage>()
.select(CarMessage::getCarMessageId, .select(CarMessage::getCarMessageId,
CarMessage::getCarMessageCartype, CarMessage::getCarMessageCarType,
CarMessage::getCarMessageType, CarMessage::getCarMessageType,
CarMessage::getCarMessageStartIndex, CarMessage::getCarMessageStartIndex,
CarMessage::getCarMessageEndIndex, CarMessage::getCarMessageEndIndex,
CarMessage::getCarMessageState) CarMessage::getCarMessageState)
.select(CarMessageType::getMessageTypeName) .select(CarMessageType::getMessageTypeName)
.leftJoin(CarMessageType.class, CarMessageType::getMessageTypeId, CarMessage::getCarMessageType) .leftJoin(CarMessageType.class, CarMessageType::getMessageTypeId, CarMessage::getCarMessageType)
.eq(StringUtils.isNotNull(id),CarMessage::getCarMessageCartype, id)); .eq(StringUtils.isNotNull(id),CarMessage::getCarMessageCarType, id));
} }

View File

@ -12,7 +12,7 @@ import com.muyu.domain.req.FaultCodeListReq;
import com.muyu.domain.req.FaultCodeUpdReq; import com.muyu.domain.req.FaultCodeUpdReq;
import com.muyu.domain.resp.FaultCodeListResp; import com.muyu.domain.resp.FaultCodeListResp;
import com.muyu.domain.resp.FaultCodeTotalListResp; import com.muyu.domain.resp.FaultCodeTotalListResp;
import com.muyu.domain.resp.FaultConditionListResp; import com.muyu.domain.vo.FaultCodeVO;
import com.muyu.server.mapper.FaultCodeMapper; import com.muyu.server.mapper.FaultCodeMapper;
import com.muyu.server.service.FaultCodeService; import com.muyu.server.service.FaultCodeService;
import com.muyu.server.service.FaultLabelService; import com.muyu.server.service.FaultLabelService;
@ -44,8 +44,6 @@ public class FaultCodeServiceImpl extends ServiceImpl<FaultCodeMapper, FaultCode
*/ */
@Override @Override
public FaultCodeTotalListResp selectfaultcodelist(FaultCodeListReq faultCodeListReq) { public FaultCodeTotalListResp selectfaultcodelist(FaultCodeListReq faultCodeListReq) {
LambdaQueryWrapper<FaultCode> queryWrapper = new LambdaQueryWrapper<>();
long count = this.count(queryWrapper);
MPJLambdaWrapper<FaultCode> wrapper = new MPJLambdaWrapper<>(); MPJLambdaWrapper<FaultCode> wrapper = new MPJLambdaWrapper<>();
wrapper.select( wrapper.select(
@ -53,6 +51,7 @@ public class FaultCodeServiceImpl extends ServiceImpl<FaultCodeMapper, FaultCode
FaultCode::getMessageTypeId, FaultCode::getMessageTypeId,
FaultCode::getFaultcodeNumber, FaultCode::getFaultcodeNumber,
FaultCode::getFaultGroup, FaultCode::getFaultGroup,
FaultCode::getFaultcodeId,
FaultCode::getFaultValue, FaultCode::getFaultValue,
FaultCode::getIsWarning) FaultCode::getIsWarning)
.select( .select(
@ -63,9 +62,10 @@ public class FaultCodeServiceImpl extends ServiceImpl<FaultCodeMapper, FaultCode
FaultCode::getFaultcodeNumber,faultCodeListReq.getFaultcodeNumber()) FaultCode::getFaultcodeNumber,faultCodeListReq.getFaultcodeNumber())
.eq(StringUtils.isNotEmpty(faultCodeListReq.getFaultBit()), .eq(StringUtils.isNotEmpty(faultCodeListReq.getFaultBit()),
FaultCode::getFaultBit, faultCodeListReq.getFaultBit()); FaultCode::getFaultBit, faultCodeListReq.getFaultBit());
wrapper.last("LIMIT "+ ((faultCodeListReq.getPageNum()-1)*faultCodeListReq.getPageSize())+", "+faultCodeListReq.getPageSize()); Page<FaultCodeListResp> page = faultCodeMapper.selectJoinPage(new Page<>(faultCodeListReq.getPageNum(), faultCodeListReq.getPageSize()),
List<FaultCodeListResp> faultCodeListResps = faultCodeMapper.selectJoinList(FaultCodeListResp.class, wrapper); FaultCodeListResp.class, wrapper);
return FaultCodeTotalListResp.faultCodeTotalListResp(faultCodeListResps,count);
return FaultCodeTotalListResp.faultCodeTotalListResp(page.getRecords(),page.getTotal());
} }

View File

@ -5,14 +5,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.muyu.domain.CarType; import com.muyu.domain.CarType;
import com.muyu.domain.FaultCode;
import com.muyu.domain.FaultCondition; import com.muyu.domain.FaultCondition;
import com.muyu.domain.FaultLabel; import com.muyu.domain.FaultLabel;
import com.muyu.domain.req.FaultConditionAddReq; import com.muyu.domain.req.FaultConditionAddReq;
import com.muyu.domain.req.FaultConditionListReq; import com.muyu.domain.req.FaultConditionListReq;
import com.muyu.domain.resp.FaultConditionListResp; import com.muyu.domain.resp.FaultConditionListResp;
import com.muyu.domain.resp.FaultConditionTotalListResp; import com.muyu.domain.resp.FaultConditionTotalListResp;
import com.muyu.domain.resp.FaultLogListResp;
import com.muyu.server.mapper.FaultConditionMapper; import com.muyu.server.mapper.FaultConditionMapper;
import com.muyu.server.service.FaultConditionService; import com.muyu.server.service.FaultConditionService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -44,14 +42,8 @@ public class FaultConditionServiceImpl extends ServiceImpl<FaultConditionMapper,
*/ */
@Override @Override
public FaultConditionTotalListResp getfaultrulelist(FaultConditionListReq faultConditionListReq) { public FaultConditionTotalListResp getfaultrulelist(FaultConditionListReq faultConditionListReq) {
LambdaQueryWrapper<FaultCondition> queryWrapper = new LambdaQueryWrapper<>();
long count = this.count(queryWrapper);
MPJLambdaWrapper<FaultCondition> wrapper = new MPJLambdaWrapper<>(); MPJLambdaWrapper<FaultCondition> wrapper = new MPJLambdaWrapper<>();
wrapper.select(FaultCondition::getCarconditionId, wrapper.selectAll(FaultCondition.class)
FaultCondition::getCarTypeId,
FaultCondition::getMessageTypeId,
FaultCondition::getFaultconditionIdentification,
FaultCondition::getFaultconditionParameter)
.select(CarType::getCarTypeName) .select(CarType::getCarTypeName)
.select(FaultLabel::getMessageTypeName, .select(FaultLabel::getMessageTypeName,
FaultLabel::getMessageTypeCode) FaultLabel::getMessageTypeCode)
@ -63,9 +55,9 @@ public class FaultConditionServiceImpl extends ServiceImpl<FaultConditionMapper,
if (faultConditionListReq.getMessageTypeId()!=0){ if (faultConditionListReq.getMessageTypeId()!=0){
wrapper.eq(FaultLabel::getMessageTypeId, faultConditionListReq.getMessageTypeId()); wrapper.eq(FaultLabel::getMessageTypeId, faultConditionListReq.getMessageTypeId());
} }
wrapper.last("LIMIT "+ ((faultConditionListReq.getPageNum()-1)*faultConditionListReq.getPageSize())+", "+faultConditionListReq.getPageSize()); Page<FaultConditionListResp> page = faultConditionMapper.selectJoinPage(new Page<>(faultConditionListReq.getPageNum(), faultConditionListReq.getPageSize()),
List<FaultConditionListResp> faultConditionListResps = faultConditionMapper.selectJoinList(FaultConditionListResp.class, wrapper); FaultConditionListResp.class, wrapper);
return FaultConditionTotalListResp.faultConditionTotalListResp(faultConditionListResps,count); return FaultConditionTotalListResp.faultConditionTotalListResp(page.getRecords(),page.getTotal());
} }

View File

@ -7,7 +7,6 @@ import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.muyu.common.core.utils.StringUtils; import com.muyu.common.core.utils.StringUtils;
import com.muyu.domain.CarInformation; import com.muyu.domain.CarInformation;
import com.muyu.domain.FaultCode; import com.muyu.domain.FaultCode;
import com.muyu.domain.FaultCondition;
import com.muyu.domain.FaultLog; import com.muyu.domain.FaultLog;
import com.muyu.domain.req.FaultLogListReq; import com.muyu.domain.req.FaultLogListReq;
import com.muyu.domain.resp.FaultLogListResp; import com.muyu.domain.resp.FaultLogListResp;
@ -16,9 +15,6 @@ import com.muyu.server.mapper.FaultLogMapper;
import com.muyu.server.service.FaultLogService; import com.muyu.server.service.FaultLogService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* *
* @Authorweiran * @Authorweiran
@ -39,17 +35,11 @@ public class FaultLogServiceImpl extends ServiceImpl<FaultLogMapper, FaultLog> i
*/ */
@Override @Override
public FaultLogTotalListResp selectfaultlog(FaultLogListReq faultLogListReq) { public FaultLogTotalListResp selectfaultlog(FaultLogListReq faultLogListReq) {
LambdaQueryWrapper<FaultLog> queryWrapper = new LambdaQueryWrapper<>();
long count = this.count(queryWrapper);
MPJLambdaWrapper<FaultLog> wrapper = new MPJLambdaWrapper<>(); MPJLambdaWrapper<FaultLog> wrapper = new MPJLambdaWrapper<>();
wrapper.select(FaultLog::getLogId, wrapper.selectAll(FaultLog.class)
FaultLog::getFaultcodeId,
FaultLog::getCarInformationId,
FaultLog::getCarVin,
FaultLog::getStartwarningTime,
FaultLog::getEndwarningTime)
.select(FaultCode::getFaultcodeNumber) .select(FaultCode::getFaultcodeNumber)
.select(CarInformation::getCarInformationVIN) .select(CarInformation::getCarInformationVin)
.leftJoin(FaultCode.class,FaultCode::getFaultcodeId,FaultLog::getFaultcodeId) .leftJoin(FaultCode.class,FaultCode::getFaultcodeId,FaultLog::getFaultcodeId)
.leftJoin(CarInformation.class,CarInformation::getCarInformationId,FaultLog::getCarInformationId) .leftJoin(CarInformation.class,CarInformation::getCarInformationId,FaultLog::getCarInformationId)
.eq(StringUtils.isNotEmpty(faultLogListReq.getCarVin()), .eq(StringUtils.isNotEmpty(faultLogListReq.getCarVin()),
@ -60,8 +50,8 @@ public class FaultLogServiceImpl extends ServiceImpl<FaultLogMapper, FaultLog> i
if (faultLogListReq.getEndwarningTime()!=null){ if (faultLogListReq.getEndwarningTime()!=null){
wrapper.eq(FaultLog::getEndwarningTime,faultLogListReq.getEndwarningTime()); wrapper.eq(FaultLog::getEndwarningTime,faultLogListReq.getEndwarningTime());
} }
wrapper.last("LIMIT "+ ((faultLogListReq.getPageNum()-1)*faultLogListReq.getPageSize())+", "+faultLogListReq.getPageSize()); Page<FaultLogListResp> ipage = faultLogMapper.selectJoinPage(new Page<>(faultLogListReq.getPageNum(),
List<FaultLogListResp> faultLogListResps = faultLogMapper.selectJoinList(FaultLogListResp.class, wrapper); faultLogListReq.getPageSize()), FaultLogListResp.class, wrapper);
return FaultLogTotalListResp.faultLogTotalListResp(faultLogListResps,count); return FaultLogTotalListResp.faultLogTotalListResp(ipage.getRecords(),ipage.getTotal());
} }
} }

View File

@ -4,7 +4,7 @@ server:
# nacos线上地址 # nacos线上地址
nacos: nacos:
addr: 127.0.0.1:8848 addr: 159.75.188.178:8848
user-name: nacos user-name: nacos
password: nacos password: nacos
namespace: eight namespace: eight

View File

@ -4,7 +4,7 @@ server:
# nacos线上地址 # nacos线上地址
nacos: nacos:
addr: 127.0.0.1:8848 addr: 159.75.188.178:8848
user-name: nacos user-name: nacos
password: nacos password: nacos
namespace: eight namespace: eight

View File

@ -4,7 +4,7 @@ server:
# nacos线上地址 # nacos线上地址
nacos: nacos:
addr: 127.0.0.1:8848 addr: 159.75.188.178:8848
user-name: nacos user-name: nacos
password: nacos password: nacos
namespace: eight namespace: eight

View File

@ -4,7 +4,7 @@ server:
# nacos线上地址 # nacos线上地址
nacos: nacos:
addr: 127.0.0.1:8848 addr: 159.75.188.178:8848
user-name: nacos user-name: nacos
password: nacos password: nacos
namespace: eight namespace: eight

View File

@ -4,7 +4,7 @@ server:
# nacos线上地址 # nacos线上地址
nacos: nacos:
addr: 127.0.0.1:8848 addr: 159.75.188.178:8848
user-name: nacos user-name: nacos
password: nacos password: nacos
namespace: eight namespace: eight