Merge remote-tracking branch 'origin/master'
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.TClinicalTrialPointsDTO; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.model.TClinicalTrialPoints; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.query.TClinicalTrialPointsQuery; |
| | | import com.ruoyi.system.service.TClinicalTrialPointsService; |
| | | import com.ruoyi.system.service.TProjectTeamService; |
| | | import com.ruoyi.system.service.TProjectTeamStaffService; |
| | | import com.ruoyi.system.vo.TClinicalTrialPointsVO; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Api(tags = "临床试验积分") |
| | | @RestController |
| | | @RequestMapping("/t-clinical-trial-points") |
| | | @RequestMapping("") |
| | | public class TClinicalTrialPointsController { |
| | | |
| | | private final TClinicalTrialPointsService clinicalTrialPointsService; |
| | | private final TokenService tokenService; |
| | | private final TProjectTeamService projectTeamService; |
| | | private final TProjectTeamStaffService projectTeamStaffService; |
| | | private final SysUserMapper sysUserMapper; |
| | | @Autowired |
| | | public TClinicalTrialPointsController(TClinicalTrialPointsService clinicalTrialPointsService, TokenService tokenService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService, SysUserMapper sysUserMapper) { |
| | | this.clinicalTrialPointsService = clinicalTrialPointsService; |
| | | this.tokenService = tokenService; |
| | | this.projectTeamService = projectTeamService; |
| | | this.projectTeamStaffService = projectTeamStaffService; |
| | | this.sysUserMapper = sysUserMapper; |
| | | } |
| | | |
| | | /** |
| | | * 获取临床试验积分列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:clinicalTrialPoints:list')") |
| | | @ApiOperation(value = "获取临床试验积分分页列表", response = TClinicalTrialPointsQuery.class) |
| | | @PostMapping(value = "/api/t-clinical-trial-points/pageList") |
| | | public R<PageInfo<TClinicalTrialPointsVO>> pageList(@RequestBody String param) { |
| | | TClinicalTrialPointsQuery query = JSON.parseObject(param, TClinicalTrialPointsQuery.class); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType != 1){ |
| | | // 查询用户所在项目组 |
| | | List<TProjectTeamStaff> projectTeamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getUserId, userId)); |
| | | if(projectTeamStaffs.size() > 0){ |
| | | // 查询项目组id |
| | | List<String> teamIds = projectTeamStaffs.stream().map(TProjectTeamStaff::getTeamId).distinct().collect(Collectors.toList()); |
| | | query.setTeamIds(teamIds); |
| | | } |
| | | } |
| | | return R.ok(clinicalTrialPointsService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 添加临床试验积分管理 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:clinicalTrialPoints:add')") |
| | | @Log(title = "临床试验积分信息-新增临床试验积分", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加临床试验积分",response = TClinicalTrialPointsDTO.class) |
| | | @PostMapping(value = "/api/t-clinical-trial-points/add") |
| | | public R<Boolean> add(@RequestBody String param) { |
| | | TClinicalTrialPointsDTO dto = JSON.parseObject(param,TClinicalTrialPointsDTO.class); |
| | | // 通过当前用户查询项目组 |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType == 2){ |
| | | TProjectTeamStaff projectTeamStaff = projectTeamStaffService.getOne(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(projectTeamStaff)){ |
| | | return R.fail("当前用户未分配项目组,无法创建临床试验积分"); |
| | | } |
| | | } |
| | | // 查询项目组 |
| | | TProjectTeam projectTeam = projectTeamService.getById(dto.getTeamId()); |
| | | if(Objects.isNull(projectTeam)){ |
| | | return R.fail("项目组不存在"); |
| | | } |
| | | if(projectTeam.getStatus() == 2){ |
| | | return R.fail("项目组已封存,无法创建临床试验积分"); |
| | | } |
| | | // 查询项目组工艺工程师id |
| | | TProjectTeamStaff projectTeamStaff = projectTeamStaffService.getOne(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getTeamId, dto.getTeamId()) |
| | | .eq(TProjectTeamStaff::getRoleType, 3) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(projectTeamStaff)){ |
| | | return R.fail("当前项目组未分配工艺工程师,无法创建临床试验积分"); |
| | | } |
| | | dto.setProcessEngineerId(projectTeamStaff.getId()); |
| | | clinicalTrialPointsService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 修改临床试验积分 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:clinicalTrialPoints:edit')") |
| | | @Log(title = "临床试验积分信息-修改临床试验积分", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改临床试验积分") |
| | | @PostMapping(value = "/api/t-clinical-trial-points/update") |
| | | public R<Boolean> update(@RequestBody String param) { |
| | | TClinicalTrialPointsDTO dto = JSON.parseObject(param,TClinicalTrialPointsDTO.class); |
| | | clinicalTrialPointsService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 查看临床试验积分详情 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:clinicalTrialPoints:detail')") |
| | | @ApiOperation(value = "查看临床试验积分详情") |
| | | @GetMapping(value = "/open/t-clinical-trial-points/getDetailById") |
| | | public R<TClinicalTrialPointsVO> getDetailById(@RequestParam String id) { |
| | | TClinicalTrialPoints clinicalTrialPoints = clinicalTrialPointsService.getById(id); |
| | | TClinicalTrialPointsVO clinicalTrialPointsVO = new TClinicalTrialPointsVO(); |
| | | BeanUtils.copyProperties(clinicalTrialPoints, clinicalTrialPointsVO); |
| | | // 查询项目组 |
| | | TProjectTeam projectTeam = projectTeamService.getById(clinicalTrialPoints.getTeamId()); |
| | | // 查询项目组成员 |
| | | List<TProjectTeamStaff> projectTeamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getTeamId, projectTeam.getId())); |
| | | List<Long> userIds = projectTeamStaffs.stream().map(TProjectTeamStaff::getUserId).collect(Collectors.toList()); |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | clinicalTrialPointsVO.setStaffNames(sysUsers.stream().map(SysUser::getNickName).collect(Collectors.joining(","))); |
| | | clinicalTrialPointsVO.setProjectTeam(projectTeam); |
| | | |
| | | return R.ok(clinicalTrialPointsVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除临床试验积分 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:clinicalTrialPoints:delete')") |
| | | @Log(title = "临床试验积分信息-删除临床试验积分", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除临床试验积分") |
| | | @DeleteMapping(value = "/open/t-clinical-trial-points/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(clinicalTrialPointsService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除临床试验积分 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:clinicalTrialPoints:delete')") |
| | | @Log(title = "临床试验积分信息-删除临床试验积分", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除临床试验积分") |
| | | @DeleteMapping(value = "/open/t-clinical-trial-points/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(clinicalTrialPointsService.removeByIds(ids)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.TExperimentResultReportDTO; |
| | | import com.ruoyi.system.model.TExperimentResultReport; |
| | | import com.ruoyi.system.model.TExperimentScheme; |
| | | import com.ruoyi.system.model.TInspectionReport; |
| | | import com.ruoyi.system.model.TResultWorkEvaluate; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TExperimentResultReportQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.TExperimentResultReportVO; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private final TResultWorkEvaluateService resultWorkEvaluateService; |
| | | private final TExperimentSchemeService experimentSchemeService; |
| | | private final TInspectionReportService inspectionReportService; |
| | | private final TProjectTeamStaffService projectTeamStaffService; |
| | | private final TExperimentDispatchParticipantsService experimentDispatchParticipantsService; |
| | | @Autowired |
| | | public TExperimentResultReportController(TExperimentResultReportService experimentResultReportService, TokenService tokenService, ISysUserService sysUserService, TResultWorkEvaluateService resultWorkEvaluateService, TExperimentSchemeService experimentSchemeService, TInspectionReportService inspectionReportService) { |
| | | public TExperimentResultReportController(TExperimentResultReportService experimentResultReportService, TokenService tokenService, ISysUserService sysUserService, TResultWorkEvaluateService resultWorkEvaluateService, TExperimentSchemeService experimentSchemeService, TInspectionReportService inspectionReportService, TProjectTeamStaffService projectTeamStaffService, TExperimentDispatchParticipantsService experimentDispatchParticipantsService) { |
| | | this.experimentResultReportService = experimentResultReportService; |
| | | this.tokenService = tokenService; |
| | | this.sysUserService = sysUserService; |
| | | this.resultWorkEvaluateService = resultWorkEvaluateService; |
| | | this.experimentSchemeService = experimentSchemeService; |
| | | this.inspectionReportService = inspectionReportService; |
| | | this.projectTeamStaffService = projectTeamStaffService; |
| | | this.experimentDispatchParticipantsService = experimentDispatchParticipantsService; |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping(value = "/api/t-experiment-result-report/pageList") |
| | | public R<PageInfo<TExperimentResultReportVO>> pageList(@RequestBody String param) { |
| | | TExperimentResultReportQuery query = JSON.parseObject(param, TExperimentResultReportQuery.class); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType != 1){ |
| | | // 查询用户所参与的实验调度 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getUserId, userId)); |
| | | if(experimentDispatchParticipants.size() > 0){ |
| | | // 查询项目组id |
| | | List<String> dispatchIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getDispatchId).distinct().collect(Collectors.toList()); |
| | | query.setDispatchIds(dispatchIds); |
| | | } |
| | | } |
| | | return R.ok(experimentResultReportService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取实验结果汇报评定列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:list')") |
| | | @ApiOperation(value = "获取实验结果汇报评定列表-审批人使用",response = TExperimentResultReportQuery.class) |
| | | @PostMapping(value = "/api/t-experiment-result-report/evaluatePageList") |
| | | public R<PageInfo<TExperimentResultReportVO>> evaluatePageList(@RequestBody String param) { |
| | | TExperimentResultReportQuery query = JSON.parseObject(param, TExperimentResultReportQuery.class); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType != 1){ |
| | | // 查询用户所参与的实验调度 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getUserId, userId)); |
| | | if(experimentDispatchParticipants.size() > 0){ |
| | | // 查询项目组id |
| | | List<String> dispatchIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getDispatchId).distinct().collect(Collectors.toList()); |
| | | query.setDispatchIds(dispatchIds); |
| | | } |
| | | } |
| | | return R.ok(experimentResultReportService.evaluatePageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 添加实验结果汇报管理 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:add')") |
| | |
| | | TExperimentSchemeQuery query = JSON.parseObject(param, TExperimentSchemeQuery.class); |
| | | return R.ok(experimentSchemeService.pageList(query)); |
| | | } |
| | | /** |
| | | * 获取实验方案管理列表-中止审批列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:list')") |
| | | @ApiOperation(value = "获取实验方案分页列表-中止审批列表",response = TExperimentSchemeQuery.class) |
| | | @PostMapping(value = "/api/t-experiment-scheme/auditPageList") |
| | | public R<PageInfo<TExperimentSchemeVO>> auditPageList(@RequestBody String param) { |
| | | TExperimentSchemeQuery query = JSON.parseObject(param, TExperimentSchemeQuery.class); |
| | | return R.ok(experimentSchemeService.auditPageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 通过实验调度查询查询组别列表 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改实验方案 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:edit')") |
| | | @Log(title = "实验方案信息-修改实验方案-实验员提交", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改实验方案-实验员提交") |
| | | @PostMapping(value = "/api/t-experiment-scheme/updateTester") |
| | | public R<Boolean> updateTester(@RequestBody String param) { |
| | | TExperimentSchemeDTO dto = JSON.parseObject(param,TExperimentSchemeDTO.class); |
| | | dto.setStatus(6); |
| | | experimentSchemeService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 查看实验方案详情 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:detail')") |
| | |
| | | TProjectProposal projectProposal = projectProposalService.getById(experimentDispatch.getProposalId()); |
| | | if(Objects.nonNull(projectProposal)){ |
| | | experimentDispatch.setProjectName(projectProposal.getProjectName()); |
| | | experimentDispatch.setProjectCode(projectProposal.getProjectCode()); |
| | | } |
| | | } |
| | | experimentSchemeVO.setExperimentDispatch(experimentDispatch); |
| | |
| | | // 获取实验人员 |
| | | List<TExperimentSchemePerson> experimentSchemePersons = experimentSchemePersonService.list(Wrappers.lambdaQuery(TExperimentSchemePerson.class) |
| | | .eq(TExperimentSchemePerson::getSchemeId, id)); |
| | | List<Long> userIds = experimentSchemePersons.stream().map(TExperimentSchemePerson::getUserId).collect(Collectors.toList()); |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | sysUsers.forEach(sysUser -> { |
| | | experimentSchemePersons.stream().filter(experimentSchemePerson -> experimentSchemePerson.getUserId().equals(sysUser.getUserId())).forEach(experimentSchemePerson -> { |
| | | experimentSchemePerson.setNickName(sysUser.getNickName()); |
| | | experimentSchemePerson.setAvatar(sysUser.getAvatar()); |
| | | }); |
| | | }); |
| | | experimentSchemeVO.setExperimentSchemePersons(experimentSchemePersons); |
| | | |
| | | // 查询审核人姓名 |
| | | SysUser sysUser = sysUserService.selectUserById(experimentScheme.getAuditPersonId()); |
| | | if(Objects.nonNull(sysUser)){ |
| | | experimentSchemeVO.setAuditPersonName(sysUser.getNickName()); |
| | | } |
| | | |
| | | return R.ok(experimentSchemeVO); |
| | | } |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:sign')") |
| | | @Log(title = "实验方案信息-申请中止实验", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "申请中止实验") |
| | | @ApiOperation(value = "申请中止实验",response = ApplicationTerminationDTO.class) |
| | | @PostMapping(value = "/api/t-experiment-scheme/applicationTermination") |
| | | public R<Boolean> applicationTermination(@RequestBody String param) { |
| | | ApplicationTerminationDTO applicationTerminationDTO = JSON.parseObject(param, ApplicationTerminationDTO.class); |
| | |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | } |
| | | return R.ok(feasibilityStudyReportService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取可研、可行、工艺开发工具、验证发布报告管理列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:evaluatePageList')") |
| | | @ApiOperation(value = "获取专业报告课题评定分页列表-超管、审批人",response = TFeasibilityStudyReportQuery.class) |
| | | @PostMapping(value = "/api/t-feasibility-study-report/evaluatePageList") |
| | | public R<PageInfo<TFeasibilityStudyReportVO>> evaluatePageList(@RequestBody String param) { |
| | | TFeasibilityStudyReportQuery query = JSON.parseObject(param, TFeasibilityStudyReportQuery.class); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType != 1){ |
| | | // 查询用户所在项目组 |
| | | List<TProjectTeamStaff> projectTeamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getUserId, userId)); |
| | | if(projectTeamStaffs.size() > 0){ |
| | | // 查询项目组id |
| | | List<String> teamIds = projectTeamStaffs.stream().map(TProjectTeamStaff::getTeamId).distinct().collect(Collectors.toList()); |
| | | query.setTeamIds(teamIds); |
| | | } |
| | | } |
| | | return R.ok(feasibilityStudyReportService.evaluatePageList(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取专业报告课题评定数量统计",response = TFeasibilityStudyReportQuery.class) |
| | | @PostMapping(value = "/api/t-feasibility-study-report/evaluateCount") |
| | | public R<Map<String,Integer>> evaluateCount(@RequestBody String param) { |
| | | TFeasibilityStudyReportQuery query = JSON.parseObject(param, TFeasibilityStudyReportQuery.class); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType != 1){ |
| | | // 查询用户所在项目组 |
| | | List<TProjectTeamStaff> projectTeamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getUserId, userId)); |
| | | if(projectTeamStaffs.size() > 0){ |
| | | // 查询项目组id |
| | | List<String> teamIds = projectTeamStaffs.stream().map(TProjectTeamStaff::getTeamId).distinct().collect(Collectors.toList()); |
| | | query.setTeamIds(teamIds); |
| | | } |
| | | } |
| | | Map<String,Integer> map = feasibilityStudyReportService.evaluateCount(query); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | |
| | | feasibilityStudyReportService.updateById(feasibilityStudyReport); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 课题评定-进行评定 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:evaluate')") |
| | | @Log(title = "课题评定-进行评定", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "课题评定") |
| | | @PutMapping(value = "/open/t-feasibility-study-report/evaluate") |
| | | public R<Boolean> evaluate(@RequestParam(value = "id") String id, |
| | | @RequestParam(value = "evaluateScore") String evaluateScore) { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | TFeasibilityStudyReport feasibilityStudyReport = feasibilityStudyReportService.getById(id); |
| | | feasibilityStudyReport.setStatus(3); |
| | | feasibilityStudyReport.setEvaluatePersonId(userId); |
| | | feasibilityStudyReport.setEvaluateTime(LocalDateTime.now()); |
| | | feasibilityStudyReport.setEvaluateScore(evaluateScore); |
| | | feasibilityStudyReportService.updateById(feasibilityStudyReport); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 课题评定-评定详情 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:evaluate')") |
| | | @Log(title = "课题评定-评定详情", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "评定详情") |
| | | @GetMapping(value = "/open/t-feasibility-study-report/evaluateDetail") |
| | | public R<TFeasibilityStudyReportVO> evaluateDetail(@RequestParam(value = "id") String id) { |
| | | TFeasibilityStudyReport feasibilityStudyReport = feasibilityStudyReportService.getById(id); |
| | | TFeasibilityStudyReportVO tFeasibilityStudyReportVO = new TFeasibilityStudyReportVO(); |
| | | BeanUtils.copyProperties(feasibilityStudyReport, tFeasibilityStudyReportVO); |
| | | // 查询评定人员名称 |
| | | SysUser sysUser = sysUserService.selectUserById(feasibilityStudyReport.getEvaluatePersonId()); |
| | | if(Objects.nonNull(sysUser)){ |
| | | tFeasibilityStudyReportVO.setEvaluatePersonName(sysUser.getNickName()); |
| | | } |
| | | return R.ok(tFeasibilityStudyReportVO); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.QaReportFileEnum; |
| | | import com.ruoyi.common.enums.QaReportTypeEnum; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.TQaTestItemReportDTO; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.model.TQaReportFile; |
| | | import com.ruoyi.system.model.TQaTestItemReport; |
| | | import com.ruoyi.system.query.TQaTestItemReportQuery; |
| | | import com.ruoyi.system.service.TProjectTeamService; |
| | | import com.ruoyi.system.service.TProjectTeamStaffService; |
| | | import com.ruoyi.system.service.TQaReportFileService; |
| | | import com.ruoyi.system.service.TQaTestItemReportService; |
| | | import com.ruoyi.system.vo.TQaTestItemReportVO; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/t-tester-other-task") |
| | | public class TTesterOtherTaskController { |
| | | |
| | | private final TQaTestItemReportService qaTestItemReportService; |
| | | private final TQaReportFileService qaReportFileService; |
| | | private final TokenService tokenService; |
| | | private final TProjectTeamService projectTeamService; |
| | | private final TProjectTeamStaffService projectTeamStaffService; |
| | | @Autowired |
| | | public TTesterOtherTaskController(TQaTestItemReportService qaTestItemReportService, TQaReportFileService qaReportFileService, TokenService tokenService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService) { |
| | | this.qaTestItemReportService = qaTestItemReportService; |
| | | this.qaReportFileService = qaReportFileService; |
| | | this.tokenService = tokenService; |
| | | this.projectTeamService = projectTeamService; |
| | | this.projectTeamStaffService = projectTeamStaffService; |
| | | } |
| | | |
| | | /** |
| | | * 获取QA检测项报告管理列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:list')") |
| | | @ApiOperation(value = "获取QA检测项报告管理分页列表-工艺工程师使用", response = TQaTestItemReportQuery.class) |
| | | @PostMapping(value = "/api/t-qa-test-item-report/pageList") |
| | | public R<PageInfo<TQaTestItemReportVO>> pageList(@RequestBody String param) { |
| | | TQaTestItemReportQuery query = JSON.parseObject(param, TQaTestItemReportQuery.class); |
| | | |
| | | return R.ok(qaTestItemReportService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取QA检测项报告管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取QA检测项报告管理下拉列表-化验师使用") |
| | | @GetMapping(value = "/open/t-qa-test-item-report/getListByItemId") |
| | | public R<List<TQaTestItemReport>> getListByItemId(@RequestParam String itemId) { |
| | | List<TQaTestItemReport> list = qaTestItemReportService.list(Wrappers.lambdaQuery(TQaTestItemReport.class) |
| | | .eq(TQaTestItemReport::getItemId, itemId)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | /** |
| | | * 添加QA检测项报告管理管理 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:add')") |
| | | @Log(title = "QA检测项报告管理信息-新增QA检测项报告管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加QA检测项报告管理",response = TQaTestItemReportDTO.class) |
| | | @PostMapping(value = "/api/t-qa-test-item-report/add") |
| | | public R<Boolean> add(@RequestBody String param) { |
| | | TQaTestItemReportDTO dto = JSON.parseObject(param,TQaTestItemReportDTO.class); |
| | | // 通过当前用户查询项目组 |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | TProjectTeamStaff projectTeamStaff = projectTeamStaffService.getOne(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(projectTeamStaff)){ |
| | | return R.fail("当前用户未分配项目组,无法创建项目课题方案"); |
| | | } |
| | | // 查询项目组 |
| | | TProjectTeam projectTeam = projectTeamService.getById(projectTeamStaff.getTeamId()); |
| | | if(Objects.isNull(projectTeam)){ |
| | | return R.fail("项目组不存在"); |
| | | } |
| | | if(projectTeam.getStatus() == 2){ |
| | | return R.fail("项目组已封存,无法创建项目课题方案"); |
| | | } |
| | | // 生成中试、生产验证编号 |
| | | String reportCode = projectTeam.getTeamName() + "-" + QaReportTypeEnum.TEST_REPORT.getCode(); |
| | | |
| | | // 查询上个项目课题方案的序号 |
| | | long count = qaTestItemReportService.count(Wrappers.lambdaQuery(TQaTestItemReport.class) |
| | | .like(TQaTestItemReport::getReportCode, reportCode)); |
| | | reportCode = reportCode + "-" + String.format("%03d", count+1); |
| | | dto.setReportCode(reportCode); |
| | | |
| | | qaTestItemReportService.save(dto); |
| | | // 添加检测报告文件 |
| | | List<TQaReportFile> qaReportFiles = dto.getQaReportFiles(); |
| | | for (TQaReportFile qaReportFile : qaReportFiles) { |
| | | qaReportFile.setReportId(dto.getId()); |
| | | qaReportFile.setReportType(QaReportFileEnum.TEST_REPORT.getCode()); |
| | | } |
| | | qaReportFileService.saveBatch(qaReportFiles); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 修改QA检测项报告管理 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:edit')") |
| | | @Log(title = "QA检测项报告管理信息-修改QA检测项报告管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改QA检测项报告管理") |
| | | @PostMapping(value = "/api/t-qa-test-item-report/update") |
| | | public R<Boolean> update(@RequestBody String param) { |
| | | TQaTestItemReportDTO dto = JSON.parseObject(param,TQaTestItemReportDTO.class); |
| | | qaTestItemReportService.updateById(dto); |
| | | qaReportFileService.remove(Wrappers.lambdaQuery(TQaReportFile.class) |
| | | .eq(TQaReportFile::getReportId, dto.getId())); |
| | | // 添加检测报告文件 |
| | | List<TQaReportFile> qaReportFiles = dto.getQaReportFiles(); |
| | | for (TQaReportFile qaReportFile : qaReportFiles) { |
| | | qaReportFile.setReportId(dto.getId()); |
| | | qaReportFile.setReportType(QaReportFileEnum.TEST_REPORT.getCode()); |
| | | } |
| | | qaReportFileService.saveBatch(qaReportFiles); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 查看QA检测项报告管理详情 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:detail')") |
| | | @ApiOperation(value = "查看QA检测项报告管理详情") |
| | | @GetMapping(value = "/open/t-qa-test-item-report/getDetailById") |
| | | public R<TQaTestItemReportVO> getDetailById(@RequestParam String id) { |
| | | TQaTestItemReport testItemReport = qaTestItemReportService.getById(id); |
| | | TQaTestItemReportVO testItemReportVO = new TQaTestItemReportVO(); |
| | | BeanUtils.copyProperties(testItemReport, testItemReportVO); |
| | | // 查询检测报告文件 |
| | | List<TQaReportFile> qaReportFiles = qaReportFileService.list(Wrappers.lambdaQuery(TQaReportFile.class) |
| | | .eq(TQaReportFile::getReportId, id) |
| | | .eq(TQaReportFile::getReportType, QaReportFileEnum.TEST_REPORT.getCode())); |
| | | testItemReportVO.setQaReportFileList(qaReportFiles); |
| | | return R.ok(testItemReportVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除QA检测项报告管理 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:delete')") |
| | | @Log(title = "QA检测项报告管理信息-删除QA检测项报告管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除QA检测项报告管理") |
| | | @DeleteMapping(value = "/open/t-qa-test-item-report/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | // 删除QA检测项报告文件 |
| | | qaReportFileService.remove(Wrappers.lambdaQuery(TQaReportFile.class).eq(TQaReportFile::getReportId, id) |
| | | .in(TQaReportFile::getReportType, QaReportFileEnum.TEST_REPORT.getCode())); |
| | | return R.ok(qaTestItemReportService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除QA检测项报告管理 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:delete')") |
| | | @Log(title = "QA检测项报告管理信息-删除QA检测项报告管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除QA检测项报告管理") |
| | | @DeleteMapping(value = "/open/t-qa-test-item-report/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | // 删除QA检测项报告检测报告文件 |
| | | qaReportFileService.remove(Wrappers.lambdaQuery(TQaReportFile.class).in(TQaReportFile::getReportId, ids) |
| | | .in(TQaReportFile::getReportType, QaReportFileEnum.TEST_REPORT.getCode())); |
| | | return R.ok(qaTestItemReportService.removeByIds(ids)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.SysUserUpdateStatusDTO; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.query.SysUserQuery; |
| | | import com.ruoyi.system.service.*; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | |
| | | return AjaxResult.success(new ArrayList<>()); |
| | | } |
| | | List<String> teamIds = staffs.stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList()); |
| | | List<TProjectTeamStaff> teamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getTeamId, teamIds) |
| | | .eq(Objects.nonNull(roleId),TProjectTeamStaff::getRoleType,Integer.parseInt(roleId.toString()))); |
| | | LambdaQueryWrapper<TProjectTeamStaff> wrapper = new LambdaQueryWrapper<>(); |
| | | if(Objects.nonNull(roleId)){ |
| | | wrapper.eq(TProjectTeamStaff::getRoleType,Integer.parseInt(roleId.toString())); |
| | | } |
| | | wrapper.in(TProjectTeamStaff::getTeamId, teamIds); |
| | | List<TProjectTeamStaff> teamStaffs = projectTeamStaffService.list(wrapper); |
| | | List<Long> userIds = teamStaffs.stream().map(TProjectTeamStaff::getUserId).collect(Collectors.toList()); |
| | | |
| | | List<SysUser> list = userService.listByRole(userIds,nickName); |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.ruoyi.system.model.TClinicalTrialPoints; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "临床试验积分新增编辑DTO") |
| | | public class TClinicalTrialPointsDTO extends TClinicalTrialPoints { |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TClinicalTrialPoints; |
| | | import com.ruoyi.system.query.TClinicalTrialPointsQuery; |
| | | import com.ruoyi.system.vo.TClinicalTrialPointsVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TClinicalTrialPointsMapper extends BaseMapper<TClinicalTrialPoints> { |
| | | |
| | | /** |
| | | * 获取列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TClinicalTrialPointsVO> pageList(@Param("query") TClinicalTrialPointsQuery query, @Param("pageInfo")PageInfo<TClinicalTrialPointsVO> pageInfo); |
| | | } |
| | |
| | | * @return 实验结果汇报分页列表 |
| | | */ |
| | | List<TExperimentResultReportVO> pageList(@Param("query") TExperimentResultReportQuery query, @Param("pageInfo")PageInfo<TExperimentResultReportVO> pageInfo); |
| | | /** |
| | | * 分页查询实验结果汇报评定列表 |
| | | * |
| | | * @param query 查询条件 |
| | | * @return 实验结果汇报分页列表 |
| | | */ |
| | | List<TExperimentResultReportVO> evaluatePageList(@Param("query") TExperimentResultReportQuery query, @Param("pageInfo")PageInfo<TExperimentResultReportVO> pageInfo); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TExperimentSchemeVO> pageList(@Param("query") TExperimentSchemeQuery query, @Param("pageInfo") PageInfo<TExperimentSchemeVO> pageInfo); |
| | | |
| | | /** |
| | | * 审核分页查询 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TExperimentSchemeVO> auditPageList(@Param("query")TExperimentSchemeQuery query, @Param("pageInfo")PageInfo<TExperimentSchemeVO> pageInfo); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @return |
| | | */ |
| | | List<TFeasibilityStudyReportVO> pageList(@Param("query") TFeasibilityStudyReportQuery query, @Param("pageInfo")PageInfo<TFeasibilityStudyReportVO> pageInfo); |
| | | |
| | | /** |
| | | * 课题评定分页查询可研、可行、工艺开发工具、验证发布报告管理 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TFeasibilityStudyReportVO> evaluatePageList(@Param("query")TFeasibilityStudyReportQuery query, @Param("pageInfo")PageInfo<TFeasibilityStudyReportVO> pageInfo); |
| | | |
| | | /** |
| | | * 课题评定数量统计 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Map<String, Integer> evaluateCount(@Param("query")TFeasibilityStudyReportQuery query); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | @TableField("team_id") |
| | | private String teamId; |
| | | |
| | | @ApiModelProperty(value = "工艺工程师id") |
| | | @TableField("process_engineer_id") |
| | | private String processEngineerId; |
| | | |
| | | @ApiModelProperty(value = "临床实验内容") |
| | | @TableField("trial_content") |
| | | private String trialContent; |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "课题方案名称") |
| | | @TableField(exist = false) |
| | | private String projectName; |
| | | @ApiModelProperty(value = "课题方案编号") |
| | | @TableField(exist = false) |
| | | private String projectCode; |
| | | |
| | | @ApiModelProperty(value = "参与人员名称拼接") |
| | | @TableField(exist = false) |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | @TableField("experiment_result") |
| | | private String experimentResult; |
| | | |
| | | @ApiModelProperty(value = "状态 -1=草稿箱 1=待提交 2=待评定 3=已评定 4=已封存") |
| | | @ApiModelProperty(value = "状态 -1=草稿箱 1=待提交 2=待评定 3=已评定 4=已封存 5=已解封") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | @TableField("commit_sign") |
| | | private String commitSign; |
| | | |
| | | @ApiModelProperty(value = "审批状态 -1=草稿箱 1=已发送 2=申请中止待审核 3=申请中止已通过 4=申请中止已驳回 5=已封存") |
| | | @ApiModelProperty(value = "审批状态 -1=草稿箱 1=已发送 2=申请中止待审核 3=申请中止已通过 4=申请中止已驳回 5=已封存 6=实验员已提交") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("user_id") |
| | | private Integer userId; |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "提交时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField("commit_time") |
| | | private LocalDateTime commitTime; |
| | | |
| | | @ApiModelProperty(value = "用户昵称") |
| | | @TableField(exist = false) |
| | | private String nickName; |
| | | @ApiModelProperty(value = "用户头像") |
| | | @TableField(exist = false) |
| | | private String avatar; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = " 临床积分查询query") |
| | | public class TClinicalTrialPointsQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "项目组名称") |
| | | private String teamName; |
| | | @ApiModelProperty(value = "实验内容") |
| | | private String trialContent; |
| | | @ApiModelProperty(value = "项目组id集合 前端忽略") |
| | | private List<String> teamIds; |
| | | } |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.domain.model.TimeRangeQueryBody; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "实验结果汇报查询条件query") |
| | |
| | | @ApiModelProperty(value = "状态 -1=草稿箱 1=待提交 2=待评定 3=已评定 4=已封存") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "实验调度id集合 前端忽略") |
| | | private List<String> dispatchIds; |
| | | |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value="可研、可行、工艺开发工具、验证发布报告管理查询参数query") |
| | | @ApiModel(value="(可研、可行、工艺开发工具、验证发布报告管理)、(课题评定列表)查询参数query") |
| | | public class TFeasibilityStudyReportQuery extends TimeRangeQueryBody { |
| | | |
| | | @ApiModelProperty(value = "项目组名称") |
| | |
| | | @ApiModelProperty(value = "类型 1=可研报告 2=可行报告 3=工艺开发工具 4=验证与发布") |
| | | private Integer reportType; |
| | | |
| | | @ApiModelProperty(value = "提交人") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty(value = "状态 -1=草稿箱 1=待审核 2=待评定 3=已评定 4=已驳回 5=已撤回") |
| | | private Integer status; |
| | | |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TClinicalTrialPoints; |
| | | import com.ruoyi.system.query.TClinicalTrialPointsQuery; |
| | | import com.ruoyi.system.vo.TClinicalTrialPointsVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TClinicalTrialPointsService extends IService<TClinicalTrialPoints> { |
| | | |
| | | /** |
| | | * 临床试验积分分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TClinicalTrialPointsVO> pageList(TClinicalTrialPointsQuery query); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TExperimentResultReportVO> pageList(TExperimentResultReportQuery query); |
| | | /** |
| | | * 获取实验结果汇报评定列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TExperimentResultReportVO> evaluatePageList(TExperimentResultReportQuery query); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TExperimentSchemeVO> pageList(TExperimentSchemeQuery query); |
| | | |
| | | /** |
| | | * 获取检验方法确认单分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TExperimentSchemeVO> auditPageList(TExperimentSchemeQuery query); |
| | | } |
| | |
| | | import com.ruoyi.system.query.TFeasibilityStudyReportQuery; |
| | | import com.ruoyi.system.vo.TFeasibilityStudyReportVO; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 可研、可行、工艺开发工具、验证发布报告 服务类 |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TFeasibilityStudyReportVO> pageList(TFeasibilityStudyReportQuery query); |
| | | |
| | | /** |
| | | * 获取专业报告课题评定分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TFeasibilityStudyReportVO> evaluatePageList(TFeasibilityStudyReportQuery query); |
| | | |
| | | /** |
| | | * 获取专业报告课题评定数量统计 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Map<String, Integer> evaluateCount(TFeasibilityStudyReportQuery query); |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TClinicalTrialPointsMapper; |
| | | import com.ruoyi.system.model.TClinicalTrialPoints; |
| | | import com.ruoyi.system.query.TClinicalTrialPointsQuery; |
| | | import com.ruoyi.system.service.TClinicalTrialPointsService; |
| | | import com.ruoyi.system.vo.TClinicalTrialPointsVO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TClinicalTrialPointsServiceImpl extends ServiceImpl<TClinicalTrialPointsMapper, TClinicalTrialPoints> implements TClinicalTrialPointsService { |
| | | |
| | | @Override |
| | | public PageInfo<TClinicalTrialPointsVO> pageList(TClinicalTrialPointsQuery query) { |
| | | PageInfo<TClinicalTrialPointsVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TClinicalTrialPointsVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | // 统计当前项目组累计分数 |
| | | List<String> teamIds = list.stream().map(TClinicalTrialPointsVO::getTeamId).distinct().collect(Collectors.toList()); |
| | | List<TClinicalTrialPoints> teamList = this.list(Wrappers.lambdaQuery(TClinicalTrialPoints.class) |
| | | .in(TClinicalTrialPoints::getTeamId,teamIds)); |
| | | for (TClinicalTrialPointsVO clinicalTrialPointsVO : list) { |
| | | List<TClinicalTrialPoints> clinicalTrialPoints = teamList.stream().filter(item -> item.getTeamId().equals(clinicalTrialPointsVO.getTeamId())).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty(clinicalTrialPoints)){ |
| | | clinicalTrialPointsVO.setTotalScore(0.0); |
| | | }else { |
| | | clinicalTrialPointsVO.setTotalScore(clinicalTrialPoints.stream().mapToDouble(TClinicalTrialPoints::getEvaluateScore).sum()); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.system.mapper.TExperimentResultReportMapper; |
| | | import com.ruoyi.system.model.TExperimentDispatchParticipants; |
| | | import com.ruoyi.system.model.TExperimentResultReport; |
| | | import com.ruoyi.system.query.TExperimentResultReportQuery; |
| | | import com.ruoyi.system.service.TExperimentResultReportService; |
| | | import com.ruoyi.system.vo.TExperimentDispatchVO; |
| | | import com.ruoyi.system.vo.TExperimentResultReportVO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TExperimentResultReportVO> evaluatePageList(TExperimentResultReportQuery query) { |
| | | PageInfo<TExperimentResultReportVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TExperimentResultReportVO> list = this.baseMapper.evaluatePageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.mapper.TExperimentSchemeMapper; |
| | | import com.ruoyi.system.mapper.TExperimentSchemePersonMapper; |
| | | import com.ruoyi.system.model.TExperimentScheme; |
| | | import com.ruoyi.system.model.TExperimentSchemePerson; |
| | | import com.ruoyi.system.query.TExperimentSchemeQuery; |
| | | import com.ruoyi.system.service.TExperimentSchemeService; |
| | | import com.ruoyi.system.vo.SysOperLogVO; |
| | | import com.ruoyi.system.vo.TExperimentSchemeVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TExperimentSchemeServiceImpl extends ServiceImpl<TExperimentSchemeMapper, TExperimentScheme> implements TExperimentSchemeService { |
| | | |
| | | @Autowired |
| | | private TExperimentSchemePersonMapper experimentSchemePersonMapper; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | | public PageInfo<TExperimentSchemeVO> pageList(TExperimentSchemeQuery query) { |
| | | PageInfo<TExperimentSchemeVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TExperimentSchemeVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | List<String> schemeIds = list.stream().map(TExperimentSchemeVO::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty(schemeIds)){ |
| | | return pageInfo; |
| | | } |
| | | List<TExperimentSchemePerson> experimentSchemePersonList = experimentSchemePersonMapper.selectList(Wrappers.lambdaQuery(TExperimentSchemePerson.class).in(TExperimentSchemePerson::getSchemeId, schemeIds)); |
| | | List<Long> userIds = experimentSchemePersonList.stream().map(TExperimentSchemePerson::getUserId).collect(Collectors.toList()); |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | sysUsers.forEach(sysUser -> { |
| | | experimentSchemePersonList.stream().filter(experimentSchemePerson -> experimentSchemePerson.getUserId().equals(sysUser.getUserId())).forEach(experimentSchemePerson -> experimentSchemePerson.setNickName(sysUser.getNickName())); |
| | | }); |
| | | for (TExperimentSchemeVO experimentSchemeVO : list) { |
| | | List<TExperimentSchemePerson> personList = experimentSchemePersonList.stream().filter(experimentSchemePerson -> experimentSchemePerson.getSchemeId().equals(experimentSchemeVO.getId())).collect(Collectors.toList()); |
| | | experimentSchemeVO.setExperimentSchemePersons(personList); |
| | | // 写入名称 |
| | | experimentSchemeVO.setSchemePersonName(personList.stream().map(TExperimentSchemePerson::getNickName).collect(Collectors.joining(","))); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TExperimentSchemeVO> auditPageList(TExperimentSchemeQuery query) { |
| | | PageInfo<TExperimentSchemeVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TExperimentSchemeVO> list = this.baseMapper.auditPageList(query,pageInfo); |
| | | List<String> schemeIds = list.stream().map(TExperimentSchemeVO::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty(schemeIds)){ |
| | | return pageInfo; |
| | | } |
| | | List<TExperimentSchemePerson> experimentSchemePersonList = experimentSchemePersonMapper.selectList(Wrappers.lambdaQuery(TExperimentSchemePerson.class).in(TExperimentSchemePerson::getSchemeId, schemeIds)); |
| | | List<Long> userIds = experimentSchemePersonList.stream().map(TExperimentSchemePerson::getUserId).collect(Collectors.toList()); |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | sysUsers.forEach(sysUser -> { |
| | | experimentSchemePersonList.stream().filter(experimentSchemePerson -> experimentSchemePerson.getUserId().equals(sysUser.getUserId())).forEach(experimentSchemePerson -> experimentSchemePerson.setNickName(sysUser.getNickName())); |
| | | }); |
| | | for (TExperimentSchemeVO experimentSchemeVO : list) { |
| | | List<TExperimentSchemePerson> personList = experimentSchemePersonList.stream().filter(experimentSchemePerson -> experimentSchemePerson.getSchemeId().equals(experimentSchemeVO.getId())).collect(Collectors.toList()); |
| | | experimentSchemeVO.setExperimentSchemePersons(personList); |
| | | // 写入名称 |
| | | experimentSchemeVO.setSchemePersonName(personList.stream().map(TExperimentSchemePerson::getNickName).collect(Collectors.joining(","))); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | |
| | | import com.ruoyi.system.query.TFeasibilityStudyReportQuery; |
| | | import com.ruoyi.system.service.TFeasibilityStudyReportService; |
| | | import com.ruoyi.system.vo.TFeasibilityStudyReportVO; |
| | | import com.ruoyi.system.vo.TQaTestItemVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TFeasibilityStudyReportVO> evaluatePageList(TFeasibilityStudyReportQuery query) { |
| | | PageInfo<TFeasibilityStudyReportVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TFeasibilityStudyReportVO> list = this.baseMapper.evaluatePageList(query,pageInfo); |
| | | for (TFeasibilityStudyReportVO tFeasibilityStudyReportVO : list) { |
| | | String scoreStr = tFeasibilityStudyReportVO.getEvaluateScore(); |
| | | if (scoreStr == null || scoreStr.isEmpty()) { |
| | | tFeasibilityStudyReportVO.setTotalScore(0); |
| | | continue; |
| | | } |
| | | |
| | | try { |
| | | // 使用 Stream 累加分数 |
| | | int sum = Arrays.stream(scoreStr.split(",")) |
| | | .mapToInt(Integer::parseInt) |
| | | .sum(); |
| | | tFeasibilityStudyReportVO.setTotalScore(sum); |
| | | } catch (NumberFormatException e) { |
| | | tFeasibilityStudyReportVO.setTotalScore(0); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Integer> evaluateCount(TFeasibilityStudyReportQuery query) { |
| | | Map<String, Integer> map = this.baseMapper.evaluateCount(query); |
| | | return map; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.ruoyi.system.model.TClinicalTrialPoints; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "临床试验积分VO") |
| | | public class TClinicalTrialPointsVO extends TClinicalTrialPoints { |
| | | |
| | | @ApiModelProperty(value = "项目组信息") |
| | | private TProjectTeam projectTeam; |
| | | |
| | | @ApiModelProperty(value = "项目组成员名称拼接") |
| | | private String staffNames; |
| | | |
| | | @ApiModelProperty(value = "总分") |
| | | private Double totalScore; |
| | | |
| | | } |
| | |
| | | @Data |
| | | @ApiModel(value = "实验方案管理VO", description = "实验方案管理VO") |
| | | public class TExperimentSchemeVO extends TExperimentScheme { |
| | | @ApiModelProperty(value = "项目课题方案") |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "实验编号") |
| | | private String experimentCode; |
| | | |
| | | @ApiModelProperty(value = "实验名称") |
| | | private String experimentName; |
| | | |
| | | @ApiModelProperty(value = "实验员名称") |
| | | private String schemePersonName; |
| | | |
| | | @ApiModelProperty(value = "审核人名称") |
| | | private String auditPersonName; |
| | | |
| | | @ApiModelProperty(value = "实验人员信息") |
| | | private List<TExperimentSchemePerson> experimentSchemePersons; |
| | |
| | | @ApiModelProperty(value = "项目组成员名称拼接") |
| | | private String staffNames; |
| | | |
| | | @ApiModelProperty(value = "总分") |
| | | private Integer totalScore; |
| | | |
| | | @ApiModelProperty(value = "评定人员名称") |
| | | private String evaluatePersonName; |
| | | |
| | | @ApiModelProperty(value = "报告文件") |
| | | private List<TFeasibilityReportFile> feasibilityReportFiles; |
| | | |
| | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TClinicalTrialPoints"> |
| | | <id column="id" property="id" /> |
| | | <result column="team_id" property="teamId" /> |
| | | <result column="process_engineer_id" property="processEngineerId" /> |
| | | <result column="trial_content" property="trialContent" /> |
| | | <result column="trial_time" property="trialTime" /> |
| | | <result column="evaluate_score" property="evaluateScore" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, team_id, trial_content, trial_time, evaluate_score, create_time, update_time, create_by, update_by, disabled |
| | | id, team_id, process_engineer_id,trial_content, trial_time, evaluate_score, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TClinicalTrialPointsVO"> |
| | | select |
| | | t.id, |
| | | t.team_id, |
| | | t.process_engineer_id, |
| | | t.trial_content, |
| | | t.trial_time, |
| | | t.evaluate_score, |
| | | t.create_time, |
| | | t.update_time, |
| | | t.create_by, |
| | | t.update_by, |
| | | t.disabled, |
| | | p.team_name AS teamName |
| | | from t_clinical_trial_points t |
| | | left join t_project_team p on t.team_id = p.id |
| | | <where> |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and p.team_name like concat('%',#{query.teamName},'%') |
| | | </if> |
| | | <if test="query.trialContent != null and query.trialContent != ''"> |
| | | and t.trial_content like concat('%',#{query.trialContent},'%') |
| | | </if> |
| | | <if test="query.teamIds != null and query.teamIds.size() > 0"> |
| | | and t.team_id in |
| | | <foreach item="teamId" collection="query.teamIds" separator="," open="(" close=")" index=""> |
| | | #{teamId} |
| | | </foreach> |
| | | </if> |
| | | AND t.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY t.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND terr.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.dispatchIds != null and query.dispatchIds.size() > 0"> |
| | | AND terr.dispatch_id IN |
| | | <foreach collection="query.dispatchIds" item="item" index="index" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND terr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY terr.create_time DESC |
| | | </select> |
| | | <select id="evaluatePageList" resultType="com.ruoyi.system.vo.TExperimentResultReportVO"> |
| | | select terr.id, terr.dispatch_id, terr.experiment_result, terr.status, terr.evaluate_one, terr.evaluate_two, terr.evaluate_three, |
| | | terr.evaluate_four, terr.evaluate_five, terr.evaluate_six, terr.evaluate_person_id, terr.evaluate_time, terr.create_time, |
| | | terr.update_time, terr.create_by, terr.update_by, terr.disabled, tpp.project_name AS projectName, |
| | | ted.experiment_code AS experimentCode, ted.experiment_name AS experimentName |
| | | from t_experiment_result_report terr |
| | | left join t_experiment_dispatch ted on terr.dispatch_id = ted.id |
| | | left join t_project_proposal tpp on ted.proposal_id = tpp.id |
| | | <where> |
| | | <if test="query.projectName != null and query.projectName != ''"> |
| | | and tpp.project_name like concat('%', #{query.projectName}, '%') |
| | | </if> |
| | | <if test="query.experimentCode != null and query.experimentCode != ''"> |
| | | and ted.experiment_code like concat('%', #{query.experimentCode}, '%') |
| | | </if> |
| | | <if test="query.experimentName != null and query.experimentName != ''"> |
| | | and ted.experiment_name like concat('%', #{query.experimentName}, '%') |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and terr.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND terr.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.dispatchIds != null and query.dispatchIds.size() > 0"> |
| | | AND terr.dispatch_id IN |
| | | <foreach collection="query.dispatchIds" item="item" index="index" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND terr.status IN (2,3,4,5) |
| | | AND terr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY terr.create_time DESC |
| | |
| | | </where> |
| | | ORDER BY tes.create_time DESC |
| | | </select> |
| | | <select id="auditPageList" resultType="com.ruoyi.system.vo.TExperimentSchemeVO"> |
| | | select tes.id, tes.dispatch_id, tes.experiment_date, tes.experiment_objective, tes.experiment_param_route, |
| | | tes.experiment_material, tes.experiment_device, tes.experiment_step_record, tes.stop_reason, tes.stop_file,tes.stop_file_name, |
| | | tes.commit_sign, tes.status, tes.audit_person_id, tes.audit_time, tes.audit_remark, tes.create_time, tes.update_time, |
| | | tes.create_by, tes.update_by, tes.disabled, tpp.project_name as projectName,ted.experiment_code as experimentCode, |
| | | ted.experiment_name as experimentName |
| | | from t_experiment_scheme tes |
| | | left join t_experiment_dispatch ted on tes.dispatch_id = ted.id |
| | | left join t_project_proposal tpp on ted.proposal_id = tpp.id |
| | | <where> |
| | | <if test="query.status != null"> |
| | | and tes.status = #{query.status} |
| | | </if> |
| | | <if test="query.projectName != null and query.projectName != ''"> |
| | | and tpp.project_name like concat('%', #{query.projectName}, '%') |
| | | </if> |
| | | <if test="query.experimentCode != null and query.experimentCode != ''"> |
| | | and tes.experiment_code like concat('%', #{query.experimentCode}, '%') |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tes.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | AND tes.status IN (2,3,4) |
| | | AND tes.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tes.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </where> |
| | | ORDER BY tfsr.create_time DESC |
| | | </select> |
| | | <select id="evaluatePageList" resultType="com.ruoyi.system.vo.TFeasibilityStudyReportVO"> |
| | | select tfsr.id, tfsr.team_id, tfsr.report_code, tfsr.report_name, tfsr.report_text, tfsr.report_type, tfsr.status, |
| | | tfsr.audit_person_id, tfsr.audit_time, tfsr.audit_remark, tfsr.evaluate_person_id, tfsr.evaluate_time, tfsr.evaluate_score, |
| | | tfsr.create_time, tfsr.update_time, tfsr.create_by, tfsr.update_by, tfsr.disabled, tpt.team_name as teamName |
| | | from t_feasibility_study_report tfsr |
| | | left join t_project_team tpt on tpt.id = tfsr.team_id |
| | | <where> |
| | | <if test="query.reportName != null and query.reportName != ''"> |
| | | and tfsr.report_name like concat('%', #{query.reportName}, '%') |
| | | </if> |
| | | <if test="query.reportCode != null and query.reportCode != ''"> |
| | | and tfsr.report_code like concat('%', #{query.reportCode}, '%') |
| | | </if> |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and tpt.team_name like concat('%', #{query.teamName}) |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and tfsr.status = #{query.status} |
| | | </if> |
| | | <if test="query.reportType != null"> |
| | | and tfsr.report_type = #{query.reportType} |
| | | </if> |
| | | <if test="query.createBy != null and query.createBy != ''"> |
| | | and tfsr.createBy like concat('%', #{query.createBy}) |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tfsr.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.teamIds != null and query.teamIds.size() > 0"> |
| | | and tfsr.team_id in |
| | | <foreach item="teamId" collection="query.teamIds" separator="," open="(" close=")" index=""> |
| | | #{teamId} |
| | | </foreach> |
| | | </if> |
| | | AND tfsr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tfsr.create_time DESC |
| | | </select> |
| | | <select id="evaluateCount" resultType="java.util.Map"> |
| | | select |
| | | COUNT(tfsr.id) as totalCount, |
| | | SUM(CASE WHEN tfsr.status = 2 THEN 1 ELSE 0 END) AS toEvaluatedCount, |
| | | SUM(CASE WHEN tfsr.status = 3 THEN 1 ELSE 0 END) AS evaluatedCount, |
| | | from t_feasibility_study_report tfsr |
| | | left join t_project_team tpt on tpt.id = tfsr.team_id |
| | | <where> |
| | | <if test="query.reportName != null and query.reportName != ''"> |
| | | and tfsr.report_name like concat('%', #{query.reportName}, '%') |
| | | </if> |
| | | <if test="query.reportCode != null and query.reportCode != ''"> |
| | | and tfsr.report_code like concat('%', #{query.reportCode}, '%') |
| | | </if> |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and tpt.team_name like concat('%', #{query.teamName}) |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and tfsr.status = #{query.status} |
| | | </if> |
| | | <if test="query.reportType != null"> |
| | | and tfsr.report_type = #{query.reportType} |
| | | </if> |
| | | <if test="query.createBy != null and query.createBy != ''"> |
| | | and tfsr.createBy like concat('%', #{query.createBy}) |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tfsr.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.teamIds != null and query.teamIds.size() > 0"> |
| | | and tfsr.team_id in |
| | | <foreach item="teamId" collection="query.teamIds" separator="," open="(" close=")" index=""> |
| | | #{teamId} |
| | | </foreach> |
| | | </if> |
| | | AND tfsr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |