搭配接口开发
This commit is contained in:
parent
38d88b175d
commit
9119a1671e
|
|
@ -11,31 +11,8 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
|||
/**
|
||||
* @author HeiZi
|
||||
*/
|
||||
@FeignClient(contextId = "proteamService", value = ServiceNameConstants.PROTEAM_SERVICE, fallbackFactory = RemoteProteamFallbackFactory.class)
|
||||
public interface RemoteProteamService {
|
||||
|
||||
/**
|
||||
* 未知的的方法
|
||||
* @param source
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/tEquipment/asyncDeviceList")
|
||||
Result<Object> asyncDeviceList(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
*未知的的方法
|
||||
* @param source
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/tEquipment/catchPicture")
|
||||
Result<Object> catchPicture(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
*未知的的方法
|
||||
* @param source
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/tEquipment/downloadPic")
|
||||
Result<Object> downloadPic(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
package com.securitycontrol.system.api;
|
||||
|
||||
import com.securitycontrol.common.core.constant.SecurityConstants;
|
||||
import com.securitycontrol.common.core.constant.ServiceNameConstants;
|
||||
import com.securitycontrol.common.core.domain.Result;
|
||||
import com.securitycontrol.system.api.domain.TbSourceFile;
|
||||
import com.securitycontrol.system.api.factory.RemoteSourceFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 资源服务
|
||||
*
|
||||
* @author czc
|
||||
*/
|
||||
@FeignClient(contextId = "remoteSourceService", value = ServiceNameConstants.BACK_SERVICE, fallbackFactory = RemoteSourceFallbackFactory.class)
|
||||
public interface RemoteSourceService {
|
||||
|
||||
/**
|
||||
* 查询资源信息
|
||||
* @param sourceId
|
||||
* @param sourceType
|
||||
* @param source
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/source/file/getSourceList")
|
||||
Result<List<TbSourceFile>> getSourceFile(@RequestParam("sourceId") String sourceId, @RequestParam("sourceType") String sourceType, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.securitycontrol.system.api.domain;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author 黑子
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class TbSourceFile {
|
||||
|
||||
private String file;
|
||||
|
||||
private String fileId;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private String contentType;
|
||||
|
||||
private String suffix;
|
||||
|
||||
private long fileSize;
|
||||
|
||||
private String sourceId;
|
||||
|
||||
private String id;
|
||||
|
||||
private String fileType;
|
||||
/**
|
||||
* 资源类型
|
||||
*/
|
||||
private String sourceType;
|
||||
|
||||
private String updateTime;
|
||||
|
||||
@JsonIgnore
|
||||
private byte[] data;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -11,29 +11,7 @@ import org.springframework.stereotype.Component;
|
|||
* @author HeiZi
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class RemoteProteamFallbackFactory implements FallbackFactory<RemoteProteamService> {
|
||||
public class RemoteProteamFallbackFactory{
|
||||
|
||||
@Override
|
||||
public RemoteProteamService create(Throwable throwable) {
|
||||
|
||||
log.error("工程班组服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteProteamService() {
|
||||
@Override
|
||||
public Result<Object> asyncDeviceList(String source) {
|
||||
return Result.fail("同步第三方设备数据失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Object> catchPicture(String source) {
|
||||
return Result.fail("单次抓图调用失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Object> downloadPic(String source) {
|
||||
return Result.fail("下载图片转交人工智能平台调用失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
package com.securitycontrol.system.api.factory;
|
||||
|
||||
import com.securitycontrol.common.core.domain.Result;
|
||||
import com.securitycontrol.system.api.RemoteSourceService;
|
||||
import com.securitycontrol.system.api.domain.TbSourceFile;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资源文件
|
||||
* 降级服务
|
||||
*
|
||||
* @author czc
|
||||
*/
|
||||
@Component
|
||||
public class RemoteSourceFallbackFactory implements FallbackFactory<RemoteSourceService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteSourceFallbackFactory.class);
|
||||
|
||||
|
||||
@Override
|
||||
public RemoteSourceService create(Throwable throwable) {
|
||||
log.error("资源文件服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteSourceService(){
|
||||
|
||||
@Override
|
||||
public Result<List<TbSourceFile>> getSourceFile(String sourceId, String sourceType, String source) {
|
||||
return Result.fail("第三方文件资源服务调用失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
com.securitycontrol.system.api.factory.RemoteUserFallbackFactory
|
||||
com.securitycontrol.system.api.factory.RemoteLogFallbackFactory
|
||||
com.securitycontrol.system.api.factory.RemoteFileFallbackFactory
|
||||
com.securitycontrol.system.api.factory.RemoteSourceFallbackFactory
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ public class ServiceNameConstants {
|
|||
/**
|
||||
* proteam的serviceid
|
||||
*/
|
||||
public static final String PROTEAM_SERVICE = "securityControl-proteam";
|
||||
public static final String BACK_SERVICE = "securityControl-background";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,4 +20,8 @@ public class ScreenParamDto extends ScreenDto{
|
|||
|
||||
@ApiModelProperty("结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty("编码类型")
|
||||
private int typeCode;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
package com.securitycontrol.entity.screen.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备采集 值 实体类
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class DeviceValueVo {
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String proName;
|
||||
/**
|
||||
* 标段工程编码
|
||||
*/
|
||||
private String bidCode;
|
||||
/**
|
||||
* 检测值
|
||||
*/
|
||||
private String val;
|
||||
/**
|
||||
* 检测值名称
|
||||
*/
|
||||
private String modelName;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String deviceType;
|
||||
/**
|
||||
* 设备类型编码
|
||||
*/
|
||||
private int typeCode;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
/**
|
||||
* 是否告警
|
||||
*/
|
||||
private String isWarn;
|
||||
}
|
||||
|
|
@ -42,6 +42,10 @@ public class SystemGlobal {
|
|||
* 应急流程
|
||||
*/
|
||||
public final static String SW_NAME="三维文件";
|
||||
/**
|
||||
* 工程图片
|
||||
*/
|
||||
public final static String PRO_IMAGE="工程图片";
|
||||
|
||||
/**
|
||||
* 预案类型
|
||||
|
|
@ -81,4 +85,9 @@ public class SystemGlobal {
|
|||
|
||||
public final static String WORLD2_FIX="docx";
|
||||
|
||||
/**
|
||||
* 环境监测编码
|
||||
*/
|
||||
public final static int HJ_TYPE=351;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
package com.securitycontrol.background.controller;
|
||||
|
||||
import com.securitycontrol.background.service.SourceFileService;
|
||||
import com.securitycontrol.common.core.domain.Result;
|
||||
import com.securitycontrol.entity.file.FileExportVo;
|
||||
import com.securitycontrol.system.api.domain.TbSourceFile;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资源文件接口层
|
||||
* @author 黑子
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/source/file/")
|
||||
@Slf4j
|
||||
public class SourceFileController {
|
||||
|
||||
@Autowired
|
||||
private SourceFileService service;
|
||||
|
||||
@PostMapping("getSourceList")
|
||||
public Result<List<TbSourceFile>> getSourceList(@RequestParam(value = "sourceId") String sourceId, @RequestParam("sourceType") String sourceType){
|
||||
List<TbSourceFile> list= service.getTbSourceList(sourceId,sourceType);
|
||||
return Result.ok(list);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.securitycontrol.background.mapper;
|
||||
|
||||
import com.securitycontrol.entity.file.FileExportVo;
|
||||
import com.securitycontrol.system.api.domain.TbSourceFile;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
|
@ -43,4 +44,11 @@ public interface SourceFileMapper {
|
|||
|
||||
List<FileExportVo> getSourceList(@Param("sourceId") String sourceId, @Param("sourceType") String sourceType);
|
||||
|
||||
/**
|
||||
* 降级调用资源文件信息
|
||||
* @param sourceId
|
||||
* @param sourceType
|
||||
* @return
|
||||
*/
|
||||
List<TbSourceFile> getTbSourceList(@Param("sourceId") String sourceId, @Param("sourceType") String sourceType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.securitycontrol.background.service;
|
|||
import com.securitycontrol.common.core.domain.Result;
|
||||
import com.securitycontrol.entity.background.vo.EmergencyPlanVo;
|
||||
import com.securitycontrol.entity.file.FileExportVo;
|
||||
import com.securitycontrol.system.api.domain.TbSourceFile;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -52,5 +53,11 @@ public interface SourceFileService {
|
|||
*/
|
||||
List<FileExportVo> getSourceList(String sourceId,String sourceType);
|
||||
|
||||
|
||||
/**
|
||||
* 查询资源信息结合
|
||||
* @param sourceId
|
||||
* @param sourceType
|
||||
* @return
|
||||
*/
|
||||
List<TbSourceFile> getTbSourceList(String sourceId, String sourceType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.securitycontrol.common.core.utils.uuid.IdUtils;
|
|||
import com.securitycontrol.entity.background.vo.EmergencyPlanVo;
|
||||
import com.securitycontrol.entity.file.FileExportVo;
|
||||
import com.securitycontrol.entity.system.SystemGlobal;
|
||||
import com.securitycontrol.system.api.domain.TbSourceFile;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -143,6 +144,15 @@ public class SourceFileServiceImpl implements SourceFileService {
|
|||
return mapper.getSourceList(sourceId,sourceType);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sourceId
|
||||
* @param sourceType
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TbSourceFile> getTbSourceList(String sourceId, String sourceType) {
|
||||
return mapper.getTbSourceList(sourceId,sourceType);
|
||||
}
|
||||
|
||||
|
||||
public String checkData(FileExportVo fileExportVo){
|
||||
|
|
|
|||
|
|
@ -26,4 +26,12 @@
|
|||
and del_flag=0
|
||||
</select>
|
||||
|
||||
<select id="getTbSourceList" resultType="com.securitycontrol.system.api.domain.TbSourceFile">
|
||||
select id,file_type fileType,file_id fileId,file_suffix suffix,
|
||||
file_name fileName,source_id sourceId,source_type sourceType,update_time updaetTime
|
||||
from tb_resource_file
|
||||
where source_id=#{sourceId} AND source_type=#{sourceType}
|
||||
and del_flag=0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.securitycontrol.screen.controller;
|
||||
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
||||
import com.securitycontrol.screen.service.XcIndexService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
*现场施工搭大屏接口层
|
||||
* @author 黑子
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/largeScreen/xcIndex/")
|
||||
public class XcIndexController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private XcIndexService service;
|
||||
|
||||
@ApiOperation(value = "查询项目简介")
|
||||
@GetMapping("getProDetails")
|
||||
public AjaxResult getProDetails(ScreenParamDto dto){
|
||||
return service.getProDetails(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工程环境检测 实施数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询工程实时检测数据")
|
||||
@GetMapping("getProJcData")
|
||||
public AjaxResult getProJcData(ScreenParamDto dto){
|
||||
return service.getProJcData(dto);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.securitycontrol.screen.mapper;
|
||||
|
||||
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
||||
import com.securitycontrol.entity.screen.vo.DeviceValueVo;
|
||||
import com.securitycontrol.entity.system.base.vo.ProVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 施工现场大屏 首页数据接口层
|
||||
* @author 黑子
|
||||
*/
|
||||
@Repository
|
||||
public interface XcIndexMapper {
|
||||
|
||||
/**
|
||||
* 获取工程详情
|
||||
* @param bidCode
|
||||
* @return
|
||||
*/
|
||||
ProVo getProDetails(@Param("bidCode") String bidCode);
|
||||
|
||||
/**
|
||||
* 查询环境检测数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<DeviceValueVo> getProJcData(ScreenParamDto dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.securitycontrol.screen.service;
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
||||
|
||||
/**
|
||||
* S施工现场大屏
|
||||
* @author 黑子
|
||||
*/
|
||||
public interface XcIndexService {
|
||||
/**
|
||||
* 查询项目简介
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getProDetails(ScreenParamDto dto);
|
||||
|
||||
/**
|
||||
* 查询实施环境检测数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getProJcData(ScreenParamDto dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package com.securitycontrol.screen.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.securitycontrol.common.core.constant.HttpStatus;
|
||||
import com.securitycontrol.common.core.constant.SecurityConstants;
|
||||
import com.securitycontrol.common.core.domain.Result;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
||||
import com.securitycontrol.entity.screen.vo.DeviceValueVo;
|
||||
import com.securitycontrol.entity.system.SystemGlobal;
|
||||
import com.securitycontrol.entity.system.base.vo.ProVo;
|
||||
import com.securitycontrol.screen.mapper.XcIndexMapper;
|
||||
import com.securitycontrol.screen.service.XcIndexService;
|
||||
import com.securitycontrol.system.api.RemoteFileService;
|
||||
import com.securitycontrol.system.api.RemoteSourceService;
|
||||
import com.securitycontrol.system.api.domain.SysFile;
|
||||
import com.securitycontrol.system.api.domain.TbSourceFile;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 现场施工 大屏首页接口层
|
||||
* @author 黑子
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class XcIndexServiceImpl implements XcIndexService {
|
||||
|
||||
@Autowired
|
||||
private XcIndexMapper mapper;
|
||||
@Resource
|
||||
private RemoteSourceService remoteSourceService;
|
||||
@Resource
|
||||
private RemoteFileService remoteFileService;
|
||||
|
||||
@Override
|
||||
public AjaxResult getProDetails(ScreenParamDto dto) {
|
||||
Map<String ,Object> map= Maps.newHashMap();
|
||||
try{
|
||||
System.err.println(dto.getBidCode());
|
||||
ProVo proVo=mapper.getProDetails(dto.getBidCode());
|
||||
Result<List<TbSourceFile>> result=remoteSourceService.getSourceFile(proVo.getProId(), SystemGlobal.PRO_IMAGE, SecurityConstants.INNER);
|
||||
if(result.getCode()==SystemGlobal.SUCCESS_CODE){
|
||||
List<ProVo.FileData> list2 = new ArrayList<>();
|
||||
List<TbSourceFile> list=result.getData();
|
||||
list.forEach(fileVo->{
|
||||
Result<SysFile> result2 = remoteFileService.getImgBase64(fileVo.getFileId(), SecurityConstants.INNER);
|
||||
if (result2 != null && result2.getCode() == HttpStatus.SUCCESS && result2.getData() != null) {
|
||||
String jsonString = JSON.toJSONString(result2.getData());
|
||||
JSONObject item = JSON.parseObject(jsonString);
|
||||
String base64 = item.getString("url");
|
||||
ProVo.FileData fileData = new ProVo.FileData();
|
||||
fileData.setFileId(fileVo.getFileId());
|
||||
fileData.setBase64Url(base64);
|
||||
fileData.setFileSourceType(fileVo.getSourceType());
|
||||
list2.add(fileData);
|
||||
}
|
||||
|
||||
});
|
||||
proVo.setFileData(list2);
|
||||
}
|
||||
map.put("data",proVo);
|
||||
map.put("code",200);
|
||||
return AjaxResult.success(map);
|
||||
}catch (Exception e){
|
||||
map.put("data","");
|
||||
map.put("code",201);
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询实时环境检测数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getProJcData(ScreenParamDto dto) {
|
||||
try{
|
||||
dto.setTypeCode(SystemGlobal.HJ_TYPE);
|
||||
List<DeviceValueVo> list=mapper.getProJcData(dto);
|
||||
return AjaxResult.success(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(new ArrayList<DeviceValueVo>());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.screen.mapper.XcIndexMapper">
|
||||
|
||||
<select id="getProDetails" resultType="com.securitycontrol.entity.system.base.vo.ProVo">
|
||||
select pro_brief AS proBrief,pro_id AS proId
|
||||
from tb_project
|
||||
where bid_code=#{bidCode}
|
||||
</select>
|
||||
<!--查询环境检测数据-->
|
||||
<select id="getProJcData" resultType="com.securitycontrol.entity.screen.vo.DeviceValueVo">
|
||||
select bdd.device_name deviceName,tdd.mode_name modelName,
|
||||
tdv.val,tdv.is_warn isWarn,tdv.create_time createTime,sd.dict_name deviceType
|
||||
from tb_pro_bd bd
|
||||
INNER join tb_bd_device bdd on bdd.bd_id=bd.id and bdd.del_flage=0
|
||||
LEFT JOIN sys_dict sd on sd.dict_code=bdd.devic_type
|
||||
left join tb_device_detail tdd on tdd.device_id=bdd.device_id and tdd.del_flag=0
|
||||
left join tb_device_value tdv on tdd.id=tdv.attribute_id
|
||||
where tdd.mode_name is not null and sd.dict_code=#{typeCode}
|
||||
and bd.bid_code=#{bidCode}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue