xuhy
2 天以前 39a97f1b7585edc184ea5066600f1d9a2d2cb8cf
测评接口,草稿箱修改
20个文件已修改
4个文件已添加
457 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TFeasibilityStudyReportController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TProjectApprovalReportController.java 232 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTesterOtherTaskController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/enums/ProjectApprovalReportStatusEnum.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/dto/TProjectApprovalReportDTO.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TProjectApprovalReportMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TProjectApprovalReportQuery.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/TProjectApprovalReportService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TProjectApprovalReportServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/TProjectApprovalReportVO.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TExperimentDispatchMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TExperimentSchemeMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TFeasibilityStudyReportMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TProjectApprovalReportMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TProjectProposalMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TQaProduceReportMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TQaTestItemMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TQaTestItemReportMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TSamplingRecordMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TTestMethodConfirmSheetMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TTestMethodConfirmSheetOriginalMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TFeasibilityStudyReportController.java
@@ -129,7 +129,7 @@
            }
        }
        Map<String,Integer> map = feasibilityStudyReportService.evaluateCount(query);
        return R.ok();
        return R.ok(map);
    }
    /**
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TProjectApprovalReportController.java
@@ -1,9 +1,41 @@
package com.ruoyi.web.controller.api;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.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;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.model.TFeasibilityReportFile;
import com.ruoyi.system.model.TProjectApprovalReport;
import com.ruoyi.system.model.TProjectTeam;
import com.ruoyi.system.model.TProjectTeamStaff;
import com.ruoyi.system.query.TProjectApprovalReportQuery;
import com.ruoyi.system.service.TFeasibilityReportFileService;
import com.ruoyi.system.service.TProjectApprovalReportService;
import com.ruoyi.system.service.TProjectTeamService;
import com.ruoyi.system.service.TProjectTeamStaffService;
import com.ruoyi.system.vo.TProjectApprovalReportVO;
import io.jsonwebtoken.lang.Collections;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
 * <p>
@@ -15,8 +47,202 @@
 */
@Api(tags = "立项报告管理")
@RestController
@RequestMapping("/t-project-approval-report")
@RequestMapping("")
public class TProjectApprovalReportController {
    private final TProjectApprovalReportService projectApprovalReportService;
    private final TFeasibilityReportFileService feasibilityReportFileService;
    private final TokenService tokenService;
    private final TProjectTeamService projectTeamService;
    private final TProjectTeamStaffService projectTeamStaffService;
    private final SysUserMapper sysUserMapper;
    @Autowired
    public TProjectApprovalReportController(TProjectApprovalReportService projectApprovalReportService, TFeasibilityReportFileService feasibilityReportFileService, TokenService tokenService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService, SysUserMapper sysUserMapper) {
        this.projectApprovalReportService = projectApprovalReportService;
        this.feasibilityReportFileService = feasibilityReportFileService;
        this.tokenService = tokenService;
        this.projectTeamService = projectTeamService;
        this.projectTeamStaffService = projectTeamStaffService;
        this.sysUserMapper = sysUserMapper;
    }
    /**
     * 获取立项报告列表
     */
    //@PreAuthorize("@ss.hasPermi('system:projectApprovalReport:list')")
    @ApiOperation(value = "获取立项报告分页列表",response = TProjectApprovalReportQuery.class)
    @PostMapping(value = "/api/t-project-approval-report/pageList")
    public R<PageInfo<TProjectApprovalReportVO>> pageList(@RequestBody String param) {
        TProjectApprovalReportQuery query = JSON.parseObject(param, TProjectApprovalReportQuery.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(projectApprovalReportService.pageList(query));
    }
    /**
     * 添加立项报告管理
     */
    //@PreAuthorize("@ss.hasPermi('system:projectApprovalReport:add')")
    @Log(title = "立项报告信息-新增立项报告", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加立项报告",response = TProjectApprovalReportDTO.class)
    @PostMapping(value = "/api/t-project-approval-report/add")
    public R<Boolean> add(@RequestBody String param) {
        TProjectApprovalReportDTO dto = JSON.parseObject(param,TProjectApprovalReportDTO.class);
        // 通过当前用户查询项目组
        Long userId = tokenService.getLoginUser().getUserId();
        TProjectTeamStaff projectTeamStaff = projectTeamStaffService.getOne(Wrappers.lambdaQuery(TProjectTeamStaff.class)
                .eq(TProjectTeamStaff::getUserId, userId)
                .last("LIMIT 1"));
        if(Objects.isNull(projectTeamStaff)){
            return R.fail("当前用户未分配项目组,无法创建项目课题方案");
        }
        // 查询项目组
        TProjectTeam projectTeam = projectTeamService.getById(projectTeamStaff.getTeamId());
        if(Objects.isNull(projectTeam)){
            return R.fail("项目组不存在");
        }
        if(projectTeam.getStatus() == 2){
            return R.fail("项目组已封存,无法创建项目课题方案");
        }
        // 生成可研、可行、工艺开发工具、验证发布报告编号
        String reportCode = projectTeam.getTeamName() + "-" + 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);
        // 添加检测报告文件
        List<TFeasibilityReportFile> feasibilityReportFiles = dto.getFeasibilityReportFiles();
        if(!Collections.isEmpty(feasibilityReportFiles)){
            for (TFeasibilityReportFile feasibilityReportFile : feasibilityReportFiles) {
                feasibilityReportFile.setReportId(dto.getId());
                feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode());
            }
        }
        feasibilityReportFileService.saveBatch(feasibilityReportFiles);
        return R.ok();
    }
    /**
     * 修改立项报告
     */
    //@PreAuthorize("@ss.hasPermi('system:projectApprovalReport:edit')")
    @Log(title = "立项报告信息-修改立项报告", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改立项报告")
    @PostMapping(value = "/api/t-project-approval-report/update")
    public R<Boolean> update(@RequestBody String param) {
        TProjectApprovalReportDTO dto = JSON.parseObject(param,TProjectApprovalReportDTO.class);
        projectApprovalReportService.updateById(dto);
        feasibilityReportFileService.remove(Wrappers.lambdaQuery(TFeasibilityReportFile.class)
                .eq(TFeasibilityReportFile::getReportId, dto.getId()));
        // 添加检测报告文件
        List<TFeasibilityReportFile> feasibilityReportFiles = dto.getFeasibilityReportFiles();
        if(!Collections.isEmpty(feasibilityReportFiles)){
            for (TFeasibilityReportFile feasibilityReportFile : feasibilityReportFiles) {
                feasibilityReportFile.setReportId(dto.getId());
                feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode());
            }
        }
        feasibilityReportFileService.saveBatch(feasibilityReportFiles);
        return R.ok();
    }
    /**
     * 查看立项报告详情
     */
    //@PreAuthorize("@ss.hasPermi('system:projectApprovalReport:detail')")
    @ApiOperation(value = "查看立项报告详情")
    @GetMapping(value = "/open/t-project-approval-report/getDetailById")
    public R<TProjectApprovalReportVO> getDetailById(@RequestParam String id) {
        TProjectApprovalReport projectApprovalReport = projectApprovalReportService.getById(id);
        TProjectApprovalReportVO projectApprovalReportVO = new TProjectApprovalReportVO();
        BeanUtils.copyProperties(projectApprovalReport, projectApprovalReportVO);
        // 查询检测报告文件
        List<TFeasibilityReportFile> feasibilityReportFiles = feasibilityReportFileService.list(Wrappers.lambdaQuery(TFeasibilityReportFile.class)
                .eq(TFeasibilityReportFile::getReportId, id));
        projectApprovalReportVO.setFeasibilityReportFiles(feasibilityReportFiles);
        // 查询项目组
        TProjectTeam projectTeam = projectTeamService.getById(projectApprovalReport.getTeamId());
        // 查询项目组成员
        List<TProjectTeamStaff> projectTeamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class)
                .eq(TProjectTeamStaff::getTeamId, projectTeam.getId()));
        List<Long> userIds = projectTeamStaffs.stream().map(TProjectTeamStaff::getUserId).collect(Collectors.toList());
        List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds);
        projectApprovalReportVO.setStaffNames(sysUsers.stream().map(SysUser::getNickName).collect(Collectors.joining(",")));
        projectApprovalReportVO.setProjectTeam(projectTeam);
        return R.ok(projectApprovalReportVO);
    }
    /**
     * 删除立项报告
     */
    //@PreAuthorize("@ss.hasPermi('system:projectApprovalReport:delete')")
    @Log(title = "立项报告信息-删除立项报告", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除立项报告")
    @DeleteMapping(value = "/open/t-project-approval-report/deleteById")
    public R<Boolean> deleteById(@RequestParam String id) {
        // 删除可研、可行、工艺开发工具、验证发布报告文件
        feasibilityReportFileService.remove(Wrappers.lambdaQuery(TFeasibilityReportFile.class).eq(TFeasibilityReportFile::getReportId, id));
        return R.ok(projectApprovalReportService.removeById(id));
    }
    /**
     * 批量删除立项报告
     */
    //@PreAuthorize("@ss.hasPermi('system:projectApprovalReport:delete')")
    @Log(title = "立项报告信息-删除立项报告", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除立项报告")
    @DeleteMapping(value = "/open/t-project-approval-report/deleteByIds")
    public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
        // 删除可研、可行、工艺开发工具、验证发布报告文件
        feasibilityReportFileService.remove(Wrappers.lambdaQuery(TFeasibilityReportFile.class).in(TFeasibilityReportFile::getReportId, ids));
        return R.ok(projectApprovalReportService.removeByIds(ids));
    }
    /**
     * 撤销立项报告
     */
    //@PreAuthorize("@ss.hasPermi('system:projectApprovalReport:revokedReport')")
    @Log(title = "立项报告信息-撤销立项报告状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "撤销立项报告状态")
    @PutMapping(value = "/open/t-project-approval-report/revokedReport")
    public R<Boolean> revokedReport(@RequestParam String id) {
        TProjectApprovalReport projectApprovalReport = projectApprovalReportService.getById(id);
        projectApprovalReport.setStatus(ProjectApprovalReportStatusEnum.REVOKED.getCode());
        projectApprovalReportService.updateById(projectApprovalReport);
        return R.ok();
    }
    /**
     * 审核立项报告
     */
    //@PreAuthorize("@ss.hasPermi('system:projectApprovalReport:auditReport')")
    @Log(title = "立项报告信息-审核立项报告状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "审核立项报告状态")
    @PostMapping(value = "/api/t-project-approval-report/auditReport")
    public R<Boolean> auditReport(@RequestBody String param) {
        Long userId = tokenService.getLoginUser().getUserId();
        AuditStatusDTO dto = JSON.parseObject(param,AuditStatusDTO.class);
        TProjectApprovalReport projectApprovalReport = projectApprovalReportService.getById(dto.getId());
        projectApprovalReport.setStatus(dto.getAuditStatus());
        projectApprovalReport.setAuditRemark(dto.getAuditRemark());
        projectApprovalReport.setAuditPersonId(userId);
        projectApprovalReport.setAuditTime(LocalDateTime.now());
        projectApprovalReportService.updateById(projectApprovalReport);
        return R.ok();
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTesterOtherTaskController.java
@@ -40,7 +40,7 @@
 */
@Api(tags = "实验员其他任务管理")
@RestController
@RequestMapping("/t-tester-other-task")
@RequestMapping("")
public class TTesterOtherTaskController {
    private final TTesterOtherTaskService testerOtherTaskService;
ruoyi-common/src/main/java/com/ruoyi/common/enums/ProjectApprovalReportStatusEnum.java
New file
@@ -0,0 +1,47 @@
package com.ruoyi.common.enums;
import lombok.Getter;
/**
 * @author xiaochen
 * @ClassName Disable
 * @Description
 * @date 2022-06-08 16:55
 */
public enum ProjectApprovalReportStatusEnum {
    /*状态 -1=草稿箱 1=待审核 2=已通过 3=已驳回 4=已撤回*/
    DRAFTS(-1, "草稿箱"),
    PENDING_APPROVAL(1, "待审核"),
    PASSED(2, "已通过"),
    REJECTED(3, "已驳回"),
    REVOKED(4, "已撤销");
    @Getter
    private String desc;
    @Getter
    private int code;
    ProjectApprovalReportStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    /**
     * 通过code获取枚举
     *
     * @param code
     * @return
     */
    public static ProjectApprovalReportStatusEnum fromCode(Integer code) {
        ProjectApprovalReportStatusEnum[] resultTypes = ProjectApprovalReportStatusEnum.values();
        for (ProjectApprovalReportStatusEnum resultType : resultTypes) {
            if (code.equals(resultType.getCode())) {
                return resultType;
            }
        }
        return null;
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/dto/TProjectApprovalReportDTO.java
New file
@@ -0,0 +1,18 @@
package com.ruoyi.system.dto;
import com.ruoyi.system.model.TFeasibilityReportFile;
import com.ruoyi.system.model.TProjectApprovalReport;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "立项报告新增编辑DTO")
public class TProjectApprovalReportDTO extends TProjectApprovalReport {
    @ApiModelProperty(value = "立项报告文件集合")
    private List<TFeasibilityReportFile> feasibilityReportFiles;
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TProjectApprovalReportMapper.java
@@ -1,7 +1,13 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TProjectApprovalReport;
import com.ruoyi.system.query.TProjectApprovalReportQuery;
import com.ruoyi.system.vo.TProjectApprovalReportVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * <p>
@@ -13,4 +19,11 @@
 */
public interface TProjectApprovalReportMapper extends BaseMapper<TProjectApprovalReport> {
    /**
     *  分页查询列表
     * @param query
     * @param pageInfo
     * @return
     */
    List<TProjectApprovalReportVO> pageList(@Param("query") TProjectApprovalReportQuery query, @Param("pageInfo")PageInfo<TProjectApprovalReportVO> pageInfo);
}
ruoyi-system/src/main/java/com/ruoyi/system/query/TProjectApprovalReportQuery.java
New file
@@ -0,0 +1,27 @@
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;
import java.util.List;
@Data
@ApiModel(value = "立项报告信息查询对象query")
public class TProjectApprovalReportQuery extends TimeRangeQueryBody {
    @ApiModelProperty(value = "项目组名称")
    private String teamName;
    @ApiModelProperty(value = "报告标题")
    private String reportName;
    @ApiModelProperty(value = "报告编号")
    private String reportCode;
    @ApiModelProperty(value = "状态 -1=草稿箱 1=待审核 2=待评定 3=已评定 4=已驳回 5=已撤回")
    private Integer status;
    @ApiModelProperty(value = "项目组id集合 前端忽略")
    private List<String> teamIds;
}
ruoyi-system/src/main/java/com/ruoyi/system/service/TProjectApprovalReportService.java
@@ -1,7 +1,10 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TProjectApprovalReport;
import com.ruoyi.system.query.TProjectApprovalReportQuery;
import com.ruoyi.system.vo.TProjectApprovalReportVO;
/**
 * <p>
@@ -13,4 +16,11 @@
 */
public interface TProjectApprovalReportService extends IService<TProjectApprovalReport> {
    /**
     * 获取立项报告分页列表
     * @param query
     * @return
     */
    PageInfo<TProjectApprovalReportVO> pageList(TProjectApprovalReportQuery query);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TProjectApprovalReportServiceImpl.java
@@ -1,10 +1,18 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.mapper.TProjectApprovalReportMapper;
import com.ruoyi.system.model.TProjectApprovalReport;
import com.ruoyi.system.query.TProjectApprovalReportQuery;
import com.ruoyi.system.service.TProjectApprovalReportService;
import com.ruoyi.system.vo.SysOperLogVO;
import com.ruoyi.system.vo.TFeasibilityStudyReportVO;
import com.ruoyi.system.vo.TProjectApprovalReportVO;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
/**
 * <p>
@@ -17,4 +25,12 @@
@Service
public class TProjectApprovalReportServiceImpl extends ServiceImpl<TProjectApprovalReportMapper, TProjectApprovalReport> implements TProjectApprovalReportService {
    @Override
    public PageInfo<TProjectApprovalReportVO> pageList(TProjectApprovalReportQuery query) {
        PageInfo<TProjectApprovalReportVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        List<TProjectApprovalReportVO> list = this.baseMapper.pageList(query,pageInfo);
        pageInfo.setRecords(list);
        return pageInfo;
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/vo/TProjectApprovalReportVO.java
New file
@@ -0,0 +1,28 @@
package com.ruoyi.system.vo;
import com.ruoyi.system.model.TFeasibilityReportFile;
import com.ruoyi.system.model.TProjectApprovalReport;
import com.ruoyi.system.model.TProjectTeam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "立项报告信息VO")
public class TProjectApprovalReportVO extends TProjectApprovalReport {
    @ApiModelProperty(value = "项目组名称")
    private String teamName;
    @ApiModelProperty(value = "项目组信息")
    private TProjectTeam projectTeam;
    @ApiModelProperty(value = "项目组成员名称拼接")
    private String staffNames;
    @ApiModelProperty(value = "立项报告文件")
    private List<TFeasibilityReportFile> feasibilityReportFiles;
}
ruoyi-system/src/main/resources/mapper/system/TExperimentDispatchMapper.xml
@@ -38,7 +38,7 @@
            <if test="query.experimentCode != null and query.experimentCode != ''">
                and ted.experiment_code like concat('%',#{query.experimentCode},'%')
            </if>
            <if test="query.status !=null">
            <if test="query.status !=null and query.status != -1">
                and ted.status = #{query.status}
            </if>
            <if test="query.status ==null">
ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml
@@ -45,7 +45,7 @@
            <if test="query.experimentName != null and query.experimentName != ''">
                and ted.experiment_name like concat('%', #{query.experimentName}, '%')
            </if>
            <if test="query.status != null">
            <if test="query.status != null and query.status != -1">
                and terr.status = #{query.status}
            </if>
            <if test="query.status == null">
ruoyi-system/src/main/resources/mapper/system/TExperimentSchemeMapper.xml
@@ -43,7 +43,7 @@
        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">
            <if test="query.status != null and query.status != -1">
                and tes.status = #{query.status}
            </if>
            <if test="query.status == null">
ruoyi-system/src/main/resources/mapper/system/TFeasibilityStudyReportMapper.xml
@@ -82,7 +82,7 @@
            <if test="query.teamName != null and query.teamName != ''">
                and tpt.team_name like concat('%', #{query.teamName})
            </if>
            <if test="query.status != null">
            <if test="query.status != null and query.status != -1">
                and tfsr.status = #{query.status}
            </if>
            <if test="query.status == null">
@@ -103,6 +103,7 @@
                    #{teamId}
                </foreach>
            </if>
            and tfsr.status in (2,3)
            AND tfsr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tfsr.create_time DESC
@@ -124,7 +125,7 @@
            <if test="query.teamName != null and query.teamName != ''">
                and tpt.team_name like concat('%', #{query.teamName})
            </if>
            <if test="query.status != null">
            <if test="query.status != null and query.status != -1">
                and tfsr.status = #{query.status}
            </if>
            <if test="query.status == null">
ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml
@@ -38,7 +38,7 @@
            <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">
            <if test="query.status != null and query.status != -1">
                and tir.status = #{query.status}
            </if>
            <if test="query.status == null">
ruoyi-system/src/main/resources/mapper/system/TProjectApprovalReportMapper.xml
@@ -24,5 +24,38 @@
    <sql id="Base_Column_List">
        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
        from t_project_approval_report tpar
        left join t_project_team tpt on tpt.id = tpar.team_id
        <where>
            <if test="query.teamIds != null and query.teamIds.size() > 0">
                and tpt.id in
                <foreach item="item" collection="query.teamIds" separator="," open="(" close=")" index="">
                    #{item}
                </foreach>
            </if>
            <if test="query.teamName != null and query.teamName != ''">
                and tpt.team_name like concat('%',#{query.teamName},'%')
            </if>
            <if test="query.reportCode != null and query.reportCode != ''">
                and tpar.report_code like concat('%',#{query.reportCode},'%')
            </if>
            <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">
                and tpar.status = #{query.status}
            </if>
            <if test="query.status == null">
                and tpar.status != -1
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                AND tpar.create_time BETWEEN #{query.startTime} AND #{query.endTime}
            </if>
            AND tpar.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tpar.create_time DESC
    </select>
</mapper>
ruoyi-system/src/main/resources/mapper/system/TProjectProposalMapper.xml
@@ -55,7 +55,7 @@
            <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">
            <if test="query.auditStatus != null and query.auditStatus != -1">
                AND tpp.audit_status = #{query.auditStatus}
            </if>
            <if test="query.auditStatus == null">
ruoyi-system/src/main/resources/mapper/system/TQaProduceReportMapper.xml
@@ -47,7 +47,7 @@
            <if test="query.teamName != null and query.teamName != ''">
                and tpt.team_name like concat('%', #{query.teamName}, '%')
            </if>
            <if test="query.status != null">
            <if test="query.status != null and query.status != -1">
                and tqpr.status = #{query.status}
            </if>
            <if test="query.status == null">
ruoyi-system/src/main/resources/mapper/system/TQaTestItemMapper.xml
@@ -41,7 +41,7 @@
            <if test="query.itemCode != null and query.itemCode != ''">
               and tqti.item_code like concat('%', #{query.itemCode})
            </if>
            <if test="query.status != null">
            <if test="query.status != null and query.status != -1">
                and tqti.status = #{query.status}
            </if>
            <if test="query.status == null">
ruoyi-system/src/main/resources/mapper/system/TQaTestItemReportMapper.xml
@@ -54,7 +54,7 @@
            <if test="query.reportContent != null and query.reportContent != ''">
                and tqtir.report_content = #{query.reportContent}
            </if>
            <if test="query.status != null">
            <if test="query.status != null and query.status != -1">
                and tqtir.status = #{query.status}
            </if>
            <if test="query.status == null">
ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml
@@ -40,7 +40,7 @@
            <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">
            <if test="query.status != null and query.status != -1">
                AND t1.status = #{query.status}
            </if>
            <if test="query.status == null">
ruoyi-system/src/main/resources/mapper/system/TSamplingRecordMapper.xml
@@ -41,7 +41,7 @@
            <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">
            <if test="query.status != null and query.status != -1">
                and tsr.status = #{query.status}
            </if>
            <if test="query.status == null">
ruoyi-system/src/main/resources/mapper/system/TTestMethodConfirmSheetMapper.xml
@@ -40,7 +40,7 @@
            <if test="query.experimentCode != null and query.experimentCode !=''">
                and ted.experiment_code like concat('%', #{query.experimentCode}, '%')
            </if>
            <if test="query.auditStatus != null">
            <if test="query.auditStatus != null and query.auditStatus != -1">
                and tmcs.audit_status = #{query.auditStatus}
            </if>
            <if test="query.auditStatus == null">
ruoyi-system/src/main/resources/mapper/system/TTestMethodConfirmSheetOriginalMapper.xml
@@ -44,7 +44,7 @@
            <if test="query.createBy != null and query.createBy != ''">
                and ttmcso.create_by like concat('%', #{query.createBy}, '%')
            </if>
            <if test="query.status != null">
            <if test="query.status != null and query.status != -1">
                and ttmcso.status = #{query.status}
            </if>
            <if test="query.status == null">