|
|
@ -17,6 +17,7 @@ import org.dromara.business.api.domain.vo.RemoteBusinessAlertVo; |
|
|
|
import org.dromara.common.core.constant.AiCompareStatusConstants; |
|
|
|
|
|
|
|
import org.dromara.common.core.constant.BusinessConstants; |
|
|
|
import org.dromara.common.core.utils.MapstructUtils; |
|
|
|
import org.dromara.common.core.utils.StringUtils; |
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery; |
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
@ -32,10 +33,7 @@ import org.dromara.sample.media.service.IMediaService; |
|
|
|
import org.dromara.sample.wayline.mapper.IAiCompareMapper; |
|
|
|
import org.dromara.sample.wayline.mapper.IAiComparePlateMapper; |
|
|
|
import org.dromara.sample.wayline.mapper.IWaylineJobMapper; |
|
|
|
import org.dromara.sample.wayline.model.dto.AiCompareDTO; |
|
|
|
import org.dromara.sample.wayline.model.dto.AiCompareMediaFileDTO; |
|
|
|
import org.dromara.sample.wayline.model.dto.AiComparePlateDTO; |
|
|
|
import org.dromara.sample.wayline.model.dto.FrameDTO; |
|
|
|
import org.dromara.sample.wayline.model.dto.*; |
|
|
|
import org.dromara.sample.wayline.model.entity.AiCompareEntity; |
|
|
|
import org.dromara.sample.wayline.model.entity.AiComparePlateEntity; |
|
|
|
import org.dromara.sample.wayline.model.entity.AiCompareQueueEntity; |
|
|
@ -150,7 +148,7 @@ public class AiCompareServiceImpl implements IAiCompareService { |
|
|
|
if(isIllegal){ |
|
|
|
QueryWrapper<AiComparePlateEntity> queryWrapper = new QueryWrapper<AiComparePlateEntity>().eq("file_id", e.getFileId()); |
|
|
|
AiComparePlateEntity plateEntity = aiComparePlateMapper.selectOne(queryWrapper); |
|
|
|
e.setPatternUrl(fileService.getObjectUrlOne(MinIOConstants.BUCKET_PATTERN,plateEntity.getPatternName(),seconds).toString()); |
|
|
|
e.setPatternUrl(fileService.getObjectUrlOne(MinIOConstants.BUCKET_ALERT,plateEntity.getPatternName(),seconds).toString()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
@ -187,12 +185,16 @@ public class AiCompareServiceImpl implements IAiCompareService { |
|
|
|
return listMediaFile(aiCompareEntity.getJobId(),3600,true); |
|
|
|
} |
|
|
|
@Override |
|
|
|
public Boolean pictureFrame(FrameDTO frameDTO) { |
|
|
|
if(!frameDTO.getFrameList().isEmpty()){ |
|
|
|
throw new RuntimeException("未获取到违建数据"); |
|
|
|
} |
|
|
|
public Boolean pictureFrame(Map<String,Object>objectMap) { |
|
|
|
FrameDTO frameDTO = Convert.convert(FrameDTO.class, objectMap); |
|
|
|
AiCompareEntity aiCompareEntity = aiCompareMapper.selectById(frameDTO.getCompareId()); |
|
|
|
aiCompareEntity.setStatus(AiCompareStatusConstants.COMPARE_STATUS_3); |
|
|
|
aiCompareEntity.setId(frameDTO.getCompareId()); |
|
|
|
aiCompareMapper.updateById(aiCompareEntity); |
|
|
|
frameDTO.setJobName(aiCompareEntity.getJobName()); |
|
|
|
frameDTO.setFileUrl(fileService.getObjectUrlOne(MinIOConstants.BUCKET_MEDIAFILE,frameDTO.getFileUrl(),3600).toString()); |
|
|
|
frameDTO.setMateFileUrl(fileService.getObjectUrlOne(MinIOConstants.BUCKET_MEDIAFILE,frameDTO.getMateFileUrl(),3600).toString()); |
|
|
|
String topic = TopicConst.IMAGE +TopicConst.FRAME; |
|
|
|
|
|
|
|
mqttGatewayPublish.publish(topic,new CommonTopicRequest().setData(frameDTO),1); |
|
|
|
return true; |
|
|
|
} |
|
|
@ -218,9 +220,12 @@ public class AiCompareServiceImpl implements IAiCompareService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean alert(List<Map<String, Object>> mapList) { |
|
|
|
|
|
|
|
public Boolean alert(Map<String,Object>map) { |
|
|
|
|
|
|
|
System.out.println(map); |
|
|
|
AiCompareAlertDTO compareAlertDTO = Convert.convert(AiCompareAlertDTO.class,map); |
|
|
|
RemoteBusinessAlertBo businessAlertBo=new RemoteBusinessAlertBo(); |
|
|
|
businessAlertService.saveBusinessAlert(businessAlertBo); |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|