| @ -0,0 +1,85 @@ | |||
| package com.hxhq.business.controller; | |||
| import java.util.Arrays; | |||
| import java.util.List; | |||
| import com.hxhq.business.dto.gyzj.ListDto; | |||
| import com.hxhq.business.form.gyzj.BjForm; | |||
| import com.hxhq.business.form.gyzj.CzyjForm; | |||
| import com.hxhq.business.form.gyzj.GhForm; | |||
| import com.hxhq.business.form.gyzj.SearchForm; | |||
| import com.hxhq.business.service.IGyzjService; | |||
| import com.hxhq.common.security.annotation.RequiresPermissions; | |||
| import com.hxhq.common.security.utils.SecurityUtils; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.hxhq.business.domain.StudyGyzj; | |||
| import com.hxhq.business.service.IStudyGyzjService; | |||
| import com.hxhq.common.core.web.controller.BaseController; | |||
| import com.hxhq.common.core.web.domain.AjaxResult; | |||
| import com.hxhq.common.core.web.page.TableDataInfo; | |||
| /** | |||
| * 试验-物资信息-给药制剂Controller | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| @RestController | |||
| @RequestMapping("/business/studyGyzj") | |||
| public class StudyGyzjController extends BaseController | |||
| { | |||
| @Autowired | |||
| private IGyzjService gyzjService; | |||
| /** | |||
| * 列表 | |||
| */ | |||
| @RequiresPermissions({"business:studyGyzj:list","business:nonTrialGyzj:list","business:drugGyzj:list"}) | |||
| @GetMapping("/list") | |||
| public TableDataInfo list(SearchForm form) | |||
| { | |||
| startPage(); | |||
| List<ListDto> list = gyzjService.queryStudyList(form); | |||
| return getDataTable(list); | |||
| } | |||
| /** | |||
| * 处置药剂 | |||
| */ | |||
| @PostMapping("/czyj") | |||
| @RequiresPermissions({"business:studyGyzj:xq","business:nonTrialGyzj:xq","business:drugGyzj:xq"}) | |||
| public AjaxResult czyj(@RequestBody CzyjForm form) | |||
| { | |||
| form.setClrId(SecurityUtils.getUserId()); | |||
| gyzjService.czyj(form); | |||
| return AjaxResult.success("操作成功"); | |||
| } | |||
| /** | |||
| * 编辑 | |||
| */ | |||
| @PostMapping("bj") | |||
| @RequiresPermissions({"business:studyGyzj:bj","business:nonTrialGyzj:bj","business:drugGyzj:bj"}) | |||
| public AjaxResult bj(@RequestBody BjForm form) | |||
| { | |||
| form.setQmrId(SecurityUtils.getUserId()); | |||
| gyzjService.bj(form); | |||
| return AjaxResult.success("操作成功"); | |||
| } | |||
| /** | |||
| * 归还 | |||
| */ | |||
| @PostMapping("gh") | |||
| @RequiresPermissions({"business:studyGyzj:gh","business:nonTrialGyzj:gh","business:drugGyzj:gh"}) | |||
| public AjaxResult gh(@RequestBody GhForm form) | |||
| { | |||
| form.setQmrId(SecurityUtils.getUserId()); | |||
| form.setJsr1Id(SecurityUtils.getUserId()); | |||
| gyzjService.gh(form); | |||
| return AjaxResult.success("操作成功"); | |||
| } | |||
| } | |||
| @ -0,0 +1,95 @@ | |||
| package com.hxhq.business.controller; | |||
| import java.util.Arrays; | |||
| import java.util.List; | |||
| import com.hxhq.business.dto.mjy.ListDto; | |||
| import com.hxhq.business.form.mjy.*; | |||
| import com.hxhq.business.service.IMjyService; | |||
| import com.hxhq.common.security.annotation.RequiresPermissions; | |||
| import com.hxhq.common.security.utils.SecurityUtils; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import com.hxhq.business.domain.StudyMjy; | |||
| import com.hxhq.business.service.IStudyMjyService; | |||
| import com.hxhq.common.core.web.controller.BaseController; | |||
| import com.hxhq.common.core.web.domain.AjaxResult; | |||
| import com.hxhq.common.core.web.page.TableDataInfo; | |||
| /** | |||
| * 试验-物资信息-麻精药Controller | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| @RestController | |||
| @RequestMapping("/business/studyMjy") | |||
| public class StudyMjyController extends BaseController | |||
| { | |||
| @Autowired | |||
| private IMjyService mjyService; | |||
| /** | |||
| * 列表 | |||
| */ | |||
| @RequiresPermissions({"business:studyMjy:list","business:nonTrialMjy:list","business:drugMjy:list"}) | |||
| @GetMapping("/list") | |||
| public TableDataInfo list(SearchForm form) | |||
| { | |||
| startPage(); | |||
| List<ListDto> list = mjyService.queryStudyList(form); | |||
| return getDataTable(list); | |||
| } | |||
| /** | |||
| * 处置药剂 | |||
| */ | |||
| @PostMapping("/czyj") | |||
| @RequiresPermissions({"business:studyMjy:czyj","business:nonTrialMjy:czyj","business:drugMjy:czyj"}) | |||
| public AjaxResult czyj(@RequestBody CzyjForm form) | |||
| { | |||
| form.setClrId(SecurityUtils.getUserId()); | |||
| mjyService.czyj(form); | |||
| return AjaxResult.success("操作成功"); | |||
| } | |||
| /** | |||
| * 编辑 | |||
| */ | |||
| @PostMapping("bj") | |||
| @RequiresPermissions({"business:studyMjy:bj","business:nonTrialMjy:bj","business:drugMjy:bj"}) | |||
| public AjaxResult bj(@RequestBody BjForm form) | |||
| { | |||
| form.setQmrId(SecurityUtils.getUserId()); | |||
| mjyService.bj(form); | |||
| return AjaxResult.success("操作成功"); | |||
| } | |||
| /** | |||
| * 修改库存 | |||
| */ | |||
| @PostMapping("xgkc") | |||
| @RequiresPermissions({"business:studyMjy:xgkc","business:nonTrialMjy:xgkc","business:drugMjy:xgkc"}) | |||
| public AjaxResult xgkc(@RequestBody XgkcForm form) | |||
| { | |||
| form.setQmrId(SecurityUtils.getUserId()); | |||
| mjyService.xgkc(form); | |||
| return AjaxResult.success("操作成功"); | |||
| } | |||
| /** | |||
| * 归还 | |||
| */ | |||
| @PostMapping("gh") | |||
| @RequiresPermissions({"business:studyMjy:gh","business:nonTrialMjy:gh","business:drugMjy:gh"}) | |||
| public AjaxResult gh(@RequestBody GhForm form) | |||
| { | |||
| form.setQmrId(SecurityUtils.getUserId()); | |||
| mjyService.gh(form); | |||
| return AjaxResult.success("操作成功"); | |||
| } | |||
| } | |||
| @ -0,0 +1,45 @@ | |||
| package com.hxhq.business.domain; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.hxhq.common.core.domain.MpBaseEntity; | |||
| /** | |||
| * 试验-物资信息-给药制剂对象 t_study_gyzj | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| @TableName("t_study_gyzj") | |||
| public class StudyGyzj extends MpBaseEntity | |||
| { | |||
| private static final long serialVersionUID = 1L; | |||
| /** 所属试验id */ | |||
| private Long studyId; | |||
| /** 资源id */ | |||
| private Long resourceId; | |||
| public void setStudyId(Long studyId) | |||
| { | |||
| this.studyId = studyId; | |||
| } | |||
| public Long getStudyId() | |||
| { | |||
| return studyId; | |||
| } | |||
| public void setResourceId(Long resourceId) | |||
| { | |||
| this.resourceId = resourceId; | |||
| } | |||
| public Long getResourceId() | |||
| { | |||
| return resourceId; | |||
| } | |||
| } | |||
| @ -0,0 +1,45 @@ | |||
| package com.hxhq.business.domain; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.hxhq.common.core.domain.MpBaseEntity; | |||
| /** | |||
| * 试验-物资信息-麻精药对象 t_study_mjy | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| @TableName("t_study_mjy") | |||
| public class StudyMjy extends MpBaseEntity | |||
| { | |||
| private static final long serialVersionUID = 1L; | |||
| /** 所属试验id */ | |||
| private Long studyId; | |||
| /** 资源id */ | |||
| private Long resourceId; | |||
| public void setStudyId(Long studyId) | |||
| { | |||
| this.studyId = studyId; | |||
| } | |||
| public Long getStudyId() | |||
| { | |||
| return studyId; | |||
| } | |||
| public void setResourceId(Long resourceId) | |||
| { | |||
| this.resourceId = resourceId; | |||
| } | |||
| public Long getResourceId() | |||
| { | |||
| return resourceId; | |||
| } | |||
| } | |||
| @ -0,0 +1,14 @@ | |||
| package com.hxhq.business.mapper; | |||
| import com.hxhq.business.domain.StudyGyzj; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * 试验-物资信息-给药制剂Mapper接口 | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| public interface StudyGyzjMapper extends BaseMapper<StudyGyzj> | |||
| { | |||
| } | |||
| @ -0,0 +1,14 @@ | |||
| package com.hxhq.business.mapper; | |||
| import com.hxhq.business.domain.StudyMjy; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * 试验-物资信息-麻精药Mapper接口 | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| public interface StudyMjyMapper extends BaseMapper<StudyMjy> | |||
| { | |||
| } | |||
| @ -0,0 +1,23 @@ | |||
| package com.hxhq.business.service; | |||
| import java.util.List; | |||
| import com.hxhq.business.domain.StudyGyzj; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * 试验-物资信息-给药制剂Service接口 | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| public interface IStudyGyzjService extends IService<StudyGyzj> | |||
| { | |||
| /** | |||
| * 查询试验-物资信息-给药制剂列表 | |||
| * | |||
| * @param studyGyzj 试验-物资信息-给药制剂 | |||
| * @return 试验-物资信息-给药制剂集合 | |||
| */ | |||
| public List<StudyGyzj> queryList(StudyGyzj studyGyzj); | |||
| } | |||
| @ -0,0 +1,23 @@ | |||
| package com.hxhq.business.service; | |||
| import java.util.List; | |||
| import com.hxhq.business.domain.StudyMjy; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * 试验-物资信息-麻精药Service接口 | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| public interface IStudyMjyService extends IService<StudyMjy> | |||
| { | |||
| /** | |||
| * 查询试验-物资信息-麻精药列表 | |||
| * | |||
| * @param studyMjy 试验-物资信息-麻精药 | |||
| * @return 试验-物资信息-麻精药集合 | |||
| */ | |||
| public List<StudyMjy> queryList(StudyMjy studyMjy); | |||
| } | |||
| @ -0,0 +1,35 @@ | |||
| package com.hxhq.business.service.impl; | |||
| import java.util.List; | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
| import com.hxhq.common.core.utils.DateUtils; | |||
| import org.springframework.stereotype.Service; | |||
| import com.hxhq.business.mapper.StudyGyzjMapper; | |||
| import com.hxhq.business.domain.StudyGyzj; | |||
| import com.hxhq.business.service.IStudyGyzjService; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| /** | |||
| * 试验-物资信息-给药制剂Service业务层处理 | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| @Service | |||
| public class StudyGyzjServiceImpl extends ServiceImpl<StudyGyzjMapper, StudyGyzj> implements IStudyGyzjService | |||
| { | |||
| /** | |||
| * 查询试验-物资信息-给药制剂列表 | |||
| * | |||
| * @param studyGyzj 试验-物资信息-给药制剂 | |||
| * @return 试验-物资信息-给药制剂 | |||
| */ | |||
| @Override | |||
| public List<StudyGyzj> queryList(StudyGyzj studyGyzj) | |||
| { | |||
| QueryWrapper<StudyGyzj> queryWrapper = Wrappers.query(); | |||
| return this.list(queryWrapper); | |||
| } | |||
| } | |||
| @ -0,0 +1,35 @@ | |||
| package com.hxhq.business.service.impl; | |||
| import java.util.List; | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
| import com.hxhq.common.core.utils.DateUtils; | |||
| import org.springframework.stereotype.Service; | |||
| import com.hxhq.business.mapper.StudyMjyMapper; | |||
| import com.hxhq.business.domain.StudyMjy; | |||
| import com.hxhq.business.service.IStudyMjyService; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| /** | |||
| * 试验-物资信息-麻精药Service业务层处理 | |||
| * | |||
| * @author hxhq | |||
| * @date 2026-01-09 | |||
| */ | |||
| @Service | |||
| public class StudyMjyServiceImpl extends ServiceImpl<StudyMjyMapper, StudyMjy> implements IStudyMjyService | |||
| { | |||
| /** | |||
| * 查询试验-物资信息-麻精药列表 | |||
| * | |||
| * @param studyMjy 试验-物资信息-麻精药 | |||
| * @return 试验-物资信息-麻精药 | |||
| */ | |||
| @Override | |||
| public List<StudyMjy> queryList(StudyMjy studyMjy) | |||
| { | |||
| QueryWrapper<StudyMjy> queryWrapper = Wrappers.query(); | |||
| return this.list(queryWrapper); | |||
| } | |||
| } | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.hxhq.business.mapper.StudyGyzjMapper"> | |||
| </mapper> | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.hxhq.business.mapper.StudyMjyMapper"> | |||
| </mapper> | |||