| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.grid.EventAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventVO; |
| | | import com.panzhihua.service_grid.model.dos.EventResourceDO; |
| | | import com.panzhihua.service_grid.service.EventResourceService; |
| | | import com.panzhihua.service_grid.service.EventService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | return eventService.eventDetails(id); |
| | | }; |
| | | |
| | | /** |
| | | * 添加突发事件 |
| | | * @param emergenciesEventAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/addEmergencies") |
| | | R addEmergencies(@RequestBody EmergenciesEventAddDTO emergenciesEventAddDTO){ |
| | | return eventService.addEmergencies(emergenciesEventAddDTO); |
| | | }; |
| | | /** |
| | | * 保存草稿 |
| | | * @param {classNameFirstLower}AddDTO 添加事件传递对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/saveEmergenciesDraft") |
| | | R saveEmergenciesDraft(@RequestBody EmergenciesEventEditDTO emergenciesEventEditDTO){ |
| | | return eventService.saveEmergenciesDraft(emergenciesEventEditDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 突发事件上报社区 |
| | | * @param emergenciesEventReportDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/emergenciesReport") |
| | | R emergenciesReport(@RequestBody EmergenciesEventReportDTO emergenciesEventReportDTO){ |
| | | return eventService.emergenciesReport(emergenciesEventReportDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 突发事件撤销 |
| | | * @param eventRevokeDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/emergenciesRevoke") |
| | | R emergenciesRevoke(@RequestBody EventRevokeDTO eventRevokeDTO){ |
| | | return eventService.emergenciesRevoke(eventRevokeDTO); |
| | | } |
| | | /** |
| | | * 处理事件 |
| | | * @param eventDealDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/dealEvent") |
| | | R dealEvent(@RequestBody EventDealDTO eventDealDTO){ |
| | | return eventService.dealEvent(eventDealDTO); |
| | | } |
| | | |
| | | /** |
| | | * 处理事件 |
| | | * @param eventVerifyDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/verify") |
| | | R verifyEvent(@RequestBody EventVerifyDTO eventVerifyDTO){ |
| | | return eventService.verifyEvent(eventVerifyDTO); |
| | | } |
| | | |
| | | /** |
| | | * 重新发布事件 |
| | | * @param eventRepublicDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/republish") |
| | | R republishEvent(@RequestBody EventRepublicDTO eventRepublicDTO){ |
| | | return eventService.republishEvent(eventRepublicDTO); |
| | | } |
| | | |
| | | } |