修改 左侧

master
wangh 1 year ago
parent e901d4177b
commit 64b570c6a1

@ -58,7 +58,7 @@ public class ApiController {
return success(iApiService.queryPram());
}
@ApiOperation(tags = {"60脱水机"}, value = "获取设备状态 1=绿灯 0红灯")
@ApiOperation(tags = {"60脱水机"}, value = "获取设备状态 msg字段")
@GetMapping("/home/queryDeviceState")
public AjaxResult queryDeviceState() {
return success(iApiService.queryDeviceState());

@ -3,6 +3,7 @@ package com.haiwei.web.controller.common;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -95,6 +96,7 @@ public class CommonController
/**
*
*/
@ApiOperation(tags = {"文档归档"}, value = "下载")
@GetMapping("/common/download/resource")
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
throws Exception

@ -15,7 +15,7 @@ import java.util.List;
@Repository
public interface ApiMapper {
List<ParamVo> queryPram();
List<ParamVo> queryDeviceState();
String queryDeviceState();
List<RecordRaramData> queryPramList(@Param("beginTime") Date beginTime,@Param("endTime") Date endTime);
}

@ -13,7 +13,7 @@ import java.util.List;
public interface IApiService {
List<ParamVo> queryPram();
List<ParamVo> queryDeviceState();
String queryDeviceState();
List<RecordRaramData> queryPramList(Date beginTime, Date endTime);
}

@ -25,7 +25,7 @@ public class ApiServiceImpl implements IApiService {
}
@Override
public List<ParamVo> queryDeviceState() {
public String queryDeviceState() {
return mapper.queryDeviceState();
}

@ -22,12 +22,17 @@
left join base_point_info ee on ee.objid = info.EID
where info.Status = 1 order by order_by
</select>
<select id="queryDeviceState" resultType="com.haiwei.manage.domain.ParamVo">
SELECT name,
DataType as data
<select id="queryDeviceState" resultType="string">
SELECT top 1
case
when ID = 1 and DataType = 0 then '停机'
when ID = 1 and DataType = 1 then '运行'
when ID = 1 and DataType = 1 and ID = 2 and DataType = 1 then '故障'
end
FROM EEquipmentState
where PID = 7
</select>
<select id="queryPramList" resultType="com.haiwei.manage.domain.RecordRaramData">

Loading…
Cancel
Save