diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMapper.java index ba7ff5f..5439d48 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMapper.java @@ -36,7 +36,7 @@ public interface StudyMapper extends BaseMapper * @param studyId * @return */ - String queryNotFinishFormName(@Param("studyId") Long studyId); + List queryNotFinishFormName(@Param("studyId") Long studyId); /** * 获取首页统计的表单数量 diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyServiceImpl.java index 2ac85d8..28ddab8 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyServiceImpl.java @@ -347,9 +347,9 @@ public class StudyServiceImpl extends ServiceImpl implements throw new ServiceException("该试验已锁定"); } checkPermit(study); - String name = baseMapper.queryNotFinishFormName(study.getId()); - if(StringUtils.isNoneBlank(name)){ - throw new ServiceException("该试验下"+name+"还未结束,请先完成该表单后再进行锁定试验"); + List nameList = baseMapper.queryNotFinishFormName(study.getId()); + if(nameList!=null && nameList.size()>0){ + throw new ServiceException("该试验下"+String.join("、",nameList)+"还未结束,请先完成该表单后再进行锁定试验"); } } diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyMapper.xml index 6d8bb29..1cd599a 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyMapper.xml @@ -24,7 +24,19 @@