|
@ -1,6 +1,7 @@
|
|
|
package com.yihu.jw.healthyhouse.controller.facilities;
|
|
|
|
|
|
import com.yihu.jw.healthyhouse.constant.SystemDictConstant;
|
|
|
import com.yihu.jw.healthyhouse.constant.UserConstant;
|
|
|
import com.yihu.jw.healthyhouse.model.dict.SystemDictEntry;
|
|
|
import com.yihu.jw.healthyhouse.model.facility.FacilityServer;
|
|
|
import com.yihu.jw.healthyhouse.service.dict.SystemDictEntryService;
|
|
@ -169,7 +170,7 @@ public class FacilitiesServerController extends EnvelopRestEndpoint {
|
|
|
String filters = "type=" + obj[0].toString();
|
|
|
facilityServerList = facilityServerService.search("", filters, "");
|
|
|
map.put("name",null==obj[1]?"":obj[1].toString());
|
|
|
map.put(obj[0].toString(), facilityServerList);
|
|
|
map.put("code", facilityServerList);
|
|
|
mapList.add(map);
|
|
|
}
|
|
|
|
|
@ -178,4 +179,31 @@ public class FacilitiesServerController extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "需求变更:按照服务分类查询-服务-获取设施服务列表", responseContainer = "List")
|
|
|
@GetMapping(value = HealthyHouseMapping.HealthyHouse.FacilitiesServer.PAGE_FACILITIESERVERS_BY_TYPE)
|
|
|
public PageEnvelop<FacilityServer> getFacilitiesServerByType(
|
|
|
@ApiParam(name = "serverType", value = "服务分类", defaultValue = "")
|
|
|
@RequestParam(value = "serverType", required = false) String serverType,
|
|
|
@ApiParam(name = "serverName", value = "服务名称", defaultValue = "")
|
|
|
@RequestParam(value = "serverName", required = false) String serverName,
|
|
|
@ApiParam(name = "size", value = "分页大小", defaultValue = "15")
|
|
|
@RequestParam(value = "size", required = false) Integer size,
|
|
|
@ApiParam(name = "page", value = "页码", defaultValue = "1")
|
|
|
@RequestParam(value = "page", required = false) Integer page) throws Exception {
|
|
|
if(StringUtils.isNotBlank(serverType)){
|
|
|
List<String> stringList = systemDictEntryService.getMinDictEntryCodeByCode(UserConstant.FACILITIES_SERVER_DICT_ID, serverType);
|
|
|
return facilityServerService.getFacilitiesServerByType(stringList.toArray(new String[stringList.size()]), serverName, page, size);
|
|
|
}else{
|
|
|
StringBuilder fis=new StringBuilder();
|
|
|
if(StringUtils.isNotBlank(serverName)){
|
|
|
fis.append("name?"+serverName+" g1;");
|
|
|
}
|
|
|
|
|
|
List<FacilityServer> facilityServerList = facilityServerService.search(null, fis.toString(), null, page, size);
|
|
|
return success(facilityServerList, null==facilityServerList?0:facilityServerList.size(), page, size);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|