Browse Source

1.关联查询车辆历史照片

test
0.0 2 years ago
parent
commit
4368795d5b
  1. 50
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java
  2. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java
  3. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml

50
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java

@ -282,30 +282,30 @@ public class BasicdataVehicleEntity extends TenantEntity {
*/
@ApiModelProperty(value = "GPS型号")
private String gpsModel;
// /**
// * 预留1
// */
// @ApiModelProperty(value = "预留1")
// private String reserve1;
// /**
// * 预留2
// */
// @ApiModelProperty(value = "预留2")
// private String reserve2;
// /**
// * 预留3
// */
// @ApiModelProperty(value = "预留3")
// private String reserve3;
// /**
// * 预留4
// */
// @ApiModelProperty(value = "预留4")
// private String reserve4;
// /**
// * 预留5
// */
// @ApiModelProperty(value = "预留5")
// private String reserve5;
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
}

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java

@ -29,6 +29,7 @@ import lombok.AllArgsConstructor;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -81,6 +82,7 @@ public class BasicdataVehicleController extends BladeController {
BasicdataVehicleVO basicdataVehicleVO = new BasicdataVehicleVO();
BeanUtils.copyProperties(detail,basicdataVehicleVO);
List<String> urls =basicdataVehicleService.selectPhotoBymasterId(basicdataVehicleVO.getId());
log.info("urls>>>>>{}",urls);
if (urls.size()>0){basicdataVehicleVO.setHistoricPhotos(StringUtils.join(urls, ","));}
return R.data(basicdataVehicleVO);
}

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml

@ -131,7 +131,7 @@
lbv.gps_model gpsModel,
(
SELECT
lbvp.photo_url
group_concat(lbvp.photo_url)
FROM
logpm_basicdata_vehicle_photo lbvp
where
@ -139,7 +139,7 @@
AND lbvp.create_time &lt;= DATE_SUB( CURDATE(), INTERVAL 1 YEAR )
ORDER BY
lbvp.create_time
LIMIT 1
LIMIT 3
) historicPhotos
FROM
logpm_basicdata_vehicle lbv

Loading…
Cancel
Save