Commit 002fc467 authored by wanghao's avatar wanghao

1 大屏端 全局搜素 设备,场站,用户信息,监控 ,以及点击查看 详情功能初步实现,待跟前段界面联调测试。

parent 68628511
......@@ -10,25 +10,22 @@ import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.ServletUtils;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.domain.Listaw;
import com.zehong.system.domain.TDetailInfoList;
import com.zehong.system.domain.TDeviceInfoS;
import com.zehong.system.service.ITDetectorInfoService;
import com.zehong.system.service.ITDetectorUserService;
import com.zehong.system.service.ITEmployedPeopleInfoService;
import com.zehong.system.domain.*;
import com.zehong.system.service.*;
import com.zehong.web.codeconfig.CodeConFig;
import org.apache.commons.collections.CollectionUtils;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import javax.annotation.Resource;
/**
* 设备信息Controller
*
......@@ -52,6 +49,9 @@ public class TDeviceInfoController extends BaseController
@Autowired
private TokenService tokenService;
@Resource
private ITDeviceUserService tDeviceUserService;
/**
* 查询设备信息列表
*/
......@@ -65,6 +65,25 @@ public class TDeviceInfoController extends BaseController
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return getDataTable(list);
}
/**
*
* 大屏端 全局搜素 设备,场站,用户信息,监控 步骤一
* */
@GetMapping("/queryBasicInforByNameForBigWindows")
public AjaxResult queryBasicInforByNameForBigWindows(String name) {
return AjaxResult.success(tDeviceInfoService.queryBasicInforByNameForBigWindows(name));
}
/**
*
* 大屏端 全局搜素 设备,场站,用户信息,监控 步骤二
* */
@GetMapping("/queryBasicInforByNameForBigWindows")
public AjaxResult queryBasicInforByTypeAndIdForBigWindows(String type,String id) {
return AjaxResult.success(tDeviceInfoService.queryBasicInforByTypeAndIdForBigWindows(type,id));
}
@GetMapping("/alllist")
public AjaxResult alllist(TDeviceInfo tDeviceInfo)
{
......
......@@ -27,7 +27,7 @@ import com.zehong.common.core.page.TableDataInfo;
* @date 2022-09-14
*/
@RestController
@RequestMapping("/system/yehuaqiDevice")
@RequestMapping("/ system/yehuaqiDevice")
public class TYehuaqiDeviceController extends BaseController
{
......
......@@ -25,6 +25,13 @@ public interface PipeInterfaceMapper {
*/
List<PipeDate> getPipeForSelect(String enterId);
/**
* 按照企业id he
* @param pipeId
* @return
*/
PipeDate getPipeBypipeId(@Param("pipeId") String pipeId);
/**
* 获取分组数据
* @return
......
......@@ -6,6 +6,7 @@ import java.util.Map;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS;
import com.zehong.system.domain.vo.TDetectorUserVO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
/**
......@@ -38,6 +39,13 @@ public interface TDeviceInfoMapper
* @return 设备信息集合
*/
public List<TDeviceInfo> selectTDeviceInfoList(TDeviceInfo tDeviceInfo);
/**
*
* 大屏端 全局搜素 设备,场站,用户信息,监控 步骤一
* */
@MapKey(value="id")
public List<Map<String,Object>> queryBasicInforByNameForBigWindows(@Param(value = "name") String name);
public List<TDeviceInfo> selectDeviceList(TDeviceInfo tDeviceInfo);
/**
......
......@@ -21,6 +21,8 @@ public interface IPipeInterfaceService {
*/
List<PipeDate> getPipeForSelect(String enterId);
PipeDate getPipeBypipeId(String pipeId);
/**
* 获取分组数据
* @return
......
......@@ -30,6 +30,20 @@ public interface ITDeviceInfoService
* @return 设备信息集合
*/
public List<TDeviceInfo> selectTDeviceInfoList(TDeviceInfo tDeviceInfo);
/**
*
* 大屏端 全局搜素 设备,场站,用户信息,监控 步骤一
* */
public Map<Object, List<Map<String, Object>>> queryBasicInforByNameForBigWindows(String name);
/**
*
* 大屏端 全局搜素 设备,场站,用户信息,监控 步骤二
* */
public Object queryBasicInforByTypeAndIdForBigWindows(String type,String id);
public List<TDeviceInfo> selectDeviceList(TDeviceInfo tDeviceInfo);
/**
......
......@@ -36,6 +36,11 @@ public class PipeInterfaceServiceImpl implements IPipeInterfaceService {
return pipeDates;
}
@Override
public PipeDate getPipeBypipeId(String pipeId) {
return pipeInterfaceMapper.getPipeBypipeId(pipeId);
}
/**
* 获取分组数据
* @return
......
package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TYehuaqiDevice;
import com.zehong.system.domain.vo.TDetectorUserVO;
import com.zehong.system.domain.vo.TYehuaqiUserVO;
import com.zehong.system.mapper.TYehuaqiDeviceMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TYehuaqiUserMapper;
......@@ -56,12 +51,12 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
public List<TYehuaqiUser> selectAllUserList(TYehuaqiUser tYehuaqiUser)
{
List<TYehuaqiUser> list = tYehuaqiUserMapper.selectTYehuaqiUserListTwo(tYehuaqiUser);
// for (TYehuaqiUser user : list){
// TYehuaqiDevice d = new TYehuaqiDevice();
// d.setUserId(user.getUserId());
// List<TYehuaqiDevice> devices = tYehuaqiDeviceMapper.selectTYehuaqiDeviceList(d);
// user.setDeviceNum(devices.size());
// }
for (TYehuaqiUser user : list){
TYehuaqiDevice d = new TYehuaqiDevice();
d.setUserId(user.getUserId());
List<TYehuaqiDevice> devices = tYehuaqiDeviceMapper.selectTYehuaqiDeviceList(d);
user.setDeviceNum(devices.size());
}
return list;
}
......
......@@ -135,6 +135,14 @@
</if>
</select>
<select id="getPipeBypipeId" parameterType="PipeDate" resultMap="PipeDateResult">
select format(pipe_length,2)pipe_length,pipe_pressure,beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,
buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name,
pipe_name,detaild_address,ind_reg_auth,ind_reg_auth_per,ind_reg_auth_per_con,key_areas_gas_usage,
aff_gas_com,aff_gas_com_sec_per,aff_gas_com_sec_per_con,sec_check_time,unit_gas_user_res,unit_gas_user_res_con from t_pipe_info
where pipe_id = #{pipeId}
</select>
<!--获取分组数据-->
<select id="selectGroupPipeData" parameterType="PipeDate" resultMap="PipeDateResult">
select beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info
......
......@@ -59,6 +59,81 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by a.device_id desc
</select>
<select id="queryBasicInforByNameForBigWindows" resultType="map">
SELECT
device_id AS id,
device_name AS NAME,
CONCAT( '[[', longitude, ', ', latitude, ']]' ) AS coordinates,
device_type AS type
FROM
t_device_info
WHERE
<if test="name != null and name != ''"> device_name like concat('%', #{name}, '%') AND</if>
longitude IS NOT NULL
AND latitude IS NOT NULL UNION
SELECT
site_station_id AS id,
site_station_name AS NAME,
CONCAT( '[[', longitude, ', ', latitude, ']]' ) AS coordinates,
'3' AS type
FROM
t_site_station_info
WHERE
<if test="name != null and name != ''"> site_station_name like concat('%', #{name}, '%') AND</if>
longitude IS NOT NULL
AND latitude IS NOT NULL UNION
SELECT
user_id AS id,
nick_name AS NAME,
CONCAT( '[[', longitude, ', ', latitude, ']]' ) AS coordinates,
CASE
user_type
WHEN '1' THEN
'4'
WHEN '2' THEN
'5'
WHEN '3' THEN
'6'
END AS type
FROM
t_detector_user
WHERE
<if test="name != null and name != ''"> nick_name like concat('%', #{name}, '%') AND</if>
longitude IS NOT NULL
AND latitude IS NOT NULL UNION
SELECT
video_manager_id AS id,
video_name AS NAME,
CONCAT( '[[', longitude, ', ', latitude, ']]' ) AS coordinates,
'7' AS type
FROM
t_video_manager
WHERE
<if test="name != null and name != ''"> video_name like concat('%', #{name}, '%') AND</if>
longitude IS NOT NULL
AND latitude IS NOT NULL UNION
SELECT
user_id AS id,
nick_name AS NAME,
CONCAT( '[[', longitude, ', ', latitude, ']]' ) AS coordinates,
'8' AS type
FROM
t_yehuaqi_user
WHERE
<if test="name != null and name != ''"> nick_name like concat('%', #{name}, '%') AND</if>
longitude IS NOT NULL
AND latitude IS NOT NULL UNION
SELECT
pipe_id AS id,
pipe_addr AS NAME,
coordinates,
'9' AS type
FROM
t_pipe_info
WHERE
<if test="name != null and name != ''"> pipe_addr like concat('%', #{name}, '%') AND</if>
coordinates IS NOT NULL
</select>
<select id="selectDeviceList" parameterType="TDeviceInfo" resultMap="TDeviceInfoResult">
SELECT * FROM t_device_info WHERE device_name like concat('%', #{deviceName}, '%')
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment