feat:()查看车辆绑定围栏组的信息
parent
a00e5345b4
commit
9e1f941be5
|
@ -2,6 +2,7 @@ package com.muyu.enterprise.controller;
|
|||
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.common.system.domain.LoginUser;
|
||||
import com.muyu.domain.FenceGroup;
|
||||
import com.muyu.domain.req.BoundFenceGroupReq;
|
||||
import com.muyu.enterprise.cache.AllVehicleCacheService;
|
||||
import com.muyu.enterprise.cache.VehicleCacheService;
|
||||
|
@ -52,9 +53,6 @@ public class VehicleController extends BaseController {
|
|||
@Autowired
|
||||
private AllVehicleCacheService allVehicleCacheService;
|
||||
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
|
||||
|
||||
/**
|
||||
* 查询车辆管理列表
|
||||
|
@ -176,4 +174,14 @@ public class VehicleController extends BaseController {
|
|||
return Result.success(templateId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看绑定的围栏信息
|
||||
*/
|
||||
@PostMapping("/showBoundFenceGroup/{fenceGroupId}")
|
||||
@Operation(description = "查看绑定的围栏信息")
|
||||
public Result<List<FenceGroup>> showBoundFenceGroup(@PathVariable("fenceGroupId") Long fenceGroupId) {
|
||||
List<FenceGroup> list = vehicleService.showBoundFenceGroup(fenceGroupId);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.muyu.enterprise.mapper;
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.muyu.domain.FenceGroup;
|
||||
import com.muyu.domain.Vehicle;
|
||||
import com.muyu.domain.req.BoundFenceGroupReq;
|
||||
import com.muyu.domain.req.VehicleManageReq;
|
||||
|
@ -49,4 +50,8 @@ public interface VehicleMapper extends MPJBaseMapper<Vehicle> {
|
|||
})
|
||||
void boundFenceGroup(BoundFenceGroupReq boundFenceGroupReq);
|
||||
|
||||
@Select("SELECT * FROM bound_middle bm LEFT JOIN vehicle v ON bm.vehicle_id=v.vehicle_id WHERE bm.fence_group_id = #{fenceGroupId}")
|
||||
List<FenceGroup> showBoundFenceGroup(@Param("fenceGroupId") Long fenceGroupId);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -30,11 +30,6 @@ public interface ElectService extends IService<Fence> {
|
|||
*/
|
||||
List<Fence> mapShow(@Param("fenceId") Long fenceId);
|
||||
|
||||
// /**
|
||||
// * 根据id查询车辆
|
||||
// */
|
||||
// Fence boundFence(@Param("fenceId") Long fenceId);
|
||||
|
||||
/**
|
||||
* 查询电子围栏(终版)
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.muyu.enterprise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.FenceGroup;
|
||||
import com.muyu.domain.Vehicle;
|
||||
import com.muyu.domain.req.BoundFenceGroupReq;
|
||||
import com.muyu.domain.req.VehicleManageReq;
|
||||
|
@ -39,4 +40,11 @@ public interface VehicleService extends IService<Vehicle> {
|
|||
*/
|
||||
void boundFenceGroup(BoundFenceGroupReq boundFenceGroupReq);
|
||||
|
||||
/**
|
||||
* 查询绑定围栏组信息
|
||||
* @param fenceGroupId
|
||||
* @return
|
||||
*/
|
||||
List<FenceGroup> showBoundFenceGroup(@Param("fenceGroupId") Long fenceGroupId);
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.enterprise.service.impl;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.domain.FenceGroup;
|
||||
import com.muyu.domain.Vehicle;
|
||||
import com.muyu.domain.VehicleType;
|
||||
import com.muyu.domain.req.BoundFenceGroupReq;
|
||||
|
@ -14,6 +15,7 @@ import com.muyu.enterprise.service.VehicleService;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -76,5 +78,11 @@ public class VehicleServiceImpl
|
|||
vehicleMapper.boundFenceGroup(boundFenceGroupReq);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FenceGroup> showBoundFenceGroup(Long fenceGroupId) {
|
||||
List<FenceGroup> fenceGroups = vehicleMapper.showBoundFenceGroup(fenceGroupId);
|
||||
return fenceGroups;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue