2 Commits

Author SHA1 Message Date
xy
7277299c66 新增数据 2025-06-24 11:32:37 +08:00
xy
49642066f5 bug调整 2025-06-19 09:39:44 +08:00
2 changed files with 5 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ public class AutoDataDto {
@SerializedName("Code") @SerializedName("Code")
@JsonProperty("Code") @JsonProperty("Code")
@ApiModelProperty("事件码") @ApiModelProperty("事件码")
private Integer code; private String code;
@SerializedName("Data") @SerializedName("Data")
@JsonProperty("Data") @JsonProperty("Data")

View File

@@ -49,16 +49,18 @@ public class CsAlarmServiceImpl extends ServiceImpl<CsEventMapper, CsEventPO> im
public void analysis(AppEventMessage appEventMessage) { public void analysis(AppEventMessage appEventMessage) {
List<CsEventPO> list1 = new ArrayList<>(); List<CsEventPO> list1 = new ArrayList<>();
LocalDateTime eventTime = null; LocalDateTime eventTime = null;
String tag = null; String tag = null, lineId = null;
String id = IdUtil.fastSimpleUUID(); String id = IdUtil.fastSimpleUUID();
//获取装置id //获取装置id
CsEquipmentDeliveryPO po = equipmentFeignClient.findDevByNDid(appEventMessage.getId()).getData(); CsEquipmentDeliveryPO po = equipmentFeignClient.findDevByNDid(appEventMessage.getId()).getData();
try { try {
lineId = appEventMessage.getId() + appEventMessage.getMsg().getClDid();
List<AppEventMessage.DataArray> dataArray = appEventMessage.getMsg().getDataArray(); List<AppEventMessage.DataArray> dataArray = appEventMessage.getMsg().getDataArray();
for (AppEventMessage.DataArray item : dataArray) { for (AppEventMessage.DataArray item : dataArray) {
eventTime = eventService.timeFormat(item.getDataTimeSec(),item.getDataTimeUSec()); eventTime = eventService.timeFormat(item.getDataTimeSec(),item.getDataTimeUSec());
//事件入库 //事件入库
CsEventPO csEvent = new CsEventPO(); CsEventPO csEvent = new CsEventPO();
csEvent.setLineId(lineId);
csEvent.setId(id); csEvent.setId(id);
csEvent.setDeviceId(po.getId()); csEvent.setDeviceId(po.getId());
csEvent.setProcess(po.getProcess()); csEvent.setProcess(po.getProcess());
@@ -91,6 +93,7 @@ public class CsAlarmServiceImpl extends ServiceImpl<CsEventMapper, CsEventPO> im
} }
} catch (Exception e) { } catch (Exception e) {
CsEventLogs csEventLogs = new CsEventLogs(); CsEventLogs csEventLogs = new CsEventLogs();
csEventLogs.setLineId(lineId);
csEventLogs.setDeviceId(po.getId()); csEventLogs.setDeviceId(po.getId());
csEventLogs.setStartTime(eventTime); csEventLogs.setStartTime(eventTime);
csEventLogs.setTag(tag); csEventLogs.setTag(tag);