Merge branch 'main' of http://git.hivekion.com:3000/liyudong/simulation-backend
This commit is contained in:
commit
6138b88aec
|
|
@ -1,8 +1,23 @@
|
||||||
package com.hivekion.baseData.controller;
|
package com.hivekion.baseData.controller;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import com.hivekion.baseData.domain.tblvehicleVo.VehicleAddInputVo;
|
||||||
|
import com.hivekion.baseData.entity.WeatherResource;
|
||||||
|
import com.hivekion.baseData.service.IWeatherResourceService;
|
||||||
|
import com.hivekion.common.annotation.AutoLog;
|
||||||
|
import com.hivekion.common.entity.PagedResultVo;
|
||||||
|
import com.hivekion.common.entity.ResponseData;
|
||||||
|
import com.hivekion.common.enums.OperationTypeEnum;
|
||||||
|
import com.hivekion.common.enums.ResultCodeEnum;
|
||||||
|
import com.hivekion.environment.entity.SimtoolEbe;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 气像资源信息 前端控制器
|
* 气像资源信息 前端控制器
|
||||||
|
|
@ -11,8 +26,53 @@ import org.springframework.stereotype.Controller;
|
||||||
* @author liDongYu
|
* @author liDongYu
|
||||||
* @since 2025-09-14
|
* @since 2025-09-14
|
||||||
*/
|
*/
|
||||||
@Controller
|
@RestController
|
||||||
@RequestMapping("/baseData/weatherResource")
|
@RequestMapping("/baseData/weatherResource")
|
||||||
public class WeatherResourceController {
|
public class WeatherResourceController extends BaseController{
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IWeatherResourceService weatherResourceService;
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation(value = "新增天气信息", notes = "")
|
||||||
|
@AutoLog(value = "新增天气信息", operationType = OperationTypeEnum.INSERT, module = "基础数据/新增车辆信息")
|
||||||
|
public boolean add(@RequestBody WeatherResource inputVo) throws Exception {
|
||||||
|
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
LocalDateTime begDate = LocalDateTime.parse(inputVo.getLastBegTimeStr(),dtf);
|
||||||
|
LocalDateTime endDate = LocalDateTime.parse(inputVo.getLastEndTimeStr(),dtf);
|
||||||
|
inputVo.setLastBegTime(begDate);
|
||||||
|
inputVo.setLastEndTime(endDate);
|
||||||
|
return weatherResourceService.save(inputVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询天气列表", notes = "")
|
||||||
|
@GetMapping("/list")
|
||||||
|
|
||||||
|
public PagedResultVo<WeatherResource> list(WeatherResource search) {
|
||||||
|
|
||||||
|
|
||||||
|
//设置开始索引
|
||||||
|
search.setStart(search.getPageSize() * (search.getPageNum() - 1));
|
||||||
|
//查询结果列表
|
||||||
|
List<WeatherResource> list = weatherResourceService.list(search);
|
||||||
|
//查询总数
|
||||||
|
Long total = weatherResourceService.count(search);
|
||||||
|
return list(search, list, total);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 删除天气数据
|
||||||
|
*
|
||||||
|
* @param id 记录ID
|
||||||
|
* @return 操作结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/remove/{id}")
|
||||||
|
public ResponseData<Void> remove(@PathVariable("id") Integer id) {
|
||||||
|
WeatherResource weather = weatherResourceService.getById(id);
|
||||||
|
if (weather == null) {
|
||||||
|
return ResponseData.error(ResultCodeEnum.RECORD_NOT_EXIT, null);
|
||||||
|
}
|
||||||
|
weatherResourceService.removeById(id);
|
||||||
|
return ResponseData.success(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.hivekion.common.entity.SearchInputVo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -21,7 +22,7 @@ import lombok.Data;
|
||||||
@TableName("TBL_WEATHER_RESOURCE")
|
@TableName("TBL_WEATHER_RESOURCE")
|
||||||
@ApiModel(value = "WeatherResource对象", description = "气像资源信息")
|
@ApiModel(value = "WeatherResource对象", description = "气像资源信息")
|
||||||
@Data
|
@Data
|
||||||
public class WeatherResource implements Serializable {
|
public class WeatherResource extends SearchInputVo implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
@ -51,5 +52,10 @@ public class WeatherResource implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String status = "init";
|
private String status = "init";
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String lastBegTimeStr;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String lastEndTimeStr;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@ package com.hivekion.baseData.mapper;
|
||||||
|
|
||||||
import com.hivekion.baseData.entity.WeatherResource;
|
import com.hivekion.baseData.entity.WeatherResource;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.hivekion.environment.entity.SimtoolEbe;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -13,4 +16,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
*/
|
*/
|
||||||
public interface WeatherResourceMapper extends BaseMapper<WeatherResource> {
|
public interface WeatherResourceMapper extends BaseMapper<WeatherResource> {
|
||||||
|
|
||||||
|
List<WeatherResource> list(WeatherResource ebe);
|
||||||
|
|
||||||
|
Long count(WeatherResource ebe);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@ package com.hivekion.baseData.service;
|
||||||
|
|
||||||
import com.hivekion.baseData.entity.WeatherResource;
|
import com.hivekion.baseData.entity.WeatherResource;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.hivekion.environment.entity.SimtoolEbe;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -13,4 +16,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
*/
|
*/
|
||||||
public interface IWeatherResourceService extends IService<WeatherResource> {
|
public interface IWeatherResourceService extends IService<WeatherResource> {
|
||||||
|
|
||||||
|
List<WeatherResource> list(WeatherResource ebe);
|
||||||
|
|
||||||
|
Long count(WeatherResource ebe);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
package com.hivekion.baseData.service.impl;
|
package com.hivekion.baseData.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.hivekion.baseData.entity.WeatherResource;
|
import com.hivekion.baseData.entity.WeatherResource;
|
||||||
import com.hivekion.baseData.mapper.WeatherResourceMapper;
|
import com.hivekion.baseData.mapper.WeatherResourceMapper;
|
||||||
import com.hivekion.baseData.service.IWeatherResourceService;
|
import com.hivekion.baseData.service.IWeatherResourceService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 气像资源信息 服务实现类
|
* 气像资源信息 服务实现类
|
||||||
|
|
@ -17,4 +20,15 @@ import org.springframework.stereotype.Service;
|
||||||
@Service
|
@Service
|
||||||
public class WeatherResourceServiceImpl extends ServiceImpl<WeatherResourceMapper, WeatherResource> implements IWeatherResourceService {
|
public class WeatherResourceServiceImpl extends ServiceImpl<WeatherResourceMapper, WeatherResource> implements IWeatherResourceService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WeatherResource> list(WeatherResource ebe) {
|
||||||
|
|
||||||
|
return this.list(new QueryWrapper<WeatherResource>().eq("scenario_id",ebe.getScenarioId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long count(WeatherResource ebe) {
|
||||||
|
return this.baseMapper.count(ebe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.hivekion.statistic.bean;
|
||||||
import com.hivekion.baseData.entity.Fightpowerstaff;
|
import com.hivekion.baseData.entity.Fightpowerstaff;
|
||||||
import com.hivekion.baseData.entity.OrgSupplier;
|
import com.hivekion.baseData.entity.OrgSupplier;
|
||||||
import com.hivekion.scenario.entity.ScenarioOrgPost;
|
import com.hivekion.scenario.entity.ScenarioOrgPost;
|
||||||
|
import com.hivekion.scenario.entity.ScenarioResource;
|
||||||
import com.hivekion.scenario.entity.ScenarioTask;
|
import com.hivekion.scenario.entity.ScenarioTask;
|
||||||
import com.hivekion.supplier.entity.SupplierRequest;
|
import com.hivekion.supplier.entity.SupplierRequest;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -38,4 +39,6 @@ public class ScenarioInfo implements Serializable {
|
||||||
//药材
|
//药材
|
||||||
private MedicalInfo medical = new MedicalInfo();
|
private MedicalInfo medical = new MedicalInfo();
|
||||||
|
|
||||||
|
private ScenarioResource sdzy;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,12 @@ public class ScenarioServiceImpl implements ScenarioService {
|
||||||
@Override
|
@Override
|
||||||
public ScenarioInfo listScenarioInfo(Integer scenarioId, String roomId, String resourceId) {
|
public ScenarioInfo listScenarioInfo(Integer scenarioId, String roomId, String resourceId) {
|
||||||
ScenarioInfo scenarioInfo = new ScenarioInfo();
|
ScenarioInfo scenarioInfo = new ScenarioInfo();
|
||||||
|
//图标Map
|
||||||
|
Map<String, String> iconMap = iconService.iconMap();
|
||||||
|
//装备Map
|
||||||
|
Map<Integer, TblEntity> entityMap = iTblEntityService.entityMap();
|
||||||
|
Map<Integer,com.hivekion.scenario.entity.Resource> hResourceMap = resourcesService.listBuildResourceByType(7);
|
||||||
|
Map<Integer,com.hivekion.scenario.entity.Resource> wResourceMap = resourcesService.listBuildResourceByType(8);
|
||||||
//获取分队信息
|
//获取分队信息
|
||||||
Map<Integer, Teaminfo> map = teamInfoService.teamInfoMap();
|
Map<Integer, Teaminfo> map = teamInfoService.teamInfoMap();
|
||||||
Map<String, ScenarioResource> resourceMap = resourceService.resourceMap();
|
Map<String, ScenarioResource> resourceMap = resourceService.resourceMap();
|
||||||
|
|
@ -90,6 +96,59 @@ public class ScenarioServiceImpl implements ScenarioService {
|
||||||
log.error("============={}==========================",resourceId);
|
log.error("============={}==========================",resourceId);
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
switch (resourceInstance.getResourceType()) {
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
if (entityMap.get(resourceInstance.getResourceId()) != null) {
|
||||||
|
TblEntity entity = entityMap.get(resourceInstance.getResourceId());
|
||||||
|
resourceInstance.setTitle(entity.getEntityName());
|
||||||
|
resourceInstance.setImgBase64(
|
||||||
|
iconMap.get(entity.getIconId()) == null ? "" : iconMap.get(entity.getIconId()));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
if (map.get(resourceInstance.getResourceId()) != null) {
|
||||||
|
Teaminfo teaminfo = map.get(resourceInstance.getResourceId());
|
||||||
|
resourceInstance.setTitle(teaminfo.getName());
|
||||||
|
resourceInstance.setImgBase64(
|
||||||
|
iconMap.get(teaminfo.getIconId()) == null ? "" : iconMap.get(teaminfo.getIconId()));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
if(hResourceMap.get(resourceInstance.getResourceId()) != null){
|
||||||
|
com.hivekion.scenario.entity.Resource resource1 = hResourceMap.get(resourceInstance.getResourceId());
|
||||||
|
resourceInstance.setTitle(resource1.getResourceName());
|
||||||
|
resourceInstance.setImgBase64(
|
||||||
|
iconMap.get(resource1.getIcon()) == null ? "" : iconMap.get(resource1.getIcon()));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
if(wResourceMap.get(resourceInstance.getResourceId()) != null){
|
||||||
|
com.hivekion.scenario.entity.Resource resource1 = wResourceMap.get(resourceInstance.getResourceId());
|
||||||
|
resourceInstance.setTitle(resource1.getResourceName());
|
||||||
|
resourceInstance.setImgBase64(
|
||||||
|
iconMap.get(resource1.getIcon()) == null ? "" : iconMap.get(resource1.getIcon()));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (resourceMap.get(resourceId) != null) {
|
||||||
|
ScenarioResource resource = resourceMap.get(resourceId);
|
||||||
|
if (map.get(resource.getResourceId()) != null) {
|
||||||
|
scenarioInfo.getTeam().setTeamName(map.get(resource.getResourceId()).getName());
|
||||||
|
resourceInstance.setResourceName(map.get(resource.getResourceId()).getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
scenarioInfo.getTeam().setType(resourceInstance.getType());
|
||||||
|
scenarioInfo.getTeam().setLat(resourceInstance.getLat());
|
||||||
|
scenarioInfo.getTeam().setLng(resourceInstance.getLng());
|
||||||
|
}catch (Exception ex){
|
||||||
|
log.error("============={}==========================",resourceId);
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
//获取关联的组织机构信息
|
//获取关联的组织机构信息
|
||||||
ScenarioOrgPost post = new ScenarioOrgPost();
|
ScenarioOrgPost post = new ScenarioOrgPost();
|
||||||
post.setResourceId(resourceId);
|
post.setResourceId(resourceId);
|
||||||
|
|
@ -173,6 +232,7 @@ public class ScenarioServiceImpl implements ScenarioService {
|
||||||
scenarioInfo.setOrgPostList(orgPostList);
|
scenarioInfo.setOrgPostList(orgPostList);
|
||||||
scenarioInfo.setSuppliers(suppliers);
|
scenarioInfo.setSuppliers(suppliers);
|
||||||
scenarioInfo.setSupplierRequests(supplierRequests);
|
scenarioInfo.setSupplierRequests(supplierRequests);
|
||||||
|
scenarioInfo.setSdzy(resourceInstance);
|
||||||
return scenarioInfo;
|
return scenarioInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,18 @@ package com.hivekion.thread;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.hivekion.Global;
|
import com.hivekion.Global;
|
||||||
|
import com.hivekion.baseData.entity.Scenario;
|
||||||
|
import com.hivekion.baseData.entity.WeatherResource;
|
||||||
|
import com.hivekion.baseData.service.impl.ScenarioServiceImpl;
|
||||||
|
import com.hivekion.baseData.service.impl.WeatherResourceServiceImpl;
|
||||||
import com.hivekion.common.entity.RequestCmdInfo;
|
import com.hivekion.common.entity.RequestCmdInfo;
|
||||||
import com.hivekion.common.entity.ResponseCmdInfo;
|
import com.hivekion.common.entity.ResponseCmdInfo;
|
||||||
import com.hivekion.room.RoomManager;
|
import com.hivekion.room.RoomManager;
|
||||||
import com.hivekion.room.bean.Room;
|
import com.hivekion.room.bean.Room;
|
||||||
import com.hivekion.scenario.entity.ScenarioResource;
|
import com.hivekion.scenario.entity.ScenarioResource;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
|
@ -39,8 +45,10 @@ public class HandleReceiveRunnable implements Runnable {
|
||||||
//消息分发业务bean处理
|
//消息分发业务bean处理
|
||||||
if (SpringUtil.getBean(WebsocketMsgWrapper.class) != null) {
|
if (SpringUtil.getBean(WebsocketMsgWrapper.class) != null) {
|
||||||
try {
|
try {
|
||||||
WebsocketMsgWrapper websocketMsgWrapper = SpringUtil.getBean(WebsocketMsgWrapper.class);
|
WebsocketMsgWrapper websocketMsgWrapper = SpringUtil.getBean(
|
||||||
websocketMsgWrapper.msgHandle(requestCmdInfo.getScenarioId(), requestCmdInfo.getRoom(),
|
WebsocketMsgWrapper.class);
|
||||||
|
websocketMsgWrapper.msgHandle(requestCmdInfo.getScenarioId(),
|
||||||
|
requestCmdInfo.getRoom(),
|
||||||
requestCmdInfo.getResourceId(), requestCmdInfo.getMessage());
|
requestCmdInfo.getResourceId(), requestCmdInfo.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("error::", e);
|
log.error("error::", e);
|
||||||
|
|
@ -52,8 +60,6 @@ public class HandleReceiveRunnable implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("error::", e);
|
log.error("error::", e);
|
||||||
}
|
}
|
||||||
|
|
@ -70,6 +76,9 @@ public class HandleReceiveRunnable implements Runnable {
|
||||||
case "get_room_info":
|
case "get_room_info":
|
||||||
handleGetRootInfo(requestCmdInfo);
|
handleGetRootInfo(requestCmdInfo);
|
||||||
break;
|
break;
|
||||||
|
case "get_weather":
|
||||||
|
handleGetWeather(requestCmdInfo);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -130,4 +139,32 @@ public class HandleReceiveRunnable implements Runnable {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleGetWeather(RequestCmdInfo requestCmdInfo) {
|
||||||
|
//获取想定
|
||||||
|
Scenario scenario = SpringUtil.getBean(ScenarioServiceImpl.class)
|
||||||
|
.getScenarioById(requestCmdInfo.getScenarioId());
|
||||||
|
LocalDateTime startTime = scenario.getStartTime();
|
||||||
|
Room room = RoomManager.getRoom(requestCmdInfo.getRoom());
|
||||||
|
if (room != null) {
|
||||||
|
long duringTime = room.getDuringTime();
|
||||||
|
List<WeatherResource> weatherList = SpringUtil.getBean(WeatherResourceServiceImpl.class)
|
||||||
|
.list();
|
||||||
|
weatherList.forEach(weatherResource -> {
|
||||||
|
ResponseCmdInfo<Object> respObj = new ResponseCmdInfo<>();
|
||||||
|
LocalDateTime weatherTime = weatherResource.getLastBegTime();
|
||||||
|
LocalDateTime weatherEndTime = weatherResource.getLastEndTime();
|
||||||
|
if (startTime.plusSeconds(duringTime).isAfter(weatherTime) && startTime.plusSeconds(
|
||||||
|
duringTime).isBefore(weatherEndTime)) {
|
||||||
|
|
||||||
|
respObj.setCmdType("start_" + weatherResource.getWeatherType());
|
||||||
|
}
|
||||||
|
if (startTime.plusSeconds(duringTime).isAfter(weatherEndTime)) {
|
||||||
|
respObj.setCmdType("stop_" + weatherResource.getWeatherType());
|
||||||
|
}
|
||||||
|
Global.sendCmdInfoQueue.add(respObj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ public class HandleSendRunable implements Runnable {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
ResponseCmdInfo<?> response = Global.sendCmdInfoQueue.take();
|
ResponseCmdInfo<?> response = Global.sendCmdInfoQueue.take();
|
||||||
|
|
||||||
WsServer.sendMessage(response.getScenarioId(), response.getRoom(), JSON.toJSONString(response));
|
WsServer.sendMessage(response.getScenarioId(), response.getRoom(), JSON.toJSONString(response));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("error::", e);
|
log.error("error::", e);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,38 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.hivekion.baseData.mapper.WeatherResourceMapper">
|
<mapper namespace="com.hivekion.baseData.mapper.WeatherResourceMapper">
|
||||||
|
<resultMap id="WeatherResource" type="com.hivekion.baseData.entity.WeatherResource">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="roomId" column="room_id"/>
|
||||||
|
<result property="scenarioId" column="scenario_id"/>
|
||||||
|
<result property="weatherType" column="weather_type"/>
|
||||||
|
<result property="lastBegTime" column="last_beg_time"/>
|
||||||
|
<result property="lastEndTime" column="last_end_time"/>
|
||||||
|
<!-- 其他字段 -->
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="list" resultType="com.hivekion.baseData.entity.WeatherResource" parameterType="com.hivekion.baseData.entity.WeatherResource" >
|
||||||
|
SELECT
|
||||||
|
<!-- @rownum := @rownum + 1 AS seq,-->
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
SELECT * FROM TBL_WEATHER_RESOURCE
|
||||||
|
<!--<where>
|
||||||
|
<if test="scenarioId != null and scenarioId !='' ">
|
||||||
|
and scenario_id =#{scenarioId}
|
||||||
|
</if>
|
||||||
|
</where>-->
|
||||||
|
order by id asc <!--) t, ( SELECT @rownum := #{start} ) r limit
|
||||||
|
#{start},#{pageSize}-->
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="count" resultType="java.lang.Long" parameterType="com.hivekion.baseData.entity.WeatherResource" >
|
||||||
|
select count(id) from TBL_WEATHER_RESOURCE
|
||||||
|
<!-- <where>
|
||||||
|
<if test="scenarioId != null and scenarioId !='' ">
|
||||||
|
and scenario_id =#{scenarioId}
|
||||||
|
</if>
|
||||||
|
</where>-->
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user