|
@@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@@ -64,7 +65,7 @@ public class DisEventController {
|
|
|
|
|
|
|
|
@GetMapping("/findByPage")
|
|
@GetMapping("/findByPage")
|
|
|
@ApiOperation("事件分页查询(多条件 + 状态过滤,接报/核实/转接/跟踪/催办共用)")
|
|
@ApiOperation("事件分页查询(多条件 + 状态过滤,接报/核实/转接/跟踪/催办共用)")
|
|
|
- @Anonymous
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:list')")
|
|
|
public AjaxResult findByPage(DisEventPageDTO dto) {
|
|
public AjaxResult findByPage(DisEventPageDTO dto) {
|
|
|
Page<DisEventVO> page = service.findByPage(dto);
|
|
Page<DisEventVO> page = service.findByPage(dto);
|
|
|
return AjaxResult.success(page);
|
|
return AjaxResult.success(page);
|
|
@@ -72,7 +73,7 @@ public class DisEventController {
|
|
|
|
|
|
|
|
@GetMapping("/statusOptions")
|
|
@GetMapping("/statusOptions")
|
|
|
@ApiOperation("事件状态下拉项(EventStatusEnum,供前端筛选使用)")
|
|
@ApiOperation("事件状态下拉项(EventStatusEnum,供前端筛选使用)")
|
|
|
- @Anonymous
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:list')")
|
|
|
public AjaxResult statusOptions() {
|
|
public AjaxResult statusOptions() {
|
|
|
List<EnumOptionVO> options = Arrays.stream(EventStatusEnum.values())
|
|
List<EnumOptionVO> options = Arrays.stream(EventStatusEnum.values())
|
|
|
.map(item -> new EnumOptionVO(item.getCode(), item.getDesc()))
|
|
.map(item -> new EnumOptionVO(item.getCode(), item.getDesc()))
|
|
@@ -82,14 +83,14 @@ public class DisEventController {
|
|
|
|
|
|
|
|
@GetMapping("/getDetail/{id}")
|
|
@GetMapping("/getDetail/{id}")
|
|
|
@ApiOperation("事件详情(主表当前值 + 操作日志时间线)")
|
|
@ApiOperation("事件详情(主表当前值 + 操作日志时间线)")
|
|
|
- @Anonymous
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:list')")
|
|
|
public AjaxResult getDetail(@PathVariable Long id) {
|
|
public AjaxResult getDetail(@PathVariable Long id) {
|
|
|
return AjaxResult.success(service.getDetail(id));
|
|
return AjaxResult.success(service.getDetail(id));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/stats")
|
|
@GetMapping("/stats")
|
|
|
@ApiOperation("多维条件统计(事件总数/损失合计/平均损失/重大及以上事件数)")
|
|
@ApiOperation("多维条件统计(事件总数/损失合计/平均损失/重大及以上事件数)")
|
|
|
- @Anonymous
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:list')")
|
|
|
public AjaxResult stats(DisEventPageDTO dto) {
|
|
public AjaxResult stats(DisEventPageDTO dto) {
|
|
|
EventStatsVO stats = service.stats(dto);
|
|
EventStatsVO stats = service.stats(dto);
|
|
|
return AjaxResult.success(stats);
|
|
return AjaxResult.success(stats);
|
|
@@ -97,7 +98,7 @@ public class DisEventController {
|
|
|
|
|
|
|
|
@GetMapping("/logs/{eventId}")
|
|
@GetMapping("/logs/{eventId}")
|
|
|
@ApiOperation("事件操作日志时间线(可选按 operType 过滤,如催办记录 operType=8)")
|
|
@ApiOperation("事件操作日志时间线(可选按 operType 过滤,如催办记录 operType=8)")
|
|
|
- @Anonymous
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:list')")
|
|
|
public AjaxResult logs(@PathVariable Long eventId,
|
|
public AjaxResult logs(@PathVariable Long eventId,
|
|
|
@RequestParam(required = false) Integer operType) {
|
|
@RequestParam(required = false) Integer operType) {
|
|
|
List<DisEventLog> logs = eventLogService.listByEventId(eventId);
|
|
List<DisEventLog> logs = eventLogService.listByEventId(eventId);
|
|
@@ -111,14 +112,14 @@ public class DisEventController {
|
|
|
|
|
|
|
|
@GetMapping("/logs")
|
|
@GetMapping("/logs")
|
|
|
@ApiOperation("事件操作日志分页查询")
|
|
@ApiOperation("事件操作日志分页查询")
|
|
|
- @Anonymous
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:list')")
|
|
|
public AjaxResult logPage(EventLogPageDTO dto) {
|
|
public AjaxResult logPage(EventLogPageDTO dto) {
|
|
|
return AjaxResult.success(eventLogService.findByPage(dto));
|
|
return AjaxResult.success(eventLogService.findByPage(dto));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/urge/findByPage")
|
|
@GetMapping("/urge/findByPage")
|
|
|
@ApiOperation("工作催办分页查询(事件 + 催办次数 + 最近催办信息)")
|
|
@ApiOperation("工作催办分页查询(事件 + 催办次数 + 最近催办信息)")
|
|
|
- @Anonymous
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:list')")
|
|
|
public AjaxResult findUrgePage(EventUrgePageDTO dto) {
|
|
public AjaxResult findUrgePage(EventUrgePageDTO dto) {
|
|
|
Page<EventUrgeRowVO> page = service.findUrgePage(dto);
|
|
Page<EventUrgeRowVO> page = service.findUrgePage(dto);
|
|
|
return AjaxResult.success(page);
|
|
return AjaxResult.success(page);
|
|
@@ -129,6 +130,7 @@ public class DisEventController {
|
|
|
@PostMapping("/saveReport")
|
|
@PostMapping("/saveReport")
|
|
|
@ApiOperation("新增接报(自动生成事件编号,状态置为待核实)")
|
|
@ApiOperation("新增接报(自动生成事件编号,状态置为待核实)")
|
|
|
@Log(title = "新增事件接报", businessType = BusinessType.INSERT)
|
|
@Log(title = "新增事件接报", businessType = BusinessType.INSERT)
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:add')")
|
|
|
public AjaxResult saveReport(@RequestBody EventSaveDTO dto) {
|
|
public AjaxResult saveReport(@RequestBody EventSaveDTO dto) {
|
|
|
DisEvent saved = service.saveReport(dto);
|
|
DisEvent saved = service.saveReport(dto);
|
|
|
return AjaxResult.success("接报成功", saved);
|
|
return AjaxResult.success("接报成功", saved);
|
|
@@ -137,6 +139,7 @@ public class DisEventController {
|
|
|
@PutMapping("/updateById")
|
|
@PutMapping("/updateById")
|
|
|
@ApiOperation("编辑接报信息(仅待核实可改,编号与状态不可改)")
|
|
@ApiOperation("编辑接报信息(仅待核实可改,编号与状态不可改)")
|
|
|
@Log(title = "修改事件接报", businessType = BusinessType.UPDATE)
|
|
@Log(title = "修改事件接报", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PreAuthorize("@ss.hasAnyPermi('dispatch:event:add,dispatch:event:edit')")
|
|
|
public AjaxResult updateById(@RequestBody EventSaveDTO dto) {
|
|
public AjaxResult updateById(@RequestBody EventSaveDTO dto) {
|
|
|
service.updateEvent(dto);
|
|
service.updateEvent(dto);
|
|
|
return AjaxResult.success("修改成功");
|
|
return AjaxResult.success("修改成功");
|
|
@@ -145,6 +148,7 @@ public class DisEventController {
|
|
|
@DeleteMapping("/deleteById")
|
|
@DeleteMapping("/deleteById")
|
|
|
@ApiOperation("删除事件(仅待核实可删)")
|
|
@ApiOperation("删除事件(仅待核实可删)")
|
|
|
@Log(title = "删除事件", businessType = BusinessType.DELETE)
|
|
@Log(title = "删除事件", businessType = BusinessType.DELETE)
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:remove')")
|
|
|
public AjaxResult deleteById(@RequestParam Long id) {
|
|
public AjaxResult deleteById(@RequestParam Long id) {
|
|
|
service.deleteEvent(id);
|
|
service.deleteEvent(id);
|
|
|
return AjaxResult.success("删除成功");
|
|
return AjaxResult.success("删除成功");
|
|
@@ -176,6 +180,7 @@ public class DisEventController {
|
|
|
@PutMapping("/verify/{id}")
|
|
@PutMapping("/verify/{id}")
|
|
|
@ApiOperation("初判核实(真实→已核实、不实→不实事件)")
|
|
@ApiOperation("初判核实(真实→已核实、不实→不实事件)")
|
|
|
@Log(title = "初判核实事件", businessType = BusinessType.UPDATE)
|
|
@Log(title = "初判核实事件", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:verify')")
|
|
|
public AjaxResult verify(@PathVariable Long id, @RequestBody EventVerifyDTO dto) {
|
|
public AjaxResult verify(@PathVariable Long id, @RequestBody EventVerifyDTO dto) {
|
|
|
service.verify(id, dto);
|
|
service.verify(id, dto);
|
|
|
return AjaxResult.success("核实成功");
|
|
return AjaxResult.success("核实成功");
|
|
@@ -186,6 +191,7 @@ public class DisEventController {
|
|
|
@PostMapping("/transfer")
|
|
@PostMapping("/transfer")
|
|
|
@ApiOperation("电话转接(写日志,不改事件状态)")
|
|
@ApiOperation("电话转接(写日志,不改事件状态)")
|
|
|
@Log(title = "转接事件", businessType = BusinessType.UPDATE)
|
|
@Log(title = "转接事件", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:transfer')")
|
|
|
public AjaxResult transfer(@RequestBody EventTransferDTO dto) {
|
|
public AjaxResult transfer(@RequestBody EventTransferDTO dto) {
|
|
|
service.transfer(dto);
|
|
service.transfer(dto);
|
|
|
return AjaxResult.success("转接成功");
|
|
return AjaxResult.success("转接成功");
|
|
@@ -194,6 +200,7 @@ public class DisEventController {
|
|
|
@PostMapping("/report")
|
|
@PostMapping("/report")
|
|
|
@ApiOperation("上报报送(写日志,不改事件状态)")
|
|
@ApiOperation("上报报送(写日志,不改事件状态)")
|
|
|
@Log(title = "报送事件", businessType = BusinessType.UPDATE)
|
|
@Log(title = "报送事件", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:report')")
|
|
|
public AjaxResult report(@RequestBody EventTransferDTO dto) {
|
|
public AjaxResult report(@RequestBody EventTransferDTO dto) {
|
|
|
service.report(dto);
|
|
service.report(dto);
|
|
|
return AjaxResult.success("报送成功");
|
|
return AjaxResult.success("报送成功");
|
|
@@ -204,6 +211,7 @@ public class DisEventController {
|
|
|
@PostMapping("/startDispose")
|
|
@PostMapping("/startDispose")
|
|
|
@ApiOperation("开始处置(已核实 → 处置中)")
|
|
@ApiOperation("开始处置(已核实 → 处置中)")
|
|
|
@Log(title = "开始处置", businessType = BusinessType.UPDATE)
|
|
@Log(title = "开始处置", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:dispose')")
|
|
|
public AjaxResult startDispose(@RequestBody EventTrackDTO dto) {
|
|
public AjaxResult startDispose(@RequestBody EventTrackDTO dto) {
|
|
|
service.startDispose(dto);
|
|
service.startDispose(dto);
|
|
|
return AjaxResult.success("已开始处置");
|
|
return AjaxResult.success("已开始处置");
|
|
@@ -212,6 +220,7 @@ public class DisEventController {
|
|
|
@PostMapping("/track")
|
|
@PostMapping("/track")
|
|
|
@ApiOperation("处置跟踪(可多次记录,不改事件状态)")
|
|
@ApiOperation("处置跟踪(可多次记录,不改事件状态)")
|
|
|
@Log(title = "处置跟踪", businessType = BusinessType.INSERT)
|
|
@Log(title = "处置跟踪", businessType = BusinessType.INSERT)
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:track')")
|
|
|
public AjaxResult track(@RequestBody EventTrackDTO dto) {
|
|
public AjaxResult track(@RequestBody EventTrackDTO dto) {
|
|
|
service.track(dto);
|
|
service.track(dto);
|
|
|
return AjaxResult.success("跟踪记录保存成功");
|
|
return AjaxResult.success("跟踪记录保存成功");
|
|
@@ -220,6 +229,7 @@ public class DisEventController {
|
|
|
@PostMapping("/release/{id}")
|
|
@PostMapping("/release/{id}")
|
|
|
@ApiOperation("事件解除(处置中 → 已解除)")
|
|
@ApiOperation("事件解除(处置中 → 已解除)")
|
|
|
@Log(title = "解除事件", businessType = BusinessType.UPDATE)
|
|
@Log(title = "解除事件", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:release')")
|
|
|
public AjaxResult release(@PathVariable Long id, @RequestBody EventReleaseDTO dto) {
|
|
public AjaxResult release(@PathVariable Long id, @RequestBody EventReleaseDTO dto) {
|
|
|
service.release(id, dto);
|
|
service.release(id, dto);
|
|
|
return AjaxResult.success("事件已解除");
|
|
return AjaxResult.success("事件已解除");
|
|
@@ -230,6 +240,7 @@ public class DisEventController {
|
|
|
@PostMapping("/urge")
|
|
@PostMapping("/urge")
|
|
|
@ApiOperation("工作催办(写日志,不改事件状态)")
|
|
@ApiOperation("工作催办(写日志,不改事件状态)")
|
|
|
@Log(title = "工作催办", businessType = BusinessType.UPDATE)
|
|
@Log(title = "工作催办", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('dispatch:event:urge')")
|
|
|
public AjaxResult urge(@RequestBody EventUrgeDTO dto) {
|
|
public AjaxResult urge(@RequestBody EventUrgeDTO dto) {
|
|
|
service.urge(dto);
|
|
service.urge(dto);
|
|
|
return AjaxResult.success("催办已发送");
|
|
return AjaxResult.success("催办已发送");
|