浏览代码

统一设备管理的返回格式

konghl 4 年之前
父节点
当前提交
24f03b82fc

+ 3 - 5
location-rescue-service/src/main/java/com/ai/bss/location/rescue/controller/EquipmentManageController.java

@ -4,6 +4,7 @@ import java.util.HashMap;
4 4
import java.util.List;
5 5
import java.util.Map;
6 6
7
import com.ai.bss.components.common.model.PageInfo;
7 8
import org.slf4j.Logger;
8 9
import org.slf4j.LoggerFactory;
9 10
import org.springframework.beans.factory.annotation.Autowired;
@ -42,7 +43,6 @@ public class EquipmentManageController {
42 43
		// 当前页数
43 44
		int pageNumber = conditionMap.getPageNumber() < 1 ? 1 : conditionMap.getPageNumber();
44 45
45
46 46
		// 每页条数
47 47
		int pageSize = conditionMap.getPageSize() < 1 ? EbcConstant.DEFAULT_PAGE_SIZE : conditionMap.getPageSize();
48 48
		conditionMap.setPageSize(pageSize);
@ -97,12 +97,10 @@ public class EquipmentManageController {
97 97
	 */
98 98
	@ResponseBody
99 99
	@RequestMapping("/queryAllEquipmentNotBind")
100
	public Map<String, Object> queryAllEquipmentNotBind() throws Exception {
100
	public CommonResponse<PageInfo<Map<String, Object>>> queryAllEquipmentNotBind() throws Exception {
101 101
		Map<String, Object> result = new HashMap<String, Object>();
102 102
103
		List<Map<String, Object>> resultList = equipmentManageService.queryAllEquipmentNotBind();
104
		result.put("dataList", resultList);
105
		return result;
103
		return equipmentManageService.queryAllEquipmentNotBind();
106 104
	}
107 105
108 106

+ 2 - 3
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/impl/EquipmentManageServiceImpl.java

@ -60,13 +60,12 @@ public class EquipmentManageServiceImpl<EquipmentManageDao> implements Equipment
60 60
    }
61 61
62 62
    @Override
63
    public List<Map<String, Object>> queryAllEquipmentNotBind() throws Exception {
63
    public CommonResponse<PageInfo<Map<String, Object>>> queryAllEquipmentNotBind() throws Exception {
64 64
        HashMap<String, Object> dataMap = new HashMap<>();
65 65
        dataMap.put("workOrgId", "0000");//TODO 组织ID
66 66
        dataMap.put("isAllowBindTerminal", EbcConstant.TOOL_BIND_REJECT);//是否可绑定
67 67
        CommonRequest<HashMap<String, Object>> commonRequest = new CommonRequest<HashMap<String, Object>>(dataMap);
68
        CommonResponse<PageInfo<Map<String, Object>>> commonResponse = resourceToolQuery.queryWorkToolByOrgAndBindFlag(commonRequest);
69
        return commonResponse.getData().getData();
68
        return resourceToolQuery.queryWorkToolByOrgAndBindFlag(commonRequest);
70 69
    }
71 70
72 71
}

+ 2 - 1
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/interfaces/EquipmentManageService.java

@ -7,6 +7,7 @@ import java.util.Map;
7 7
import com.ai.abc.api.model.CommonRequest;
8 8
import com.ai.abc.api.model.CommonResponse;
9 9
import com.ai.bss.components.common.model.PageBean;
10
import com.ai.bss.components.common.model.PageInfo;
10 11
import com.ai.bss.work.tool.model.ResourceTool;
11 12
import com.ai.bss.work.tool.model.ResourceToolType;
12 13
@ -22,5 +23,5 @@ public interface EquipmentManageService {
22 23
23 24
    CommonResponse<List<ResourceToolType>> loadAllResourceToolType(CommonRequest commonRequest);
24 25
25
    List<Map<String, Object>> queryAllEquipmentNotBind() throws Exception;
26
    CommonResponse<PageInfo<Map<String, Object>>>queryAllEquipmentNotBind() throws Exception;
26 27
}