|
@ -9,6 +9,7 @@ import com.ruoyi.common.core.page.TableDataInfo; |
|
|
import com.ruoyi.common.enums.BusinessType; |
|
|
import com.ruoyi.common.enums.BusinessType; |
|
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
|
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
|
|
import com.zc.business.domain.DcWarning; |
|
|
import com.zc.business.domain.DcWarning; |
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.web.bind.annotation.DeleteMapping; |
|
|
import org.springframework.web.bind.annotation.DeleteMapping; |
|
@ -62,15 +63,7 @@ public class DcWarningController extends BaseController |
|
|
util.exportExcel(response, list, "预警信息数据"); |
|
|
util.exportExcel(response, list, "预警信息数据"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取预警信息详细信息 |
|
|
|
|
|
*/ |
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('business:warning:query')") |
|
|
|
|
|
@GetMapping(value = "/{id}") |
|
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Integer id) |
|
|
|
|
|
{ |
|
|
|
|
|
return AjaxResult.success(dcWarningService.selectDcWarningById(id)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 新增预警信息 |
|
|
* 新增预警信息 |
|
@ -102,10 +95,10 @@ public class DcWarningController extends BaseController |
|
|
*/ |
|
|
*/ |
|
|
@PreAuthorize("@ss.hasPermi('business:warning:remove')") |
|
|
@PreAuthorize("@ss.hasPermi('business:warning:remove')") |
|
|
@Log(title = "预警信息", businessType = BusinessType.DELETE) |
|
|
@Log(title = "预警信息", businessType = BusinessType.DELETE) |
|
|
@DeleteMapping("/{ids}") |
|
|
@DeleteMapping("/{id}") |
|
|
public AjaxResult remove(@PathVariable Integer[] ids) |
|
|
public AjaxResult remove(@PathVariable String id) |
|
|
{ |
|
|
{ |
|
|
return toAjax(dcWarningService.deleteDcWarningByIds(ids)); |
|
|
return toAjax(dcWarningService.deleteDcWarningByIds(id)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//感知事件转交通事件
|
|
|
//感知事件转交通事件
|
|
@ -114,4 +107,17 @@ public class DcWarningController extends BaseController |
|
|
{ |
|
|
{ |
|
|
return dcWarningService.updateWarningConvert(dcWarning); |
|
|
return dcWarningService.updateWarningConvert(dcWarning); |
|
|
} |
|
|
} |
|
|
|
|
|
//感知事件转交通事件
|
|
|
|
|
|
@PostMapping("/delete") |
|
|
|
|
|
public AjaxResult deleteDcWarningByStringId(@RequestBody DcWarning dcWarning) |
|
|
|
|
|
{ |
|
|
|
|
|
if (dcWarning==null){ |
|
|
|
|
|
return AjaxResult.error("参数错误"); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isBlank(dcWarning.getId())){ |
|
|
|
|
|
return AjaxResult.error("参数错误"); |
|
|
|
|
|
} |
|
|
|
|
|
return toAjax(dcWarningService.deleteDcWarningByStringId(dcWarning)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|