Commit 04f6991e authored by 王晓倩's avatar 王晓倩

泽宏云设备信息推送接口调整

parent 28fd5aa1
......@@ -9,6 +9,7 @@ import java.util.List;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.BeanUtil;
import com.zehong.common.enums.ResultEnum;
import com.zehong.common.exception.IOCException;
import com.zehong.system.domain.TDetectorReportData;
......@@ -21,6 +22,7 @@ import com.zehong.system.service.ITDetectorReportDataService;
import com.zehong.system.service.ITDetectorUserService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.util.StringUtils;
......@@ -181,7 +183,7 @@ public class TDetectorInfoController extends BaseController
}
TDetectorInfo tDetectorInfo = new TDetectorInfo();
tDetectorInfo.setUserId(tDetectorUser.getUserId());
tDetectorInfo.setUserId(tDetectorUserList.get(0).getUserId());
tDetectorInfo.setDetectorName(deviceName);
tDetectorInfo.setDetectorCode(deviceNo);
tDetectorInfo.setDetectorType(deviceType);
......@@ -214,6 +216,7 @@ public class TDetectorInfoController extends BaseController
detector.setIsDel("0");
List<TDetectorInfo> detectorList = tDetectorInfoService.selectTDetectorInfoList(detector);
if(detectorList.size() > 0){
tDetectorInfo.setDetectorId(detectorList.get(0).getDetectorId());
tDetectorInfoService.updateTDetectorInfo(tDetectorInfo);
continue;
}
......@@ -233,6 +236,7 @@ public class TDetectorInfoController extends BaseController
deviceName = obj.getString("deviceName");
deviceNo = obj.getString("deviceNo");
deviceType = obj.getString("deviceType");
medium = obj.getString("medium");
address = obj.getString("address");
longitude = obj.getString("longitude");
latitude = obj.getString("latitude");
......@@ -268,6 +272,9 @@ public class TDetectorInfoController extends BaseController
if(!"".equals(deviceName)) {
tDetectorInfo.setDetectorName(deviceName);
}
if(!"".equals(medium)) {
tDetectorInfo.setMedium(medium);
}
if(!"".equals(address)) {
tDetectorInfo.setDetectorAddr(address);
}
......
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