From 4a1d862511cf9c88c6c268cf12241029dd541546 Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Thu, 8 Jan 2026 17:21:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[=E8=AF=95=E9=AA=8C=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=20=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/StudySubjectController.java | 10 +++++++++ .../business/dto/study/StudyFormFillListDto.java | 25 ++++++++++++++++++++++ .../business/service/IStudySubjectService.java | 6 ++++++ .../business/service/impl/StudyServiceImpl.java | 3 ++- .../service/impl/StudySubjectServiceImpl.java | 9 ++++++++ .../mapper/business/StudyFormFillMapper.xml | 9 +++++--- 6 files changed, 58 insertions(+), 4 deletions(-) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudySubjectController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudySubjectController.java index ee48989..07564a8 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudySubjectController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudySubjectController.java @@ -72,4 +72,14 @@ public class StudySubjectController extends BaseController return AjaxResult.success(studySubjectService.isMatchSubject(studySubjectId)); } + /** + * 判断用户是否是QA部门 + */ + @GetMapping("/isQa") + public AjaxResult isQa() + { + return AjaxResult.success(studySubjectService.isQA()); + } + + } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillListDto.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillListDto.java index c6a21b1..f8ffe15 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillListDto.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillListDto.java @@ -8,4 +8,29 @@ import com.hxhq.business.domain.StudyFormFill; */ public class StudyFormFillListDto extends StudyFormFill { + /** + * 学科负责人id + */ + private Long subjectLeader; + + /** + * 试验SD(试验负责人) + */ + private Long studyLeader; + + public Long getSubjectLeader() { + return subjectLeader; + } + + public void setSubjectLeader(Long subjectLeader) { + this.subjectLeader = subjectLeader; + } + + public Long getStudyLeader() { + return studyLeader; + } + + public void setStudyLeader(Long studyLeader) { + this.studyLeader = studyLeader; + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudySubjectService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudySubjectService.java index b415336..7364446 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudySubjectService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudySubjectService.java @@ -40,4 +40,10 @@ public interface IStudySubjectService extends IService */ Boolean isMatchSubject(Long studySubjectId); + /** + * 判断是否是QA部门的用户 + * @return + */ + Boolean isQA(); + } 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 8121209..5265a28 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 @@ -120,7 +120,8 @@ public class StudyServiceImpl extends ServiceImpl implements // 总结:有这个菜单,特殊部QA可以看所有+审核表单,其他只能看部门级下级部门的列表(部长可以操作+审核表单) Long deptId = sysUserService.selectUserById(SecurityUtils.getLoginUser().getUserid()).getDeptId(); - if (!deptId.equals(216L)) + Long qaDeptId = 216L; + if (!deptId.equals(qaDeptId)) { queryWrapper.apply("(\n" + "s.dept_id IN(\n" + diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectServiceImpl.java index 5a17923..90b56b7 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudySubjectServiceImpl.java @@ -20,6 +20,7 @@ import com.hxhq.business.service.IStudySubjectUserService; import com.hxhq.business.utils.JctUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.security.utils.SecurityUtils; +import com.hxhq.system.service.ISysUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudySubjectMapper; @@ -43,6 +44,8 @@ public class StudySubjectServiceImpl extends ServiceImpl0; } } + + @Override + public Boolean isQA() { + Long qaDeptId = 216L; + return sysUserService.selectUserById(SecurityUtils.getUserId()).getDeptId().equals(qaDeptId); + } } diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml index 8a7b3c9..0173ffc 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml @@ -5,8 +5,11 @@ \ No newline at end of file