feat: 根据站码查询单条视频监控设备详情
This commit is contained in:
parent
f03bb3f3dd
commit
368bffb61c
@ -7,9 +7,11 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@ -26,4 +28,10 @@ public class VdMonitorController {
|
||||
public ResponseResult getVmsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(vdMonitorService.getVmsstbprptList(dataSourceRequest));
|
||||
}
|
||||
|
||||
@GetMapping("/msstbprpt/getStcdInfo")
|
||||
@Operation(summary = "根据站码查询单条视频监控设备详情")
|
||||
public ResponseResult getStcdInfo(@RequestParam String stcd) {
|
||||
return ResponseResult.successData(vdMonitorService.getStcdInfo(stcd));
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,4 +7,6 @@ import com.yfd.platform.qgc_env.vd.entity.vo.VdVmsstbprptVo;
|
||||
public interface VdMonitorService {
|
||||
|
||||
DataSourceResult<VdVmsstbprptVo> getVmsstbprptList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
VdVmsstbprptVo getStcdInfo(String stcd);
|
||||
}
|
||||
|
||||
@ -41,6 +41,66 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
return buildDetailResult(dataSourceRequest, loadOptions, filterSql, paramMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VdVmsstbprptVo getStcdInfo(String stcd) {
|
||||
if (StrUtil.isBlank(stcd)) {
|
||||
return null;
|
||||
}
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT ")
|
||||
.append("t.stcd AS stcd, ")
|
||||
.append("t.stnm AS stnm, ")
|
||||
.append("t.mntp AS mntp, ")
|
||||
.append("t.sttpCode AS sttpCode, ")
|
||||
.append("t.sttpName AS sttpName, ")
|
||||
.append("t.sttpFullPath AS sttpFullPath, ")
|
||||
.append("t.rstcd AS rstcd, ")
|
||||
.append("t.ennm AS ennm, ")
|
||||
.append("t.baseId AS baseId, ")
|
||||
.append("t.baseName AS baseName, ")
|
||||
.append("t.hbrvcd AS hbrvcd, ")
|
||||
.append("t.rvcd AS rvcd, ")
|
||||
.append("t.addvcd AS addvcd, ")
|
||||
.append("t.stlc AS stlc, ")
|
||||
.append("t.lgtd AS lgtd, ")
|
||||
.append("t.lttd AS lttd, ")
|
||||
.append("t.elev AS elev, ")
|
||||
.append("t.jcdt AS jcdt, ")
|
||||
.append("t.wddt AS wddt, ")
|
||||
.append("t.dtin AS dtin, ")
|
||||
.append("CASE WHEN NVL(t.dtin, 0) = 1 THEN '已接入' ELSE '未接入' END AS dtinName, ")
|
||||
.append("t.usfl AS usfl, ")
|
||||
.append("t.bldsttCcode AS bldsttCcode, ")
|
||||
.append("CASE ")
|
||||
.append("WHEN t.bldsttCcode IN (1, 10, 11) THEN '已建' ")
|
||||
.append("WHEN t.bldsttCcode IN (2, 7, 8) THEN '在建' ")
|
||||
.append("ELSE '未建/规划' END AS bldsttCcodeName, ")
|
||||
.append("t.stindx AS stindx, ")
|
||||
.append("t.introduce AS introduce, ")
|
||||
.append("t.logo AS logo, ")
|
||||
.append("t.inffile AS inffile, ")
|
||||
.append("t.dtfrqcy AS dtfrqcy, ")
|
||||
.append("t.remark AS remark, ")
|
||||
.append("t.vlsr AS vlsr, ")
|
||||
.append("t.vlsrTm AS vlsrTm, ")
|
||||
.append("t.baseStepSort AS baseStepSort, ")
|
||||
.append("t.rstcdStepSort AS rstcdStepSort, ")
|
||||
.append("t.siteStepSort AS siteStepSort, ")
|
||||
.append("t.sourceTable AS sourceTable ")
|
||||
.append("FROM (")
|
||||
.append(buildVmsstbprptViewSql())
|
||||
.append(") t WHERE t.stcd = #{map.stcd}");
|
||||
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("stcd", stcd);
|
||||
List<VdVmsstbprptVo> list = microservicDynamicSQLMapper.getAllListWithResultType(
|
||||
sql.toString(), paramMap, VdVmsstbprptVo.class);
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return null;
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
private DataSourceResult<VdVmsstbprptVo> buildGroupedResult(DataSourceRequest dataSourceRequest,
|
||||
GroupingInfo[] groups,
|
||||
String filterSql,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user