修改数据查询

This commit is contained in:
haozq 2024-04-19 14:06:40 +08:00
parent 18310e5b9e
commit cfdd2ee1b7
20 changed files with 198 additions and 95 deletions

View File

@ -62,7 +62,7 @@ public class SysPasswordService
throw new ServiceException("用户不存在/密码错误",201); throw new ServiceException("用户不存在/密码错误",201);
} else { } else {
redisService.deleteObject(username); // redisService.deleteObject(username);
clearLoginRecordCache(username); clearLoginRecordCache(username);
} }
} }

View File

@ -75,7 +75,7 @@ public class AesCbcUtils {
} }
public static void main(String[] args) { public static void main(String[] args) {
// String json="username=guest&password=admin@123"; // String json="";
String json="{\"username\":\"guest\",\"password\":\"admin@123\"}"; String json="{\"username\":\"guest\",\"password\":\"admin@123\"}";
String data=encrypt(json); String data=encrypt(json);
System.err.println(data); System.err.println(data);

View File

@ -24,6 +24,7 @@ public class AlarmMgeDto extends ScreenParamDto {
@ApiModelProperty(value = "告警类型") @ApiModelProperty(value = "告警类型")
private String warnType; private String warnType;
@ApiModelProperty(value = "状态") @ApiModelProperty(value = "状态")
private String status; private String status;
@ -32,5 +33,6 @@ public class AlarmMgeDto extends ScreenParamDto {
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remark; private String remark;
@ApiModelProperty(value = "告警内容")
private String warnContent;
} }

View File

@ -2,6 +2,7 @@ package com.securitycontrol.entity.screen.dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.scheduling.support.SimpleTriggerContext;
/** /**
* 告警管理 * 告警管理
@ -36,4 +37,19 @@ public class ConstructionQualityDto extends ScreenParamDto {
@ApiModelProperty(value = "施工工艺") @ApiModelProperty(value = "施工工艺")
private String construction; private String construction;
@ApiModelProperty(value = "设备名称")
private String deviceName;
@ApiModelProperty(value = "时间")
private String times;
@ApiModelProperty(value = "开始时间")
private String startTime;
@ApiModelProperty(value = "结束时间")
private String endTime;
@ApiModelProperty(value = "检测属性")
private String moduleName;
} }

View File

@ -11,24 +11,48 @@ import org.hibernate.validator.constraints.Length;
*/ */
@Data @Data
public class AlarmMgeVo { public class AlarmMgeVo {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private String warnId; private String warnId;
@ApiModelProperty(value = "告警内容") @ApiModelProperty(value = "告警内容")
private String warnContent; private String warnContent;
@ApiModelProperty(value = "建管单位名称") @ApiModelProperty(value = "建管单位名称")
private String orgName; private String orgName;
@ApiModelProperty(value = "建管单位id") @ApiModelProperty(value = "建管单位id")
private String orgId; private String orgId;
@ApiModelProperty(value = "工程id") @ApiModelProperty(value = "工程id")
private String proId; private String proId;
@ApiModelProperty(value = "工程名称") @ApiModelProperty(value = "工程名称")
private String proName; private String proName;
@ApiModelProperty(value = "班组id") @ApiModelProperty(value = "班组id")
private String teamId; private String teamId;
@ApiModelProperty(value = "班组名称") @ApiModelProperty(value = "班组名称")
private String teamName; private String teamName;
@ApiModelProperty(value = "班组长名称") @ApiModelProperty(value = "班组长名称")
private String teamLeader; private String teamLeader;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "处理人")
private String userName;
@ApiModelProperty(value = "状态 0未处理 1 告警 2 未告警")
private String status;
@ApiModelProperty(value = "处理时间")
private String updateTime;
@ApiModelProperty(value = "处理时间")
private String warnTime;
} }

View File

@ -49,6 +49,9 @@ public class ConstructionQualityVo {
@ApiModelProperty(value = "合格次数") @ApiModelProperty(value = "合格次数")
private String qualificationNumber; private String qualificationNumber;
@ApiModelProperty(value = "检测名称")
private String moduleName;
@ApiModelProperty(value = "变化值") @ApiModelProperty(value = "变化值")
private String changeVal; private String changeVal;
@ -61,6 +64,9 @@ public class ConstructionQualityVo {
@ApiModelProperty(value = "施工工艺") @ApiModelProperty(value = "施工工艺")
private String construction; private String construction;
@ApiModelProperty(value = "告警时间")
private String warnTime;

View File

@ -1,32 +1,19 @@
package com.securitycontrol.background.controller; package com.securitycontrol.background.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.securitycontrol.background.service.IProService;
import com.securitycontrol.common.core.utils.ExcelStyleUtil;
import com.securitycontrol.common.log.annotation.Log;
import com.securitycontrol.common.log.enums.OperationType;
import com.securitycontrol.entity.system.base.dto.ProDto;
import com.securitycontrol.entity.system.base.vo.ProVo;
import com.securitycontrol.system.export.entity.ProExportVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.util.IOUtils; import org.apache.poi.util.IOUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
/** /**
* @authorcwchen * @authorcwchen

View File

@ -30,6 +30,7 @@ public class ConstructionQualityController extends BaseController {
@Resource(name = "ConstructionQualityService") @Resource(name = "ConstructionQualityService")
private ConstructionQualityService service; private ConstructionQualityService service;
@RequestMapping(value = "/qualityInspection", method = RequestMethod.POST) @RequestMapping(value = "/qualityInspection", method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "施工质量-质量检测设备") @ApiOperation(value = "施工质量-质量检测设备")
@ -50,6 +51,7 @@ public class ConstructionQualityController extends BaseController {
List<ConstructionQualityVo> list = service.getDetectionRecord(dto); List<ConstructionQualityVo> list = service.getDetectionRecord(dto);
return AjaxResult.success(list); return AjaxResult.success(list);
} catch (Exception e) { } catch (Exception e) {
log.error(e.toString(),e);
return AjaxResult.error(); return AjaxResult.error();
} }
} }
@ -59,7 +61,6 @@ public class ConstructionQualityController extends BaseController {
@Log(title = "告警内容", menu = "告警内容->告警内容", grade = OperationType.QUERY_BUSINESS, details = "查询告警内容", type = "业务日志") @Log(title = "告警内容", menu = "告警内容->告警内容", grade = OperationType.QUERY_BUSINESS, details = "查询告警内容", type = "业务日志")
public TableDataInfo getConstructionAlarm(ConstructionQualityDto dto) { public TableDataInfo getConstructionAlarm(ConstructionQualityDto dto) {
try{ try{
startLayPage();
List<ConstructionQualityVo> list = service.getConstructionAlarm(dto); List<ConstructionQualityVo> list = service.getConstructionAlarm(dto);
return getDataTableLayui(list); return getDataTableLayui(list);
}catch (Exception e){ }catch (Exception e){
@ -82,4 +83,19 @@ public class ConstructionQualityController extends BaseController {
} }
} }
@ApiOperation(value = "施工质量-施工质量历史数据列表")
@GetMapping("getHistoryList")
@Log(title = "施工质量列表", menu = "施工质量列表->施工质量列表", grade = OperationType.QUERY_BUSINESS, details = "查询施工质量历史数据", type = "业务日志")
public TableDataInfo getHistoryList(ConstructionQualityDto dto) {
try{
startLayPage();
List<ConstructionQualityVo> list = service.getHistoryList(dto);
return getDataTableLayui(list);
}catch (Exception e){
log.error(e.toString(),e);
return getDataTableBadLayui(new ArrayList<>(),"请求出错了");
}
}
} }

View File

@ -29,8 +29,12 @@ public class OperatingController extends BaseController {
@Resource(name = "OperatingService") @Resource(name = "OperatingService")
private OperatingService service; private OperatingService service;
@RequestMapping(value = "/RealTimeMonitoring", method = RequestMethod.POST) @RequestMapping(value = "/RealTimeMonitoring", method = RequestMethod.POST)
@ApiOperation(value = "作业环境-实时监测") @ApiOperation(value = "作业环境-实时监测")
@Log(title = "实时监测", menu = "作业环境->实时监测", grade = OperationType.QUERY_BUSINESS, details = "查询实时检测", type = "业务日志")
public AjaxResult getRealTimeMonitoring(@RequestBody OperatingQualityDto dto) { public AjaxResult getRealTimeMonitoring(@RequestBody OperatingQualityDto dto) {
try { try {
List<OperatingQualityVo> list = service.getRealTimeMonitoring(dto); List<OperatingQualityVo> list = service.getRealTimeMonitoring(dto);

View File

@ -76,4 +76,10 @@ public class ScIndexController {
public AjaxResult efficiencyAnalysis(ScreenParamDto dto){ public AjaxResult efficiencyAnalysis(ScreenParamDto dto){
return service.efficiencyAnalysis(dto); return service.efficiencyAnalysis(dto);
} }
@ApiOperation(value = "杆塔集合查询")
@GetMapping("getGtList")
public AjaxResult getGtList(ScreenParamDto dto){
return service.efficiencyAnalysis(dto);
}
} }

View File

@ -51,4 +51,11 @@ public interface ConstructionQualityMapper {
* @date 2024/3/27 19:54 * @date 2024/3/27 19:54
*/ */
List<ConstructionQualityVo> getConstructionQualityList(ConstructionQualityDto dto); List<ConstructionQualityVo> getConstructionQualityList(ConstructionQualityDto dto);
/**
* 查询施工质量设备历史告警信息
* @param dto
* @return
*/
List<ConstructionQualityVo> getHistoryList(ConstructionQualityDto dto);
} }

View File

@ -49,4 +49,10 @@ public interface ConstructionQualityService {
*/ */
List<ConstructionQualityVo> getConstructionQualityList(ConstructionQualityDto dto); List<ConstructionQualityVo> getConstructionQualityList(ConstructionQualityDto dto);
/**
* 查询施工质量历史数据记录
* @param dto
* @return
*/
List<ConstructionQualityVo> getHistoryList(ConstructionQualityDto dto);
} }

View File

@ -39,7 +39,7 @@ public class AlarmMgeServiceImpl implements AlarmMgeService {
try { try {
list = mapper.getAlarmMgeList(dto); list = mapper.getAlarmMgeList(dto);
} catch (Exception e) { } catch (Exception e) {
log.error("获取告警管理列表",e); log.error(e.toString(),e);
} }
return list; return list;
} }
@ -56,7 +56,7 @@ public class AlarmMgeServiceImpl implements AlarmMgeService {
dto.setUserId(user.getUserid()+""); dto.setUserId(user.getUserid()+"");
dto.setUserName(user.getUsername()); dto.setUserName(user.getUsername());
int num= mapper.warnProcess(dto); int num= mapper.warnProcess(dto);
if(num> SystemGlobal.SUCCESS_NUM){ if(num==SystemGlobal.SUCCESS_NUM){
return Result.ok("操作成功","操作成功"); return Result.ok("操作成功","操作成功");
} }
return Result.fail("操作失败"); return Result.fail("操作失败");

View File

@ -1,5 +1,6 @@
package com.securitycontrol.screen.service.impl; package com.securitycontrol.screen.service.impl;
import com.securitycontrol.common.core.utils.aes.StringHelper;
import com.securitycontrol.entity.screen.dto.ConstructionQualityDto; import com.securitycontrol.entity.screen.dto.ConstructionQualityDto;
import com.securitycontrol.entity.screen.vo.ConstructionQualityVo; import com.securitycontrol.entity.screen.vo.ConstructionQualityVo;
import com.securitycontrol.screen.mapper.ConstructionQualityMapper; import com.securitycontrol.screen.mapper.ConstructionQualityMapper;
@ -74,6 +75,30 @@ public class ConstructionQualityImpl implements ConstructionQualityService {
return list; return list;
} }
/**
* 查询施工质量历史数据信息
* @param dto
* @return
*/
@Override
public List<ConstructionQualityVo> getHistoryList(ConstructionQualityDto dto) {
List<ConstructionQualityVo> list = new ArrayList<>();
try{
if(StringHelper.isNotEmpty(dto.getTimes())){
dto.setStartTime(dto.getTimes().split(" - ")[0]);
dto.setEndTime(dto.getTimes().split(" - ")[1]);
}
list = mapper.getHistoryList(dto);
}catch (Exception e){
log.error(e.toString(),e);
}
return list;
}
/** /**
* 施工质量-检测记录对比 * 施工质量-检测记录对比
* @param dto * @param dto

View File

@ -9,29 +9,24 @@
<select id="getAlarmMgeList" resultType="com.securitycontrol.entity.screen.vo.AlarmMgeVo"> <select id="getAlarmMgeList" resultType="com.securitycontrol.entity.screen.vo.AlarmMgeVo">
SELECT tw.warn_id as warnId, SELECT tw.warn_id as warnId,
sb.city_name AS orgName, sb.city_name AS orgName,tw.warn_time warnTime,
sb.org_id AS orgId, sb.org_id AS orgId, tp.pro_id as proId,
tp.pro_id as proId, tp.pro_name as proName, tw.warn_content as warnContent,
tp.pro_name as proName,
tw.warn_content as warnContent,
twt.team_id as teamId, twt.team_id as teamId,
twt.team_name as teamName, twt.team_name as teamName,tdd.mode_name module ,td.device_name deviceName,
twt.team_leader as teamLeader twt.team_leader as teamLeader,su.update_time updateTime,
su.login_name userName, tw.remark,tw.`status`
FROM tb_warn tw FROM tb_warn tw
LEFT JOIN tb_device_detail tdd on tw.attribute_id=tdd.id
LEFT JOIN tb_bd_device td on tdd.device_id=td.device_id
LEFT JOIN sys_user su on su.user_id=tw.user_id
LEFT JOIN sys_build sb ON sb.org_id = tw.org_id LEFT JOIN sys_build sb ON sb.org_id = tw.org_id
LEFT JOIN tb_project tp ON tp.bid_code = tw.bid_code LEFT JOIN tb_project tp ON tp.bid_code = tw.bid_code
LEFT JOIN tb_work_team twt ON twt.team_id = tw.team_id LEFT JOIN tb_work_team twt ON twt.team_id = tw.team_id
where tw.bid_code = #{bidCode} and tw.warn_type = #{warnType} where tw.bid_code = #{bidCode} and tw.warn_type = #{warnType}
<if test="orgId !=null and orgId!=''"> <if test="warnContent!=null and warnContent!=''">
AND sb.org_id = #{orgId} and tw.warn_content like concat('%',#{warnContent},'%')
</if>
<if test="proName !=null and proName!=''">
AND tp.pro_name LIKE concat('%',#{proName},'%')
</if>
<if test="teamLeader !=null and teamLeader!=''">
AND twt.team_leader LIKE concat('%',#{teamLeader},'%')
</if> </if>
order by tw.warn_time desc
</select> </select>
</mapper> </mapper>

View File

@ -9,7 +9,7 @@
DATE_FORMAT(thdv.create_time,'%Y-%m') as month, DATE_FORMAT(thdv.create_time,'%Y-%m') as month,
SUM(CASE WHEN thdv.is_warn = 1 THEN 1 ELSE 0 END) as qualificationNumber SUM(CASE WHEN thdv.is_warn = 1 THEN 1 ELSE 0 END) as qualificationNumber
FROM tb_his_device_value thdv FROM tb_his_device_value thdv
LEFT JOIN tb_device_detail tdd ON thdv.id = tdd.id LEFT JOIN tb_device_detail tdd ON thdv.attribute_id = tdd.id
LEFT JOIN tb_bd_device tbd ON tdd.device_id = tbd.device_id LEFT JOIN tb_bd_device tbd ON tdd.device_id = tbd.device_id
LEFT JOIN tb_pro_bd tpb ON tbd.bd_id = tpb.id LEFT JOIN tb_pro_bd tpb ON tbd.bd_id = tpb.id
WHERE tpb.bid_code = #{bidCode} and DATE_FORMAT(thdv.create_time,'%Y-%m') = #{month} WHERE tpb.bid_code = #{bidCode} and DATE_FORMAT(thdv.create_time,'%Y-%m') = #{month}
@ -25,12 +25,15 @@
</select> </select>
<!--施工质量-告警内容--> <!--施工质量-告警内容-->
<select id="getConstructionAlarm" resultType="com.securitycontrol.entity.screen.vo.ConstructionQualityVo"> <select id="getConstructionAlarm" resultType="com.securitycontrol.entity.screen.vo.ConstructionQualityVo">
SELECT select tbd.device_name deviceName,
# tw.warn_id AS warningId, tw.warn_content AS warningContent,
tw.warn_content AS warningContent tw.warn_time warnTime
FROM tb_warn tw FROM tb_warn tw
LEFT JOIN tb_bd_device tbd ON tw.device_id = tbd.device_id LEFT JOIN tb_bd_device tbd ON tw.device_id = tbd.device_id
where tw.bid_code = #{bidCode} and tbd.devic_type = 1906 where tw.bid_code = #{bidCode} and tbd.devic_type = 1906
<if test="deviceId!=null and deviceId!=''">
AND tbd.device_id=#{deviceId}
</if>
</select> </select>
<!--施工质量-质量检测设备--> <!--施工质量-质量检测设备-->
@ -49,39 +52,45 @@
LEFT JOIN tb_device_detail tdd ON tdd.device_id = tbd.device_id LEFT JOIN tb_device_detail tdd ON tdd.device_id = tbd.device_id
LEFT JOIN tb_device_value tdv ON tdd.id = tdv.attribute_id LEFT JOIN tb_device_value tdv ON tdd.id = tdv.attribute_id
WHERE WHERE
tbd.devic_type = 1906 and tpb.bid_code = #{bidCode} and tbd.device_code = 1906001 tbd.devic_type =1906 and tpb.bid_code = #{bidCode}
</select> </select>
<select id="getConstructionQualityList" <select id="getConstructionQualityList"
resultType="com.securitycontrol.entity.screen.vo.ConstructionQualityVo"> resultType="com.securitycontrol.entity.screen.vo.ConstructionQualityVo">
SELECT SELECT tbd.device_name deviceName,tdd.mode_name moduleName,tdv.val,tdv.change_val,ta.area_name areaName,
thdv.val as val, tpb.bd_name ,tdv.create_time createTime,tdv.is_warn isWarn
thdv.create_time as createTime, FROM tb_bd_device tbd
thdv.is_warn as isWarn, LEFT JOIN tb_area ta on tbd.area_id=ta.area_id
tdd.max_value as maxVal, left join tb_device_detail tdd on tbd.device_id=tdd.device_id
tbd.devic_type as devicType, left join tb_device_value tdv on tdd.id=tdv.attribute_id
tbd.device_name as deviceName, left join tb_pro_bd tpb on tpb.id=tbd.bd_id
ta.area_name as areaName WHERE tpb.bid_code = #{bidCode}
FROM tb_his_device_value thdv and tbd.devic_type = 1906
LEFT JOIN tb_device_detail tdd ON thdv.id = tdd.id <if test="deviceId!=null and deviceId!=''">
LEFT JOIN tb_bd_device tbd ON tdd.device_id = tbd.device_id AND tbd.device_id=#{deviceId}
LEFT JOIN tb_pro_bd tpb ON tbd.bd_id = tpb.id </if>
LEFT JOIN tb_area ta ON tbd.area_id = ta.area_id <if test="moduleName!=null and moduleName!=''">
WHERE AND tdd.mode_name like concat('%',#{moduleName},'%')
tpb.bid_code = #{bidCode} </if>
<if test="month != null and month != ''">
AND DATE_FORMAT(thdv.create_time,'%Y-%m-%d') = #{month} </select>
<select id="getHistoryList" resultType="com.securitycontrol.entity.screen.vo.ConstructionQualityVo">
SELECT tbd.device_name deviceName,tdd.mode_name moduleName,tdv.val,tdv.change_val,ta.area_name areaName,
tpb.bd_name ,tdv.create_time createTime,tdv.is_warn isWarn,tdd.id,unit
FROM tb_bd_device tbd
LEFT JOIN tb_area ta on tbd.area_id=ta.area_id
left join tb_device_detail tdd on tbd.device_id=tdd.device_id
left join tb_his_device_value tdv on tdd.id=tdv.attribute_id
left join tb_pro_bd tpb on tpb.id=tbd.bd_id
WHERE
tbd.devic_type = 1906 and tdv.val is not null and tpb.bid_code = #{bidCode}
<if test="deviceName!=null and deviceName!=''">
AND tbd.device_name like concat('%',#{deviceName},'%')
</if>
<if test="times!=null and times!=''">
and tdv.create_time BETWEEN #{startTime} AND #{endTime}
</if> </if>
<choose>
<when test="construction != null and construction != ''">
AND tbd.device_code = #{construction}
</when>
<otherwise>
AND tbd.device_code IN ('1906002', '1906003', '1906004')
</otherwise>
</choose>
</select> </select>
</mapper> </mapper>

View File

@ -29,7 +29,7 @@
FROM tb_device_detail tdd FROM tb_device_detail tdd
LEFT JOIN tb_his_device_value thdv ON tdd.id = thdv.attribute_id LEFT JOIN tb_his_device_value thdv ON tdd.id = thdv.attribute_id
WHERE tdd.device_id = #{deviceId} AND tdd.id = #{id} and tdd.del_flag = '0' WHERE tdd.device_id = #{deviceId} AND tdd.id = #{id} and tdd.del_flag = '0'
ORDER BY thdv.create_time DESC ORDER BY thdv.create_time ASC
</select> </select>
<select id="getRealTimeAlarmList" resultType="com.securitycontrol.entity.screen.vo.TowerAssInspectVo"> <select id="getRealTimeAlarmList" resultType="com.securitycontrol.entity.screen.vo.TowerAssInspectVo">
@ -39,7 +39,7 @@
<select id="getHistoryList" resultType="com.securitycontrol.entity.screen.vo.TowerAssInspectVo"> <select id="getHistoryList" resultType="com.securitycontrol.entity.screen.vo.TowerAssInspectVo">
SELECT ta.area_name as areaName,tdd.mode_name as modeName, thdv.val , SELECT ta.area_name as areaName,tdd.mode_name as modeName, thdv.val ,
tdd.change_val as thisChangeVal, thdv.change_val as changeVal,tdd.update_time as updateTime, thdv.change_val as changeVal,tdd.update_time as updateTime,
case when thdv.is_warn = '0' then '未告警' else '告警' end isWarn case when thdv.is_warn = '0' then '未告警' else '告警' end isWarn
FROM tb_device_detail tdd FROM tb_device_detail tdd
LEFT JOIN tb_bd_device tbd ON tdd.device_id = tbd.device_id LEFT JOIN tb_bd_device tbd ON tdd.device_id = tbd.device_id

View File

@ -7,14 +7,14 @@
(SELECT '0' AS id,'球机' AS title, '-1' AS parentId,'0' AS onLine,'1' AS level) (SELECT '0' AS id,'球机' AS title, '-1' AS parentId,'0' AS onLine,'1' AS level)
UNION ALL UNION ALL
( (
SELECT CONCAT('QJ',td.device_code) AS id, SELECT CONCAT('QJ',tcm.puid) AS id,
td.device_name AS title, tcm.pro_name AS title,
'0' AS parentId, '0' AS parentId,
on_line AS onLine, IFNULL(on_line,0) AS onLine,
'2' AS level '2' AS level
FROM tb_device td FROM t_class_metting tcm
INNER JOIN t_class_metting tcm on td.device_code = tcm.puid AND tcm.work_day = CURRENT_DATE left JOIN tb_device td on td.device_code = tcm.puid AND td.del_flag=0
WHERE td.del_flag = 0 WHERE tcm.del_flag = 0 AND tcm.work_day = CURRENT_DATE AND TCM.puid is not null
<if test="param!=null and param!=''"> <if test="param!=null and param!=''">
AND INSTR(td.device_name,#{param}) > 0 AND INSTR(td.device_name,#{param}) > 0
</if> </if>

View File

@ -136,7 +136,7 @@
FROM sys_dict sd FROM sys_dict sd
LEFT JOIN sys_dict sd2 ON sd.dict_code = sd2.p_code AND sd2.del_flag = 0 LEFT JOIN sys_dict sd2 ON sd.dict_code = sd2.p_code AND sd2.del_flag = 0
WHERE sd.dict_code = '9990' AND sd.del_flag = 0 WHERE sd.dict_code = '9990' AND sd.del_flag = 0
ORDER BY sd2.dict_sort ORDER BY sd2.dict_sort DESC
</select> </select>
<select id="getGtLists" resultType="com.securitycontrol.entity.system.vo.SelectVo"> <select id="getGtLists" resultType="com.securitycontrol.entity.system.vo.SelectVo">