|
|
|
@ -1,8 +1,10 @@ |
|
|
|
package com.hxhq.business.service.impl; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.hxhq.business.domain.Study; |
|
|
|
@ -146,7 +148,8 @@ public class StudyMethodServiceImpl extends ServiceImpl |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void checkAllMethodReadStatus(Long userId, Long studyId, Long studySubjectId) { |
|
|
|
public HashMap<String,Object> checkAllMethodReadStatus(Long userId, Long studyId, Long studySubjectId) { |
|
|
|
HashMap<String,Object> result=new HashMap<>(); |
|
|
|
Study study = studyService.getById(studyId); |
|
|
|
if(study==null){ |
|
|
|
throw new ServiceException("信息不存在"); |
|
|
|
@ -171,10 +174,12 @@ public class StudyMethodServiceImpl extends ServiceImpl |
|
|
|
} |
|
|
|
List<StudyMethod> list = this.list(studyMethodLambdaQueryWrapper); |
|
|
|
if(readCount != list.size()) { |
|
|
|
String ffmc = list.stream().map(StudyMethod::getFfmc).collect(Collectors.joining(",")); |
|
|
|
throw new ServiceException("[" + ffmc + "方案还未阅读,请先阅读后再进行试验操作]"); |
|
|
|
String toUrl=study.getType().equals(StudyTypeEnum.sy.getValue())?("/study/enter/"+study.getId()+"/syff"):study.getType().equals(StudyTypeEnum.fsy.getValue())?("/nonTrial/enter/"+study.getId()+"/syff"):study.getType().equals(StudyTypeEnum.mjy.getValue())?("/drug/enter/"+study.getId()+"/syff"):""; |
|
|
|
result.put("toUrl",toUrl); |
|
|
|
result.put("ffmc","【" + list.stream().map(StudyMethod::getFfmc).collect(Collectors.joining(",")) + "】方法还未阅读,请先阅读后再进行操作]"); |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
} |