Explorar el Código

气瓶提示500
报警未处理数量查询

hanzhiwei hace 2 años
padre
commit
635b116bc0

+ 1 - 1
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/controller/DbStockController.java

@@ -84,7 +84,7 @@ public class DbStockController extends AbstractController {
         //验证信标
         long count1 = dbStockService.count(new LambdaQueryWrapper<DbStock>().eq(DbStock::getBeaconTag, dbStockBo.getBeaconTag()));
         if (count1 > 0) {
-            return ResultData.success("当前信标已绑定!");
+            return ResultData.fail("当前信标已绑定!");
         }
         //查询实验室所在学院
         ResultData<List<CheckSubjectDto>> resultData = remoteLaboratoryService.findSubjectInfoList(String.valueOf(dbStockBo.getSubjectId()));

+ 14 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/WarningNoticeLogController.java

@@ -4,6 +4,7 @@ import cn.hutool.core.date.LocalDateTimeUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.zd.airbottle.api.feign.RemoteAirBottleService;
+import com.zd.common.core.security.TokenService;
 import com.zd.common.core.utils.StringUtils;
 import com.zd.common.core.web.controller.AbstractController;
 import com.zd.laboratory.api.dto.WarningNoticeLogDto;
@@ -226,4 +227,17 @@ public class WarningNoticeLogController extends AbstractController {
         return ResultData.success(records);
     }
 
+    @GetMapping("/getDisposeCount")
+    @ApiOperation("查询预警通知气瓶未处理数量")
+    public ResultData getDisposeCount() {
+        LambdaQueryWrapper<WarningNoticeLog> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(WarningNoticeLog::getWarningType, 3);
+//        queryWrapper.eq(WarningNoticeLog::getCollegeId, tokenService.getLoginUser().getSysUser().getDeptId());
+        queryWrapper.eq(WarningNoticeLog::getDispose,0);
+        queryWrapper.eq(WarningNoticeLog::getIsDeleted, Boolean.FALSE);
+        queryWrapper.orderByDesc(WarningNoticeLog::getId);
+        long count = warningNoticeLogService.count(queryWrapper);
+        return ResultData.success(count);
+    }
+
 }