From 85803b9d60f62b2214bd25e41e929f6c1ec6de93 Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Thu, 22 Jan 2026 14:23:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[=E6=A1=A3=E6=A1=88=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=20=E8=AF=95=E9=AA=8C=E6=A1=A3=E6=A1=88=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hxhq/business/controller/StudyController.java | 23 ++++++++++++++++++++-- .../business/controller/StudyDrugController.java | 23 ++++++++++++++++++++-- .../controller/StudyNonTrialController.java | 23 ++++++++++++++++++++-- .../main/java/com/hxhq/business/domain/Study.java | 13 ++++++++++++ .../java/com/hxhq/business/mapper/StudyMapper.java | 13 ++++++++++++ .../com/hxhq/business/service/IStudyService.java | 11 +++++++++++ .../business/service/impl/StudyServiceImpl.java | 23 ++++++++++++++++++++++ .../main/resources/mapper/business/StudyMapper.xml | 12 +++++++++++ 8 files changed, 135 insertions(+), 6 deletions(-) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyController.java index c2bc6a2..aac9695 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyController.java @@ -16,6 +16,7 @@ import com.hxhq.business.form.study.StudySaveForm; import com.hxhq.business.form.study.StudySearchForm; import com.hxhq.business.service.IStudyJcgjService; import com.hxhq.common.core.utils.StringUtils; +import com.hxhq.common.security.annotation.Logical; import com.hxhq.common.security.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -59,7 +60,7 @@ public class StudyController extends BaseController /** * 获取试验详细信息 */ - @RequiresPermissions({"business:study:list"}) + @RequiresPermissions(value = {"business:study:list","business:archive:trial:list"},logical = Logical.OR) @GetMapping(value = "/info") public AjaxResult getInfo(Long id) { @@ -119,7 +120,7 @@ public class StudyController extends BaseController * @param form * @return */ - @RequiresPermissions({"business:study:detail"}) + @RequiresPermissions(value = {"business:study:detail","business:archive:trial:xq"},logical = Logical.OR) @GetMapping("/jcgjList") public TableDataInfo jcgjList(StudyJcgj form) { @@ -271,4 +272,22 @@ public class StudyController extends BaseController studyService.jy(form); return AjaxResult.success(); } + + // region 档案相关 + + /** + * 查询档案列表 + */ + @GetMapping("/archiveList") + @RequiresPermissions("business:archive:trial:list") + public TableDataInfo archiveList(StudySearchForm form) + { + form.setType(StudyTypeEnum.sy.getValue()); + startPage(); + List list = studyService.queryArchiveList(form); + TableDataInfo table = getDataTable(list); + return table; + } + + //endregion } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyDrugController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyDrugController.java index 4bcc6ca..f72c4bd 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyDrugController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyDrugController.java @@ -15,6 +15,7 @@ import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.core.web.controller.BaseController; import com.hxhq.common.core.web.domain.AjaxResult; import com.hxhq.common.core.web.page.TableDataInfo; +import com.hxhq.common.security.annotation.Logical; import com.hxhq.common.security.annotation.RequiresPermissions; import com.hxhq.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -58,7 +59,7 @@ public class StudyDrugController extends BaseController /** * 获取试验详细信息 */ - @RequiresPermissions({"business:form:drug:list"}) + @RequiresPermissions(value = {"business:form:drug:list","business:archive:drugConfig:list"},logical = Logical.OR) @GetMapping(value = "/info") public AjaxResult getInfo(Long id) { @@ -118,7 +119,7 @@ public class StudyDrugController extends BaseController * @param form * @return */ - @RequiresPermissions({"business:form:drug:detail"}) + @RequiresPermissions(value = {"business:form:drug:detail","business:archive:drugConfig:xq"},logical = Logical.OR) @GetMapping("/jcgjList") public TableDataInfo jcgjList(StudyJcgj form) { @@ -270,4 +271,22 @@ public class StudyDrugController extends BaseController studyService.jy(form); return AjaxResult.success(); } + + // region 档案相关 + + /** + * 查询档案列表 + */ + @GetMapping("/archiveList") + @RequiresPermissions("business:archive:drugConfig:list") + public TableDataInfo archiveList(StudySearchForm form) + { + form.setType(StudyTypeEnum.mjy.getValue()); + startPage(); + List list = studyService.queryArchiveList(form); + TableDataInfo table = getDataTable(list); + return table; + } + + //endregion } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyNonTrialController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyNonTrialController.java index f38785f..14ff4fc 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyNonTrialController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyNonTrialController.java @@ -15,6 +15,7 @@ import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.core.web.controller.BaseController; import com.hxhq.common.core.web.domain.AjaxResult; import com.hxhq.common.core.web.page.TableDataInfo; +import com.hxhq.common.security.annotation.Logical; import com.hxhq.common.security.annotation.RequiresPermissions; import com.hxhq.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -57,7 +58,7 @@ public class StudyNonTrialController extends BaseController /** * 获取试验详细信息 */ - @RequiresPermissions({"business:form:nonTrial:list"}) + @RequiresPermissions(value = {"business:form:nonTrial:list","business:archive:nonTrial:list"},logical = Logical.OR) @GetMapping(value = "/info") public AjaxResult getInfo(Long id) { @@ -117,7 +118,7 @@ public class StudyNonTrialController extends BaseController * @param form * @return */ - @RequiresPermissions({"business:form:nonTrial:detail"}) + @RequiresPermissions(value = {"business:form:nonTrial:detail","business:archive:nonTrial:xq"},logical = Logical.OR) @GetMapping("/jcgjList") public TableDataInfo jcgjList(StudyJcgj form) { @@ -269,4 +270,22 @@ public class StudyNonTrialController extends BaseController studyService.jy(form); return AjaxResult.success(); } + + // region 档案相关 + + /** + * 查询档案列表 + */ + @GetMapping("/archiveList") + @RequiresPermissions("business:archive:nonTrial:list") + public TableDataInfo archiveList(StudySearchForm form) + { + form.setType(StudyTypeEnum.fsy.getValue()); + startPage(); + List list = studyService.queryArchiveList(form); + TableDataInfo table = getDataTable(list); + return table; + } + + //endregion } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Study.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Study.java index dddcdff..b27f9d8 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Study.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Study.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.TableName; import com.hxhq.common.core.annotation.Compare; import com.hxhq.common.core.domain.MpBaseEntity; +import java.util.Date; + /** * 试验对象 t_study @@ -54,6 +56,9 @@ public class Study extends MpBaseEntity /** 所属部门名称:非试验需要 */ private String deptName; + /** 归档申请时间 */ + private Date gdApplyTime; + @Compare(name = "试验简述",nameEn = "Description") private String remark; @@ -163,6 +168,14 @@ public class Study extends MpBaseEntity this.deptName = deptName; } + public Date getGdApplyTime() { + return gdApplyTime; + } + + public void setGdApplyTime(Date gdApplyTime) { + this.gdApplyTime = gdApplyTime; + } + @Override public String getRemark() { return remark; 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 37a24f2..ba7ff5f 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 @@ -51,4 +51,17 @@ public interface StudyMapper extends BaseMapper * @return */ HomeCountDto queryHomeStudyCount(@Param("userId") Long userId); + + // region 档案相关 + + /** + * 查询档案列表 + * @param queryWrapper + * @return + */ + List queryArchiveList(@Param("ew") Wrapper queryWrapper); + + // endregion + + } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyService.java index cfd6e84..8c63e58 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyService.java @@ -115,4 +115,15 @@ public interface IStudyService extends IService */ HomeCountDto queryHomeCount(); + // region 档案相关 + + /** + * 查询档案列表 + * @param form + * @return + */ + List queryArchiveList(StudySearchForm form); + + // endregion + } 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 9d479ec..44157f1 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 @@ -475,4 +475,27 @@ public class StudyServiceImpl extends ServiceImpl implements formCount.setStudyFinishCount(studyCount.getStudyFinishCount()); return formCount; } + + // region 档案相关 + + @Override + public List queryArchiveList(StudySearchForm form) { + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.eq("s.del_flag","0"); + queryWrapper.eq("s.type",form.getType()); + if(StringUtils.isNoneBlank(form.getName())){ + queryWrapper.like("s.name",form.getName()); + } + if(StringUtils.isNoneBlank(form.getSn())){ + queryWrapper.like("s.sn",form.getSn()); + } + if(form.getStatus()!=null && form.getStatus().intValue()>0){ + queryWrapper.eq("s.status",form.getStatus()); + } + queryWrapper.orderByDesc("s.gd_apply_time"); + queryWrapper.orderByDesc("s.id"); + return baseMapper.queryArchiveList(queryWrapper); + } + + //endregion } 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 a1dc3b6..c326d37 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 @@ -63,4 +63,16 @@ OR EXISTS (SELECT ssu.id FROM `t_study_subject_user` ssu WHERE ssu.`del_flag`='0' AND ssu.`study_id`=s.`id` AND ssu.user_id=#{userId}) ) + + + + \ No newline at end of file