Browse Source

fix:修改返回字段

zhongwei
wangyinsheng 2 months ago
parent
commit
1d4065d993
  1. 4
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/DeviceAttrDTO.java
  2. 4
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/DeviceFuncDTO.java
  3. 6
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/DataInstructService.java
  4. 6
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/DataRecordService.java

4
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/DeviceAttrDTO.java

@ -12,6 +12,10 @@ public class DeviceAttrDTO {
@JsonProperty("item_id")
private String itemId;
@ApiModelProperty("itemName")
@JsonProperty("item_name")
private String itemName;
@ApiModelProperty("站点名称")
@JsonProperty("station_name")
private String stationName;

4
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/DeviceFuncDTO.java

@ -12,6 +12,10 @@ public class DeviceFuncDTO {
@JsonProperty("item_id")
private String itemId;
@ApiModelProperty("itemName")
@JsonProperty("item_name")
private String itemName;
@ApiModelProperty("站点名称")
@JsonProperty("station_name")
private String stationName;

6
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/DataInstructService.java

@ -64,6 +64,12 @@ public class DataInstructService extends BaseServiceImpl<DataInstructMapper, Dat
deviceFuncDTO.setYkName(deviceFunc.getName());
deviceFuncDTO.setStationName(deviceFunc.getProjectName());
deviceFuncDTO.setStationId(deviceFunc.getProjectId());
String stationName = deviceFuncDTO.getStationName() == null ? "" : deviceFuncDTO.getStationName();
String deviceName = deviceFuncDTO.getDeviceName() == null ? "" : deviceFuncDTO.getDeviceName();
String recordName = deviceFuncDTO.getYkName() == null ? "" : deviceFuncDTO.getYkName();
deviceFuncDTO.setItemName(new StringBuffer(stationName)
.append(" ").append(deviceName)
.append(" ").append(recordName).toString());
deviceFuncDTOS.add(deviceFuncDTO);
}
}

6
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/DataRecordService.java

@ -91,6 +91,12 @@ public class DataRecordService extends BaseServiceImpl<DataRecordMapper, DataRec
deviceAttrDTO.setStationId(deviceAttr.getProjectId());
deviceAttrDTO.setRecordName(deviceAttr.getName());
deviceAttrDTO.setItemId(deviceAttr.getSignage());
String stationName = deviceAttrDTO.getStationName() == null ? "" : deviceAttrDTO.getStationName();
String deviceName = deviceAttrDTO.getDeviceName() == null ? "" : deviceAttrDTO.getDeviceName();
String recordName = deviceAttrDTO.getRecordName() == null ? "" : deviceAttrDTO.getRecordName();
deviceAttrDTO.setItemName(new StringBuffer(stationName)
.append(" ").append(deviceName)
.append(" ").append(recordName).toString());
deviceAttrDTO.setRule(deviceAttr.getRule());
deviceAttrDTOS.add(deviceAttrDTO);
}

Loading…
Cancel
Save