Browse Source

查询相机 加行别 条件

sunhh 1 year ago
parent
commit
9ac7f6c071

+ 7 - 1
business-service/src/main/java/com/ozs/service/impl/MsgWebPushServiceImpl.java

@@ -57,7 +57,7 @@ public class MsgWebPushServiceImpl extends ServiceImpl<MsgWebPushMapper, MsgWebP
         if (!StringUtils.isEmpty(webAlarm) && webAlarm.size() > 0) {
             for (MsgAlarm msgAlarm : webAlarm) {
                 LambdaQueryWrapper<BaseRailwayManagement> wrapper = new LambdaQueryWrapper<>();
-                if (!ObjectUtils.isEmpty(msgAlarm.getRailwayCode())) {
+                if (!StringUtils.isEmptySunhh(msgAlarm.getRailwayCode())) {
                     wrapper.eq(BaseRailwayManagement::getRailwayCode, msgAlarm.getRailwayCode());
                 }
                 BaseRailwayManagement baseRailwayManagement = baseRailwayManagementService.getOne(wrapper);
@@ -69,6 +69,9 @@ public class MsgWebPushServiceImpl extends ServiceImpl<MsgWebPushMapper, MsgWebP
                 if (!StringUtils.isEmptySunhh(msgAlarm.getRailwayCode())) {
                     lw.eq(BaseCameraManagement::getRailwayCode, msgAlarm.getRailwayCode());
                 }
+                if (!StringUtils.isEmptySunhh(msgAlarm.getLineDir())) {
+                    lw.eq(BaseCameraManagement::getLineDir, msgAlarm.getLineDir());
+                }
                 if (!StringUtils.isEmptySunhh(msgAlarm.getAlarmMile())) {
                     lw.le(BaseCameraManagement::getBeginMile, msgAlarm.getAlarmMile());
                     lw.gt(BaseCameraManagement::getEndMile, msgAlarm.getAlarmMile());
@@ -129,6 +132,9 @@ public class MsgWebPushServiceImpl extends ServiceImpl<MsgWebPushMapper, MsgWebP
                 if (!StringUtils.isEmptySunhh(o.getRailwayCode())) {
                     lw.eq(BaseCameraManagement::getRailwayCode, o.getRailwayCode());
                 }
+                if (!StringUtils.isEmptySunhh(o.getLineDir())) {
+                    lw.eq(BaseCameraManagement::getLineDir, o.getLineDir());
+                }
                 if (!StringUtils.isEmptySunhh(o.getAlarmMile())) {
                     lw.le(BaseCameraManagement::getBeginMile, o.getAlarmMile());
                     lw.gt(BaseCameraManagement::getEndMile, o.getAlarmMile());

+ 2 - 2
vehicle-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseRailwayManagementController.java

@@ -63,14 +63,14 @@ public class BaseRailwayManagementController extends BaseController {
     @PostMapping("/list")
     @Log(title = "线路台账管理", businessType = BusinessType.SELECT)
     public AjaxResult selectBaseLineManagement(@RequestBody BaseRailwayManagementVo baseRailwayManagementVo) {
-        LambdaQueryWrapper<BaseRailwayManagement> lw = new LambdaQueryWrapper<BaseRailwayManagement>();
+        LambdaQueryWrapper<BaseRailwayManagement> lw = new LambdaQueryWrapper<>();
         if (!StringUtils.isBlank(baseRailwayManagementVo.getRailwayCode())) {
             lw.like(BaseRailwayManagement::getRailwayCode, "%" + baseRailwayManagementVo.getRailwayCode() + "%");
         }
         if (!ObjectUtils.isEmpty(baseRailwayManagementVo.getRailwayType()) && baseRailwayManagementVo.getRailwayType() != 0) {
             lw.eq(BaseRailwayManagement::getRailwayType, baseRailwayManagementVo.getRailwayType());
         }
-        IPage<BaseRailwayManagement> page = baseRailwayManagementService.page(new Page<BaseRailwayManagement>(baseRailwayManagementVo.getPageNum(), baseRailwayManagementVo.getPageSize()), lw);
+        IPage<BaseRailwayManagement> page = baseRailwayManagementService.page(new Page<>(baseRailwayManagementVo.getPageNum(), baseRailwayManagementVo.getPageSize()), lw);
         List<SysDictData> data = dictTypeService.selectDictDataByType("railway_type");
         if (!ObjectUtils.isEmpty(page) && !ObjectUtils.isEmpty(page.getRecords())) {
             List<BaseRailwayManagement> dto1 = page.getRecords().stream().map(o -> {