|
@@ -0,0 +1,71 @@
|
|
|
|
+package com.iden.bms.controller;
|
|
|
|
+
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.iden.bms.service.WarningEveningComeStaService;
|
|
|
|
+import com.iden.common.annotation.Permission;
|
|
|
|
+import com.iden.common.exception.BDException;
|
|
|
|
+import com.iden.common.util.PageResult;
|
|
|
|
+import com.iden.common.util.Result;
|
|
|
|
+import com.iden.common.util.WebPageUtils;
|
|
|
|
+import com.iden.common.vo.WarningEveningComeStaVO;
|
|
|
|
+import com.iden.common.vo.PageReqVO;
|
|
|
|
+import com.iden.common.vo.UserLogindConvertVO;
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
+
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @Author: lilt
|
|
|
|
+ * @Date: 2021/5/26
|
|
|
|
+ * @Desc:
|
|
|
|
+ */
|
|
|
|
+@RestController
|
|
|
|
+@Api(value = "WarningEveningComeStaController", tags = { "预警管理" })
|
|
|
|
+@Slf4j
|
|
|
|
+@RequestMapping("/bms/warningEveningComeSta")
|
|
|
|
+@Permission
|
|
|
|
+public class WarningEveningComeStaController {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private WarningEveningComeStaService warningEveningComeStaService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @GetMapping("/listWarningEveningComeSta")
|
|
|
|
+ @ApiOperation(value = "昼伏夜出人员预警列表分页 ")
|
|
|
|
+ @ApiImplicitParams(value = {
|
|
|
|
+ @ApiImplicitParam(paramType = "query", name = "district", value = "所属区域"),
|
|
|
|
+ @ApiImplicitParam(paramType = "query", name = "subdistrict", value = "所属街道"),
|
|
|
|
+ @ApiImplicitParam(paramType = "query", name = "communityName", value = "小区名称"),
|
|
|
|
+ @ApiImplicitParam(paramType = "query", name = "beginDate", value = "开始时间"),
|
|
|
|
+ @ApiImplicitParam(paramType = "query", name = "endDate", value = "结束时间")
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ public PageResult<List<WarningEveningComeStaVO>> listWarningEveningComeSta(HttpServletRequest request, @RequestHeader(value = "token") String token,
|
|
|
|
+ @RequestParam(value = "district", required = false) String district,
|
|
|
|
+ @RequestParam(value = "subdistrict", required = false) String subdistrict,
|
|
|
|
+ @RequestParam(value = "communityName", required = false) String communityName,
|
|
|
|
+ @RequestParam(value = "beginDate", required = false) String beginDate,
|
|
|
|
+ @RequestParam(value = "endDate", required = false) String endDate,
|
|
|
|
+ PageReqVO pageReqVo){
|
|
|
|
+ try {
|
|
|
|
+ UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
+ IPage<WarningEveningComeStaVO> pageResponse = this.warningEveningComeStaService.listWarningEveningComeSta(district,subdistrict,communityName,beginDate,endDate,loginUser ,pageReqVo);
|
|
|
|
+ return PageResult.success(pageResponse.getRecords(),pageResponse.getCurrent(),pageResponse.getSize(),pageResponse.getTotal());
|
|
|
|
+ }catch (BDException e) {
|
|
|
|
+ log.error("昼伏夜出人员预警列表查询-分页列表出现异常",e);
|
|
|
|
+ return PageResult.error(e.getMessage());
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("昼伏夜出人员预警管理: 昼伏夜出人员预警列表查询出现异常",e);
|
|
|
|
+ return PageResult.error( "获取列表失败");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|