|
@@ -5,17 +5,22 @@ import com.diagbot.dto.GetModuleInfoOneDTO;
|
|
import com.diagbot.dto.QcModuleDetailDTO;
|
|
import com.diagbot.dto.QcModuleDetailDTO;
|
|
import com.diagbot.dto.QuestionDTO;
|
|
import com.diagbot.dto.QuestionDTO;
|
|
import com.diagbot.entity.QcModuleDetail;
|
|
import com.diagbot.entity.QcModuleDetail;
|
|
|
|
+import com.diagbot.entity.QcModuleInfo;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonException;
|
|
import com.diagbot.exception.CommonException;
|
|
import com.diagbot.service.impl.QcModuleInfoServiceImpl;
|
|
import com.diagbot.service.impl.QcModuleInfoServiceImpl;
|
|
import com.diagbot.util.BeanUtil;
|
|
import com.diagbot.util.BeanUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
|
|
+import com.diagbot.util.ListUtil;
|
|
import com.diagbot.vo.GetModuleInfoOneVO;
|
|
import com.diagbot.vo.GetModuleInfoOneVO;
|
|
|
|
+import com.diagbot.vo.GetModuleMapVO;
|
|
import com.diagbot.vo.QuestionIdsVO;
|
|
import com.diagbot.vo.QuestionIdsVO;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -69,4 +74,29 @@ public class QcModuleInfoFacade extends QcModuleInfoServiceImpl {
|
|
getModuleInfoOneDTO.setModuleDetail(map);
|
|
getModuleInfoOneDTO.setModuleDetail(map);
|
|
return getModuleInfoOneDTO;
|
|
return getModuleInfoOneDTO;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据模块获取模板信息
|
|
|
|
+ *
|
|
|
|
+ * @param getModuleMapVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public Map<Long, GetModuleInfoOneDTO> getModuleMap(GetModuleMapVO getModuleMapVO) {
|
|
|
|
+ Map<Long, GetModuleInfoOneDTO> res = new LinkedHashMap<>();
|
|
|
|
+ List<QcModuleInfo> qcModuleInfoList = this.list(new QueryWrapper<QcModuleInfo>()
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .eq("mode_id", getModuleMapVO.getModeId())
|
|
|
|
+ .eq("hospital_id", getModuleMapVO.getHospitalId())
|
|
|
|
+ );
|
|
|
|
+ List<Long> ids = qcModuleInfoList.stream().map(r -> r.getId()).collect(Collectors.toList());
|
|
|
|
+ if (ListUtil.isEmpty(ids)) {
|
|
|
|
+ return new HashMap<>();
|
|
|
|
+ }
|
|
|
|
+ GetModuleInfoOneVO getModuleInfoOneVO = new GetModuleInfoOneVO();
|
|
|
|
+ for (Long id : ids) {
|
|
|
|
+ getModuleInfoOneVO.setModuleId(id);
|
|
|
|
+ res.put(id, getByIdFac(getModuleInfoOneVO));
|
|
|
|
+ }
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
}
|
|
}
|