diff --git a/hzims-biz-common/src/main/java/com/hnac/hzims/common/constant/CommonConstant.java b/hzims-biz-common/src/main/java/com/hnac/hzims/common/constant/CommonConstant.java index 31abfa1..801f766 100644 --- a/hzims-biz-common/src/main/java/com/hnac/hzims/common/constant/CommonConstant.java +++ b/hzims-biz-common/src/main/java/com/hnac/hzims/common/constant/CommonConstant.java @@ -49,4 +49,9 @@ public interface CommonConstant { */ String DEFAULT_PASSWORD = "123456"; + /** + * 租户ID + */ + String TENANT_ID = "200000"; + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java index e1cac85..981ab67 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java @@ -305,10 +305,11 @@ public class StationVideoTypeController extends BladeController { @ApiOperationSupport(order = 140) @ApiOperation(value = "根据摄像头设备编码获取ws地址", notes = "根据摄像头设备编码获取ws地址") public R> getWsUrlByPointCode(@RequestParam(value = "pointCodes",required = false) String pointCodes, + @RequestParam(value = "streamType",required = false) Integer streamType, @RequestParam(value = "host",required = false) String host, @RequestParam(value = "appKey",required = false) String appKey, @RequestParam(value = "appSecret",required = false) String appSecret) { - return R.data(stationVideoTypeService.getWsUrlByPointCode(pointCodes,host,appKey,appSecret)); + return R.data(stationVideoTypeService.getWsUrlByPointCode(pointCodes,host,appKey,appSecret,streamType)); } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java index 01d55b1..834a7e3 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java @@ -74,6 +74,6 @@ public interface IStationVideoTypeService extends BaseService getWsUrlByPointCode(String pointCodes,String host,String appKey,String appSecret); + Map getWsUrlByPointCode(String pointCodes,String host,String appKey,String appSecret,Integer streamType); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java index b4ffcce..f3500bb 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java @@ -198,14 +198,14 @@ public class StationVideoTypeServiceImpl extends BaseServiceImpl getWsUrlByPointCode(String pointCodes,String host,String appKey,String appSecret) { + public Map getWsUrlByPointCode(String pointCodes,String host,String appKey,String appSecret,Integer streamType) { Map result = new HashMap<>(); pointCodes = StringUtil.isNotBlank(pointCodes) ? pointCodes : "7eaf556c7d3e429d89cd622256898776,43ee17dafde94c4ba40ad313ebefe6d2,98f51c998acf4dd2951e0484d265710e,6bb1f8ad552444309b68677b8ac3fbaf"; final String finalHost = StringUtil.isNotBlank(host) ? host : videoHost; final String finalAppKey = StringUtil.isNotBlank(appKey) ? appKey : videoAppKey; final String finalAppSecret = StringUtil.isNotBlank(appSecret) ? appSecret : videoAppSecret; Map param = new HashMap(6){{ - put("streamType",0); + put("streamType",Func.isNotEmpty(streamType) ? streamType : 0); put("protocol","ws"); put("transmode",1); put("expand","transcode=0"); diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java index 88779d5..382af2b 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java @@ -53,21 +53,21 @@ public class CarController extends BladeController { @ApiOperation(value = "新增车辆") @ApiOperationSupport(order = 1) public R saveCar(@Valid @RequestBody CarEntity carEntity) { - return R.status(carService.save(carEntity)); + return carService.saveCar(carEntity); } @PostMapping("/updateCar") @ApiOperation(value = "修改车辆") @ApiOperationSupport(order = 2) public R updateCar(@Valid @RequestBody CarEntity carEntity) { - return R.status(carService.updateById(carEntity)); + return carService.updateCar(carEntity); } @PostMapping("/removeCar") @ApiOperation(value = "删除车辆") @ApiOperationSupport(order = 3) public R removeCar(@RequestParam Long id) { - return R.status(carService.removeById(id)); + return R.status(carService.removeCar(id)); } @GetMapping("/carDetail") @@ -101,7 +101,7 @@ public class CarController extends BladeController { @ApiOperation(value = "修改车辆维保记录") @ApiOperationSupport(order = 7) public R updateCarMaintenance(@Valid @RequestBody CarMaintenanceEntity carMaintenanceEntity) { - return R.status(carMaintenanceService.updateById(carMaintenanceEntity)); + return carMaintenanceService.updateCarMaintenance(carMaintenanceEntity); } @PostMapping("/removeCarMaintenance") diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml index 33ba901..b77ecf2 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml @@ -26,13 +26,13 @@ WHERE t1.is_deleted = 0 - AND t2.unit = #{param.unit} + AND t2.unit like concat('%', #{param.unit}, '%') AND t1.start_time >= #{param.startTime} - AND t1.end_time < #{param.endTime} + AND t1.end_time <= #{param.endTime} AND t1.car_id = #{param.carId} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml index 695be59..dbbb074 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml @@ -4,7 +4,7 @@