Commit a0c9c348 authored by 付培阳's avatar 付培阳

消防水源接口

parent f7b41355
...@@ -19,11 +19,14 @@ import org.springframework.web.bind.annotation.*; ...@@ -19,11 +19,14 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -305,12 +308,15 @@ public class WaterResourceController extends BaseController { ...@@ -305,12 +308,15 @@ public class WaterResourceController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "分页查询", notes = "分页查询") @ApiOperation(httpMethod = "GET", value = "分页查询", notes = "分页查询")
public ResponseModel<Page<WaterResourceDto>> queryForPage(@RequestParam(value = "current") int current, public ResponseModel<Page<WaterResourceDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size, String name, @RequestParam(value = "size") int size, String name,
@RequestParam(value = "belongBuildingId")ArrayList<Long> belongBuildingId,
Long belongFightingSystemId, Long sequenceNbr,
String resourceType) { String resourceType) {
Page<WaterResourceDto> page = new Page<>(); Page<WaterResourceDto> page = new Page<>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(waterResourceServiceImpl.queryForWaterResourcePage(page, name, return ResponseHelper.buildResponse(waterResourceServiceImpl.queryForWaterResourcePage(page, name,
resourceType, true)); resourceType, belongBuildingId, belongFightingSystemId,
sequenceNbr, true));
} }
/** /**
...@@ -349,6 +355,7 @@ public class WaterResourceController extends BaseController { ...@@ -349,6 +355,7 @@ public class WaterResourceController extends BaseController {
/** /**
* 查询水资源类型列表 * 查询水资源类型列表
*
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
...@@ -52,8 +53,12 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate ...@@ -52,8 +53,12 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
public Page<WaterResourceDto> queryForWaterResourcePage(Page<WaterResourceDto> page, public Page<WaterResourceDto> queryForWaterResourcePage(Page<WaterResourceDto> page,
@Condition(Operator.like) String name, @Condition(Operator.like) String name,
@Condition(Operator.eq) String resourceType, @Condition(Operator.eq) String resourceType,
@Condition(Operator.in) ArrayList<Long> belongBuildingId,
@Condition(Operator.eq) Long belongFightingSystemId,
@Condition(Operator.eq) Long sequenceNbr,
@Condition(Operator.eq) Boolean isDelete) { @Condition(Operator.eq) Boolean isDelete) {
return this.queryForPage(page, null, false, name, resourceType, isDelete); return this.queryForPage(page, null, false, name, resourceType, belongBuildingId, belongFightingSystemId,
sequenceNbr, isDelete);
} }
/** /**
......
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