| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.ExperimentDispatchSignDTO; |
| | | import com.ruoyi.system.dto.TExperimentDispatchDTO; |
| | |
| | | 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.web.bind.annotation.*; |
| | | |
| | |
| | | @PostMapping(value = "/api/t-experiment-dispatch/pageList") |
| | | public R<PageInfo<TExperimentDispatchVO>> pageList(@RequestBody String param) { |
| | | TExperimentDispatchQuery query = JSON.parseObject(param, TExperimentDispatchQuery.class); |
| | | // 获取当前用户 |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if (roleType != 1){ |
| | | query.setUserId(userId); |
| | | // 查询实验参与人员 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getUserId, userId)); |
| | | if(!CollectionUtils.isEmpty(experimentDispatchParticipants)){ |
| | | List<String> dispatchIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getDispatchId).distinct().collect(Collectors.toList()); |
| | | query.setDispatchIds(dispatchIds); |
| | | } |
| | | } |
| | | return R.ok(experimentDispatchService.pageList(query)); |
| | | } |
| | | |
| | |
| | | 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.TExperimentResultReportDTO; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TExperimentResultReportQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.TExperimentDispatchVO; |
| | | import com.ruoyi.system.vo.TExperimentResultReportVO; |
| | | import com.ruoyi.system.vo.TExperimentSchemeVO; |
| | | import io.swagger.annotations.Api; |
| | | 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.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | private final TExperimentResultReportService experimentResultReportService; |
| | | private final TokenService tokenService; |
| | | private final ISysUserService sysUserService; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final TResultWorkEvaluateService resultWorkEvaluateService; |
| | | private final TExperimentSchemeService experimentSchemeService; |
| | | private final TInspectionReportService inspectionReportService; |
| | | private final TProjectTeamStaffService projectTeamStaffService; |
| | | private final TProjectTeamService projectTeamService; |
| | | private final TExperimentDispatchParticipantsService experimentDispatchParticipantsService; |
| | | private final TExperimentDispatchService experimentDispatchService; |
| | | private final TProjectProposalService projectProposalService; |
| | | @Autowired |
| | | public TExperimentResultReportController(TExperimentResultReportService experimentResultReportService, TokenService tokenService, ISysUserService sysUserService, TResultWorkEvaluateService resultWorkEvaluateService, TExperimentSchemeService experimentSchemeService, TInspectionReportService inspectionReportService, TProjectTeamStaffService projectTeamStaffService, TExperimentDispatchParticipantsService experimentDispatchParticipantsService) { |
| | | public TExperimentResultReportController(TExperimentResultReportService experimentResultReportService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TResultWorkEvaluateService resultWorkEvaluateService, TExperimentSchemeService experimentSchemeService, TInspectionReportService inspectionReportService, TProjectTeamStaffService projectTeamStaffService, TProjectTeamService projectTeamService, TExperimentDispatchParticipantsService experimentDispatchParticipantsService, TExperimentDispatchService experimentDispatchService, TProjectProposalService projectProposalService) { |
| | | this.experimentResultReportService = experimentResultReportService; |
| | | this.tokenService = tokenService; |
| | | this.sysUserService = sysUserService; |
| | | this.sysUserMapper = sysUserMapper; |
| | | this.resultWorkEvaluateService = resultWorkEvaluateService; |
| | | this.experimentSchemeService = experimentSchemeService; |
| | | this.inspectionReportService = inspectionReportService; |
| | | this.projectTeamStaffService = projectTeamStaffService; |
| | | this.projectTeamService = projectTeamService; |
| | | this.experimentDispatchParticipantsService = experimentDispatchParticipantsService; |
| | | this.experimentDispatchService = experimentDispatchService; |
| | | this.projectProposalService = projectProposalService; |
| | | } |
| | | |
| | | /** |
| | |
| | | experimentResultReportService.updateById(dto); |
| | | // 修改实验结果工作评价 |
| | | List<TResultWorkEvaluate> resultWorkEvaluates = dto.getResultWorkEvaluates(); |
| | | resultWorkEvaluateService.updateBatchById(resultWorkEvaluates); |
| | | resultWorkEvaluateService.saveOrUpdateBatch(resultWorkEvaluates); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:edit')") |
| | | @Log(title = "实验结果汇报信息-评定工艺工程师实验", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "评定工艺工程师实验") |
| | | @ApiOperation(value = "评定工艺工程师实验",response = TResultWorkEvaluate.class) |
| | | @PostMapping(value = "/api/t-experiment-result-report/evaluateProcess") |
| | | public R<Boolean> evaluateProcess(@RequestBody String param) { |
| | | TResultWorkEvaluate resultWorkEvaluate = JSON.parseObject(param,TResultWorkEvaluate.class); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | resultWorkEvaluate.setEvaluatePersonId(userId); |
| | | resultWorkEvaluate.setEvaluateTime(LocalDateTime.now()); |
| | | resultWorkEvaluate.setStatus(1); |
| | | resultWorkEvaluate.setEvaluateType(1); |
| | | // 查询当前用户组 |
| | | TProjectTeamStaff projectTeamStaff = projectTeamStaffService.getOne(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(projectTeamStaff)){ |
| | | return R.fail("当前用户未分配项目组,无法进行评定"); |
| | | } |
| | | TProjectTeamStaff projectTeamStaff1 = projectTeamStaffService.getOne(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getTeamId, projectTeamStaff.getTeamId()) |
| | | .eq(TProjectTeamStaff::getRoleType, 3) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(projectTeamStaff1)){ |
| | | return R.fail("当前项目组未分配工艺工程师,无法进行评定"); |
| | | } |
| | | resultWorkEvaluate.setUserId(projectTeamStaff1.getUserId()); |
| | | resultWorkEvaluate.setTeamId(projectTeamStaff.getTeamId()); |
| | | resultWorkEvaluateService.save(resultWorkEvaluate); |
| | | // 查询实验结果汇报 |
| | | TExperimentResultReport experimentResultReport = experimentResultReportService.getById(resultWorkEvaluate.getResultReportId()); |
| | | experimentResultReport.setStatus(3); |
| | | experimentResultReportService.updateById(experimentResultReport); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | .eq(TResultWorkEvaluate::getResultReportId, id)); |
| | | experimentResultReportVO.setResultWorkEvaluates(resultWorkEvaluates); |
| | | // 查询实验结果列表 |
| | | List<TExperimentScheme> experimentSchemes = experimentSchemeService.list(Wrappers.lambdaQuery(TExperimentScheme.class) |
| | | .eq(TExperimentScheme::getDispatchId, experimentResultReport.getDispatchId())); |
| | | experimentResultReportVO.setExperimentSchemes(experimentSchemes); |
| | | List<TExperimentSchemeVO> experimentSchemes = experimentSchemeService.getList(experimentResultReport.getDispatchId()); |
| | | experimentResultReportVO.setExperimentSchemeVOS(experimentSchemes); |
| | | // 查询检验报告列表 |
| | | List<TInspectionReport> inspectionReports = inspectionReportService.list(Wrappers.lambdaQuery(TInspectionReport.class) |
| | | .eq(TInspectionReport::getDispatchId, experimentResultReport.getDispatchId())); |
| | | experimentResultReportVO.setInspectionReports(inspectionReports); |
| | | // 获取实验参与人员 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getDispatchId, experimentResultReport.getDispatchId())); |
| | | experimentResultReportVO.setExperimentDispatchParticipants(experimentDispatchParticipants); |
| | | // 查询实验调度 |
| | | TExperimentDispatch experimentDispatch = experimentDispatchService.getById(experimentResultReport.getDispatchId()); |
| | | TExperimentDispatchVO experimentDispatchVO = new TExperimentDispatchVO(); |
| | | BeanUtils.copyProperties(experimentDispatch, experimentDispatchVO); |
| | | // 查询项目课题 |
| | | TProjectProposal proposal = projectProposalService.getById(experimentDispatch.getProposalId()); |
| | | experimentDispatchVO.setProjectName(proposal.getProjectName()); |
| | | // 查询参与人员 |
| | | List<TExperimentDispatchParticipants> tExperimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getDispatchId, experimentResultReport.getDispatchId())); |
| | | List<Long> userIds = tExperimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getUserId).distinct().collect(Collectors.toList()); |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | String participantsName = sysUsers.stream().map(SysUser::getNickName).collect(Collectors.joining(";")); |
| | | experimentDispatchVO.setParticipantsName(participantsName); |
| | | experimentResultReportVO.setExperimentDispatchVO(experimentDispatchVO); |
| | | return R.ok(experimentResultReportVO); |
| | | } |
| | | |
| | |
| | | return R.ok(experimentResultReportService.removeByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 通过实验调度id获取实验结果、检验结果、评价信息、参与人员信息 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:detail')") |
| | | @ApiOperation(value = "通过实验调度id获取实验结果、检验结果、评价信息、参与人员信息") |
| | | @GetMapping(value = "/open/t-experiment-result-report/getOtherInfoByDispatchId") |
| | | public R<TExperimentResultReportVO> getOtherInfoByDispatchId(@RequestParam String dispatchId) { |
| | | TExperimentResultReportVO experimentResultReportVO = new TExperimentResultReportVO(); |
| | | // 获取评分列表 |
| | | List<TResultWorkEvaluate> resultWorkEvaluates = resultWorkEvaluateService.list(Wrappers.lambdaQuery(TResultWorkEvaluate.class) |
| | | .eq(TResultWorkEvaluate::getDispatchId, dispatchId)); |
| | | experimentResultReportVO.setResultWorkEvaluates(resultWorkEvaluates); |
| | | // 查询实验结果列表 |
| | | List<TExperimentSchemeVO> experimentSchemeVOS = experimentSchemeService.getList(dispatchId); |
| | | experimentResultReportVO.setExperimentSchemeVOS(experimentSchemeVOS); |
| | | // 查询检验报告列表 |
| | | List<TInspectionReport> inspectionReports = inspectionReportService.list(Wrappers.lambdaQuery(TInspectionReport.class) |
| | | .eq(TInspectionReport::getDispatchId, dispatchId)); |
| | | experimentResultReportVO.setInspectionReports(inspectionReports); |
| | | // 获取实验参与人员 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getDispatchId, dispatchId)); |
| | | // 设置nickName |
| | | List<Long> userIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getUserId).collect(Collectors.toList()); |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | experimentDispatchParticipants.forEach(tExperimentDispatchParticipant -> { |
| | | SysUser sysUser = sysUsers.stream().filter(user -> user.getUserId().equals(tExperimentDispatchParticipant.getUserId())).findFirst().orElse(null); |
| | | if(sysUser != null){ |
| | | tExperimentDispatchParticipant.setNickName(sysUser.getNickName()); |
| | | tExperimentDispatchParticipant.setAvatar(sysUser.getAvatar()); |
| | | } |
| | | }); |
| | | experimentResultReportVO.setExperimentDispatchParticipants(experimentDispatchParticipants); |
| | | return R.ok(experimentResultReportVO); |
| | | } |
| | | |
| | | /** |
| | | * 提交接口 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:detail')") |
| | | @ApiOperation(value = "提交接口") |
| | | @GetMapping(value = "/open/t-experiment-result-report/commit") |
| | | public R<TExperimentResultReportVO> commit(@RequestParam String id) { |
| | | TExperimentResultReport experimentResultReport = experimentResultReportService.getById(id); |
| | | experimentResultReport.setStatus(2); |
| | | experimentResultReportService.updateById(experimentResultReport); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | @PostMapping(value = "/api/t-experiment-scheme/pageList") |
| | | public R<PageInfo<TExperimentSchemeVO>> pageList(@RequestBody String param) { |
| | | TExperimentSchemeQuery query = JSON.parseObject(param, TExperimentSchemeQuery.class); |
| | | // 获取当前用户 |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if (roleType != 1){ |
| | | query.setUserId(userId); |
| | | // 查询实验参与人员 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getUserId, userId)); |
| | | if(!CollectionUtils.isEmpty(experimentDispatchParticipants)){ |
| | | List<String> dispatchIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getDispatchId).distinct().collect(Collectors.toList()); |
| | | query.setDispatchIds(dispatchIds); |
| | | } |
| | | } |
| | | return R.ok(experimentSchemeService.pageList(query)); |
| | | } |
| | | /** |
| | |
| | | @PostMapping(value = "/api/t-experiment-scheme/auditPageList") |
| | | public R<PageInfo<TExperimentSchemeVO>> auditPageList(@RequestBody String param) { |
| | | TExperimentSchemeQuery query = JSON.parseObject(param, TExperimentSchemeQuery.class); |
| | | // 获取当前用户 |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if (roleType != 1){ |
| | | query.setUserId(userId); |
| | | // 查询实验参与人员 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getUserId, userId)); |
| | | if(!CollectionUtils.isEmpty(experimentDispatchParticipants)){ |
| | | List<String> dispatchIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getDispatchId).distinct().collect(Collectors.toList()); |
| | | query.setDispatchIds(dispatchIds); |
| | | } |
| | | } |
| | | return R.ok(experimentSchemeService.auditPageList(query)); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | 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.TInspectionReportDTO; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.model.TExperimentDispatch; |
| | | import com.ruoyi.system.model.TExperimentDispatchParticipants; |
| | | import com.ruoyi.system.model.TInspectionReport; |
| | | import com.ruoyi.system.model.TProjectProposal; |
| | | import com.ruoyi.system.query.TInspectionReportQuery; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.system.service.TInspectionReportService; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.TInspectionReportVO; |
| | | import io.swagger.annotations.Api; |
| | | 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.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public class TInspectionReportController { |
| | | |
| | | private final TInspectionReportService inspectionReportService; |
| | | private final TExperimentDispatchService experimentDispatchService; |
| | | private final TProjectProposalService projectProposalService; |
| | | private final TExperimentDispatchParticipantsService experimentDispatchParticipantsService; |
| | | private final TokenService tokenService; |
| | | private final ISysUserService sysUserService; |
| | | private final SysUserMapper sysUserMapper; |
| | | @Autowired |
| | | public TInspectionReportController(TInspectionReportService inspectionReportService, TokenService tokenService, ISysUserService sysUserService) { |
| | | public TInspectionReportController(TInspectionReportService inspectionReportService, TExperimentDispatchService experimentDispatchService, TProjectProposalService projectProposalService, TExperimentDispatchParticipantsService experimentDispatchParticipantsService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper) { |
| | | this.inspectionReportService = inspectionReportService; |
| | | this.experimentDispatchService = experimentDispatchService; |
| | | this.projectProposalService = projectProposalService; |
| | | this.experimentDispatchParticipantsService = experimentDispatchParticipantsService; |
| | | this.tokenService = tokenService; |
| | | this.sysUserService = sysUserService; |
| | | this.sysUserMapper = sysUserMapper; |
| | | } |
| | | |
| | | /** |
| | |
| | | TInspectionReport inspectionReport = inspectionReportService.getById(id); |
| | | TInspectionReportVO inspectionReportVO = new TInspectionReportVO(); |
| | | BeanUtils.copyProperties(inspectionReport, inspectionReportVO); |
| | | // 查询实验调度 |
| | | TExperimentDispatch experimentDispatch = experimentDispatchService.getById(inspectionReportVO.getDispatchId()); |
| | | // 查询项目课题 |
| | | TProjectProposal projectProposal = projectProposalService.getById(experimentDispatch.getProposalId()); |
| | | experimentDispatch.setProjectName(projectProposal.getProjectName()); |
| | | // 查询实验调度人员 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getDispatchId, inspectionReportVO.getDispatchId())); |
| | | // 将参与人员名字拼接 |
| | | List<Long> userIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getUserId).distinct().collect(Collectors.toList()); |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | if(!CollectionUtils.isEmpty(sysUsers)){ |
| | | String nickNames = sysUsers.stream().map(SysUser::getNickName).collect(Collectors.joining(",")); |
| | | experimentDispatch.setParticipantsName(nickNames); |
| | | } |
| | | inspectionReportVO.setExperimentDispatch(experimentDispatch); |
| | | return R.ok(inspectionReportVO); |
| | | } |
| | | |
| | |
| | | return R.ok(inspectionReportService.removeByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 提交检验报告 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:inspectionReport:commit')") |
| | | @Log(title = "检验报告信息-提交检验报告", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "提交检验报告") |
| | | @PutMapping(value = "/open/t-inspection-report/commit") |
| | | public R<Boolean> commit(@RequestParam(value = "id") String id) { |
| | | // 修改状态为已提交 |
| | | TInspectionReport inspectionReport = inspectionReportService.getById(id); |
| | | inspectionReport.setStatus(2); |
| | | inspectionReportService.updateById(inspectionReport); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.FeasibilityReportFileEnum; |
| | | import com.ruoyi.common.enums.ProjectApprovalReportStatusEnum; |
| | | import com.ruoyi.common.enums.StudyReportTypeEnum; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.AuditStatusDTO; |
| | | import com.ruoyi.system.dto.TProjectApprovalReportDTO; |
| | |
| | | return R.fail("项目组已封存,无法创建项目课题方案"); |
| | | } |
| | | // 生成可研、可行、工艺开发工具、验证发布报告编号 |
| | | String reportCode = projectTeam.getTeamName() + "-" + StudyReportTypeEnum.VERIFICATION_RELEASE.getCode(); |
| | | // 查询上个项目课题方案的序号 |
| | | long count = projectApprovalReportService.count(Wrappers.lambdaQuery(TProjectApprovalReport.class) |
| | | .like(TProjectApprovalReport::getReportCode, reportCode)); |
| | | reportCode = reportCode + "-" + String.format("%03d", count+1); |
| | | dto.setReportCode(reportCode); |
| | | // String reportCode = projectTeam.getTeamName() + "-" + StudyReportTypeEnum.VERIFICATION_RELEASE.getCode(); |
| | | // // 查询上个项目课题方案的序号 |
| | | // long count = projectApprovalReportService.count(Wrappers.lambdaQuery(TProjectApprovalReport.class) |
| | | // .like(TProjectApprovalReport::getReportCode, reportCode)); |
| | | // reportCode = reportCode + "-" + String.format("%03d", count+1); |
| | | // dto.setReportCode(reportCode); |
| | | |
| | | projectApprovalReportService.save(dto); |
| | | // 添加检测报告文件 |
| | |
| | | feasibilityReportFile.setReportId(dto.getId()); |
| | | feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode()); |
| | | } |
| | | feasibilityReportFileService.saveBatch(feasibilityReportFiles); |
| | | } |
| | | feasibilityReportFileService.saveBatch(feasibilityReportFiles); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | feasibilityReportFile.setReportId(dto.getId()); |
| | | feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode()); |
| | | } |
| | | feasibilityReportFileService.saveBatch(feasibilityReportFiles); |
| | | } |
| | | feasibilityReportFileService.saveBatch(feasibilityReportFiles); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.TQaTestItemDTO; |
| | | import com.ruoyi.system.dto.TResultWorkEvaluateDTO; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.ResultEvaluateChemistTesterQuery; |
| | | import com.ruoyi.system.query.TProjectApprovalReportQuery; |
| | | import com.ruoyi.system.query.TQaTestItemReportQuery; |
| | | import com.ruoyi.system.query.TResultWorkEvaluateQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Api(tags = "实验结果工作评定管理") |
| | | @RestController |
| | | @RequestMapping("/t-result-work-evaluate") |
| | | @RequestMapping("") |
| | | public class TResultWorkEvaluateController { |
| | | @Resource |
| | | private TResultWorkEvaluateService tResultWorkEvaluateService; |
| | |
| | | private TQaProduceReportService qaProduceReportService; |
| | | @Resource |
| | | private TQaTestItemService qaTestItemService; |
| | | private final TProjectTeamService projectTeamService; |
| | | private final TProjectTeamStaffService projectTeamStaffService; |
| | | private final ISysUserService sysUserService; |
| | | |
| | | @Autowired |
| | | public TResultWorkEvaluateController(TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService, ISysUserService sysUserService) { |
| | | this.projectTeamService = projectTeamService; |
| | | this.projectTeamStaffService = projectTeamStaffService; |
| | | this.sysUserService = sysUserService; |
| | | private TProjectTeamService projectTeamService; |
| | | @Autowired |
| | | private TProjectTeamStaffService projectTeamStaffService; |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | @Autowired |
| | | private TExperimentDispatchParticipantsService experimentDispatchParticipantsService; |
| | | |
| | | /** |
| | | * 获取化验师工作评定分页列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:resultWorkEvaluate:list')") |
| | | @ApiOperation(value = "获取化验师工作评定分页列表",response = TResultWorkEvaluateQuery.class) |
| | | @PostMapping(value = "/api/t-result-work-evaluate/chemistEvaluateList") |
| | | public R<PageInfo<TResultWorkEvaluateVO>> chemistEvaluateList(@RequestBody String param) { |
| | | TResultWorkEvaluateQuery query = JSON.parseObject(param, TResultWorkEvaluateQuery.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(tResultWorkEvaluateService.chemistEvaluateList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 添加QA检测项管理管理 |
| | | * 获取实验员工作评定分页列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:resultWorkEvaluate:list')") |
| | | @ApiOperation(value = "获取实验员工作评定分页列表",response = TProjectApprovalReportQuery.class) |
| | | @PostMapping(value = "/api/t-result-work-evaluate/testerEvaluateList") |
| | | public R<PageInfo<TResultWorkEvaluateVO>> testerEvaluateList(@RequestBody String param) { |
| | | TResultWorkEvaluateQuery query = JSON.parseObject(param, TResultWorkEvaluateQuery.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(tResultWorkEvaluateService.testerEvaluateList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 新增化验师、实验员工作评定 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:resultWorkEvaluate:add')") |
| | | @Log(title = "QA检测项管理信息-新增QA检测项管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加QA检测项管理", response = TQaTestItemDTO.class) |
| | | @PostMapping(value = "/api/t-qa-test-item/add") |
| | | @Log(title = "实验结果工作评定管理-新增化验师、实验员工作评定", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增化验师、实验员工作评定", response = TQaTestItemDTO.class) |
| | | @PostMapping(value = "/api/t-result-work-evaluate/add") |
| | | public R<Boolean> add(@RequestBody String param) { |
| | | TQaTestItemDTO dto = JSON.parseObject(param, TQaTestItemDTO.class); |
| | | // resultWorkEvaluateService.save(dto); |
| | | TResultWorkEvaluateDTO dto = JSON.parseObject(param, TResultWorkEvaluateDTO.class); |
| | | tResultWorkEvaluateService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 查询可评定的化验师 |
| | | */ |
| | | @ApiOperation(value = "查询可评定的化验师") |
| | | @GetMapping(value = "/open/t-result-work-evaluate/getEvaluateChemist") |
| | | public R<List<SysUser>> getEvaluateChemist(@RequestParam(value = "nickName",required = false) String nickName, |
| | | @RequestParam(value = "dispatchId") String dispatchId) { |
| | | // 查询参与的化验师 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getDispatchId, dispatchId) |
| | | .eq(TExperimentDispatchParticipants::getRoleType, 4)); |
| | | List<Long> userIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getUserId).distinct().collect(Collectors.toList()); |
| | | if(StringUtils.hasLength(nickName)){ |
| | | List<SysUser> sysUsers = sysUserService.selectListByNameAndUserIds(nickName,userIds); |
| | | return R.ok(sysUsers); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 查询可评定的实验员 |
| | | */ |
| | | @ApiOperation(value = "查询可评定的实验员") |
| | | @GetMapping(value = "/open/t-result-work-evaluate/getEvaluateTester") |
| | | public R<List<SysUser>> getEvaluateTester(@RequestParam(value = "nickName",required = false) String nickName, |
| | | @RequestParam(value = "dispatchId") String dispatchId) { |
| | | // 查询参与的化验师 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getDispatchId, dispatchId) |
| | | .eq(TExperimentDispatchParticipants::getRoleType, 5)); |
| | | List<Long> userIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getUserId).distinct().collect(Collectors.toList()); |
| | | if(StringUtils.hasLength(nickName)){ |
| | | List<SysUser> sysUsers = sysUserService.selectListByNameAndUserIds(nickName,userIds); |
| | | return R.ok(sysUsers); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 查询化验师评定列表 |
| | | */ |
| | | @ApiOperation(value = "查询化验师评定列表-化验师使用") |
| | | @PostMapping(value = "/api/t-result-work-evaluate/getEvaluateChemistPageList") |
| | | public R<PageInfo<ResultEvaluateChemistTesterVO>> getEvaluateChemistPageList(@RequestBody String param) { |
| | | ResultEvaluateChemistTesterQuery query = JSON.parseObject(param, ResultEvaluateChemistTesterQuery.class); |
| | | // 获取当前用户id |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | query.setUserId(userId); |
| | | PageInfo<ResultEvaluateChemistTesterVO> pageInfo = tResultWorkEvaluateService.getEvaluateChemistPageList(query); |
| | | return R.ok(pageInfo); |
| | | } |
| | | /** |
| | | * 查询实验员评定列表 |
| | | */ |
| | | @ApiOperation(value = "查询实验员评定列表-实验员使用") |
| | | @PostMapping(value = "/api/t-result-work-evaluate/getEvaluateTesterPageList") |
| | | public R<PageInfo<ResultEvaluateChemistTesterVO>> getEvaluateTesterPageList(@RequestBody String param) { |
| | | ResultEvaluateChemistTesterQuery query = JSON.parseObject(param, ResultEvaluateChemistTesterQuery.class); |
| | | // 获取当前用户id |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | query.setUserId(userId); |
| | | PageInfo<ResultEvaluateChemistTesterVO> pageInfo = tResultWorkEvaluateService.getEvaluateTesterPageList(query); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "项目组总积分分页列表", tags = "项目组总积分", response = TQaTestItemReportQuery.class) |
| | | @PostMapping(value = "/api/t-result-work-evaluate/pageList") |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | |
| | | @PostMapping(value = "/api/t-sampling-record/pageList") |
| | | public R<PageInfo<TSamplingRecordVO>> pageList(@RequestBody String param) { |
| | | TSamplingRecordQuery query = JSON.parseObject(param, TSamplingRecordQuery.class); |
| | | // 获取当前用户 |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if (roleType != 1){ |
| | | query.setUserId(userId); |
| | | // 查询实验参与人员 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getUserId, userId)); |
| | | if(!CollectionUtils.isEmpty(experimentDispatchParticipants)){ |
| | | List<String> dispatchIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getDispatchId).distinct().collect(Collectors.toList()); |
| | | query.setDispatchIds(dispatchIds); |
| | | } |
| | | } |
| | | return R.ok(samplingRecordService.pageList(query)); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.system.vo.TTestMethodConfirmSheetVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | 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.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | private final TProjectTeamStaffService projectTeamStaffService; |
| | | private final TExperimentDispatchService experimentDispatchService; |
| | | private final TProjectProposalService projectProposalService; |
| | | private final TExperimentDispatchParticipantsService experimentDispatchParticipantsService; |
| | | @Autowired |
| | | public TTestMethodConfirmSheetController(TTestMethodConfirmSheetService testMethodConfirmSheetService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TTestMethodConfirmSheetTermService testMethodConfirmSheetTermService, TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService, TExperimentDispatchService experimentDispatchService, TProjectProposalService projectProposalService) { |
| | | public TTestMethodConfirmSheetController(TTestMethodConfirmSheetService testMethodConfirmSheetService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TTestMethodConfirmSheetTermService testMethodConfirmSheetTermService, TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService, TExperimentDispatchService experimentDispatchService, TProjectProposalService projectProposalService, TExperimentDispatchParticipantsService experimentDispatchParticipantsService) { |
| | | this.testMethodConfirmSheetService = testMethodConfirmSheetService; |
| | | this.tokenService = tokenService; |
| | | this.sysUserService = sysUserService; |
| | |
| | | this.projectTeamStaffService = projectTeamStaffService; |
| | | this.experimentDispatchService = experimentDispatchService; |
| | | this.projectProposalService = projectProposalService; |
| | | this.experimentDispatchParticipantsService = experimentDispatchParticipantsService; |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping(value = "/api/t-test-method-confirm-sheet/pageList") |
| | | public R<PageInfo<TTestMethodConfirmSheetVO>> pageList(@RequestBody String param) { |
| | | TTestMethodConfirmSheetQuery query = JSON.parseObject(param, TTestMethodConfirmSheetQuery.class); |
| | | // 获取当前用户 |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if (roleType != 1){ |
| | | query.setUserId(userId); |
| | | // 查询实验参与人员 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getUserId, userId)); |
| | | if(!CollectionUtils.isEmpty(experimentDispatchParticipants)){ |
| | | List<String> dispatchIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getDispatchId).distinct().collect(Collectors.toList()); |
| | | query.setDispatchIds(dispatchIds); |
| | | } |
| | | } |
| | | return R.ok(testMethodConfirmSheetService.pageList(query)); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.system.service.TTestMethodConfirmSheetOriginalDataService; |
| | | import com.ruoyi.system.service.TTestMethodConfirmSheetOriginalService; |
| | | import com.ruoyi.system.service.TTestMethodConfirmSheetTermService; |
| | | import com.ruoyi.system.vo.TTestMethodConfirmSheetOriginalVO; |
| | | import io.swagger.annotations.Api; |
| | | 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; |
| | |
| | | private final SysUserMapper sysUserMapper; |
| | | private final TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService; |
| | | private final TTestMethodConfirmSheetOriginalDataService testMethodConfirmSheetOriginalDataService; |
| | | private final TTestMethodConfirmSheetTermService testMethodConfirmSheetTermService; |
| | | @Autowired |
| | | public TTestMethodConfirmSheetOriginalController(TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService, TTestMethodConfirmSheetOriginalDataService testMethodConfirmSheetOriginalDataService) { |
| | | public TTestMethodConfirmSheetOriginalController(TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService, TTestMethodConfirmSheetOriginalDataService testMethodConfirmSheetOriginalDataService, TTestMethodConfirmSheetTermService testMethodConfirmSheetTermService) { |
| | | this.tokenService = tokenService; |
| | | this.sysUserService = sysUserService; |
| | | this.sysUserMapper = sysUserMapper; |
| | | this.testMethodConfirmSheetOriginalService = testMethodConfirmSheetOriginalService; |
| | | this.testMethodConfirmSheetOriginalDataService = testMethodConfirmSheetOriginalDataService; |
| | | this.testMethodConfirmSheetTermService = testMethodConfirmSheetTermService; |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "查看检验方法确认单详情") |
| | | @GetMapping(value = "/open/t-test-method-confirm-sheet-original/getDetailById") |
| | | public R<TTestMethodConfirmSheetOriginalVO> getDetailById(@RequestParam String id) { |
| | | TTestMethodConfirmSheetOriginal testMethodConfirmSheet = testMethodConfirmSheetOriginalService.getById(id); |
| | | TTestMethodConfirmSheetOriginalVO testMethodConfirmSheetVO = new TTestMethodConfirmSheetOriginalVO(); |
| | | BeanUtils.copyProperties(testMethodConfirmSheet, testMethodConfirmSheetVO); |
| | | TTestMethodConfirmSheetOriginal testMethodConfirmSheetOriginal = testMethodConfirmSheetOriginalService.getById(id); |
| | | TTestMethodConfirmSheetOriginalVO testMethodConfirmSheetOriginalVO = new TTestMethodConfirmSheetOriginalVO(); |
| | | BeanUtils.copyProperties(testMethodConfirmSheetOriginal, testMethodConfirmSheetOriginalVO); |
| | | |
| | | // 查询检测项数据 |
| | | TTestMethodConfirmSheetTerm testMethodConfirmSheetTerm = testMethodConfirmSheetTermService.getById(testMethodConfirmSheetOriginal.getTermId()); |
| | | testMethodConfirmSheetOriginalVO.setTestMethodConfirmSheetTerm(testMethodConfirmSheetTerm); |
| | | |
| | | // 查询检测数据 |
| | | List<TTestMethodConfirmSheetOriginalData> testMethodConfirmSheetOriginalDataList = testMethodConfirmSheetOriginalDataService.list(Wrappers.lambdaQuery(TTestMethodConfirmSheetOriginalData.class).eq(TTestMethodConfirmSheetOriginalData::getOriginalId, id)); |
| | | testMethodConfirmSheetVO.setTestMethodConfirmSheetOriginalDataList(testMethodConfirmSheetOriginalDataList); |
| | | return R.ok(testMethodConfirmSheetVO); |
| | | testMethodConfirmSheetOriginalVO.setTestMethodConfirmSheetOriginalDataList(testMethodConfirmSheetOriginalDataList); |
| | | return R.ok(testMethodConfirmSheetOriginalVO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.ruoyi.system.model.TResultWorkEvaluate; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "新增实验结果评定DTO") |
| | | public class TResultWorkEvaluateDTO extends TResultWorkEvaluate { |
| | | } |
| | |
| | | long selectIdByPhone(@Param("phonenumber") String phonenumber); |
| | | |
| | | List<SysUser> listByRole(@Param("userIds")List<Long> userIds, @Param("nickName")String nickName); |
| | | |
| | | List<SysUser> selectListByNameAndUserIds(@Param("nickName")String nickName, @Param("userIds")List<Long> userIds); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TExperimentSchemeVO> auditPageList(@Param("query")TExperimentSchemeQuery query, @Param("pageInfo")PageInfo<TExperimentSchemeVO> pageInfo); |
| | | |
| | | /** |
| | | * 根据调度id获取实验方案 |
| | | * @param dispatchId |
| | | * @return |
| | | */ |
| | | List<TExperimentSchemeVO> getList(@Param("dispatchId")String dispatchId); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TResultWorkEvaluate; |
| | | import com.ruoyi.system.query.ResultEvaluateChemistTesterQuery; |
| | | import com.ruoyi.system.query.TResultWorkEvaluateQuery; |
| | | import com.ruoyi.system.vo.ResultEvaluateChemistTesterVO; |
| | | import com.ruoyi.system.vo.TResultWorkEvaluateVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | public interface TResultWorkEvaluateMapper extends BaseMapper<TResultWorkEvaluate> { |
| | | |
| | | List<TResultWorkEvaluateVO> pageList(@Param("query")TResultWorkEvaluateQuery query,@Param("pageInfo") PageInfo<TResultWorkEvaluateVO> pageInfo); |
| | | |
| | | /** |
| | | * 查询化验师工作评定分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TResultWorkEvaluateVO> chemistEvaluateList(@Param("query")TResultWorkEvaluateQuery query, @Param("pageInfo")PageInfo<TResultWorkEvaluateVO> pageInfo); |
| | | |
| | | /** |
| | | * 查询实验员工作评定分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TResultWorkEvaluateVO> testerEvaluateList(@Param("query")TResultWorkEvaluateQuery query, @Param("pageInfo")PageInfo<TResultWorkEvaluateVO> pageInfo); |
| | | |
| | | /** |
| | | * 查询化验师工作评定分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<ResultEvaluateChemistTesterVO> getEvaluateChemistPageList(@Param("query")ResultEvaluateChemistTesterQuery query, @Param("pageInfo")PageInfo<ResultEvaluateChemistTesterVO> pageInfo); |
| | | |
| | | /** |
| | | * 查询实验员工作评定分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<ResultEvaluateChemistTesterVO> getEvaluateTesterPageList(@Param("query")ResultEvaluateChemistTesterQuery query, @Param("pageInfo")PageInfo<ResultEvaluateChemistTesterVO> pageInfo); |
| | | |
| | | } |
| | |
| | | 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 = "用户id") |
| | | @TableField("user_id") |
| | | private Integer userId; |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "实验结果id") |
| | | @TableField("result_report_id") |
| | |
| | | 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.ruoyi.common.core.domain.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @TableField("data_files") |
| | | private String dataFiles; |
| | | |
| | | @ApiModelProperty(value = "检测结果数据") |
| | | @TableField("result_text") |
| | | private String resultText; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.model.TimeRangeQueryBody; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "实验员和化验师评定结果查询参数query") |
| | | public class ResultEvaluateChemistTesterQuery extends TimeRangeQueryBody { |
| | | |
| | | @ApiModelProperty(value = "项目课题方案名称") |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "实验编号") |
| | | private String experimentCode; |
| | | |
| | | @ApiModelProperty(value = "实验名称") |
| | | private String experimentName; |
| | | |
| | | @ApiModelProperty(value = "项目阶段 1=实验室开发阶段 2=中式试验阶段 3=生产验证试验阶段") |
| | | private Integer projectStage; |
| | | |
| | | @ApiModelProperty(value = "用户id 前端忽略") |
| | | private Long userId; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "实验调度query") |
| | | public class TExperimentDispatchQuery extends TimeRangeQueryBody { |
| | | |
| | | @ApiModelProperty(value = "项目课题方案名称") |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "实验编号") |
| | | private String experimentCode; |
| | | |
| | | @ApiModelProperty(value = "状态 -1=草稿箱 1=待确认 2=已确认 3=已封存") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "用户id 前端忽略") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "实验id 前端忽略") |
| | | private List<String> dispatchIds; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "实验方案管理query") |
| | | public class TExperimentSchemeQuery extends TimeRangeQueryBody { |
| | |
| | | |
| | | @ApiModelProperty(value = "审批状态 -1=草稿箱 1=已发送 2=申请中止待审核 3=申请中止已通过 4=申请中止已驳回 5=已封存") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "用户id 前端忽略") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "实验id 前端忽略") |
| | | private List<String> dispatchIds; |
| | | } |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import com.ruoyi.common.core.domain.model.TimeRangeQueryBody; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | |
| | | @ApiModelProperty(value = "项目组名称") |
| | | private String teamName; |
| | | @ApiModelProperty(value = "实验编号") |
| | | private String experimentCode; |
| | | |
| | | @ApiModelProperty(value = "实验名称") |
| | | private String experimentName; |
| | | @ApiModelProperty(value = "状态 -1=草稿箱 1=已提交") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "当前登陆人所属项目组List 前端忽略") |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "取样记录查询query") |
| | | public class TSamplingRecordQuery extends TimeRangeQueryBody { |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "用户id 前端忽略") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "实验id 前端忽略") |
| | | private List<String> dispatchIds; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "检验方法确认单查询query") |
| | | public class TTestMethodConfirmSheetQuery extends TimeRangeQueryBody { |
| | |
| | | |
| | | @ApiModelProperty(value = "审核状态 -1=草稿箱 1=待确认 2=通过 3=驳回 4=已撤回 5=已封存") |
| | | private Integer auditStatus; |
| | | |
| | | @ApiModelProperty(value = "用户id 前端忽略") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "实验id 前端忽略") |
| | | private List<String> dispatchIds; |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.system.query.SysUserQuery; |
| | | import com.ruoyi.system.vo.SysUserVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户 业务层 |
| | |
| | | |
| | | List<SysUser> selectListByNamePhone(String name); |
| | | |
| | | /** |
| | | * 通过用户id和nickName查询用户 |
| | | * @return |
| | | */ |
| | | List<SysUser> selectListByNameAndUserIds(String nickName, List<Long> userIds); |
| | | |
| | | |
| | | // UserInfoVo userInfo(Long userId); |
| | | |
| | |
| | | import com.ruoyi.system.query.TExperimentSchemeQuery; |
| | | import com.ruoyi.system.vo.TExperimentSchemeVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 实验方案管理 服务类 |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TExperimentSchemeVO> auditPageList(TExperimentSchemeQuery query); |
| | | |
| | | /** |
| | | * 获取检验方法确认单列表 |
| | | * @param dispatchId |
| | | * @return |
| | | */ |
| | | List<TExperimentSchemeVO> getList(String dispatchId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TResultWorkEvaluate; |
| | | import com.ruoyi.system.query.ResultEvaluateChemistTesterQuery; |
| | | import com.ruoyi.system.query.TResultWorkEvaluateQuery; |
| | | import com.ruoyi.system.vo.ResultEvaluateChemistTesterVO; |
| | | import com.ruoyi.system.vo.TResultWorkEvaluateVO; |
| | | |
| | | /** |
| | |
| | | |
| | | PageInfo<TResultWorkEvaluateVO> pageList(TResultWorkEvaluateQuery query); |
| | | |
| | | /** |
| | | * 获取化验师工作评定分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TResultWorkEvaluateVO> chemistEvaluateList(TResultWorkEvaluateQuery query); |
| | | |
| | | /** |
| | | * 获取实验员工作评定分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TResultWorkEvaluateVO> testerEvaluateList(TResultWorkEvaluateQuery query); |
| | | |
| | | /** |
| | | * 获取化验师工作评定分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<ResultEvaluateChemistTesterVO> getEvaluateChemistPageList(ResultEvaluateChemistTesterQuery query); |
| | | |
| | | /** |
| | | * 获取实验员工作评定分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<ResultEvaluateChemistTesterVO> getEvaluateTesterPageList(ResultEvaluateChemistTesterQuery query); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.DataScope; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | |
| | | public List<SysUser> selectListByNamePhone(String name) { |
| | | return userMapper.selectListByNamePhone(name); |
| | | } |
| | | @Override |
| | | public List<SysUser> selectListByNameAndUserIds(String nickName, List<Long> userIds) { |
| | | return userMapper.selectListByNameAndUserIds(nickName, userIds); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysUser> selectUserByUserNameList(List<String> names) { |
| | |
| | | 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.TExperimentDispatchParticipantsMapper; |
| | | import com.ruoyi.system.mapper.TExperimentResultReportMapper; |
| | | import com.ruoyi.system.mapper.TResultWorkEvaluateMapper; |
| | | import com.ruoyi.system.model.TExperimentDispatchParticipants; |
| | | import com.ruoyi.system.model.TExperimentResultReport; |
| | | import com.ruoyi.system.model.TResultWorkEvaluate; |
| | | import com.ruoyi.system.query.TExperimentResultReportQuery; |
| | | import com.ruoyi.system.service.TExperimentResultReportService; |
| | | import com.ruoyi.system.vo.TExperimentResultReportVO; |
| | | 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 TExperimentResultReportServiceImpl extends ServiceImpl<TExperimentResultReportMapper, TExperimentResultReport> implements TExperimentResultReportService { |
| | | |
| | | @Autowired |
| | | private TExperimentResultReportMapper tExperimentResultReportMapper; |
| | | @Autowired |
| | | private TExperimentDispatchParticipantsMapper experimentDispatchParticipantsMapper; |
| | | @Autowired |
| | | private TResultWorkEvaluateMapper resultWorkEvaluateMapper; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | | public PageInfo<TExperimentResultReportVO> pageList(TExperimentResultReportQuery query) { |
| | | PageInfo<TExperimentResultReportVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TExperimentResultReportVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | // TODO 处理实验人员信息及是否评定 |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | return pageInfo; |
| | | } |
| | | List<String> dispatchIds = list.stream().map(TExperimentResultReportVO::getDispatchId).distinct().collect(Collectors.toList()); |
| | | // 查询参与人员 |
| | | List<TExperimentDispatchParticipants> tExperimentDispatchParticipants = experimentDispatchParticipantsMapper.selectList(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .in(TExperimentDispatchParticipants::getDispatchId, dispatchIds)); |
| | | |
| | | // 设置参与人员名称 |
| | | List<Long> userIds = tExperimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getUserId).collect(Collectors.toList()); |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | tExperimentDispatchParticipants.forEach(tExperimentDispatchParticipant -> { |
| | | SysUser sysUser = sysUsers.stream().filter(user -> user.getUserId().equals(tExperimentDispatchParticipant.getUserId())).findFirst().orElse(null); |
| | | if(sysUser != null){ |
| | | tExperimentDispatchParticipant.setNickName(sysUser.getNickName()); |
| | | tExperimentDispatchParticipant.setAvatar(sysUser.getAvatar()); |
| | | } |
| | | }); |
| | | |
| | | List<String> ids = list.stream().map(TExperimentResultReportVO::getId).distinct().collect(Collectors.toList()); |
| | | // 查询结果汇报评价 |
| | | List<TResultWorkEvaluate> resultWorkEvaluates = resultWorkEvaluateMapper.selectList(Wrappers.lambdaQuery(TResultWorkEvaluate.class) |
| | | .in(TResultWorkEvaluate::getResultReportId, ids)); |
| | | |
| | | for (TExperimentResultReportVO experimentResultReportVO : list) { |
| | | experimentResultReportVO.setExperimentDispatchParticipants(tExperimentDispatchParticipants.stream().filter(participants -> participants.getDispatchId().equals(experimentResultReportVO.getDispatchId())).collect(Collectors.toList())); |
| | | experimentResultReportVO.setResultWorkEvaluates(resultWorkEvaluates.stream().filter(evaluate -> evaluate.getResultReportId().equals(experimentResultReportVO.getId())).collect(Collectors.toList())); |
| | | // 设置工艺工程师名称 |
| | | TExperimentDispatchParticipants dispatchParticipants = tExperimentDispatchParticipants.stream() |
| | | .filter(participants -> participants.getDispatchId().equals(experimentResultReportVO.getDispatchId()) |
| | | && participants.getRoleType().equals(3)).findFirst().orElse(null); |
| | | if(dispatchParticipants != null){ |
| | | experimentResultReportVO.setProcessEngineerName(dispatchParticipants.getNickName()); |
| | | } |
| | | // 设置化验师名称 |
| | | List<TExperimentDispatchParticipants> laboratoryChemist = tExperimentDispatchParticipants.stream() |
| | | .filter(participants -> participants.getDispatchId().equals(experimentResultReportVO.getDispatchId()) |
| | | && participants.getRoleType().equals(4)).collect(Collectors.toList()); |
| | | List<TResultWorkEvaluate> chemistEvaluates = resultWorkEvaluates.stream() |
| | | .filter(workEvaluate -> workEvaluate.getDispatchId().equals(experimentResultReportVO.getDispatchId()) |
| | | && workEvaluate.getEvaluateType().equals(2)).collect(Collectors.toList()); |
| | | if(laboratoryChemist.size() == chemistEvaluates.size()){ |
| | | experimentResultReportVO.setLaboratoryChemistEvaluate(1); |
| | | } |
| | | if(!CollectionUtils.isEmpty(laboratoryChemist)){ |
| | | String laboratoryChemistName = laboratoryChemist.stream().map(TExperimentDispatchParticipants::getNickName).collect(Collectors.joining(",")); |
| | | experimentResultReportVO.setLaboratoryChemistName(laboratoryChemistName); |
| | | } |
| | | // 设置实验员名称 |
| | | List<TExperimentDispatchParticipants> experimenter = tExperimentDispatchParticipants.stream() |
| | | .filter(participants -> participants.getDispatchId().equals(experimentResultReportVO.getDispatchId()) |
| | | && participants.getRoleType().equals(5)).collect(Collectors.toList()); |
| | | List<TResultWorkEvaluate> experimenterEvaluates = resultWorkEvaluates.stream() |
| | | .filter(workEvaluate -> workEvaluate.getDispatchId().equals(experimentResultReportVO.getDispatchId()) |
| | | && workEvaluate.getEvaluateType().equals(3)).collect(Collectors.toList()); |
| | | if(experimenter.size() == experimenterEvaluates.size()){ |
| | | experimentResultReportVO.setExperimenterEvaluate(1); |
| | | } |
| | | if(!CollectionUtils.isEmpty(experimenter)){ |
| | | String experimenterName = experimenter.stream().map(TExperimentDispatchParticipants::getNickName).collect(Collectors.joining(",")); |
| | | experimentResultReportVO.setExperimenterName(experimenterName); |
| | | } |
| | | } |
| | | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public List<TExperimentSchemeVO> getList(String dispatchId) { |
| | | List<TExperimentSchemeVO> list = this.baseMapper.getList(dispatchId); |
| | | List<String> schemeIds = list.stream().map(TExperimentSchemeVO::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty(schemeIds)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | 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(","))); |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.documents4j.api.IFileConsumer; |
| | | 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.TExperimentDispatchParticipantsMapper; |
| | | import com.ruoyi.system.mapper.TResultWorkEvaluateMapper; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.model.TExperimentDispatchParticipants; |
| | | import com.ruoyi.system.model.TResultWorkEvaluate; |
| | | import com.ruoyi.system.query.ResultEvaluateChemistTesterQuery; |
| | | import com.ruoyi.system.query.TResultWorkEvaluateQuery; |
| | | import com.ruoyi.system.service.TResultWorkEvaluateService; |
| | | import com.ruoyi.system.vo.TProjectTeamVO; |
| | | import com.ruoyi.system.vo.ResultEvaluateChemistTesterVO; |
| | | import com.ruoyi.system.vo.TResultWorkEvaluateVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | public class TTesterWorkEvaluateServiceImpl extends ServiceImpl<TResultWorkEvaluateMapper, TResultWorkEvaluate> implements TResultWorkEvaluateService { |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | @Autowired |
| | | private TExperimentDispatchParticipantsMapper experimentDispatchParticipantsMapper; |
| | | |
| | | @Override |
| | | public PageInfo<TResultWorkEvaluateVO> pageList(TResultWorkEvaluateQuery query) { |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TResultWorkEvaluateVO> chemistEvaluateList(TResultWorkEvaluateQuery query) { |
| | | PageInfo<TResultWorkEvaluateVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TResultWorkEvaluateVO> list = this.baseMapper.chemistEvaluateList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | @Override |
| | | public PageInfo<TResultWorkEvaluateVO> testerEvaluateList(TResultWorkEvaluateQuery query) { |
| | | PageInfo<TResultWorkEvaluateVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TResultWorkEvaluateVO> list = this.baseMapper.testerEvaluateList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<ResultEvaluateChemistTesterVO> getEvaluateChemistPageList(ResultEvaluateChemistTesterQuery query) { |
| | | PageInfo<ResultEvaluateChemistTesterVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<ResultEvaluateChemistTesterVO> list = this.baseMapper.getEvaluateChemistPageList(query,pageInfo); |
| | | if(!CollectionUtils.isEmpty(list)){ |
| | | // 查询工艺工程师的名称 |
| | | List<String> dispatchIds = list.stream().map(ResultEvaluateChemistTesterVO::getDispatchId).collect(Collectors.toList()); |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsMapper.selectList(new LambdaQueryWrapper<TExperimentDispatchParticipants>() |
| | | .in(TExperimentDispatchParticipants::getDispatchId, dispatchIds) |
| | | .eq(TExperimentDispatchParticipants::getRoleType, 3)); |
| | | List<Long> userIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getUserId).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(userIds)){ |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | for (ResultEvaluateChemistTesterVO resultEvaluateChemistTesterVO : list) { |
| | | sysUsers.stream().filter(sysUser -> sysUser.getUserId().equals(resultEvaluateChemistTesterVO.getParticipantsId())).findFirst().ifPresent(sysUser -> { |
| | | resultEvaluateChemistTesterVO.setProcessEngineerName(sysUser.getNickName()); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<ResultEvaluateChemistTesterVO> getEvaluateTesterPageList(ResultEvaluateChemistTesterQuery query) { |
| | | PageInfo<ResultEvaluateChemistTesterVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<ResultEvaluateChemistTesterVO> list = this.baseMapper.getEvaluateTesterPageList(query,pageInfo); |
| | | if(!CollectionUtils.isEmpty(list)){ |
| | | // 查询工艺工程师的名称 |
| | | List<String> dispatchIds = list.stream().map(ResultEvaluateChemistTesterVO::getDispatchId).collect(Collectors.toList()); |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsMapper.selectList(new LambdaQueryWrapper<TExperimentDispatchParticipants>() |
| | | .in(TExperimentDispatchParticipants::getDispatchId, dispatchIds) |
| | | .eq(TExperimentDispatchParticipants::getRoleType, 3)); |
| | | List<Long> userIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getUserId).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(userIds)){ |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds); |
| | | for (ResultEvaluateChemistTesterVO resultEvaluateChemistTesterVO : list) { |
| | | sysUsers.stream().filter(sysUser -> sysUser.getUserId().equals(resultEvaluateChemistTesterVO.getParticipantsId())).findFirst().ifPresent(sysUser -> { |
| | | resultEvaluateChemistTesterVO.setProcessEngineerName(sysUser.getNickName()); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel(value = "实验员和化验师评价结果VO") |
| | | public class ResultEvaluateChemistTesterVO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "评定id") |
| | | private String evaluateId; |
| | | |
| | | @ApiModelProperty(value = "化验师id或实验员id") |
| | | private Long participantsId; |
| | | |
| | | @ApiModelProperty(value = "实验id") |
| | | private String dispatchId; |
| | | |
| | | @ApiModelProperty(value = "项目课题方案名称") |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "项目阶段 1=实验室开发阶段 2=中式试验阶段 3=生产验证试验阶段") |
| | | private Integer projectStage; |
| | | |
| | | @ApiModelProperty(value = "实验编号") |
| | | private String experimentCode; |
| | | |
| | | @ApiModelProperty(value = "实验名称") |
| | | private String experimentName; |
| | | |
| | | @ApiModelProperty(value = "工艺工程师姓名") |
| | | private String processEngineerName; |
| | | |
| | | @ApiModelProperty(value = "化验师名称") |
| | | private String laboratoryChemistName; |
| | | |
| | | @ApiModelProperty(value = "实验员名称") |
| | | private String laboratoryTesterName; |
| | | |
| | | @ApiModelProperty(value = "是否评定 1=是 0=否") |
| | | private Integer isEvaluate; |
| | | |
| | | @ApiModelProperty(value = "评定时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime evaluateTime; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | 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 io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "评分列表") |
| | | private List<TResultWorkEvaluate> resultWorkEvaluates; |
| | | @ApiModelProperty(value = "实验结果") |
| | | private List<TExperimentScheme> experimentSchemes; |
| | | private List<TExperimentSchemeVO> experimentSchemeVOS; |
| | | @ApiModelProperty(value = "检验结果报告") |
| | | private List<TInspectionReport> InspectionReports; |
| | | |
| | | @ApiModelProperty(value = "实验参与人员") |
| | | private List<TExperimentDispatchParticipants> experimentDispatchParticipants; |
| | | @ApiModelProperty(value = "实验调度") |
| | | private TExperimentDispatchVO experimentDispatchVO; |
| | | @ApiModelProperty(value = "项目课题方案") |
| | | private String projectName; |
| | | |
| | |
| | | @ApiModelProperty(value = "化验师名称") |
| | | private String laboratoryChemistName; |
| | | |
| | | @ApiModelProperty(value = "化验师是否评定") |
| | | @ApiModelProperty(value = "化验师是否评定 1=是 0=否") |
| | | private Integer laboratoryChemistEvaluate; |
| | | |
| | | @ApiModelProperty(value = "实验员姓名") |
| | | private String experimenterName; |
| | | |
| | | @ApiModelProperty(value = "实验员是否评定") |
| | | @ApiModelProperty(value = "实验员是否评定 1=是 0=否") |
| | | private Integer experimenterEvaluate; |
| | | } |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.ruoyi.system.model.TExperimentDispatch; |
| | | import com.ruoyi.system.model.TInspectionReport; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "检验报告VO") |
| | | public class TInspectionReportVO extends TInspectionReport { |
| | | |
| | | |
| | | @ApiModelProperty(value = "项目课题方案") |
| | | private String projectName; |
| | | @ApiModelProperty(value = "实验编号") |
| | | private String experimentCode; |
| | | @ApiModelProperty(value = "实验名称") |
| | | private String experimentName; |
| | | @ApiModelProperty(value = "实验调度") |
| | | private TExperimentDispatch experimentDispatch; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.system.model.TQaReportFile; |
| | | import com.ruoyi.system.model.TQaTestItemReport; |
| | | import com.ruoyi.system.model.TResultWorkEvaluate; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "实验员工作评定管理分页列表VO") |
| | |
| | | |
| | | @ApiModelProperty(value = "项目组名称") |
| | | private String teamName; |
| | | @ApiModelProperty(value = "实验编号") |
| | | private String experimentCode; |
| | | @ApiModelProperty(value = "实验名称") |
| | | private String experimentName; |
| | | @ApiModelProperty(value = "项目组总积分") |
| | | private Integer teamIntegral; |
| | | @ApiModelProperty(value = "工艺工程师总积分") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime endTime; |
| | | |
| | | @ApiModelProperty(value = "化验师名称") |
| | | private String chemistName; |
| | | @ApiModelProperty(value = "实验员名称") |
| | | private String testerName; |
| | | |
| | | } |
| | |
| | | |
| | | import com.ruoyi.system.model.TTestMethodConfirmSheetOriginal; |
| | | import com.ruoyi.system.model.TTestMethodConfirmSheetOriginalData; |
| | | import com.ruoyi.system.model.TTestMethodConfirmSheetTerm; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "检测数据") |
| | | private List<TTestMethodConfirmSheetOriginalData> testMethodConfirmSheetOriginalDataList; |
| | | |
| | | @ApiModelProperty(value = "检测项数据") |
| | | private TTestMethodConfirmSheetTerm testMethodConfirmSheetTerm; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <select id="listByRole" resultType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp, |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack, |
| | | u.districtId AS districtId, u.role_type AS roleType,r.role_id AS roleId |
| | | from sys_user u |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | WHERE u.del_flag = 0 |
| | | <if test="userIds != null and userIds.size()>0"> |
| | | AND u.user_id IN |
| | | <foreach collection="userIds" close=")" open="(" item="userId" separator=","> |
| | | #{userId} |
| | | </foreach> |
| | | </if> |
| | | <if test="nickName != null and nickName != ''"> |
| | | AND u.nick_name LIKE concat('%',#{nickName},'%') |
| | | </if> |
| | | </select> |
| | | <select id="selectListByNameAndUserIds" resultType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp, |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack, u.districtId AS districtId |
| | | from sys_user u |
| | | WHERE u.del_flag = 0 |
| | |
| | | <if test="query.experimentCode != null and query.experimentCode != ''"> |
| | | and ted.experiment_code like concat('%',#{query.experimentCode},'%') |
| | | </if> |
| | | <if test="query.status !=null and query.status != -1"> |
| | | <if test="query.status !=null"> |
| | | and ted.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | | and ted.status != -1 |
| | | <if test="query.dispatchIds != null and query.dispatchIds.size() > 0"> |
| | | and ted.id in |
| | | <foreach item="item" collection="query.dispatchIds" separator="," close=")" index="index" open="("> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND ted.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.status == null"> |
| | | and ted.status != -1 |
| | | </if> |
| | | AND ted.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY ted.create_time DESC |
| | |
| | | <if test="query.experimentName != null and query.experimentName != ''"> |
| | | and ted.experiment_name like concat('%', #{query.experimentName}, '%') |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and terr.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | 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 query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and tes.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | | and tes.status != -1 |
| | | </if> |
| | | <if test="query.projectName != null and query.projectName != ''"> |
| | | and tpp.project_name like concat('%', #{query.projectName}, '%') |
| | |
| | | </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> |
| | | <if test="query.dispatchIds != null and query.dispatchIds.size() > 0"> |
| | | and tes.dispatch_id in |
| | | <foreach item="item" collection="query.dispatchIds" separator="," close=")" index="index" open="("> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.status == null"> |
| | | and tes.status != -1 |
| | | </if> |
| | | AND tes.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | |
| | | <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> |
| | | <if test="query.dispatchIds != null and query.dispatchIds.size() > 0"> |
| | | and tes.dispatch_id in |
| | | <foreach item="item" collection="query.dispatchIds" separator="," close=")" index="index" open="("> |
| | | #{item} |
| | | </foreach> |
| | | </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> |
| | | <select id="getList" 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 tes.dispatch_id = #{dispatchId} |
| | | AND tes.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | ORDER BY tes.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and tpt.team_name like concat('%', #{query.teamName}) |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and tfsr.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and tpt.team_name like concat('%', #{query.teamName}) |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and tfsr.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | id, dispatch_id, test_result, test_reason, status, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TInspectionReportVO"> |
| | | select id, dispatch_id, test_result, test_reason, status, create_time, update_time, create_by, update_by, disabled |
| | | select tir.id, tir.dispatch_id, tir.test_result, tir.test_reason, tir.status, tir.create_time, |
| | | tir.update_time, tir.create_by, tir.update_by, tir.disabled, ted.experiment_name, ted.experiment_code, |
| | | tpp.project_name |
| | | from t_inspection_report tir |
| | | left join t_experiment_dispatch ted on ted.id = tir.dispatch_id |
| | | left join t_project_proposal tpp on ted.proposal_id = tpp.id |
| | |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tir.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and tir.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | id, team_id, report_code, report_name, report_text, status, audit_person_id, audit_time, audit_remark, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TProjectApprovalReportVO"> |
| | | select id, team_id, report_code, report_name, report_text, status, audit_person_id, audit_time, audit_remark, create_time, update_time, create_by, update_by, disabled |
| | | select tpar.id, tpar.team_id, tpar.report_code, tpar.report_name, tpar.report_text, tpar.status, tpar.audit_person_id, |
| | | tpar.audit_time, tpar.audit_remark, tpar.create_time, tpar.update_time, tpar.create_by, tpar.update_by, tpar.disabled, |
| | | tpt.team_name as teamName |
| | | from t_project_approval_report tpar |
| | | left join t_project_team tpt on tpt.id = tpar.team_id |
| | | <where> |
| | |
| | | <if test="query.reportName != null and query.reportName != ''"> |
| | | and tpar.report_name like concat('%',#{query.reportName},'%') |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and tpar.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tpp.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.auditStatus != null and query.auditStatus != -1"> |
| | | <if test="query.auditStatus != null"> |
| | | AND tpp.audit_status = #{query.auditStatus} |
| | | </if> |
| | | <if test="query.auditStatus == null"> |
| | |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and tpt.team_name like concat('%', #{query.teamName}, '%') |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and tqpr.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | <if test="query.itemCode != null and query.itemCode != ''"> |
| | | and tqti.item_code like concat('%', #{query.itemCode}) |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and tqti.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | <if test="query.reportContent != null and query.reportContent != ''"> |
| | | and tqtir.report_content = #{query.reportContent} |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and tqtir.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND t1.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | AND t1.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | </where> |
| | | group by t1.team_id |
| | | </select> |
| | | <select id="chemistEvaluateList" resultType="com.ruoyi.system.vo.TResultWorkEvaluateVO"> |
| | | select trwe.id, trwe.dispatch_id, trwe.user_id, trwe.result_report_id,trwe.evaluate_type, trwe.evaluate_one, |
| | | trwe.evaluate_two, trwe.evaluate_three, trwe.evaluate_four, trwe.evaluate_five, trwe.evaluate_six, |
| | | trwe.status, trwe.evaluate_person_id, trwe.evaluate_time,trwe.result_evaluate_json,trwe.team_id, trwe.create_time, |
| | | trwe.update_time, trwe.create_by, trwe.update_by, trwe.disabled, tpp.project_name as projectName, |
| | | ted.experiment_code as experimentCode,ted.experiment_name as experimentName |
| | | from t_result_work_evaluate trwe |
| | | left join t_experiment_dispatch ted on trwe.dispatch_id = ted.id |
| | | left join t_project_proposal tpp on ted.proposal_id = tpp.id |
| | | <where> |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and tpp.team_name like concat('%',#{query.teamName},'%') |
| | | </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.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND trwe.evaluate_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND trwe.status = #{query.status} |
| | | </if> |
| | | <if test="query.teamIds != null and query.teamIds > 0"> |
| | | AND trwe.team_id in |
| | | <foreach collection="query.teamIds" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | AND trwe.evaluate_type = 2 |
| | | AND trwe.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY trwe.evaluate_time DESC |
| | | </select> |
| | | <select id="testerEvaluateList" resultType="com.ruoyi.system.vo.TResultWorkEvaluateVO"> |
| | | select trwe.id, trwe.dispatch_id, trwe.user_id, trwe.result_report_id,trwe.evaluate_type, trwe.evaluate_one, |
| | | trwe.evaluate_two, trwe.evaluate_three, trwe.evaluate_four, trwe.evaluate_five, trwe.evaluate_six, |
| | | trwe.status, trwe.evaluate_person_id, trwe.evaluate_time,trwe.result_evaluate_json,trwe.team_id, trwe.create_time, |
| | | trwe.update_time, trwe.create_by, trwe.update_by, trwe.disabled, tpp.project_name as projectName, |
| | | ted.experiment_code as experimentCode,ted.experiment_name as experimentName |
| | | from t_result_work_evaluate trwe |
| | | left join t_experiment_dispatch ted on trwe.dispatch_id = ted.id |
| | | left join t_project_proposal tpp on ted.proposal_id = tpp.id |
| | | <where> |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and tpp.team_name like concat('%',#{query.teamName},'%') |
| | | </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.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND trwe.evaluate_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND trwe.status = #{query.status} |
| | | </if> |
| | | <if test="query.teamIds != null and query.teamIds > 0"> |
| | | AND trwe.team_id in |
| | | <foreach collection="query.teamIds" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | AND trwe.evaluate_type = 3 |
| | | AND trwe.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY trwe.evaluate_time DESC |
| | | </select> |
| | | <select id="getEvaluateChemistPageList" resultType="com.ruoyi.system.vo.ResultEvaluateChemistTesterVO"> |
| | | select trwe.evaluate_time,CASE WHEN trwe.id IS NOT NULL THEN 1 ELSE 0 END AS isEvaluate,trwe.id, |
| | | tedp.id AS participantsId,tpp.project_name AS projectName,tpp.project_stage AS projectStage, |
| | | ted.experiment_code AS experimentCode,ted.experiment_name AS experimentName,su.nick_name AS laboratoryChemistName, |
| | | tedp.dispatch_id AS dispatchId |
| | | from t_experiment_dispatch_participants tedp |
| | | left join t_experiment_dispatch ted on ted.id = tedp.dispatch_id |
| | | left join t_result_work_evaluate trwe on tedp.id = trwe.dispatch_id and trwe.evaluate_type = 2 |
| | | left join t_project_proposal tpp on ted.proposal_id = tpp.id |
| | | left join sys_user su on tedp.user_id = su.id |
| | | <where> |
| | | <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.projectName != null and query.projectName != ''"> |
| | | and tpp.project_name like concat('%',#{query.projectName},'%') |
| | | </if> |
| | | <if test="query.userId != null"> |
| | | and tedp.user_id = #{query.userId} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND trwe.evaluate_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.projectStage != null"> |
| | | AND tpp.project_stage = #{query.projectStage} |
| | | </if> |
| | | AND ted.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY trwe.evaluate_time DESC |
| | | </select> |
| | | <select id="getEvaluateTesterPageList" resultType="com.ruoyi.system.vo.ResultEvaluateChemistTesterVO"> |
| | | select trwe.evaluate_time,CASE WHEN trwe.id IS NOT NULL THEN 1 ELSE 0 END AS isEvaluate,trwe.id, |
| | | tedp.id AS participantsId,tpp.project_name AS projectName,tpp.project_stage AS projectStage, |
| | | ted.experiment_code AS experimentCode,ted.experiment_name AS experimentName,su.nick_name AS laboratoryTesterName, |
| | | tedp.dispatch_id AS dispatchId |
| | | from t_experiment_dispatch_participants tedp |
| | | left join t_experiment_dispatch ted on ted.id = tedp.dispatch_id |
| | | left join t_result_work_evaluate trwe on tedp.id = trwe.dispatch_id and trwe.evaluate_type = 3 |
| | | left join t_project_proposal tpp on ted.proposal_id = tpp.id |
| | | left join sys_user su on tedp.user_id = su.id |
| | | <where> |
| | | <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.projectName != null and query.projectName != ''"> |
| | | and tpp.project_name like concat('%',#{query.projectName},'%') |
| | | </if> |
| | | <if test="query.userId != null"> |
| | | and tedp.user_id = #{query.userId} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND trwe.evaluate_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.projectStage != null"> |
| | | AND tpp.project_stage = #{query.projectStage} |
| | | </if> |
| | | AND ted.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY trwe.evaluate_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tsr.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and tsr.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | | and tsr.status != -1 |
| | | </if> |
| | | <if test="query.createBy != null and query.createBy !=''"> |
| | | and tsr.create_by like concat('%', #{query.createBy}, '%') |
| | | </if> |
| | | <if test="query.dispatchIds != null and query.dispatchIds.size() > 0"> |
| | | and tsr.dispatch_id in |
| | | <foreach item="item" collection="query.dispatchIds" separator="," close=")" index="index" open="("> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.status == null"> |
| | | and tsr.status != -1 |
| | | </if> |
| | | AND tsr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tsr.create_time DESC |
| | |
| | | <if test="query.experimentCode != null and query.experimentCode !=''"> |
| | | and ted.experiment_code like concat('%', #{query.experimentCode}, '%') |
| | | </if> |
| | | <if test="query.auditStatus != null and query.auditStatus != -1"> |
| | | <if test="query.auditStatus != null"> |
| | | and tmcs.audit_status = #{query.auditStatus} |
| | | </if> |
| | | <if test="query.auditStatus == null"> |
| | | and tmcs.audit_status != -1 |
| | | <if test="query.dispatchIds != null and query.dispatchIds.size() > 0"> |
| | | and tmcs.dispatch_id in |
| | | <foreach item="item" collection="query.dispatchIds" separator="," close=")" index="index" open="("> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tmcs.create_time BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.auditStatus == null"> |
| | | and tmcs.audit_status != -1 |
| | | </if> |
| | | AND tmcs.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tmcs.create_time DESC |
| | |
| | | <if test="query.createBy != null and query.createBy != ''"> |
| | | and ttmcso.create_by like concat('%', #{query.createBy}, '%') |
| | | </if> |
| | | <if test="query.status != null and query.status != -1"> |
| | | <if test="query.status != null"> |
| | | and ttmcso.status = #{query.status} |
| | | </if> |
| | | <if test="query.status == null"> |
| | |
| | | <result column="data_type" property="dataType" /> |
| | | <result column="data_pictures" property="dataPictures" /> |
| | | <result column="data_files" property="dataFiles" /> |
| | | <result column="result_text" property="resultText" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, original_id, data_code, data_title, data_type, data_pictures, data_files, create_time, update_time, create_by, update_by, disabled |
| | | id, original_id, data_code, data_title, data_type, data_pictures, data_files,result_text, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | |
| | | </mapper> |