|
@@ -549,6 +549,46 @@ public class AlarmEventServiceImpl implements AlarmEventService {
|
|
|
return centereventTEventcatalogue.getEventCode();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String updateFireEventImage(TowerEventVo towerEventVo, String logId) {
|
|
|
+ List<CenterdataTAttach> attachList = new ArrayList<>();
|
|
|
+ String orderCode = SpringUtils.getBean(RemoteMonitorService.class).getOrderCodeByChinaTowerDeviceCode(towerEventVo.getDeviceCode());
|
|
|
+ if (StringUtils.isNotBlank(towerEventVo.getOriginalPictureUrl())) {
|
|
|
+ String[] pictures = towerEventVo.getOriginalPictureUrl().split(",");
|
|
|
+ for (String picture : pictures) {
|
|
|
+ CenterdataTAttach tAttach = new CenterdataTAttach();
|
|
|
+ tAttach.setBusId(logId);
|
|
|
+ tAttach.setAttachPath(GWHttpUtilsTest65.encrypt(picture, orderCode));
|
|
|
+ tAttach.setBusIndx(BUS_INDEX_2);
|
|
|
+ tAttach.setBusSource("TT_1");
|
|
|
+ tAttach.setFileType(FILE_TYPE_1);
|
|
|
+ attachList.add(tAttach);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(towerEventVo.getAlarmPictureUrl())) {
|
|
|
+ String[] pictures = towerEventVo.getAlarmPictureUrl().split(",");
|
|
|
+ for (String picture : pictures) {
|
|
|
+ CenterdataTAttach tAttach = new CenterdataTAttach();
|
|
|
+ tAttach.setBusId(logId);
|
|
|
+ tAttach.setAttachPath(GWHttpUtilsTest65.encrypt(picture, orderCode));
|
|
|
+ tAttach.setBusIndx(BUS_INDEX_2);
|
|
|
+ tAttach.setBusSource("TT_1");
|
|
|
+ tAttach.setFileType(FILE_TYPE_1);
|
|
|
+ attachList.add(tAttach);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(towerEventVo.getAlarmVideoUrl())) {
|
|
|
+ CenterdataTAttach tAttach = new CenterdataTAttach();
|
|
|
+ tAttach.setBusId(logId);
|
|
|
+ tAttach.setAttachPath(GWHttpUtilsTest65.encrypt(towerEventVo.getAlarmVideoUrl(), orderCode));
|
|
|
+ tAttach.setBusIndx(BUS_INDEX_2);
|
|
|
+ tAttach.setBusSource("TT_1");
|
|
|
+ tAttach.setFileType(FILE_TYPE_2);
|
|
|
+ attachList.add(tAttach);
|
|
|
+ }
|
|
|
+ return remoteDataService.delAndInsertBatch(JSON.toJSONString(attachList)).getMsg();
|
|
|
+ }
|
|
|
+
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public String insertSensorEvent(SensorEventVo sensorEventVo) {
|