|
@@ -11,6 +11,7 @@ import com.diagbot.dto.GetModuleDetailInfoDTO;
|
|
import com.diagbot.dto.GetModuleInfoOneDTO;
|
|
import com.diagbot.dto.GetModuleInfoOneDTO;
|
|
import com.diagbot.dto.GetModuleTypeDTO;
|
|
import com.diagbot.dto.GetModuleTypeDTO;
|
|
import com.diagbot.dto.GetQuestionInfoDTO;
|
|
import com.diagbot.dto.GetQuestionInfoDTO;
|
|
|
|
+import com.diagbot.dto.GetQuestiongAndModuleRelationsDTO;
|
|
import com.diagbot.dto.ModuleInfoDTO;
|
|
import com.diagbot.dto.ModuleInfoDTO;
|
|
import com.diagbot.dto.ModuleInfoListDTO;
|
|
import com.diagbot.dto.ModuleInfoListDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
@@ -36,6 +37,7 @@ import com.diagbot.vo.GetModuleDetailInfoVO;
|
|
import com.diagbot.vo.GetModuleInfoOneVO;
|
|
import com.diagbot.vo.GetModuleInfoOneVO;
|
|
import com.diagbot.vo.GetModuleInfoVO;
|
|
import com.diagbot.vo.GetModuleInfoVO;
|
|
import com.diagbot.vo.GetModuleTypeVO;
|
|
import com.diagbot.vo.GetModuleTypeVO;
|
|
|
|
+import com.diagbot.vo.GetQuestiongAndModuleRelationsVO;
|
|
import com.diagbot.vo.ModuleGetQuestionInfoVO;
|
|
import com.diagbot.vo.ModuleGetQuestionInfoVO;
|
|
import com.diagbot.vo.UpdateModuleInfoVO;
|
|
import com.diagbot.vo.UpdateModuleInfoVO;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -491,4 +493,30 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
return this.list(moduleInfoQueryWrapper);
|
|
return this.list(moduleInfoQueryWrapper);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 返回标签关联模板信息
|
|
|
|
+ *
|
|
|
|
+ * @param getQuestiongAndModuleRelationsVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public GetQuestiongAndModuleRelationsDTO getQuestiongAndModuleRelations(GetQuestiongAndModuleRelationsVO getQuestiongAndModuleRelationsVO){
|
|
|
|
+ StringBuffer errMsg = new StringBuffer();
|
|
|
|
+ List<ModuleDetail> moduleDetails = moduleDetailFacade.list(new QueryWrapper<ModuleDetail>()
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .eq("question_id", getQuestiongAndModuleRelationsVO.getQuestionId()));
|
|
|
|
+ if (ListUtil.isNotEmpty(moduleDetails)) {
|
|
|
|
+ List<Long> moduleIds = moduleDetails.stream().map(row -> row.getModuleId()).collect(Collectors.toList());
|
|
|
|
+ List<String> moduleNames = this.list(new QueryWrapper<ModuleInfo>()
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .in("id", moduleIds))
|
|
|
|
+ .stream().map(row -> row.getName()).collect(Collectors.toList());
|
|
|
|
+ for (String mouduleName: moduleNames) {
|
|
|
|
+ errMsg.append("该标签已关联").append("【" + mouduleName + "】").append("<br/>");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ GetQuestiongAndModuleRelationsDTO getQuestiongAndModuleRelationsDTO = new GetQuestiongAndModuleRelationsDTO();
|
|
|
|
+ getQuestiongAndModuleRelationsDTO.setRelationInfos(errMsg.append("是否删除?"));
|
|
|
|
+ return getQuestiongAndModuleRelationsDTO;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|