From 99caaa8b3444d1024e58702490e74cfb79cfb9ee Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Tue, 13 Jan 2026 15:41:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[=E8=AF=95=E9=AA=8C=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=20=E5=8F=96=E6=B6=88=E9=82=80=E8=AF=B7=E4=BA=BA=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=98=AF=E5=90=A6=E6=9C=89=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/mapper/StudySubjectUserMapper.java | 12 +++++++++- .../service/impl/StudySubjectUserServiceImpl.java | 14 +++++++++++- .../mapper/business/StudySubjectUserMapper.xml | 26 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudySubjectUserMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudySubjectUserMapper.java index 73c2f99..4828243 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudySubjectUserMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudySubjectUserMapper.java @@ -2,6 +2,10 @@ package com.hxhq.business.mapper; import com.hxhq.business.domain.StudySubjectUser; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + /** * 试验-学科-成员Mapper接口 * @@ -10,5 +14,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface StudySubjectUserMapper extends BaseMapper { - + /** + * 获取有表单的和姓名 + * @param studyId + * @param userIdList + * @return + */ + String getHasFormNameList(@Param("studyId") Long studyId, @Param("userIdList") List userIdList); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectUserServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectUserServiceImpl.java index da2fe62..aec2cc7 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectUserServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectUserServiceImpl.java @@ -20,6 +20,8 @@ import com.hxhq.business.service.IStudyService; import com.hxhq.business.service.IStudySubjectService; import com.hxhq.business.utils.JctUtil; import com.hxhq.common.core.exception.ServiceException; +import com.hxhq.common.core.utils.StringUtils; +import com.hxhq.common.core.web.domain.AjaxResult; import com.hxhq.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -63,7 +65,7 @@ public class StudySubjectUserServiceImpl extends ServiceImpl itemList = form.getSubjectUserList(); //已经设置的学科信息 @@ -113,6 +115,16 @@ public class StudySubjectUserServiceImpl extends ServiceImpl0){ + String name = baseMapper.getHasFormNameList(study.getId(),deleteList.stream().map(o->o.getUserId()).collect(Collectors.toList())); + if(StringUtils.isNoneBlank(name)){ + throw new ServiceException(name+"已创建过表单,无法取消勾选"); + } + } + if(StringUtils.isBlank(form.getSign().getQmrmm())){ + return ; + } + studyService.checkPassword(form.getSign()); + if(deleteList.size()>0){ removeBatchByIds(deleteList); } diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudySubjectUserMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudySubjectUserMapper.xml index ac736a4..788714b 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudySubjectUserMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudySubjectUserMapper.xml @@ -3,4 +3,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + \ No newline at end of file