|
|
@ -2,6 +2,7 @@ package org.dromara.business.controller; |
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.nacos.client.utils.TenantUtil; |
|
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
@ -17,6 +18,8 @@ import org.dromara.common.log.annotation.Log; |
|
|
|
import org.dromara.common.log.enums.BusinessType; |
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery; |
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
|
import org.dromara.common.tenant.helper.TenantHelper; |
|
|
|
import org.dromara.common.web.core.BaseController; |
|
|
|
import org.dromara.system.api.RemoteNoticeService; |
|
|
|
import org.dromara.system.api.domain.bo.RemoteNoticeBo; |
|
|
@ -87,7 +90,7 @@ public class BusinessAlertController extends BaseController { |
|
|
|
*/ |
|
|
|
@Operation(summary ="ai实时流预警保存",description = "ai实时流预警保存") |
|
|
|
@PostMapping("/saveAlert") |
|
|
|
public void saveAlert(@RequestBody BusinessAlertVo vo) { |
|
|
|
public R saveAlert(@RequestBody BusinessAlertVo vo) { |
|
|
|
vo.setBusinessType(2); |
|
|
|
BusinessAlert businessAlert = businessAlertService.addBusinessAlert(vo); |
|
|
|
RemoteStartProcess startProcess = new RemoteStartProcess(); |
|
|
@ -102,13 +105,14 @@ public class BusinessAlertController extends BaseController { |
|
|
|
remoteNoticeBo.setIsRead(0); |
|
|
|
remoteNoticeBo.setCreateBy(1L); |
|
|
|
remoteNoticeBo.setCreateDept(1L); |
|
|
|
remoteNoticeBo.setCreateTime(new Date()); |
|
|
|
remoteNoticeBo.setCreateTime(vo.getCreateTime()); |
|
|
|
if (vo.getBusinessType() == 2){ |
|
|
|
vo.setImages(MinioUntil.getObjectUrlOne(MinIOConstants.BUCKET_DKCY, vo.getImages(), 3600).toString()); |
|
|
|
} |
|
|
|
remoteNoticeBo.setDeviceSn(vo.getDeviceSn()); |
|
|
|
remoteNoticeBo.setParam(JSON.toJSONString(vo)); |
|
|
|
remoteNoticeService.saveNotice(remoteNoticeBo); |
|
|
|
return R.ok(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|