Commit 21d66369 authored by 吴俊凯's avatar 吴俊凯

预案执行代码合并

parent d3067ff8
......@@ -635,6 +635,7 @@ public class RiskSourceController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "重点设备启动预案", notes = "重点设备启动预案")
@RequestMapping(value = "/startEquipReserve", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public ResponseModel startEquipReserve(@RequestParam Long id, @RequestParam String typeCode) {
ReserveEnum reserveEnum = riskSourceService.startEquipReserve(id, typeCode);
Integer status = reserveEnum.getStatus();
String text = reserveEnum.getText();
......
......@@ -41,6 +41,7 @@ public class DataRefreshServiceImpl implements IDataRefreshService {
@Override
public void sendRefreshDataWithArea(String areaType, Map content) {
Map<String,Object> sendData = new HashMap<>(2);
sendData.put("refreshType",areaType);
sendData.put("content",content);
......
......@@ -517,6 +517,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Override
public List<Object> getReserveEquipById(Long id, String typeCode) {
return iEquipmentDao.getReserveEquipById(id, typeCode);
}
......
......@@ -145,6 +145,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Override
public void handlerMqttMessage(String topic, String data) {
TopicEntityVo topicEntity = JSON.parseObject(data, TopicEntityVo.class);
log.info("iotCode 性能指标属于: " + topicEntity.getType());
EquipmentSpecificIndexVo equipmentSpecificIndex = JSONObject.parseObject(topicEntity.getMessage(), EquipmentSpecificIndexVo.class);
......
......@@ -1048,6 +1048,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
@Transactional
public ReserveEnum startEquipReserve(Long id, String typeCode) {
int count = equipmentService.countByStatus(NumberEnum.ONE.getValue());
if (count > NumberEnum.ZERO.getValue()) {
return ReserveEnum.RUNNING;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment