1、企业端接口对接
parent
65bebab413
commit
672ee48f94
|
@ -81,4 +81,18 @@ public class DwController extends BaseController {
|
||||||
return dwService.getDictionary();
|
return dwService.getDictionary();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "getLastProp")
|
||||||
|
public Object getLastProp() throws Exception {
|
||||||
|
PageData pd = this.getPageData();
|
||||||
|
GetLastPropDto mapGet = JSONObject.parseObject(JSONObject.toJSONString(pd), GetLastPropDto.class);
|
||||||
|
return dwService.getLastProp(mapGet);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "getAllMessage")
|
||||||
|
public Object getAllMessage() throws Exception {
|
||||||
|
PageData pd = this.getPageData();
|
||||||
|
return dwService.getAllMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -885,13 +885,15 @@ public class MapController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
} else {
|
} else {
|
||||||
MapInfo info = JSONObject.parseObject(JSONObject.toJSONString(map.get("info")), MapInfo.class);
|
MapInfo info = JSONObject.parseObject(JSONObject.toJSONString(map.get("info")), MapInfo.class);
|
||||||
PageData condition = new PageData();
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(info.getRequired().getUserId())){
|
||||||
condition.put("USER_ID", info.getRequired().getUserId());
|
PageData condition = new PageData();
|
||||||
PageData userInfo = usersService.findById(condition);
|
condition.put("USER_ID", info.getRequired().getUserId());
|
||||||
HashMap<String, String> otherInfo = new HashMap<>();
|
PageData userInfo = usersService.findById(condition);
|
||||||
otherInfo.put("postName", userInfo.getString("postName"));
|
HashMap<String, String> otherInfo = new HashMap<>();
|
||||||
otherInfo.put("personType", userInfo.getString("PERSON_TYPE"));
|
otherInfo.put("postName", userInfo.getString("postName"));
|
||||||
map.put("otherInfo", otherInfo);
|
otherInfo.put("personType", userInfo.getString("PERSON_TYPE"));
|
||||||
|
map.put("otherInfo", otherInfo);
|
||||||
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3,14 +3,27 @@ package com.zcloud.service.dw;
|
||||||
import com.zcloud.service.dw.dto.*;
|
import com.zcloud.service.dw.dto.*;
|
||||||
|
|
||||||
public interface DwService {
|
public interface DwService {
|
||||||
|
// 第一版定位接口
|
||||||
|
// 废弃
|
||||||
|
@Deprecated
|
||||||
Object getMapInfo(MapGet param) throws Exception;
|
Object getMapInfo(MapGet param) throws Exception;
|
||||||
|
// 废弃
|
||||||
|
@Deprecated
|
||||||
Object getMapList(MapGet param) throws Exception;
|
Object getMapList(MapGet param) throws Exception;
|
||||||
|
// 废弃
|
||||||
|
@Deprecated
|
||||||
Object saveOrUpdateMap(MapInfo param) throws Exception;
|
Object saveOrUpdateMap(MapInfo param) throws Exception;
|
||||||
Object getTrace(TraceGet param) throws Exception;
|
Object getTrace(TraceGet param) throws Exception;
|
||||||
Object getAlarmList(AlarmGet param) throws Exception;
|
Object getAlarmList(AlarmGet param) throws Exception;
|
||||||
Object manageAlarm(AlarmManageDto param) throws Exception;
|
Object manageAlarm(AlarmManageDto param) throws Exception;
|
||||||
|
// 废弃
|
||||||
|
@Deprecated
|
||||||
Object getDictionary() throws Exception;
|
Object getDictionary() throws Exception;
|
||||||
|
// 废弃
|
||||||
|
@Deprecated
|
||||||
Object deleteMap(DeleteDto deleteDto);
|
Object deleteMap(DeleteDto deleteDto);
|
||||||
|
// 第二版定位接口
|
||||||
|
Object getLastProp(GetLastPropDto dto) throws Exception;
|
||||||
|
Object getAllMessage() throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.zcloud.service.dw.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GetLastPropDto {
|
||||||
|
// 设备编号
|
||||||
|
private String deviceCode;
|
||||||
|
//属性identifier,多个属性时逗号隔开,不传或为null时,查设备全部属性最新值
|
||||||
|
private String prop;
|
||||||
|
}
|
|
@ -67,4 +67,14 @@ public class DwServiceImpl implements DwService {
|
||||||
public Object deleteMap(DeleteDto deleteDto) {
|
public Object deleteMap(DeleteDto deleteDto) {
|
||||||
return HttpUtil.post(url + "dw/deleteMap", deleteDto);
|
return HttpUtil.post(url + "dw/deleteMap", deleteDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getLastProp(GetLastPropDto dto) throws Exception {
|
||||||
|
return HttpUtil.post(url + "dw/getLastProp", dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getAllMessage() throws Exception {
|
||||||
|
return HttpUtil.post(url + "dw/getAllMessage",null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue