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

预案执行代码合并

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