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")
@JsonProperty("Code")
@ApiModelProperty("事件码")
private Integer code;
private String code;
@SerializedName("Data")
@JsonProperty("Data")

View File

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