huanghongfa
2021-09-02 177249c76aeea0b4bf8d8816d4994e3b445b45ce
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/CommonEventApi.java
@@ -1,23 +1,21 @@
package com.panzhihua.grid_app.api;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.grid.*;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComMngPopulationVO;
import com.panzhihua.common.model.vos.grid.EventDetailsVO;
import com.panzhihua.common.model.vos.grid.EventVO;
import com.panzhihua.common.service.grid.GridService;
import com.panzhihua.common.utlis.ClazzUtils;
import com.panzhihua.common.utlis.IdCardUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 *
@@ -25,7 +23,7 @@
 * @version 1.0
 * @since 1.0
 * @date 2021-05-26
 * */
 */
@Slf4j
@RestController
@RequestMapping("/event/common")
@@ -39,13 +37,16 @@
        if(eventType==null){
            return false;
        }
        boolean inType = eventType==1 | eventType==2 |eventType==3| eventType==4| eventType==5| eventType==6;
        boolean inType =
            eventType == 1 | eventType == 2 | eventType == 3 | eventType == 4 | eventType == 5 | eventType == 6;
        return inType;
    }
    /**
     * 事件列表
     * @param pageEventDTO 查找事件
     *
     * @param pageEventDTO
     *            查找事件
     * @return 查找结果
     */
    @GetMapping("/usersList")
@@ -63,7 +64,9 @@
    /**
     * 新增并发布事件事件
     * @param commonEventAddDTO 添加事件传递对象
     *
     * @param commonEventAddDTO
     *            添加事件传递对象
     * @return 新增结果
     */
    @PostMapping("/release")
@@ -82,7 +85,9 @@
    /**
     * 保存草稿
     * @param commonEventEditDTO 保存草稿传递对象
     *
     * @param commonEventEditDTO
     *            保存草稿传递对象
     * @return 新增结果
     */
    @PostMapping("/draft")
@@ -102,7 +107,9 @@
    /**
     * 上报社区
     * @param commonEventReportDTO 上报社区传递对象
     *
     * @param commonEventReportDTO
     *            上报社区传递对象
     * @return 上报结果
     */
    @PutMapping("/report")
@@ -118,7 +125,9 @@
    /**
     * 处理事件
     * @param commonEventDealDTO 修改事件传递对象
     *
     * @param commonEventDealDTO
     *            修改事件传递对象
     * @return 处理结果
     */
    @PutMapping("/deal")
@@ -136,7 +145,9 @@
    /**
     * 验证事件
     * @param commonEventVerifyDTO 验证事件传递对象
     *
     * @param commonEventVerifyDTO
     *            验证事件传递对象
     * @return 验证结果
     */
    @PutMapping("/verify")
@@ -149,10 +160,11 @@
        return gridService.verifyEvent(commonEventVerifyDTO);
    }
    /**
     * 直接上报社区
     * @param commonEventDirectReportDTO 上报社区传递对象
     *
     * @param commonEventDirectReportDTO
     *            上报社区传递对象
     * @return 上报结果
     */
    @PostMapping("/reportDirect")
@@ -165,7 +177,5 @@
        commonEventDirectReportDTO.setCommunityId(loginUserInfoVO.getCommunityId());
        return gridService.reportDirect(commonEventDirectReportDTO);
    }
}