소스 검색

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

hexiao 2 년 전
부모
커밋
2524d36a5c

+ 1 - 0
hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseCameraManagementController.java

@@ -249,6 +249,7 @@ public class BaseCameraManagementController extends BaseController {
         List<Object> list = new ArrayList<>();
         list.add(baseRailwayManagement.getRailwayName());
         list.add(AppendUtils.stringAppend(baseCameraManagement.getInstallMile()));
+        list.add(baseCameraManagement.getLineDir());
         list.add(baseCameraManagement.getCameraCode());
         list.add(baseDeviceDynamicManagement.getElectricity());
         SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

+ 5 - 4
hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/MsgAlarmController.java

@@ -84,7 +84,7 @@ public class MsgAlarmController extends BaseController {
     @ApiOperation(value = "报警信息分页")
     @PostMapping("/list")
     public AjaxResult selectMsgAlarm(@RequestBody MsgAlarmVo msgAlarmVo) {
-        BaseCameraManagement baseCameraManagement=new BaseCameraManagement();
+        List<BaseCameraManagement> baseCameraManagementList=new ArrayList<>();
         LambdaQueryWrapper<BaseCameraManagement> wrapper = new LambdaQueryWrapper<BaseCameraManagement>();
         if (!ObjectUtils.isEmpty(msgAlarmVo.getRailwayCode())) {
             wrapper.eq(BaseCameraManagement::getRailwayCode, msgAlarmVo.getRailwayCode());
@@ -96,14 +96,15 @@ public class MsgAlarmController extends BaseController {
             wrapper.le(BaseCameraManagement::getEndMile, msgAlarmVo.getEndMile());
         }
         if (!ObjectUtils.isEmpty(msgAlarmVo.getRailwayCode())||!ObjectUtils.isEmpty(msgAlarmVo.getBeginMile())||!ObjectUtils.isEmpty(msgAlarmVo.getEndMile())) {
-            baseCameraManagement = baseCameraManagementService.getOne(wrapper);
+            baseCameraManagementList = baseCameraManagementService.list(wrapper);
         }
         LambdaQueryWrapper<MsgAlarm> lw = new LambdaQueryWrapper<MsgAlarm>();
         if (!ObjectUtils.isEmpty(msgAlarmVo.getLineDir())) {
             lw.eq(MsgAlarm::getLineDir, msgAlarmVo.getLineDir());
         }
-        if (!ObjectUtils.isEmpty(baseCameraManagement.getCameraCode())) {
-            lw.eq(MsgAlarm::getCameraCode, baseCameraManagement.getCameraCode());
+        if (baseCameraManagementList.size()>0) {
+            List<String> collect = baseCameraManagementList.stream().map(BaseCameraManagement::getCameraCode).collect(Collectors.toList());
+            lw.in(MsgAlarm::getCameraCode, collect);
         }
         if (!ObjectUtils.isEmpty(msgAlarmVo.getAlarmType())) {
             lw.eq(MsgAlarm::getAlarmType, msgAlarmVo.getAlarmType());

+ 5 - 5
hazard-sdk/pom.xml

@@ -31,11 +31,11 @@
             <artifactId>druid-spring-boot-starter</artifactId>
             <version>1.2.15</version>
         </dependency>
-        <!-- 系统模块-->
-        <dependency>
-            <groupId>com.ozs</groupId>
-            <artifactId>base-system</artifactId>
-        </dependency>
+<!--        &lt;!&ndash; 系统模块&ndash;&gt;-->
+<!--        <dependency>-->
+<!--            <groupId>com.ozs</groupId>-->
+<!--            <artifactId>base-system</artifactId>-->
+<!--        </dependency>-->
         <!-- 业务代码-->
         <dependency>
             <groupId>com.ozs</groupId>

+ 10 - 10
hazard-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -19,7 +19,7 @@ import com.ozs.service.service.BaseDeviceDynamicManagementService;
 import com.ozs.service.service.MsgAlarmFrequencyService;
 import com.ozs.service.service.MsgAlarmService;
 import com.ozs.service.service.SvcAddressService;
-import com.ozs.system.service.ISysUserService;
+//import com.ozs.system.service.ISysUserService;
 import com.ozs.vo.ReqDeviceVo;
 import com.ozs.vo.ReqMsgAlarmVo;
 import com.ozs.vo.RespGeoHazardMonitorVo;
@@ -67,8 +67,8 @@ public class GeoHazardMonitorTokenController {
     SvcAddressService svcAddressService;
     @Autowired
     BaseCameraManagementService baseCameraManagementService;
-    @Autowired
-    private ISysUserService userService;
+//    @Autowired
+//    private ISysUserService userService;
 
 
     /**
@@ -148,7 +148,7 @@ public class GeoHazardMonitorTokenController {
             }
             MsgAlarm alarm = msgAlarmService.getOne(lw);
             log.info("alarm:{}", alarm);
-            SysUser sysUser = userService.selectUserById(1L);
+//            SysUser sysUser = userService.selectUserById(1L);
             if (ObjectUtils.isEmpty(alarm)) {
                 MsgAlarm msgAlarm = new MsgAlarm();
                 BeanUtils.copyProperties(reqMsgAlarmVo, msgAlarm);
@@ -160,8 +160,8 @@ public class GeoHazardMonitorTokenController {
                     buffer.append(";");
                 }
                 msgAlarm.setImageUrl(buffer.toString());
-                msgAlarm.setCreateBy(sysUser.getUserId());
-                msgAlarm.setUpdateBy(sysUser.getUserId());
+//                msgAlarm.setCreateBy(sysUser.getUserId());
+//                msgAlarm.setUpdateBy(sysUser.getUserId());
                 msgAlarm.setAlarmMile(baseCameraManagement.getInstallMile());
                 msgAlarm.setAlarmTime(new Date(reqMsgAlarmVo.getAlarmTime()));
                 msgAlarmService.save(msgAlarm);
@@ -179,8 +179,8 @@ public class GeoHazardMonitorTokenController {
                     buffer.append(";");
                 }
                 msgAlarmVice.setImageUrl(buffer.toString());
-                msgAlarmVice.setCreateBy(sysUser.getUserId());
-                msgAlarmVice.setUpdateBy(sysUser.getUserId());
+//                msgAlarmVice.setCreateBy(sysUser.getUserId());
+//                msgAlarmVice.setUpdateBy(sysUser.getUserId());
                 msgAlarmFrequencyService.save(msgAlarmVice);
                 respMsgAlarmVo.setAlarmId(reqMsgAlarmVo.getAlarmId());
                 respMsgAlarmVo.setCameraCode(reqMsgAlarmVo.getAlarmCamera());
@@ -223,12 +223,12 @@ public class GeoHazardMonitorTokenController {
                 jsonObject.put("message", "信息编码为空!");
                 return SM4Utils.encryptData_ECB(JSONObject.toJSONString(jsonObject), "4370780c9a8c43e5");
             }
-            SysUser sysUser = userService.selectUserById(1L);
+//            SysUser sysUser = userService.selectUserById(1L);
             lw.eq(BaseDeviceDynamicManagement::getCameraCode, reqDeviceVo.getCameraCode());
             BaseDeviceDynamicManagement baseDynamicManagement = baseDeviceDynamicManagementService.getOne(lw);
             baseDynamicManagement.setElectricity(reqDeviceVo.getElectricity());
             baseDynamicManagement.setUpdateTime(new Date(reqDeviceVo.getTime()));
-            baseDynamicManagement.setUpdateBy(sysUser.getUserId());
+//            baseDynamicManagement.setUpdateBy(sysUser.getUserId());
             log.info("reqDeviceVo:{}", baseDynamicManagement);
             if (baseDeviceDynamicManagementService.updateById(baseDynamicManagement)) {
                 jsonObject.put("resultCode", 1);