Kaynağa Gözat

Merge branch 'master' of http://124.70.58.209:3000/ytrd-project-management/VehicleMonitor

gao.qiang 1 yıl önce
ebeveyn
işleme
cef6f67a96

+ 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());

+ 6 - 0
business-service/src/main/resources/mapper/MsgAlarmMapper.xml

@@ -220,6 +220,12 @@
             <if test="alarmMile != null and alarmMile != 0">
                 and alarm_mile = #{alarmMile}
             </if>
+            <if test="beginMile != null and beginMile != 0">
+                and alarm_mile &gt;= #{beginMile}
+            </if>
+            <if test="endMile != null and endMile != 0">
+                and alarm_mile &lt;= #{endMile}
+            </if>
             <if test="isRelease != null and isRelease != 0">
                 and is_release = #{isRelease}
             </if>

+ 5 - 4
vehicle-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseCameraManagementController.java

@@ -849,10 +849,11 @@ public class BaseCameraManagementController extends BaseController {
             if (list.size() > 0) {
                 MsgAlarm msgAlarm = list.get(0);
                 if (StringUtils.isNotEmpty(msgAlarm.getReleasedBy())) {
-                    BaseUser user = baseUserService.getUser(msgAlarm.getReleasedBy());
-                    if (!StringUtils.isEmptySunhh(user) && !StringUtils.isEmptySunhh(user.getNickName())) {
-                        msgAlarm.setReleasedByName(user.getNickName());
-                    }
+//                    BaseUser user = baseUserService.getUser(msgAlarm.getReleasedBy());
+//                    if (!StringUtils.isEmptySunhh(user) && !StringUtils.isEmptySunhh(user.getNickName())) {
+//                        msgAlarm.setReleasedByName(user.getNickName());
+//                    }
+                    msgAlarm.setReleasedByName(msgAlarm.getReleasedBy());
                 }
                 msgAlarmResp.setAlarmType(msgAlarm.getAlarmType());
                 msgAlarmResp.setIsRelease(msgAlarm.getIsRelease());

+ 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 -> {

+ 15 - 12
vehicle-admin/src/main/java/com/ozs/web/controller/accountmanagment/MsgAlarmController.java

@@ -167,10 +167,11 @@ public class MsgAlarmController extends BaseController {
                     o.setRailwayName(baseRailwayManagement.getRailwayName());
                 }
                 if (!StringUtils.isEmptySunhh(o.getReleasedBy())) {
-                    BaseUser user = baseUserService.getUser(o.getReleasedBy());
-                    if (!StringUtils.isEmptySunhh(user) && !StringUtils.isEmptySunhh(user.getNickName())) {
-                        o.setReleasedByName(user.getNickName());
-                    }
+//                    BaseUser user = baseUserService.getUser(o.getReleasedBy());
+//                    if (!StringUtils.isEmptySunhh(user) && !StringUtils.isEmptySunhh(user.getNickName())) {
+//                        o.setReleasedByName(user.getNickName());
+//                    }
+                    o.setReleasedByName(o.getReleasedBy());
                 }
                 String mils = AppendUtils.stringAppend(o.getAlarmMile());
                 o.setAlarmMiles(mils);
@@ -223,10 +224,11 @@ public class MsgAlarmController extends BaseController {
                 o.setRailwayName(baseRailwayManagement.getRailwayName());
             }
             if (StringUtils.isNotEmpty(o.getReleasedBy())) {
-                BaseUser user = baseUserService.getUser(o.getReleasedBy());
-                if (!StringUtils.isEmptySunhh(user) && !StringUtils.isEmptySunhh(user.getNickName())) {
-                    o.setReleasedByName(user.getNickName());
-                }
+//                BaseUser user = baseUserService.getUser(o.getReleasedBy());
+//                if (!StringUtils.isEmptySunhh(user) && !StringUtils.isEmptySunhh(user.getNickName())) {
+//                    o.setReleasedByName(user.getNickName());
+//                }
+                o.setReleasedByName(o.getReleasedBy());
             }
             String mils = AppendUtils.stringAppend(o.getAlarmMile());
             o.setAlarmMiles(mils);
@@ -258,10 +260,11 @@ public class MsgAlarmController extends BaseController {
             MsgAlarmResp msgAlarmResp = new MsgAlarmResp();
             BeanUtils.copyProperties(msgAlarm, msgAlarmResp);
             if (!StringUtils.isEmptySunhh(msgAlarm.getReleasedBy())) {
-                BaseUser user = baseUserService.getUser(msgAlarm.getReleasedBy());
-                if (!StringUtils.isEmptySunhh(user) && !StringUtils.isEmptySunhh(user.getNickName())) {
-                    msgAlarmResp.setReleasedByName(user.getNickName());
-                }
+//                BaseUser user = baseUserService.getUser(msgAlarm.getReleasedBy());
+//                if (!StringUtils.isEmptySunhh(user) && !StringUtils.isEmptySunhh(user.getNickName())) {
+//                    msgAlarmResp.setReleasedByName(user.getNickName());
+//                }
+                msgAlarmResp.setReleasedByName(msgAlarm.getReleasedBy());
             }
             if (!StringUtils.isEmptySunhh(baseRailwayManagement) && !StringUtils.isEmptySunhh(baseRailwayManagement.getRailwayName())) {
                 msgAlarmResp.setRailwayName(baseRailwayManagement.getRailwayName());