|
@ -1,5 +1,6 @@ |
|
|
package org.dromara.system.service.impl; |
|
|
package org.dromara.system.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.ListUtil; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import org.dromara.common.core.utils.MapstructUtils; |
|
|
import org.dromara.common.core.utils.MapstructUtils; |
|
|
import org.dromara.common.core.utils.StringUtils; |
|
|
import org.dromara.common.core.utils.StringUtils; |
|
@ -9,6 +10,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
|
import org.dromara.system.api.domain.vo.RemoteAiLabelPostVo; |
|
|
|
|
|
import org.dromara.system.domain.vo.AiLabelPostVo; |
|
|
|
|
|
import org.dromara.system.domain.vo.SysPostVo; |
|
|
|
|
|
import org.dromara.system.service.IAiLabelPostService; |
|
|
|
|
|
import org.dromara.system.service.ISysPostService; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.dromara.system.domain.bo.AiLabelBo; |
|
|
import org.dromara.system.domain.bo.AiLabelBo; |
|
|
import org.dromara.system.domain.vo.AiLabelVo; |
|
|
import org.dromara.system.domain.vo.AiLabelVo; |
|
@ -20,6 +27,7 @@ import java.util.Comparator; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
import java.util.Collection; |
|
|
import java.util.Collection; |
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* ai 识别类型Service业务层处理 |
|
|
* ai 识别类型Service业务层处理 |
|
@ -33,6 +41,12 @@ public class AiLabelServiceImpl implements IAiLabelService { |
|
|
|
|
|
|
|
|
private final AiLabelMapper baseMapper; |
|
|
private final AiLabelMapper baseMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private ISysPostService sysPostService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private IAiLabelPostService aiLabelPostService; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 查询ai 识别类型 |
|
|
* 查询ai 识别类型 |
|
|
* |
|
|
* |
|
@ -148,4 +162,23 @@ public class AiLabelServiceImpl implements IAiLabelService { |
|
|
public String getFlowCode(String labelCode) { |
|
|
public String getFlowCode(String labelCode) { |
|
|
return this.baseMapper.selectOne(new LambdaQueryWrapper<AiLabel>().eq(AiLabel::getLabelEn, labelCode)).getFlowCode(); |
|
|
return this.baseMapper.selectOne(new LambdaQueryWrapper<AiLabel>().eq(AiLabel::getLabelEn, labelCode)).getFlowCode(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<AiLabelVo> selectLabelByList(String postCode) { |
|
|
|
|
|
SysPostVo sysPostVo = sysPostService.selectLableByList(postCode,null); |
|
|
|
|
|
if(sysPostVo != null){ |
|
|
|
|
|
List<AiLabelPostVo> postVoList = aiLabelPostService.queryListByLabel(sysPostVo.getPostId()); |
|
|
|
|
|
return postVoList.stream() |
|
|
|
|
|
.map(aiLabel -> { |
|
|
|
|
|
AiLabelVo aiLabelVo = new AiLabelVo(); |
|
|
|
|
|
aiLabelVo.setLabelId(aiLabel.getLabelId()); |
|
|
|
|
|
aiLabelVo.setLabelEn(aiLabel.getLabelEn()); |
|
|
|
|
|
aiLabelVo.setLabelCn(aiLabel.getLabelCn()); |
|
|
|
|
|
aiLabelVo.setAiName(aiLabel.getAiName()); |
|
|
|
|
|
return aiLabelVo; |
|
|
|
|
|
}) |
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
return ListUtil.empty(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|