Commit 33015706 authored by 王晓倩's avatar 王晓倩

泽宏云设备推送接口,用户状态已删除的不接收设备数据。

右上角预警列表只查询用户状态未删除的。
parent 38bea365
......@@ -89,6 +89,7 @@ public class TDetectorReportController extends BaseController
// List<MapResourcesInfo> mapResourcesList = mapResourcesService.selectByExample(example);
TDetectorUser tDetectorUser = new TDetectorUser();
tDetectorUser.setNickName(username);
tDetectorUser.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList = tDetectorUserService.detectorUserList(tDetectorUser);
if(tDetectorUserList.size() == 0){
return AjaxResult.error(1,"查询不到用户名username=" + username);
......@@ -164,6 +165,7 @@ public class TDetectorReportController extends BaseController
// List<MapResourcesInfo> mapResourcesList = mapResourcesService.selectByExample(example);
TDetectorUser tDetectorUser = new TDetectorUser();
tDetectorUser.setNickName(username);
tDetectorUser.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList = tDetectorUserService.detectorUserList(tDetectorUser);
if(tDetectorUserList.size() == 0){
return AjaxResult.error(1,"查询不到用户名username=" + username);
......@@ -220,6 +222,7 @@ public class TDetectorReportController extends BaseController
//用户不存在无操作
TDetectorUser tDetectorUser = new TDetectorUser();
tDetectorUser.setNickName(username);
tDetectorUser.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList = tDetectorUserService.detectorUserList(tDetectorUser);
if(tDetectorUserList.size() == 0){
continue;
......@@ -260,6 +263,7 @@ public class TDetectorReportController extends BaseController
TDetectorUser tDetectorUser1 = new TDetectorUser();
tDetectorUser1.setNickName(sourceUsername);
tDetectorUser1.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList1 = tDetectorUserService.detectorUserList(tDetectorUser1);
if(tDetectorUserList1.size() == 0){
return AjaxResult.error(4,"查询不到原用户名sourceUsername=" + sourceUsername);
......@@ -267,6 +271,7 @@ public class TDetectorReportController extends BaseController
TDetectorUser tDetectorUser2 = new TDetectorUser();
tDetectorUser2.setNickName(targetUsername);
tDetectorUser2.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList2 = tDetectorUserService.detectorUserList(tDetectorUser2);
if(tDetectorUserList2.size() == 0){
return AjaxResult.error(5,"查询不到目标用户名targetUsername=" + targetUsername);
......@@ -351,6 +356,7 @@ public class TDetectorReportController extends BaseController
}
log.info("泽宏设备上报数据===="+tDetectorReportDataForm.toString());
// 查询设备编号,is_del是0
TDetectorInfo detector = tDetectorInfoService.selectTDetectorInfoByCode(tDetectorReportDataForm.getDeviceNo());
if(detector == null){
throw new IOCException(ResultEnum.DETECTOR_NOEXIST);
......
......@@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t_detector_report_data rd
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_detector_user u ON u.user_id = di.user_id
WHERE u.nick_name is not NULL
WHERE u.is_del = '0'
ORDER BY rd.create_time DESC LIMIT 50
</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