Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 8 months ago
parent
commit
a89fb5ea8e
  1. 25
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/SearchStationTypeEnum.java
  2. 14
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java
  3. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java

25
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/SearchStationTypeEnum.java

@ -11,17 +11,20 @@ import java.util.Arrays;
*/ */
@AllArgsConstructor @AllArgsConstructor
public enum SearchStationTypeEnum { public enum SearchStationTypeEnum {
TOTAL("站点总数量",null,"运维平台目前接入站点总数为:%s"), STATION_TOTAL("电站总数量",null,"智能运维平台接入电站总数为:%s"),
HYDROPOWER_TOTAL("水电站总数量","0","运维平台目前接入水电站总数为:%s"), SET_TOTAL("站点总数量",null,"智能运维平台接入站点总数为:%s"),
WIND_POWER_TOTAL("风电场总数量","1","运维平台目前接入风电场总数为:%s"), HYDROPOWER_TOTAL("水电站总数量","0","智能运维平台接入水电站总数为:%s"),
ENERGY_STORAGE_TOTAL("储能站总数量","3","运维平台目前接入储能站总数为:%s"), WIND_POWER_TOTAL("风电场总数量","1","智能运维平台接入风电场总数为:%s"),
PHOTOVOLTAIC_TOTAL("光伏站总数量","5","运维平台目前接入光伏站总数为:%s"), ENERGY_STORAGE_TOTAL("储能站总数量","3","智能运维平台接入储能站总数为:%s"),
CHARGE_TOTAL("充电站总数量","7","运维平台目前接入充电站总数为:%s"), PHOTOVOLTAIC_TOTAL("光伏站总数量","5","智能运维平台接入光伏站总数为:%s"),
HYDROPOWER_NUM("水电站接入量","0","运维平台目前接入水电站接入量为:%s"), CHARGE_TOTAL("充电站总数量","7","智能运维平台接入充电站总数为:%s"),
WIND_POWER_NUM("风电场接入量","1","运维平台目前接入风电场接入量为:%s"), STATION_NUM("电站接入量",null,"智能运维平台接入电站总数为:%s"),
ENERGY_STORAGE_NUM("储能站接入量","3","运维平台目前接入储能站接入量为:%s"), SET_NUM("站点接入量",null,"智能运维平台接入站点总数为:%s"),
PHOTOVOLTAIC_NUM("光伏站接入量","5","运维平台目前接入光伏站接入量为:%s"), HYDROPOWER_NUM("水电站接入量","0","智能运维平台接入水电站接入量为:%s"),
CHARGE_NUM("充电站接入量","7","运维平台目前接入充电站接入量为:%s"), WIND_POWER_NUM("风电场接入量","1","智能运维平台接入风电场接入量为:%s"),
ENERGY_STORAGE_NUM("储能站接入量","3","智能运维平台接入储能站接入量为:%s"),
PHOTOVOLTAIC_NUM("光伏站接入量","5","智能运维平台接入光伏站接入量为:%s"),
CHARGE_NUM("充电站接入量","7","智能运维平台接入充电站接入量为:%s"),
; ;
@Getter @Getter

14
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java

@ -117,6 +117,8 @@ public class InteractiveHandler extends TextWebSocketHandler {
case CHOOSE_FAULT: case CHOOSE_FAULT:
this.handleFaultChoose(messageContext,sessionId); this.handleFaultChoose(messageContext,sessionId);
break; break;
case CHOOSE_YC:
this.handleDataChoose(messageContext,sessionId);
default: default:
break; break;
} }
@ -209,4 +211,16 @@ public class InteractiveHandler extends TextWebSocketHandler {
extra.put("data",data); extra.put("data",data);
interactiveService.specialAsk(sessionId,userId,extra); interactiveService.specialAsk(sessionId,userId,extra);
} }
private void handleDataChoose(JSONObject messageContext,String sessionId) {
IInteractiveService interactiveService = SpringUtil.getBean(IInteractiveService.class);
String userId = messageContext.getString("userId");
String funcCode = messageContext.getString("funcCode");
FaultSelectionVO selectionVO = messageContext.getObject("selection",FaultSelectionVO.class);
Map<String, Object> extra = new HashMap<>(2);
extra.put("func",funcCode);
extra.put("data",selectionVO);
interactiveService.specialAsk(sessionId,userId,extra);
}
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java

@ -144,7 +144,7 @@ public class StationClient implements IStationClient {
@RequestParam(required = false) String endTime, @RequestParam(required = false) String endTime,
@RequestParam(required = false) String type) { @RequestParam(required = false) String type) {
LambdaQueryWrapper<StationEntity> wrapper = Wrappers.<StationEntity>lambdaQuery() LambdaQueryWrapper<StationEntity> wrapper = Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getType, type) .eq(StringUtil.isNotBlank(type) && Func.isNotEmpty(type),StationEntity::getType, type)
.le(StringUtil.isNotBlank(endTime) && Func.isNotEmpty(endTime),StationEntity::getCreateTime, endTime) .le(StringUtil.isNotBlank(endTime) && Func.isNotEmpty(endTime),StationEntity::getCreateTime, endTime)
.ge(StringUtil.isNotBlank(startTime) && Func.isNotEmpty(startTime),StationEntity::getCreateTime, startTime); .ge(StringUtil.isNotBlank(startTime) && Func.isNotEmpty(startTime),StationEntity::getCreateTime, startTime);
return R.data(stationService.list(wrapper)); return R.data(stationService.list(wrapper));

Loading…
Cancel
Save