Commit 1b0e272c authored by 赵啸非's avatar 赵啸非

设备同步添加楼层和楼栋

parent 9d8481cc
......@@ -3,8 +3,6 @@ package com.mortals.xhx.busiz.req;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.mortals.xhx.base.framework.CustomJsonDateDeserializer;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date;
......@@ -18,14 +16,6 @@ public class DeviceReq implements Serializable {
*/
private Integer receiveMethod;
// /**
// * 平台系统id
// */
// private Long platformId;
// /**
// * 平台系统编码
// */
// private String platformCode;
/**
* 产品id
*/
......
......@@ -48,8 +48,7 @@ public class DeviceRestartTaskImpl implements ITaskExcuteService {
public void excuteTask(ITask task) throws AppException {
log.info("设备定时重启任务");
String restartProduct = GlobalSysInfo.getParamValue(Constant.PARAM_RESTART_PRODUCT_LIST, "ckp,hjq");
StrUtil.split(restartProduct,",").stream().forEach(productCode->{
StrUtil.split(restartProduct, ",").stream().forEach(productCode -> {
List<DeviceEntity> deviceEntities = deviceService.find(new DeviceQuery().productCode(productCode));
for (DeviceEntity device : deviceEntities) {
TbQueueMsgHeaders header = new DefaultTbQueueMsgHeaders();
......
......@@ -336,6 +336,8 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
BeanUtils.copyProperties(entity, deviceReq, BeanUtil.getNullPropertyNames(entity));
deviceReq.setDeviceStatus(update.getValue());
deviceReq.setProductCode(productEntity.getProductCode());
deviceReq.setDeviceInBuilding(entity.getDeviceInBuilding()==null?0:entity.getDeviceInBuilding());
deviceReq.setDeviceInFloor(entity.getDeviceInFloor()==null?0:entity.getDeviceInFloor());
//http://192.168.0.98:8090/inter/device/deviceIn
String phpInUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_IN_HTTP_URL, "http://172.15.28.116:8090");
ApiResp<String> resp = messageService.sendThirdParty(UrlBuilder.of(phpInUrl).addPath(thirdPartyPath).build(), deviceReq);
......
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