|
@@ -2,15 +2,18 @@ package com.usky.iot.controller.web;
|
|
|
|
|
|
|
|
|
import com.usky.common.core.bean.ApiResult;
|
|
|
+import com.usky.common.core.bean.CommonPage;
|
|
|
+import com.usky.common.log.annotation.Log;
|
|
|
+import com.usky.common.log.enums.BusinessType;
|
|
|
+import com.usky.iot.domain.BaseFacilityType;
|
|
|
+import com.usky.iot.domain.DmpDeviceInfo;
|
|
|
import com.usky.iot.service.BaseFacilityTypeService;
|
|
|
import com.usky.iot.service.BaseGgpFacilityService;
|
|
|
import com.usky.iot.service.vo.BaseGgpFacilityTypeVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -37,5 +40,33 @@ public class BaseFacilityTypeController {
|
|
|
public ApiResult<List<BaseGgpFacilityTypeVO>> typeInfo() {
|
|
|
return ApiResult.success(baseFacilityTypeService.typeInfo());
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 设施类型分页
|
|
|
+ * @param typeCode 类型编码
|
|
|
+ * @param typeName 类型名称
|
|
|
+ * @param current 当前页
|
|
|
+ * @param size 每页条数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Log(title = "设施类型分页", businessType = BusinessType.OTHER)
|
|
|
+ @GetMapping("/typePage")
|
|
|
+ public ApiResult<CommonPage<BaseFacilityType>> typePage(@RequestParam(value = "typeCode", required = false) String typeCode,
|
|
|
+ @RequestParam(value = "typeName", required = false) String typeName,
|
|
|
+ @RequestParam(value = "current", required = false, defaultValue = "1") Integer current,
|
|
|
+ @RequestParam(value = "size", required = false, defaultValue = "10") Integer size)
|
|
|
+ {
|
|
|
+ return ApiResult.success(baseFacilityTypeService.typePage(typeCode, typeName, current, size));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单位信息采集-名称模糊查询
|
|
|
+ *
|
|
|
+ * @param id 单位名称
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("typeSelect")
|
|
|
+ public ApiResult<List<BaseFacilityType>> typeSelect(@RequestParam(value = "id", required = false) Integer id) {
|
|
|
+ return ApiResult.success(baseFacilityTypeService.typeSelect(id));
|
|
|
+ }
|
|
|
}
|
|
|
|