xuhy
8 天以前 61d85c788d4d966886617ccdf3335c6a55896878
接口对接
40个文件已修改
715 ■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentDispatchController.java 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentResultReportController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentSchemeController.java 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TFeasibilityStudyReportController.java 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInspectionReportController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TProjectProposalController.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TProjectTeamController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TQaProduceReportController.java 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TQaTestItemController.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TQaTestItemReportController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSamplingRecordController.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTestMethodConfirmSheetController.java 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTestMethodConfirmSheetOriginalController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/dto/TestMethodConfirmSheetSignDTO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TExperimentDispatch.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TExperimentDispatchParticipants.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TProjectProposal.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TFeasibilityStudyReportQuery.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TQaProduceReportQuery.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TQaTestItemQuery.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TQaTestItemServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/TExperimentDispatchVO.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/TFeasibilityStudyReportVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/TTestMethodConfirmSheetVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | 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 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TProjectProposalMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TQaProduceReportMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TQaTestItemMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | 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/TExperimentDispatchController.java
@@ -40,7 +40,7 @@
 */
@Api(tags = "实验调度管理")
@RestController
@RequestMapping("/t-experiment-dispatch")
@RequestMapping("")
public class TExperimentDispatchController {
    private final TExperimentDispatchService experimentDispatchService;
@@ -52,8 +52,9 @@
    private final TExperimentDispatchTaskService experimentDispatchTaskService;
    private final TProjectTeamService projectTeamService;
    private final TProjectTeamStaffService projectTeamStaffService;
    private final TProjectProposalService projectProposalService;
    @Autowired
    public TExperimentDispatchController(TExperimentDispatchService experimentDispatchService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TExperimentDispatchGroupService experimentDispatchGroupService, TExperimentDispatchParticipantsService experimentDispatchParticipantsService, TExperimentDispatchTaskService experimentDispatchTaskService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService) {
    public TExperimentDispatchController(TExperimentDispatchService experimentDispatchService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TExperimentDispatchGroupService experimentDispatchGroupService, TExperimentDispatchParticipantsService experimentDispatchParticipantsService, TExperimentDispatchTaskService experimentDispatchTaskService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService, TProjectProposalService projectProposalService) {
        this.experimentDispatchService = experimentDispatchService;
        this.tokenService = tokenService;
        this.sysUserService = sysUserService;
@@ -63,12 +64,13 @@
        this.experimentDispatchTaskService = experimentDispatchTaskService;
        this.projectTeamService = projectTeamService;
        this.projectTeamStaffService = projectTeamStaffService;
        this.projectProposalService = projectProposalService;
    }
    /**
     * 获取实验调度管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:experimentDispatch:list')")
    //@PreAuthorize("@ss.hasPermi('system:experimentDispatch:list')")
    @ApiOperation(value = "获取实验调度分页列表",response = TExperimentDispatchQuery.class)
    @PostMapping(value = "/api/t-experiment-dispatch/pageList")
    public R<PageInfo<TExperimentDispatchVO>> pageList(@RequestBody String param) {
@@ -79,7 +81,7 @@
    /**
     * 添加实验调度管理
     */
    @PreAuthorize("@ss.hasPermi('system:experimentDispatch:add')")
    //@PreAuthorize("@ss.hasPermi('system:experimentDispatch:add')")
    @Log(title = "实验调度信息-新增实验调度", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加实验调度",response = TExperimentDispatchDTO.class)
    @PostMapping(value = "/api/t-experiment-dispatch/add")
@@ -136,7 +138,7 @@
    /**
     * 修改实验调度
     */
    @PreAuthorize("@ss.hasPermi('system:experimentDispatch:edit')")
    //@PreAuthorize("@ss.hasPermi('system:experimentDispatch:edit')")
    @Log(title = "实验调度信息-修改实验调度", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改实验调度")
    @PostMapping(value = "/api/t-experiment-dispatch/update")
@@ -170,7 +172,7 @@
    /**
     * 查看实验调度详情
     */
    @PreAuthorize("@ss.hasPermi('system:experimentDispatch:detail')")
    //@PreAuthorize("@ss.hasPermi('system:experimentDispatch:detail')")
    @ApiOperation(value = "查看实验调度详情")
    @GetMapping(value = "/open/t-experiment-dispatch/getDetailById")
    public R<TExperimentDispatchVO> getDetailById(@RequestParam String id) {
@@ -178,6 +180,13 @@
        TExperimentDispatchVO experimentDispatchVO = new TExperimentDispatchVO();
        BeanUtils.copyProperties(experimentDispatch, experimentDispatchVO);
        // 查询项目课题
        TProjectProposal proposal = projectProposalService.getById(experimentDispatch.getProposalId());
        if(Objects.nonNull(proposal)){
            experimentDispatchVO.setProjectName(proposal.getProjectName());
            experimentDispatchVO.setProjectCode(proposal.getProjectCode());
            experimentDispatchVO.setProjectStage(proposal.getProjectStage());
        }
        // 查询组别
        experimentDispatchVO.setExperimentDispatchGroups(experimentDispatchGroupService.list(Wrappers.lambdaQuery(TExperimentDispatchGroup.class).eq(TExperimentDispatchGroup::getDispatchId, id)));
        // 查询参与人员
@@ -201,9 +210,60 @@
    }
    /**
     * 查询化验师的通过签字的实验调度
     */
    @ApiOperation(value = "查询化验师的通过签字的实验调度")
    @GetMapping(value = "/open/t-experiment-dispatch/chemistSignList")
    public R<List<TExperimentDispatch>> chemistSignList() {
        Long userId = tokenService.getLoginUser().getUserId();
        Integer roleType = tokenService.getLoginUser().getUser().getRoleType();
        if(roleType != 4){
            return R.fail("您不是化验师,无法查看");
        }
        List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class)
                .eq(TExperimentDispatchParticipants::getRoleType, roleType)
                .eq(TExperimentDispatchParticipants::getUserId, userId)
                .eq(TExperimentDispatchParticipants::getStatus, 2));
        if(CollectionUtils.isEmpty(experimentDispatchParticipants)){
            return R.fail("您没有通过签字的实验调度");
        }
        List<String> dispatchIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getDispatchId).distinct().collect(Collectors.toList());
        List<TExperimentDispatch> experimentDispatches = experimentDispatchService.list(Wrappers.lambdaQuery(TExperimentDispatch.class)
                .in(TExperimentDispatch::getId, dispatchIds)
                .in(TExperimentDispatch::getStatus, 1, 2));
        List<String> proposalIds = experimentDispatches.stream().map(TExperimentDispatch::getProposalId).collect(Collectors.toList());
        List<TProjectProposal> list = projectProposalService.list(Wrappers.lambdaQuery(TProjectProposal.class).in(TProjectProposal::getId, proposalIds));
        // 查询参与人员
        List<String> ids = experimentDispatches.stream().map(TExperimentDispatch::getId).collect(Collectors.toList());
        if(!CollectionUtils.isEmpty(ids)){
            List<TExperimentDispatchParticipants> tExperimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class)
                    .in(TExperimentDispatchParticipants::getDispatchId, ids));
            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());
                }
            });
            experimentDispatches.forEach(experimentDispatch -> {
                list.stream().filter(projectProposal -> projectProposal.getId().equals(experimentDispatch.getProposalId())).findFirst().ifPresent(projectProposal -> {
                    experimentDispatch.setProjectName(projectProposal.getProjectName());
                });
                List<TExperimentDispatchParticipants> experimentDispatchParticipantsList = tExperimentDispatchParticipants.stream().filter(tExperimentDispatchParticipant -> tExperimentDispatchParticipant.getDispatchId().equals(experimentDispatch.getId())).collect(Collectors.toList());
                String participantsName = experimentDispatchParticipantsList.stream().map(TExperimentDispatchParticipants::getNickName).collect(Collectors.joining(";"));
                experimentDispatch.setParticipantsName(participantsName);
            });
        }
        return R.ok(experimentDispatches);
    }
    /**
     * 删除实验调度
     */
    @PreAuthorize("@ss.hasPermi('system:experimentDispatch:delete')")
    //@PreAuthorize("@ss.hasPermi('system:experimentDispatch:delete')")
    @Log(title = "实验调度信息-删除实验调度", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除实验调度")
    @DeleteMapping(value = "/open/t-experiment-dispatch/deleteById")
@@ -220,7 +280,7 @@
    /**
     * 批量删除实验调度
     */
    @PreAuthorize("@ss.hasPermi('system:experimentDispatch:delete')")
    //@PreAuthorize("@ss.hasPermi('system:experimentDispatch:delete')")
    @Log(title = "实验调度信息-删除实验调度", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除实验调度")
    @DeleteMapping(value = "/open/t-experiment-dispatch/deleteByIds")
@@ -237,9 +297,9 @@
    /**
     * 批量删除实验调度
     */
    @PreAuthorize("@ss.hasPermi('system:experimentDispatch:sign')")
    //@PreAuthorize("@ss.hasPermi('system:experimentDispatch:sign')")
    @Log(title = "实验调度信息-实验调度签字", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "实验调度签字")
    @ApiOperation(value = "实验调度签字",response = ExperimentDispatchSignDTO.class)
    @PostMapping(value = "/api/t-experiment-dispatch/sign")
    public R<Boolean> sign(@RequestBody String param) {
        ExperimentDispatchSignDTO experimentDispatchSign = JSON.parseObject(param, ExperimentDispatchSignDTO.class);
@@ -256,6 +316,15 @@
            experimentDispatchParticipants.setConfirmSign(experimentDispatchSign.getConfirmSign());
            experimentDispatchParticipantsService.updateById(experimentDispatchParticipants);
        }
        long count = experimentDispatchParticipantsService.count(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class)
                .eq(TExperimentDispatchParticipants::getDispatchId, experimentDispatchSign.getDispatchId())
                .in(TExperimentDispatchParticipants::getRoleType, 4, 5)
                .eq(TExperimentDispatchParticipants::getStatus, 1));
        if(count == 0){
            TExperimentDispatch tExperimentDispatch = experimentDispatchService.getById(experimentDispatchSign.getDispatchId());
            tExperimentDispatch.setStatus(2);
            experimentDispatchService.updateById(tExperimentDispatch);
        }
        return R.ok();
    }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentResultReportController.java
@@ -57,7 +57,7 @@
    /**
     * 获取实验结果汇报管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:experimentResultReport:list')")
    //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:list')")
    @ApiOperation(value = "获取实验结果汇报分页列表",response = TExperimentResultReportQuery.class)
    @PostMapping(value = "/api/t-experiment-result-report/pageList")
    public R<PageInfo<TExperimentResultReportVO>> pageList(@RequestBody String param) {
@@ -68,7 +68,7 @@
    /**
     * 添加实验结果汇报管理
     */
    @PreAuthorize("@ss.hasPermi('system:experimentResultReport:add')")
    //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:add')")
    @Log(title = "实验结果汇报信息-新增实验结果汇报", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加实验结果汇报",response = TExperimentResultReportDTO.class)
    @PostMapping(value = "/api/t-experiment-result-report/add")
@@ -87,7 +87,7 @@
    /**
     * 修改实验结果汇报
     */
    @PreAuthorize("@ss.hasPermi('system:experimentResultReport:edit')")
    //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:edit')")
    @Log(title = "实验结果汇报信息-修改实验结果汇报", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改实验结果汇报")
    @PostMapping(value = "/api/t-experiment-result-report/update")
@@ -103,7 +103,7 @@
    /**
     * 修改实验结果汇报
     */
    @PreAuthorize("@ss.hasPermi('system:experimentResultReport:edit')")
    //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:edit')")
    @Log(title = "实验结果汇报信息-评定工艺工程师实验", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "评定工艺工程师实验")
    @PostMapping(value = "/api/t-experiment-result-report/evaluateProcess")
@@ -116,7 +116,7 @@
    /**
     * 查看实验结果汇报详情
     */
    @PreAuthorize("@ss.hasPermi('system:experimentResultReport:detail')")
    //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:detail')")
    @ApiOperation(value = "查看实验结果汇报详情")
    @GetMapping(value = "/open/t-experiment-result-report/getDetailById")
    public R<TExperimentResultReportVO> getDetailById(@RequestParam String id) {
@@ -141,7 +141,7 @@
    /**
     * 删除实验结果汇报
     */
    @PreAuthorize("@ss.hasPermi('system:experimentResultReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:delete')")
    @Log(title = "实验结果汇报信息-删除实验结果汇报", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除实验结果汇报")
    @DeleteMapping(value = "/open/t-experiment-result-report/deleteById")
@@ -152,7 +152,7 @@
    /**
     * 批量删除实验结果汇报
     */
    @PreAuthorize("@ss.hasPermi('system:experimentResultReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:experimentResultReport:delete')")
    @Log(title = "实验结果汇报信息-删除实验结果汇报", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除实验结果汇报")
    @DeleteMapping(value = "/open/t-experiment-result-report/deleteByIds")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentSchemeController.java
@@ -6,15 +6,14 @@
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.ApplicationTerminationAuditDTO;
import com.ruoyi.system.dto.ApplicationTerminationDTO;
import com.ruoyi.system.dto.TExperimentSchemeDTO;
import com.ruoyi.system.dto.TestMethodConfirmSheetSignDTO;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.model.*;
import com.ruoyi.system.query.TExperimentResultReportQuery;
import com.ruoyi.system.query.TExperimentSchemeQuery;
import com.ruoyi.system.service.*;
import com.ruoyi.system.vo.TExperimentSchemeVO;
@@ -22,12 +21,13 @@
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.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
 * <p>
@@ -50,8 +50,9 @@
    private final TExperimentDispatchParticipantsService experimentDispatchParticipantsService;
    private final TExperimentDispatchService experimentDispatchService;
    private final TProjectProposalService projectProposalService;
    private final TExperimentDispatchGroupService experimentDispatchGroupService;
    @Autowired
    public TExperimentSchemeController(TExperimentSchemeService experimentSchemeService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TExperimentSchemePersonService experimentSchemePersonService, TExperimentDispatchParticipantsService experimentDispatchParticipantsService, TExperimentDispatchService experimentDispatchService, TProjectProposalService projectProposalService) {
    public TExperimentSchemeController(TExperimentSchemeService experimentSchemeService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TExperimentSchemePersonService experimentSchemePersonService, TExperimentDispatchParticipantsService experimentDispatchParticipantsService, TExperimentDispatchService experimentDispatchService, TProjectProposalService projectProposalService, TExperimentDispatchGroupService experimentDispatchGroupService) {
        this.experimentSchemeService = experimentSchemeService;
        this.tokenService = tokenService;
        this.sysUserService = sysUserService;
@@ -60,12 +61,13 @@
        this.experimentDispatchParticipantsService = experimentDispatchParticipantsService;
        this.experimentDispatchService = experimentDispatchService;
        this.projectProposalService = projectProposalService;
        this.experimentDispatchGroupService = experimentDispatchGroupService;
    }
    /**
     * 获取实验方案管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:list')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:list')")
    @ApiOperation(value = "获取实验方案分页列表",response = TExperimentSchemeQuery.class)
    @PostMapping(value = "/api/t-experiment-scheme/pageList")
    public R<PageInfo<TExperimentSchemeVO>> pageList(@RequestBody String param) {
@@ -76,18 +78,40 @@
    /**
     * 通过实验调度查询查询组别列表
     */
    @ApiOperation(value = "通过实验调度查询实验人员")
    @GetMapping(value = "/open/t-experiment-scheme/getParticipantsByDispatchId")
    public R<List<TExperimentDispatchParticipants>> getParticipantsByDispatchId(@RequestParam String dispatchId) {
        List<TExperimentDispatchParticipants> list = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class)
                .eq(TExperimentDispatchParticipants::getDispatchId, dispatchId)
                .eq(TExperimentDispatchParticipants::getRoleType,5));
        if(!CollectionUtils.isEmpty(list)){
            List<Long> userIds = list.stream().map(TExperimentDispatchParticipants::getUserId).collect(Collectors.toList());
            List<SysUser> sysUsers = sysUserMapper.selectUserByIds(userIds);
            list.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());
                }
            });
        }
        return R.ok(list);
    }
    /**
     * 通过实验调度查询查询组别列表
     */
    @ApiOperation(value = "通过实验调度查询查询组别列表")
    @GetMapping(value = "/open/t-experiment-scheme/getGroupByDispatchId")
    public R<List<TExperimentDispatchParticipants>> getGroupByDispatchId(@RequestParam String dispatchId) {
        List<TExperimentDispatchParticipants> list = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class)
                .eq(TExperimentDispatchParticipants::getDispatchId, dispatchId));
    public R<List<TExperimentDispatchGroup>> getGroupByDispatchId(@RequestParam String dispatchId) {
        List<TExperimentDispatchGroup> list = experimentDispatchGroupService.list(Wrappers.lambdaQuery(TExperimentDispatchGroup.class)
                .eq(TExperimentDispatchGroup::getDispatchId, dispatchId));
        return R.ok(list);
    }
    /**
     * 添加实验方案管理
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:add')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:add')")
    @Log(title = "实验方案信息-新增实验方案", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加实验方案",response = TExperimentSchemeDTO.class)
    @PostMapping(value = "/api/t-experiment-scheme/add")
@@ -106,7 +130,7 @@
    /**
     * 修改实验方案
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:edit')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:edit')")
    @Log(title = "实验方案信息-修改实验方案", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改实验方案")
    @PostMapping(value = "/api/t-experiment-scheme/update")
@@ -126,7 +150,7 @@
    /**
     * 查看实验方案详情
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:detail')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:detail')")
    @ApiOperation(value = "查看实验方案详情")
    @GetMapping(value = "/open/t-experiment-scheme/getDetailById")
    public R<TExperimentSchemeVO> getDetailById(@RequestParam String id) {
@@ -161,7 +185,7 @@
    /**
     * 删除实验方案
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:delete')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:delete')")
    @Log(title = "实验方案信息-删除实验方案", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除实验方案")
    @DeleteMapping(value = "/open/t-experiment-scheme/deleteById")
@@ -174,7 +198,7 @@
    /**
     * 批量删除实验方案
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:delete')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:delete')")
    @Log(title = "实验方案信息-删除实验方案", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除实验方案")
    @DeleteMapping(value = "/open/t-experiment-scheme/deleteByIds")
@@ -187,7 +211,7 @@
    /**
     * 批量删除实验方案
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:sign')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:sign')")
    @Log(title = "实验方案信息-申请中止实验", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "申请中止实验")
    @PostMapping(value = "/api/t-experiment-scheme/applicationTermination")
@@ -206,7 +230,7 @@
    /**
     * 批量删除实验方案
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:audit')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:audit')")
    @Log(title = "实验方案信息-申请中止实验审核", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "申请中止实验审核")
    @PostMapping(value = "/api/t-experiment-scheme/audit")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TFeasibilityStudyReportController.java
@@ -6,27 +6,33 @@
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.*;
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.FeasibilityStudyReportStatusEnum;
import com.ruoyi.common.enums.StudyReportTypeEnum;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.AuditStatusDTO;
import com.ruoyi.system.dto.TFeasibilityStudyReportDTO;
import com.ruoyi.system.model.*;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.model.TFeasibilityReportFile;
import com.ruoyi.system.model.TFeasibilityStudyReport;
import com.ruoyi.system.model.TProjectTeam;
import com.ruoyi.system.model.TProjectTeamStaff;
import com.ruoyi.system.query.TFeasibilityStudyReportQuery;
import com.ruoyi.system.service.TFeasibilityReportFileService;
import com.ruoyi.system.service.TFeasibilityStudyReportService;
import com.ruoyi.system.service.TProjectTeamService;
import com.ruoyi.system.service.TProjectTeamStaffService;
import com.ruoyi.system.service.*;
import com.ruoyi.system.vo.TFeasibilityStudyReportVO;
import io.jsonwebtoken.lang.Collections;
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.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
 * <p>
@@ -38,7 +44,7 @@
 */
@Api(tags = "可研、可行、工艺开发工具、验证发布报告管理")
@RestController
@RequestMapping("/t-feasibility-study-report")
@RequestMapping("")
public class TFeasibilityStudyReportController {
    private final TFeasibilityStudyReportService feasibilityStudyReportService;
@@ -46,30 +52,46 @@
    private final TokenService tokenService;
    private final TProjectTeamService projectTeamService;
    private final TProjectTeamStaffService projectTeamStaffService;
    private final ISysUserService sysUserService;
    private final SysUserMapper sysUserMapper;
    @Autowired
    public TFeasibilityStudyReportController(TFeasibilityStudyReportService feasibilityStudyReportService, TFeasibilityReportFileService feasibilityReportFileService, TokenService tokenService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService) {
    public TFeasibilityStudyReportController(TFeasibilityStudyReportService feasibilityStudyReportService, TFeasibilityReportFileService feasibilityReportFileService, TokenService tokenService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService, ISysUserService sysUserService, SysUserMapper sysUserMapper) {
        this.feasibilityStudyReportService = feasibilityStudyReportService;
        this.feasibilityReportFileService = feasibilityReportFileService;
        this.tokenService = tokenService;
        this.projectTeamService = projectTeamService;
        this.projectTeamStaffService = projectTeamStaffService;
        this.sysUserService = sysUserService;
        this.sysUserMapper = sysUserMapper;
    }
    /**
     * 获取可研、可行、工艺开发工具、验证发布报告管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:list')")
    //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:list')")
    @ApiOperation(value = "获取可研、可行、工艺开发工具、验证发布报告管理分页列表",response = TFeasibilityStudyReportQuery.class)
    @PostMapping(value = "/api/t-feasibility-study-report/pageList")
    public R<PageInfo<TFeasibilityStudyReportVO>> pageList(@RequestBody String param) {
        TFeasibilityStudyReportQuery query = JSON.parseObject(param, TFeasibilityStudyReportQuery.class);
        Long userId = tokenService.getLoginUser().getUserId();
        Integer roleType = tokenService.getLoginUser().getUser().getRoleType();
        if(roleType != 1){
            // 查询用户所在项目组
            List<TProjectTeamStaff> projectTeamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class)
                    .eq(TProjectTeamStaff::getUserId, userId));
            if(projectTeamStaffs.size() > 0){
                // 查询项目组id
                List<String> teamIds = projectTeamStaffs.stream().map(TProjectTeamStaff::getTeamId).distinct().collect(Collectors.toList());
                query.setTeamIds(teamIds);
            }
        }
        return R.ok(feasibilityStudyReportService.pageList(query));
    }
    /**
     * 添加可研、可行、工艺开发工具、验证发布报告管理管理
     */
    @PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:add')")
    //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:add')")
    @Log(title = "可研、可行、工艺开发工具、验证发布报告管理信息-新增可研、可行、工艺开发工具、验证发布报告管理", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加可研、可行、工艺开发工具、验证发布报告管理",response = TFeasibilityStudyReportDTO.class)
    @PostMapping(value = "/api/t-feasibility-study-report/add")
@@ -117,24 +139,26 @@
        feasibilityStudyReportService.save(dto);
        // 添加检测报告文件
        List<TFeasibilityReportFile> feasibilityReportFiles = dto.getFeasibilityReportFiles();
        for (TFeasibilityReportFile feasibilityReportFile : feasibilityReportFiles) {
            feasibilityReportFile.setReportId(dto.getId());
            switch (FeasibilityReportFileEnum.fromCode(feasibilityReportFile.getReportType())) {
                case FEASIBILITY_STUDY_REPORT:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.FEASIBILITY_STUDY_REPORT.getCode());
                    break;
                case FEASIBLE_REPORT:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.FEASIBLE_REPORT.getCode());
                    break;
                case PROCESS_DEVELOPMENT_TOOLS:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROCESS_DEVELOPMENT_TOOLS.getCode());
                    break;
                case VERIFICATION_RELEASE:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.VERIFICATION_RELEASE.getCode());
                    break;
                default:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode());
                    break;
        if(!Collections.isEmpty(feasibilityReportFiles)){
            for (TFeasibilityReportFile feasibilityReportFile : feasibilityReportFiles) {
                feasibilityReportFile.setReportId(dto.getId());
                switch (FeasibilityReportFileEnum.fromCode(feasibilityReportFile.getReportType())) {
                    case FEASIBILITY_STUDY_REPORT:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.FEASIBILITY_STUDY_REPORT.getCode());
                        break;
                    case FEASIBLE_REPORT:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.FEASIBLE_REPORT.getCode());
                        break;
                    case PROCESS_DEVELOPMENT_TOOLS:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROCESS_DEVELOPMENT_TOOLS.getCode());
                        break;
                    case VERIFICATION_RELEASE:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.VERIFICATION_RELEASE.getCode());
                        break;
                    default:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode());
                        break;
                }
            }
        }
        feasibilityReportFileService.saveBatch(feasibilityReportFiles);
@@ -144,7 +168,7 @@
    /**
     * 修改可研、可行、工艺开发工具、验证发布报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:edit')")
    //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:edit')")
    @Log(title = "可研、可行、工艺开发工具、验证发布报告管理信息-修改可研、可行、工艺开发工具、验证发布报告管理", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改可研、可行、工艺开发工具、验证发布报告管理")
    @PostMapping(value = "/api/t-feasibility-study-report/update")
@@ -155,24 +179,26 @@
                .eq(TFeasibilityReportFile::getReportId, dto.getId()));
        // 添加检测报告文件
        List<TFeasibilityReportFile> feasibilityReportFiles = dto.getFeasibilityReportFiles();
        for (TFeasibilityReportFile feasibilityReportFile : feasibilityReportFiles) {
            feasibilityReportFile.setReportId(dto.getId());
            switch (FeasibilityReportFileEnum.fromCode(feasibilityReportFile.getReportType())) {
                case FEASIBILITY_STUDY_REPORT:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.FEASIBILITY_STUDY_REPORT.getCode());
                    break;
                case FEASIBLE_REPORT:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.FEASIBLE_REPORT.getCode());
                    break;
                case PROCESS_DEVELOPMENT_TOOLS:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROCESS_DEVELOPMENT_TOOLS.getCode());
                    break;
                case VERIFICATION_RELEASE:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.VERIFICATION_RELEASE.getCode());
                    break;
                default:
                    feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode());
                    break;
        if(!Collections.isEmpty(feasibilityReportFiles)){
            for (TFeasibilityReportFile feasibilityReportFile : feasibilityReportFiles) {
                feasibilityReportFile.setReportId(dto.getId());
                switch (FeasibilityReportFileEnum.fromCode(feasibilityReportFile.getReportType())) {
                    case FEASIBILITY_STUDY_REPORT:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.FEASIBILITY_STUDY_REPORT.getCode());
                        break;
                    case FEASIBLE_REPORT:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.FEASIBLE_REPORT.getCode());
                        break;
                    case PROCESS_DEVELOPMENT_TOOLS:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROCESS_DEVELOPMENT_TOOLS.getCode());
                        break;
                    case VERIFICATION_RELEASE:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.VERIFICATION_RELEASE.getCode());
                        break;
                    default:
                        feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode());
                        break;
                }
            }
        }
        feasibilityReportFileService.saveBatch(feasibilityReportFiles);
@@ -182,7 +208,7 @@
    /**
     * 查看可研、可行、工艺开发工具、验证发布报告管理详情
     */
    @PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:detail')")
    //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:detail')")
    @ApiOperation(value = "查看可研、可行、工艺开发工具、验证发布报告管理详情")
    @GetMapping(value = "/open/t-feasibility-study-report/getDetailById")
    public R<TFeasibilityStudyReportVO> getDetailById(@RequestParam String id) {
@@ -193,13 +219,22 @@
        List<TFeasibilityReportFile> feasibilityReportFiles = feasibilityReportFileService.list(Wrappers.lambdaQuery(TFeasibilityReportFile.class)
                .eq(TFeasibilityReportFile::getReportId, id));
        feasibilityStudyReportVO.setFeasibilityReportFiles(feasibilityReportFiles);
        // 查询项目组
        TProjectTeam projectTeam = projectTeamService.getById(feasibilityStudyReport.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);
        feasibilityStudyReportVO.setStaffNames(sysUsers.stream().map(SysUser::getNickName).collect(Collectors.joining(",")));
        feasibilityStudyReportVO.setProjectTeam(projectTeam);
        return R.ok(feasibilityStudyReportVO);
    }
    /**
     * 删除可研、可行、工艺开发工具、验证发布报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:delete')")
    @Log(title = "可研、可行、工艺开发工具、验证发布报告管理信息-删除可研、可行、工艺开发工具、验证发布报告管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除可研、可行、工艺开发工具、验证发布报告管理")
    @DeleteMapping(value = "/open/t-feasibility-study-report/deleteById")
@@ -212,7 +247,7 @@
    /**
     * 批量删除可研、可行、工艺开发工具、验证发布报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:delete')")
    @Log(title = "可研、可行、工艺开发工具、验证发布报告管理信息-删除可研、可行、工艺开发工具、验证发布报告管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除可研、可行、工艺开发工具、验证发布报告管理")
    @DeleteMapping(value = "/open/t-feasibility-study-report/deleteByIds")
@@ -225,7 +260,7 @@
    /**
     * 撤销可研、可行、工艺开发工具、验证发布报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:revokedReport')")
    //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:revokedReport')")
    @Log(title = "可研、可行、工艺开发工具、验证发布报告管理信息-撤销可研、可行、工艺开发工具、验证发布报告管理状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "撤销可研、可行、工艺开发工具、验证发布报告管理状态")
    @PutMapping(value = "/open/t-feasibility-study-report/revokedReport")
@@ -239,7 +274,7 @@
    /**
     * 审核可研、可行、工艺开发工具、验证发布报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:auditReport')")
    //@PreAuthorize("@ss.hasPermi('system:feasibilityStudyReport:auditReport')")
    @Log(title = "可研、可行、工艺开发工具、验证发布报告管理信息-审核可研、可行、工艺开发工具、验证发布报告管理状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "审核可研、可行、工艺开发工具、验证发布报告管理状态")
    @PostMapping(value = "/api/t-feasibility-study-report/auditReport")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInspectionReportController.java
@@ -48,7 +48,7 @@
    /**
     * 获取检验报告管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:inspectionReport:list')")
    //@PreAuthorize("@ss.hasPermi('system:inspectionReport:list')")
    @ApiOperation(value = "获取检验报告分页列表",  response = TInspectionReportQuery.class)
    @PostMapping(value = "/api/t-inspection-report/pageList")
    public R<PageInfo<TInspectionReportVO>> pageList(@RequestBody String param) {
@@ -59,7 +59,7 @@
    /**
     * 添加检验报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:inspectionReport:add')")
    //@PreAuthorize("@ss.hasPermi('system:inspectionReport:add')")
    @Log(title = "检验报告信息-新增检验报告", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加检验报告",response = TInspectionReportDTO.class)
    @PostMapping(value = "/api/t-inspection-report/add")
@@ -72,7 +72,7 @@
    /**
     * 修改检验报告
     */
    @PreAuthorize("@ss.hasPermi('system:inspectionReport:edit')")
    //@PreAuthorize("@ss.hasPermi('system:inspectionReport:edit')")
    @Log(title = "检验报告信息-修改检验报告", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改检验报告")
    @PostMapping(value = "/api/t-inspection-report/update")
@@ -85,7 +85,7 @@
    /**
     * 查看检验报告详情
     */
    @PreAuthorize("@ss.hasPermi('system:inspectionReport:detail')")
    //@PreAuthorize("@ss.hasPermi('system:inspectionReport:detail')")
    @ApiOperation(value = "查看检验报告详情")
    @GetMapping(value = "/open/t-inspection-report/getDetailById")
    public R<TInspectionReportVO> getDetailById(@RequestParam String id) {
@@ -98,7 +98,7 @@
    /**
     * 删除检验报告
     */
    @PreAuthorize("@ss.hasPermi('system:inspectionReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:inspectionReport:delete')")
    @Log(title = "检验报告信息-删除检验报告", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除检验报告")
    @DeleteMapping(value = "/open/t-inspection-report/deleteById")
@@ -109,7 +109,7 @@
    /**
     * 批量删除检验报告
     */
    @PreAuthorize("@ss.hasPermi('system:inspectionReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:inspectionReport:delete')")
    @Log(title = "检验报告信息-删除检验报告", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除检验报告")
    @DeleteMapping(value = "/open/t-inspection-report/deleteByIds")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TProjectProposalController.java
@@ -28,6 +28,7 @@
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
@@ -64,18 +65,39 @@
    /**
     * 获取项目课题方案管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:projectProposal:list')")
    //@PreAuthorize("@ss.hasPermi('system:projectProposal:list')")
    @ApiOperation(value = "获取项目课题方案分页列表", response = TProjectProposalQuery.class)
    @PostMapping(value = "/api/t-project-proposal/pageList")
    public R<PageInfo<TProjectProposalVO>> pageList(@RequestBody String param) {
        TProjectProposalQuery query = JSON.parseObject(param, TProjectProposalQuery.class);
        // TODO 获取当前登录人
        return R.ok(projectProposalService.pageList(query));
    }
    /**
     * 获取项目课题方案管理列表
     */
    @ApiOperation(value = "获取项目课题方案列表")
    @GetMapping(value = "/open/t-project-proposal/list")
    public R<List<TProjectProposal>> list(@RequestParam(value = "projectName", required = false) String projectName,
                                          @RequestParam(value = "projectCode", required = false) String projectCode) {
        // 获取当前登录人
        SysUser user = tokenService.getLoginUser().getUser();
        if(user.getRoleType() != 3){
            return R.fail("当前用户非工艺工程师");
        }
        List<TProjectProposal> list = projectProposalService.list(Wrappers.lambdaQuery(TProjectProposal.class)
                .like(StringUtils.hasLength(projectName),TProjectProposal::getProjectName, projectName)
                .like(StringUtils.hasLength(projectCode),TProjectProposal::getProjectCode, projectCode)
                .eq(TProjectProposal::getCommitUserId, user.getUserId())
                .orderByDesc(TProjectProposal::getCreateTime));
        return R.ok(list);
    }
    /**
     * 添加项目课题方案管理
     */
    @PreAuthorize("@ss.hasPermi('system:projectProposal:add')")
    //@PreAuthorize("@ss.hasPermi('system:projectProposal:add')")
    @Log(title = "项目课题方案信息-新增项目课题方案", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加项目课题方案",response = TProjectProposalDTO.class)
    @PostMapping(value = "/api/t-project-proposal/add")
@@ -117,7 +139,7 @@
                .like(TProjectProposal::getProjectCode, projectProposalNo));
        projectProposalNo = projectProposalNo + String.format("%02d", count+1);
        dto.setProjectCode(projectProposalNo);
        dto.setCommitUserId(userId);
        projectProposalService.save(dto);
        return R.ok();
    }
@@ -125,7 +147,7 @@
    /**
     * 修改项目课题方案
     */
    @PreAuthorize("@ss.hasPermi('system:projectProposal:edit')")
    //@PreAuthorize("@ss.hasPermi('system:projectProposal:edit')")
    @Log(title = "项目课题方案信息-修改项目课题方案", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改项目课题方案")
    @PostMapping(value = "/api/t-project-proposal/update")
@@ -138,7 +160,7 @@
    /**
     * 查看项目课题方案详情
     */
    @PreAuthorize("@ss.hasPermi('system:projectProposal:detail')")
    //@PreAuthorize("@ss.hasPermi('system:projectProposal:detail')")
    @ApiOperation(value = "查看项目课题方案详情")
    @GetMapping(value = "/open/t-project-proposal/getDetailById")
    public R<TProjectProposalVO> getDetailById(@RequestParam String id) {
@@ -156,7 +178,7 @@
    /**
     * 删除项目课题方案
     */
    @PreAuthorize("@ss.hasPermi('system:projectProposal:delete')")
    //@PreAuthorize("@ss.hasPermi('system:projectProposal:delete')")
    @Log(title = "项目课题方案信息-删除项目课题方案", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除项目课题方案")
    @DeleteMapping(value = "/open/t-project-proposal/deleteById")
@@ -167,7 +189,7 @@
    /**
     * 批量删除项目课题方案
     */
    @PreAuthorize("@ss.hasPermi('system:projectProposal:delete')")
    //@PreAuthorize("@ss.hasPermi('system:projectProposal:delete')")
    @Log(title = "项目课题方案信息-删除项目课题方案", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除项目课题方案")
    @DeleteMapping(value = "/open/t-project-proposal/deleteByIds")
@@ -178,7 +200,7 @@
    /**
     * 修改项目课题方案
     */
    @PreAuthorize("@ss.hasPermi('system:projectProposal:upAndDown')")
    //@PreAuthorize("@ss.hasPermi('system:projectProposal:upAndDown')")
    @Log(title = "项目课题方案信息-修改项目课题方案状态[支持已撤消接口]", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改项目课题方案状态",response = UpAndDownDTO.class)
    @PostMapping(value = "/api/t-project-proposal/upAndDown")
@@ -193,7 +215,7 @@
    /**
     * 修改项目课题方案
     */
    @PreAuthorize("@ss.hasPermi('system:projectProposal:audit')")
    //@PreAuthorize("@ss.hasPermi('system:projectProposal:audit')")
    @Log(title = "项目课题方案信息-审核项目课题方案", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "审核项目课题方案",response = AuditStatusDTO.class)
    @PostMapping(value = "/api/t-project-proposal/audit")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TProjectTeamController.java
@@ -54,7 +54,7 @@
    /**
     * 获取项目组管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:projectTeam:list')")
    //@PreAuthorize("@ss.hasPermi('system:projectTeam:list')")
    @ApiOperation(value = "获取项目组分页列表",response = TProjectTeamQuery.class)
    @PostMapping(value = "/api/t-project-team/pageList")
    public R<PageInfo<TProjectTeamVO>> pageList(@RequestBody String param) {
@@ -66,7 +66,7 @@
    /**
     * 添加项目组管理
     */
    @PreAuthorize("@ss.hasPermi('system:projectTeam:add')")
    //@PreAuthorize("@ss.hasPermi('system:projectTeam:add')")
    @Log(title = "项目组信息-新增项目组", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加项目组",response = TProjectTeamDTO.class)
    @PostMapping(value = "/api/t-project-team/add")
@@ -85,7 +85,7 @@
    /**
     * 修改项目组
     */
    @PreAuthorize("@ss.hasPermi('system:projectTeam:edit')")
    //@PreAuthorize("@ss.hasPermi('system:projectTeam:edit')")
    @Log(title = "项目组信息-修改项目组", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改项目组")
    @PostMapping(value = "/api/t-project-team/update")
@@ -106,7 +106,7 @@
    /**
     * 查看项目组详情
     */
    @PreAuthorize("@ss.hasPermi('system:projectTeam:detail')")
    //@PreAuthorize("@ss.hasPermi('system:projectTeam:detail')")
    @ApiOperation(value = "查看项目组详情")
    @GetMapping(value = "/open/t-project-team/getDetailById")
    public R<TProjectTeamVO> getDetailById(@RequestParam String id) {
@@ -130,7 +130,7 @@
    /**
     * 删除项目组
     */
    @PreAuthorize("@ss.hasPermi('system:projectTeam:delete')")
    //@PreAuthorize("@ss.hasPermi('system:projectTeam:delete')")
    @Log(title = "项目组信息-删除项目组", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除项目组")
    @DeleteMapping(value = "/open/t-project-team/deleteById")
@@ -143,7 +143,7 @@
    /**
     * 批量删除项目组
     */
    @PreAuthorize("@ss.hasPermi('system:projectTeam:delete')")
    //@PreAuthorize("@ss.hasPermi('system:projectTeam:delete')")
    @Log(title = "项目组信息-删除项目组", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除项目组")
    @DeleteMapping(value = "/open/t-project-team/deleteByIds")
@@ -156,7 +156,7 @@
    /**
     * 修改项目组
     */
    @PreAuthorize("@ss.hasPermi('system:projectTeam:upAndDown')")
    //@PreAuthorize("@ss.hasPermi('system:projectTeam:upAndDown')")
    @Log(title = "项目组信息-修改项目组状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改项目组状态",response = UpAndDownDTO.class)
    @PostMapping(value = "/api/t-project-team/upAndDown")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TQaProduceReportController.java
@@ -6,11 +6,17 @@
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.*;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.QAProduceReportStatusEnum;
import com.ruoyi.common.enums.QaReportFileEnum;
import com.ruoyi.common.enums.QaReportTypeEnum;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.AuditStatusDTO;
import com.ruoyi.system.dto.TQaProduceReportDTO;
import com.ruoyi.system.model.*;
import com.ruoyi.system.model.TProjectTeam;
import com.ruoyi.system.model.TProjectTeamStaff;
import com.ruoyi.system.model.TQaProduceReport;
import com.ruoyi.system.model.TQaReportFile;
import com.ruoyi.system.query.TQaProduceReportQuery;
import com.ruoyi.system.service.TProjectTeamService;
import com.ruoyi.system.service.TProjectTeamStaffService;
@@ -21,12 +27,12 @@
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.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
 * <p>
@@ -38,7 +44,7 @@
 */
@Api(tags = "中试、生产验证分析报告;辅料;产品报告管理")
@RestController
@RequestMapping("/t-qa-produce-report")
@RequestMapping("")
public class TQaProduceReportController {
    private final TQaProduceReportService qaProduceReportService;
@@ -58,18 +64,30 @@
    /**
     * 获取中试、生产验证分析报告;辅料;产品报告管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:qaProduceReport:list')")
    //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:list')")
    @ApiOperation(value = "获取中试、生产验证分析报告;辅料;产品报告管理分页列表",  response = TQaProduceReportQuery.class)
    @PostMapping(value = "/api/t-qa-produce-report/pageList")
    public R<PageInfo<TQaProduceReportVO>> pageList(@RequestBody String param) {
        TQaProduceReportQuery query = JSON.parseObject(param, TQaProduceReportQuery.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(qaProduceReportService.pageList(query));
    }
    /**
     * 添加中试、生产验证分析报告;辅料;产品报告管理管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaProduceReport:add')")
    //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:add')")
    @Log(title = "中试、生产验证分析报告;辅料;产品报告管理信息-新增中试、生产验证分析报告;辅料;产品报告管理", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加中试、生产验证分析报告;辅料;产品报告管理",response = TQaProduceReportDTO.class)
    @PostMapping(value = "/api/t-qa-produce-report/add")
@@ -137,7 +155,7 @@
    /**
     * 修改中试、生产验证分析报告;辅料;产品报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaProduceReport:edit')")
    //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:edit')")
    @Log(title = "中试、生产验证分析报告;辅料;产品报告管理信息-修改中试、生产验证分析报告;辅料;产品报告管理", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改中试、生产验证分析报告;辅料;产品报告管理")
    @PostMapping(value = "/api/t-qa-produce-report/update")
@@ -172,7 +190,7 @@
    /**
     * 查看中试、生产验证分析报告;辅料;产品报告管理详情
     */
    @PreAuthorize("@ss.hasPermi('system:qaProduceReport:detail')")
    //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:detail')")
    @ApiOperation(value = "查看中试、生产验证分析报告;辅料;产品报告管理详情")
    @GetMapping(value = "/open/t-qa-produce-report/getDetailById")
    public R<TQaProduceReportVO> getDetailById(@RequestParam String id) {
@@ -190,7 +208,7 @@
    /**
     * 删除中试、生产验证分析报告;辅料;产品报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaProduceReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:delete')")
    @Log(title = "中试、生产验证分析报告;辅料;产品报告管理信息-删除中试、生产验证分析报告;辅料;产品报告管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除中试、生产验证分析报告;辅料;产品报告管理")
    @DeleteMapping(value = "/open/t-qa-produce-report/deleteById")
@@ -204,7 +222,7 @@
    /**
     * 批量删除中试、生产验证分析报告;辅料;产品报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaProduceReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:delete')")
    @Log(title = "中试、生产验证分析报告;辅料;产品报告管理信息-删除中试、生产验证分析报告;辅料;产品报告管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除中试、生产验证分析报告;辅料;产品报告管理")
    @DeleteMapping(value = "/open/t-qa-produce-report/deleteByIds")
@@ -218,7 +236,7 @@
    /**
     * 撤销中试、生产验证分析报告;辅料;产品报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaProduceReport:revokedReport')")
    //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:revokedReport')")
    @Log(title = "中试、生产验证分析报告;辅料;产品报告管理信息-撤销中试、生产验证分析报告;辅料;产品报告管理状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "撤销中试、生产验证分析报告;辅料;产品报告管理状态")
    @PutMapping(value = "/open/t-qa-produce-report/revokedReport")
@@ -232,7 +250,7 @@
    /**
     * 审核中试、生产验证分析报告;辅料;产品报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaProduceReport:auditReport')")
    //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:auditReport')")
    @Log(title = "中试、生产验证分析报告;辅料;产品报告管理信息-审核中试、生产验证分析报告;辅料;产品报告管理状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "审核中试、生产验证分析报告;辅料;产品报告管理状态")
    @PostMapping(value = "/api/t-qa-produce-report/auditReport")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TQaTestItemController.java
@@ -8,11 +8,14 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.QATestItemStatusEnum;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.TQaTestItemDTO;
import com.ruoyi.system.dto.UpAndDownDTO;
import com.ruoyi.system.model.TProjectTeamStaff;
import com.ruoyi.system.model.TQaTestItem;
import com.ruoyi.system.model.TQaTestItemReport;
import com.ruoyi.system.query.TQaTestItemQuery;
import com.ruoyi.system.service.TProjectTeamService;
import com.ruoyi.system.service.TProjectTeamStaffService;
import com.ruoyi.system.service.TQaTestItemReportService;
import com.ruoyi.system.service.TQaTestItemService;
import com.ruoyi.system.vo.TQaTestItemReportVO;
@@ -21,10 +24,10 @@
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.stream.Collectors;
/**
 * <p>
@@ -36,32 +39,50 @@
 */
@Api(tags = "QA检测项管理")
@RestController
@RequestMapping("/t-qa-test-item")
@RequestMapping("")
public class TQaTestItemController {
    private final TQaTestItemService qaTestItemService;
    private final TQaTestItemReportService qaTestItemReportService;
    private final TokenService tokenService;
    private final TProjectTeamService projectTeamService;
    private final TProjectTeamStaffService projectTeamStaffService;
    @Autowired
    public TQaTestItemController(TQaTestItemService qaTestItemService, TQaTestItemReportService qaTestItemReportService) {
    public TQaTestItemController(TQaTestItemService qaTestItemService, TQaTestItemReportService qaTestItemReportService, TokenService tokenService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService) {
        this.qaTestItemService = qaTestItemService;
        this.qaTestItemReportService = qaTestItemReportService;
        this.tokenService = tokenService;
        this.projectTeamService = projectTeamService;
        this.projectTeamStaffService = projectTeamStaffService;
    }
    /**
     * 获取QA检测项管理管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItem:list')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItem:list')")
    @ApiOperation(value = "获取QA检测项管理分页列表",  response = TQaTestItemQuery.class)
    @PostMapping(value = "/api/t-qa-test-item/pageList")
    public R<PageInfo<TQaTestItemVO>> pageList(@RequestBody String param) {
        TQaTestItemQuery query = JSON.parseObject(param, TQaTestItemQuery.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(qaTestItemService.pageList(query));
    }
    /**
     * 添加QA检测项管理管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItem:add')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItem:add')")
    @Log(title = "QA检测项管理信息-新增QA检测项管理", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加QA检测项管理",response = TQaTestItemDTO.class)
    @PostMapping(value = "/api/t-qa-test-item/add")
@@ -74,7 +95,7 @@
    /**
     * 修改QA检测项管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItem:edit')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItem:edit')")
    @Log(title = "QA检测项管理信息-修改QA检测项管理", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改QA检测项管理")
    @PostMapping(value = "/api/t-qa-test-item/update")
@@ -87,7 +108,7 @@
    /**
     * 查看QA检测项管理详情
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItem:detail')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItem:detail')")
    @ApiOperation(value = "查看QA检测项管理详情")
    @GetMapping(value = "/open/t-qa-test-item/getDetailById")
    public R<TQaTestItemVO> getDetailById(@RequestParam String id) {
@@ -103,7 +124,7 @@
    /**
     * 删除QA检测项管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItem:delete')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItem:delete')")
    @Log(title = "QA检测项管理信息-删除QA检测项管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除QA检测项管理")
    @DeleteMapping(value = "/open/t-qa-test-item/deleteById")
@@ -116,7 +137,7 @@
    /**
     * 批量删除QA检测项管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItem:delete')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItem:delete')")
    @Log(title = "QA检测项管理信息-删除QA检测项管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除QA检测项管理")
    @DeleteMapping(value = "/open/t-qa-test-item/deleteByIds")
@@ -129,7 +150,7 @@
    /**
     * 修改QA检测项管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItem:commitEvaluate')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItem:commitEvaluate')")
    @Log(title = "QA检测项管理信息-提交评价QA检测项管理状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改QA检测项管理状态")
    @PutMapping(value = "/open/t-qa-test-item/commitEvaluate")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TQaTestItemReportController.java
@@ -63,7 +63,7 @@
    /**
     * 获取QA检测项报告管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItemReport:list')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:list')")
    @ApiOperation(value = "获取QA检测项报告管理分页列表-工艺工程师使用", response = TQaTestItemReportQuery.class)
    @PostMapping(value = "/api/t-qa-test-item-report/pageList")
    public R<PageInfo<TQaTestItemReportVO>> pageList(@RequestBody String param) {
@@ -85,7 +85,7 @@
    /**
     * 添加QA检测项报告管理管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItemReport:add')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:add')")
    @Log(title = "QA检测项报告管理信息-新增QA检测项报告管理", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加QA检测项报告管理",response = TQaTestItemReportDTO.class)
    @PostMapping(value = "/api/t-qa-test-item-report/add")
@@ -130,7 +130,7 @@
    /**
     * 修改QA检测项报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItemReport:edit')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:edit')")
    @Log(title = "QA检测项报告管理信息-修改QA检测项报告管理", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改QA检测项报告管理")
    @PostMapping(value = "/api/t-qa-test-item-report/update")
@@ -152,7 +152,7 @@
    /**
     * 查看QA检测项报告管理详情
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItemReport:detail')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:detail')")
    @ApiOperation(value = "查看QA检测项报告管理详情")
    @GetMapping(value = "/open/t-qa-test-item-report/getDetailById")
    public R<TQaTestItemReportVO> getDetailById(@RequestParam String id) {
@@ -170,7 +170,7 @@
    /**
     * 删除QA检测项报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItemReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:delete')")
    @Log(title = "QA检测项报告管理信息-删除QA检测项报告管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除QA检测项报告管理")
    @DeleteMapping(value = "/open/t-qa-test-item-report/deleteById")
@@ -184,7 +184,7 @@
    /**
     * 批量删除QA检测项报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItemReport:delete')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:delete')")
    @Log(title = "QA检测项报告管理信息-删除QA检测项报告管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除QA检测项报告管理")
    @DeleteMapping(value = "/open/t-qa-test-item-report/deleteByIds")
@@ -198,7 +198,7 @@
    /**
     * 撤销QA检测项报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItemReport:revokedReport')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:revokedReport')")
    @Log(title = "QA检测项报告管理信息-撤销QA检测项报告管理状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "撤销QA检测项报告管理状态")
    @PutMapping(value = "/open/t-qa-test-item-report/revokedReport")
@@ -212,7 +212,7 @@
    /**
     * 审核QA检测项报告管理
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItemReport:auditReport')")
    //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:auditReport')")
    @Log(title = "QA检测项报告管理信息-审核QA检测项报告管理状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "审核QA检测项报告管理状态")
    @PostMapping(value = "/api/t-qa-test-item-report/auditReport")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSamplingRecordController.java
@@ -39,7 +39,7 @@
 */
@Api(tags = "取样记录管理")
@RestController
@RequestMapping("/t-sampling-record")
@RequestMapping("")
public class TSamplingRecordController {
    private final TSamplingRecordService samplingRecordService;
@@ -67,7 +67,7 @@
    /**
     * 获取取样记录管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecord:list')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecord:list')")
    @ApiOperation(value = "获取取样记录分页列表", response = TSamplingRecordQuery.class)
    @PostMapping(value = "/api/t-sampling-record/pageList")
    public R<PageInfo<TSamplingRecordVO>> pageList(@RequestBody String param) {
@@ -78,7 +78,7 @@
    /**
     * 添加取样记录管理
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecord:add')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecord:add')")
    @Log(title = "取样记录信息-新增取样记录", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加取样记录",response = TSamplingRecordDTO.class)
    @PostMapping(value = "/api/t-sampling-record/add")
@@ -123,7 +123,7 @@
    /**
     * 修改取样记录
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecord:edit')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecord:edit')")
    @Log(title = "取样记录信息-修改取样记录", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改取样记录")
    @PostMapping(value = "/api/t-sampling-record/update")
@@ -142,7 +142,7 @@
    /**
     * 修改取样操作记录
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecordOperation:edit')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecordOperation:edit')")
    @Log(title = "取样记录信息-修改取样操作记录", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改取样操作记录")
    @PostMapping(value = "/api/t-sampling-record/updateRecordOperation")
@@ -157,7 +157,7 @@
    /**
     * 修改取样操作记录
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecordOperation:edit')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecordOperation:edit')")
    @Log(title = "取样记录信息-实验员提交取样记录", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "实验员提交取样记录")
    @PostMapping(value = "/api/t-sampling-record/commitRecord")
@@ -177,7 +177,7 @@
    /**
     * 查看取样记录详情
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecord:detail')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecord:detail')")
    @ApiOperation(value = "查看取样记录详情")
    @GetMapping(value = "/open/t-sampling-record/getDetailById")
    public R<TSamplingRecordVO> getDetailById(@RequestParam String id) {
@@ -203,7 +203,7 @@
    /**
     * 删除取样记录
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecord:delete')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecord:delete')")
    @Log(title = "取样记录信息-删除取样记录", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除取样记录")
    @DeleteMapping(value = "/open/t-sampling-record/deleteById")
@@ -216,7 +216,7 @@
    /**
     * 批量删除取样记录
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecord:delete')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecord:delete')")
    @Log(title = "取样记录信息-删除取样记录", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除取样记录")
    @DeleteMapping(value = "/open/t-sampling-record/deleteByIds")
@@ -229,7 +229,7 @@
    /**
     * 批量送样
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecord:sendSamples')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecord:sendSamples')")
    @Log(title = "取样记录信息-批量送样", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "批量送样")
    @PostMapping(value = "/open/t-sampling-record/batchSendSamples")
@@ -249,7 +249,7 @@
    /**
     * 批量删除取样记录
     */
    @PreAuthorize("@ss.hasPermi('system:samplingRecord:collectSamples')")
    //@PreAuthorize("@ss.hasPermi('system:samplingRecord:collectSamples')")
    @Log(title = "取样记录信息-批量收样", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "批量收样")
    @PostMapping(value = "/open/t-sampling-record/batchCollectSamples")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTestMethodConfirmSheetController.java
@@ -8,6 +8,7 @@
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.QATestItemReportStatusEnum;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.TTestMethodConfirmSheetDTO;
import com.ruoyi.system.dto.TestMethodConfirmSheetSignDTO;
@@ -18,6 +19,7 @@
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;
@@ -52,8 +54,10 @@
    private final TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService;
    private final TProjectTeamService projectTeamService;
    private final TProjectTeamStaffService projectTeamStaffService;
    private final TExperimentDispatchService experimentDispatchService;
    private final TProjectProposalService projectProposalService;
    @Autowired
    public TTestMethodConfirmSheetController(TTestMethodConfirmSheetService testMethodConfirmSheetService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TTestMethodConfirmSheetTermService testMethodConfirmSheetTermService, TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService) {
    public TTestMethodConfirmSheetController(TTestMethodConfirmSheetService testMethodConfirmSheetService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TTestMethodConfirmSheetTermService testMethodConfirmSheetTermService, TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService, TProjectTeamService projectTeamService, TProjectTeamStaffService projectTeamStaffService, TExperimentDispatchService experimentDispatchService, TProjectProposalService projectProposalService) {
        this.testMethodConfirmSheetService = testMethodConfirmSheetService;
        this.tokenService = tokenService;
        this.sysUserService = sysUserService;
@@ -62,12 +66,14 @@
        this.testMethodConfirmSheetOriginalService = testMethodConfirmSheetOriginalService;
        this.projectTeamService = projectTeamService;
        this.projectTeamStaffService = projectTeamStaffService;
        this.experimentDispatchService = experimentDispatchService;
        this.projectProposalService = projectProposalService;
    }
    /**
     * 获取检验方法确认单管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:list')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:list')")
    @ApiOperation(value = "获取检验方法确认单分页列表",response = TTestMethodConfirmSheetQuery.class)
    @PostMapping(value = "/api/t-test-method-confirm-sheet/pageList")
    public R<PageInfo<TTestMethodConfirmSheetVO>> pageList(@RequestBody String param) {
@@ -78,7 +84,7 @@
    /**
     * 添加检验方法确认单管理
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:add')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:add')")
    @Log(title = "检验方法确认单信息-新增检验方法确认单", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加检验方法确认单",response = TTestMethodConfirmSheetDTO.class)
    @PostMapping(value = "/api/t-test-method-confirm-sheet/add")
@@ -129,7 +135,7 @@
    /**
     * 修改检验方法确认单
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:edit')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:edit')")
    @Log(title = "检验方法确认单信息-修改检验方法确认单", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改检验方法确认单")
    @PostMapping(value = "/api/t-test-method-confirm-sheet/update")
@@ -149,7 +155,7 @@
    /**
     * 查看检验方法确认单详情
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:detail')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:detail')")
    @ApiOperation(value = "查看检验方法确认单详情")
    @GetMapping(value = "/open/t-test-method-confirm-sheet/getDetailById")
    public R<TTestMethodConfirmSheetVO> getDetailById(@RequestParam String id) {
@@ -162,13 +168,31 @@
                .eq(TTestMethodConfirmSheetTerm::getTestId, id));
        testMethodConfirmSheetVO.setTestMethodConfirmSheetTerms(testMethodConfirmSheetTerms);
        // 查询实验调度信息
        TExperimentDispatch experimentDispatch = experimentDispatchService.getById(testMethodConfirmSheetVO.getDispatchId());
        if(Objects.nonNull(experimentDispatch)){
            testMethodConfirmSheetVO.setExperimentName(experimentDispatch.getExperimentName());
            testMethodConfirmSheetVO.setExperimentCode(experimentDispatch.getExperimentCode());
            // 查询项目课题方案
            TProjectProposal projectProposal = projectProposalService.getById(experimentDispatch.getProposalId());
            if(Objects.nonNull(projectProposal)){
                testMethodConfirmSheetVO.setProjectName(projectProposal.getProjectName());
            }
        }
        // 查询审核人姓名
        SysUser sysUser = sysUserService.selectUserById(testMethodConfirmSheet.getAuditPersonId());
        if(Objects.nonNull(sysUser)){
            testMethodConfirmSheetVO.setAuditPersonName(sysUser.getNickName());
        }
        return R.ok(testMethodConfirmSheetVO);
    }
    /**
     * 删除检验方法确认单
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:delete')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:delete')")
    @Log(title = "检验方法确认单信息-删除检验方法确认单", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除检验方法确认单")
    @DeleteMapping(value = "/open/t-test-method-confirm-sheet/deleteById")
@@ -181,7 +205,7 @@
    /**
     * 批量删除检验方法确认单
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:delete')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:delete')")
    @Log(title = "检验方法确认单信息-删除检验方法确认单", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除检验方法确认单")
    @DeleteMapping(value = "/open/t-test-method-confirm-sheet/deleteByIds")
@@ -194,19 +218,33 @@
    /**
     * 批量删除检验方法确认单
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:sign')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheet:sign')")
    @Log(title = "检验方法确认单信息-检验方法确认单签字", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "检验方法确认单签字")
    @ApiOperation(value = "检验方法确认单签字",response = TestMethodConfirmSheetSignDTO.class)
    @PostMapping(value = "/api/t-test-method-confirm-sheet/sign")
    public R<Boolean> sign(@RequestBody String param) {
        TestMethodConfirmSheetSignDTO testMethodConfirmSheetSign = JSON.parseObject(param, TestMethodConfirmSheetSignDTO.class);
        Long userId = tokenService.getLoginUser().getUserId();
        testMethodConfirmSheetService.update(Wrappers.lambdaUpdate(TTestMethodConfirmSheet.class)
                .eq(TTestMethodConfirmSheet::getId, testMethodConfirmSheetSign.getTestMethodConfirmSheetId())
                .set(TTestMethodConfirmSheet::getAuditStatus, testMethodConfirmSheetSign.getAuditStatus())
                .set(TTestMethodConfirmSheet::getSignTime, LocalDateTime.now())
                .set(TTestMethodConfirmSheet::getAuditStatus, 2)
                .set(TTestMethodConfirmSheet::getAuditTime, LocalDateTime.now())
                .set(TTestMethodConfirmSheet::getAuditPersonId, userId)
                .set(TTestMethodConfirmSheet::getConfirmSign, testMethodConfirmSheetSign.getConfirmSign()));
                .set(TTestMethodConfirmSheet::getAuditSign, testMethodConfirmSheetSign.getConfirmSign()));
        return R.ok();
    }
    /**
     * 撤销QA检测项报告管理
     */
    //@PreAuthorize("@ss.hasPermi('system:qaTestItemReport:revokedReport')")
    @Log(title = "检验方法确认单信息-撤销检验方法确认单信息状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "撤销检验方法确认单信息状态")
    @PutMapping(value = "/open/t-test-method-confirm-sheet/revokedSheet")
    public R<Boolean> revokedSheet(@RequestParam String id) {
        TTestMethodConfirmSheet testMethodConfirmSheet = testMethodConfirmSheetService.getById(id);
        testMethodConfirmSheet.setAuditStatus(QATestItemReportStatusEnum.REVOKED.getCode());
        testMethodConfirmSheetService.updateById(testMethodConfirmSheet);
        return R.ok();
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTestMethodConfirmSheetOriginalController.java
@@ -37,7 +37,7 @@
 */
@Api(tags = "原始检测项管理")
@RestController
@RequestMapping("/t-test-method-confirm-sheet-original")
@RequestMapping("")
public class TTestMethodConfirmSheetOriginalController {
    private final TokenService tokenService;
@@ -57,7 +57,7 @@
    /**
     * 获取检验方法确认单管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheetOriginal:list')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheetOriginal:list')")
    @ApiOperation(value = "获取检验方法确认单分页列表",  notes = "获取检验方法确认单分页列表",response = TTestMethodConfirmSheetOriginalQuery.class)
    @PostMapping(value = "/api/t-test-method-confirm-sheet-original/pageList")
    public R<PageInfo<TTestMethodConfirmSheetOriginalVO>> pageList(@RequestBody String param) {
@@ -68,7 +68,7 @@
    /**
     * 修改检验方法确认单
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheetOriginal:edit')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheetOriginal:edit')")
    @Log(title = "检验方法确认单信息-修改检验方法确认单", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改检验方法确认单")
    @PostMapping(value = "/api/t-test-method-confirm-sheet-original/update")
@@ -87,7 +87,7 @@
    /**
     * 查看检验方法确认单详情
     */
    @PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheetOriginal:detail')")
    //@PreAuthorize("@ss.hasPermi('system:testMethodConfirmSheetOriginal:detail')")
    @ApiOperation(value = "查看检验方法确认单详情")
    @GetMapping(value = "/open/t-test-method-confirm-sheet-original/getDetailById")
    public R<TTestMethodConfirmSheetOriginalVO> getDetailById(@RequestParam String id) {
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
@@ -64,7 +64,7 @@
    @Autowired
    private ISysMenuService menuService;
    @PreAuthorize("@ss.hasPermi('system:role')")
//    @PreAuthorize("@ss.hasPermi('system:role')")
    @ApiOperation(value = "角色列表")
    @PostMapping("/system/role/list")
    public AjaxResult list(@RequestBody SysRoleQuery query)
@@ -73,7 +73,7 @@
        return AjaxResult.success(list);
    }
    @PreAuthorize("@ss.hasPermi('system:role')")
//    @PreAuthorize("@ss.hasPermi('system:role')")
    @ApiOperation(value = "角色列表不分页")
    @PostMapping("/system/role/listNotPage")
    public AjaxResult list()
@@ -81,7 +81,7 @@
        List<SysRole> list = roleService.selectRoleList(new SysRole());
        return AjaxResult.success(list);
    }
    @PreAuthorize("@ss.hasPermi('system:role:count')")
//    @PreAuthorize("@ss.hasPermi('system:role:count')")
    @ApiOperation(value = "角色数量统计")
    @PostMapping("/system/role/roleCount")
    public AjaxResult roleCount()
@@ -110,7 +110,7 @@
    /**
     * 根据角色编号获取详细信息
     */
     @PreAuthorize("@ss.hasPermi('system:role:query')")
//     @PreAuthorize("@ss.hasPermi('system:role:query')")
    @GetMapping(value = "/system/role/{roleId}")
    public AjaxResult getInfo(@PathVariable Long roleId)
    {
@@ -154,7 +154,7 @@
    /**
     * 新增角色
     */
    @PreAuthorize("@ss.hasPermi('system:role:add')")
//    @PreAuthorize("@ss.hasPermi('system:role:add')")
    @ApiOperation(value = "新增角色")
    @Log(title = "角色信息-新增角色", businessType = BusinessType.INSERT)
    @PostMapping("/system/role/add")
@@ -172,7 +172,7 @@
    /**
     * 修改保存角色
     */
    @PreAuthorize("@ss.hasPermi('system:role:edit')")
//    @PreAuthorize("@ss.hasPermi('system:role:edit')")
    @ApiOperation(value = "编辑角色",response = SysRoleDTO.class)
    @Log(title = "角色信息-编辑角色", businessType = BusinessType.UPDATE)
    @PostMapping("/api/system/role/edit")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -1,6 +1,7 @@
package com.ruoyi.web.controller.system;
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.controller.BaseController;
@@ -14,6 +15,8 @@
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.SysUserUpdateStatusDTO;
import com.ruoyi.system.model.TProjectTeam;
import com.ruoyi.system.model.TProjectTeamStaff;
import com.ruoyi.system.query.SysUserQuery;
import com.ruoyi.system.service.*;
import com.ruoyi.system.vo.SysUserVO;
@@ -22,6 +25,7 @@
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -49,13 +53,17 @@
    private ISysDeptService deptService;
    @Autowired
    private TokenService tokenService;
    @Autowired
    private TProjectTeamService projectTeamService;
    @Autowired
    private TProjectTeamStaffService projectTeamStaffService;
    /**
     * 获取用户列表
     */
    @ApiOperation(value = "获取用户列表")
    @PostMapping("/system/user/list")
    @PreAuthorize("@ss.hasPermi('system:user')")
//    @PreAuthorize("@ss.hasPermi('system:user')")
    public AjaxResult list(@RequestBody SysUserQuery query)
    {
        PageInfo<SysUserVO> list = userService.pageList(query);
@@ -64,11 +72,32 @@
    @ApiOperation(value = "获取用户列表-不分页")
    @PostMapping("/system/user/listNotPage")
    @PreAuthorize("@ss.hasPermi('system:user')")
//    @PreAuthorize("@ss.hasPermi('system:user')")
    public AjaxResult listNotPage()
    {
        List<SysUser> list = userService.selectList();
        return AjaxResult.success(list);
    }
    @ApiOperation(value = "获取用户列表-不分页-根据角色筛选")
    @GetMapping("/system/user/listByRole")
    public AjaxResult listByRole(@RequestParam(value = "roleId",required = false) Long roleId,
                                 @RequestParam(value = "nickName",required = false) String nickName)
    {
        // 获取当前用户项目组
        Long userId = tokenService.getLoginUser().getUserId();
        List<TProjectTeamStaff> staffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class)
                .eq(TProjectTeamStaff::getUserId, userId));
        if (CollectionUtils.isEmpty(staffs)){
            return AjaxResult.success(new ArrayList<>());
        }
        List<String> teamIds = staffs.stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList());
        List<TProjectTeamStaff> teamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class)
                .eq(TProjectTeamStaff::getTeamId, teamIds)
                .eq(Objects.nonNull(roleId),TProjectTeamStaff::getRoleType,Integer.parseInt(roleId.toString())));
        List<Long> userIds = teamStaffs.stream().map(TProjectTeamStaff::getUserId).collect(Collectors.toList());
        List<SysUser> list = userService.listByRole(userIds,nickName);
        return AjaxResult.success(list);
    }
@@ -170,6 +199,7 @@
        }
        user.setCreateBy(getUsername());
        user.setPassword(SecurityUtils.encryptPassword("123456"));
        user.setRoleType(Integer.parseInt(user.getRoleId().toString()));
        userService.insertUser(user);
        return R.ok();
    }
@@ -200,6 +230,7 @@
        if(StringUtils.isNotEmpty(user.getPassword())){
            user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
        }
        user.setRoleType(Integer.parseInt(user.getRoleId().toString()));
        return R.ok(userService.updateUser(user));
    }
ruoyi-system/src/main/java/com/ruoyi/system/dto/TestMethodConfirmSheetSignDTO.java
@@ -15,6 +15,7 @@
    @ApiModelProperty(value = "签字")
    private String confirmSign;
    @ApiModelProperty(value = "审核状态 -1=草稿箱 1=待确认 2=通过 3=驳回 4=已撤回 5=已封存")
    private Integer auditStatus;
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
@@ -176,4 +176,6 @@
    void updatePassword(@Param("id") Long id,@Param("s") String s);
    long selectIdByPhone(@Param("phonenumber") String phonenumber);
    List<SysUser> listByRole(@Param("userIds")List<Long> userIds, @Param("nickName")String nickName);
}
ruoyi-system/src/main/java/com/ruoyi/system/model/TExperimentDispatch.java
@@ -69,4 +69,8 @@
    @TableField(exist = false)
    private String projectName;
    @ApiModelProperty(value = "参与人员名称拼接")
    @TableField(exist = false)
    private String participantsName;
}
ruoyi-system/src/main/java/com/ruoyi/system/model/TExperimentDispatchParticipants.java
@@ -40,7 +40,7 @@
    @TableField("user_id")
    private Long userId;
    @ApiModelProperty(value = "角色类型 3=工艺工程师 4=实验员 5=化验师")
    @ApiModelProperty(value = "角色类型 3=工艺工程师 4=化验师 5=实验员")
    @TableField("role_type")
    private Integer roleType;
ruoyi-system/src/main/java/com/ruoyi/system/model/TProjectProposal.java
@@ -30,6 +30,10 @@
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    @ApiModelProperty(value = "提交人id")
    @TableField("commit_user_id")
    private Long commitUserId;
    @ApiModelProperty(value = "项目课题方案")
    @TableField("project_name")
    private String projectName;
ruoyi-system/src/main/java/com/ruoyi/system/query/TFeasibilityStudyReportQuery.java
@@ -5,6 +5,8 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value="可研、可行、工艺开发工具、验证发布报告管理查询参数query")
public class TFeasibilityStudyReportQuery extends TimeRangeQueryBody {
@@ -24,4 +26,7 @@
    @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/query/TQaProduceReportQuery.java
@@ -5,6 +5,8 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "中试、生产验证分析报告;辅料;产品报告查询条件query")
public class TQaProduceReportQuery extends BasePage {
@@ -21,4 +23,7 @@
    @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/query/TQaTestItemQuery.java
@@ -5,6 +5,8 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "检测项查询分页query")
public class TQaTestItemQuery extends BasePage {
@@ -20,5 +22,7 @@
    @ApiModelProperty(value = "状态 -1=草稿箱 1=已提交 2=待评定 3=已评定")
    private Integer status;
    @ApiModelProperty(value = "项目组id集合 前端忽略")
    private List<String> teamIds;
}
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
@@ -261,4 +261,12 @@
    void updatePassword(Long id, String s);
    long selectIdByPhone(String phonenumber);
    /**
     * 根据角色筛选用户,区分项目组
     * @param userIds
     * @param nickName
     * @return
     */
    List<SysUser> listByRole(List<Long> userIds, String nickName);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
@@ -685,6 +685,10 @@
    public long selectIdByPhone(String phonenumber) {
        return userMapper.selectIdByPhone(phonenumber);
    }
    @Override
    public List<SysUser> listByRole(List<Long> userIds, String nickName) {
        return userMapper.listByRole(userIds,nickName);
    }
//    @Override
//    public UserInfoVo userInfo(Long userId) {
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TQaTestItemServiceImpl.java
@@ -6,7 +6,6 @@
import com.ruoyi.system.model.TQaTestItem;
import com.ruoyi.system.query.TQaTestItemQuery;
import com.ruoyi.system.service.TQaTestItemService;
import com.ruoyi.system.vo.TProjectProposalVO;
import com.ruoyi.system.vo.TQaTestItemVO;
import org.springframework.stereotype.Service;
ruoyi-system/src/main/java/com/ruoyi/system/vo/TExperimentDispatchVO.java
@@ -1,5 +1,6 @@
package com.ruoyi.system.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.system.model.TExperimentDispatch;
import com.ruoyi.system.model.TExperimentDispatchGroup;
import com.ruoyi.system.model.TExperimentDispatchParticipants;
@@ -16,8 +17,10 @@
    @ApiModelProperty(value = "项目课题方案名称")
    private String projectName;
    @ApiModelProperty(value = "参与人员名称拼接")
    private String participantsName;
    @ApiModelProperty(value = "项目阶段 1=实验室开发阶段 2=中式试验阶段 3=生产验证试验阶段")
    private Integer projectStage;
    @ApiModelProperty(value = "方案编号")
    private String projectCode;
    @ApiModelProperty(value = "组别列表")
    private List<TExperimentDispatchGroup> experimentDispatchGroups;
ruoyi-system/src/main/java/com/ruoyi/system/vo/TFeasibilityStudyReportVO.java
@@ -2,6 +2,7 @@
import com.ruoyi.system.model.TFeasibilityReportFile;
import com.ruoyi.system.model.TFeasibilityStudyReport;
import com.ruoyi.system.model.TProjectTeam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -15,6 +16,12 @@
    @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/java/com/ruoyi/system/vo/TTestMethodConfirmSheetVO.java
@@ -24,5 +24,8 @@
    @ApiModelProperty(value = "实验编号")
    private String experimentCode;
    @ApiModelProperty(value = "审核人姓名")
    private String auditPersonName;
}
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -256,6 +256,22 @@
    <select id="selectIdByPhone" resultType="java.lang.Long">
        select user_id from sys_user where phonenumber = #{phonenumber} and status = 0 and del_flag = 0
    </select>
    <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
        from sys_user u
        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>
    <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
         insert into sys_user(
@@ -319,6 +335,7 @@
            <if test="disableRemark != null">disable_remark = #{disableRemark},</if>
            <if test="operatingTime != null">operating_time = #{operatingTime},</if>
            <if test="operatingPerson != null">operating_person = #{operatingPerson},</if>
            <if test="roleType != null">role_type = #{roleType},</if>
             update_time = sysdate()
         </set>
         where user_id = #{userId}
ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml
@@ -34,7 +34,7 @@
               ted.experiment_code AS experimentCode, ted.experiment_name AS experimentName
        from t_experiment_result_report terr
        left join t_experiment_dispatch ted on terr.dispatch_id = ted.id
        left join t_project_proposal tpp on ted.project_id = tpp.id
        left join t_project_proposal tpp on ted.proposal_id = tpp.id
        <where>
            <if test="query.projectName != null and query.projectName != ''">
                and tpp.project_name like concat('%', #{query.projectName}, '%')
ruoyi-system/src/main/resources/mapper/system/TExperimentSchemeMapper.xml
@@ -41,7 +41,7 @@
        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.project_id = tpp.id
        left join t_project_proposal tpp on ted.proposal_id = tpp.id
        <where>
            <if test="query.status != null">
                and tes.status = #{query.status}
ruoyi-system/src/main/resources/mapper/system/TFeasibilityStudyReportMapper.xml
@@ -53,6 +53,12 @@
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                AND tfsr.create_time BETWEEN #{query.startTime} AND #{query.endTime}
            </if>
            <if test="query.teamIds != null and query.teamIds.size() > 0">
                and tfsr.team_id in
                <foreach item="teamId" collection="query.teamIds" separator="," open="(" close=")" index="">
                    #{teamId}
                </foreach>
            </if>
            AND tfsr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tfsr.create_time DESC
ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml
@@ -24,7 +24,7 @@
        select id, dispatch_id, test_result, test_reason, status, create_time, update_time, create_by, update_by, disabled
        from t_inspection_report tir
        left join t_experiment_dispatch ted on ted.id = tir.dispatch_id
        left join t_project_proposal tpp on tpp.id = ted.project_id
        left join t_project_proposal tpp on ted.proposal_id = tpp.id
        <where>
            <if test="query.projectName != null and query.projectName != ''">
                and tpp.project_name like concat('%', #{query.projectName}, '%')
ruoyi-system/src/main/resources/mapper/system/TProjectProposalMapper.xml
@@ -5,6 +5,7 @@
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TProjectProposal">
        <id column="id" property="id" />
        <result column="commit_user_id" property="commitUserId" />
        <result column="project_name" property="projectName" />
        <result column="project_stage" property="projectStage" />
        <result column="project_code" property="projectCode" />
@@ -29,10 +30,10 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, project_name, project_stage, project_code, experiment_objective, experiment_material, experiment_device, experiment_test_method, experiment_procedure, data_acquisition, result_evaluation, precautions, audit_status, audit_person_id, audit_time, audit_remark, create_time, update_time, create_by, update_by, disabled
        id,commit_user_id, project_name, project_stage, project_code, experiment_objective, experiment_material, experiment_device, experiment_test_method, experiment_procedure, data_acquisition, result_evaluation, precautions, audit_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.TProjectProposalVO">
        select tpp.id, tpp.project_name, tpp.project_stage, tpp.project_code, tpp.experiment_objective, tpp.experiment_material, tpp.experiment_device,
        select tpp.id,tpp.commit_user_id, tpp.project_name, tpp.project_stage, tpp.project_code, tpp.experiment_objective, tpp.experiment_material, tpp.experiment_device,
        tpp.experiment_test_method, tpp.experiment_procedure, tpp.data_acquisition, tpp.result_evaluation, tpp.precautions, tpp.audit_status,
        tpp.audit_person_id, tpp.audit_time, tpp.audit_remark, tpp.create_time, tpp.update_time, tpp.create_by, tpp.update_by, tpp.disabled,
        su.nick_name as auditPersonName
ruoyi-system/src/main/resources/mapper/system/TQaProduceReportMapper.xml
@@ -50,6 +50,12 @@
            <if test="query.status != null">
                and tqpr.status = #{query.status}
            </if>
            <if test="query.teamIds != null and query.teamIds.size() > 0">
                and tqpr.team_id in
                <foreach collection="query.teamIds" item="teamId" open="(" separator="," close=")">
                    #{teamId}
                </foreach>
            </if>
            AND tqpr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tqpr.create_time DESC
ruoyi-system/src/main/resources/mapper/system/TQaTestItemMapper.xml
@@ -43,6 +43,12 @@
            <if test="query.status != null">
                and tqti.status = #{query.status}
            </if>
            <if test="query.teamIds != null and query.teamIds.size() > 0">
                and tqti.team_id in
                <foreach collection="query.teamIds" item="teamId" open="(" separator="," close=")">
                    #{teamId}
                </foreach>
            </if>
            AND tqti.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tqti.create_time DESC
ruoyi-system/src/main/resources/mapper/system/TSamplingRecordMapper.xml
@@ -27,7 +27,7 @@
            tpp.project_name AS projectName
        from t_sampling_record tsr
        left join t_experiment_dispatch ted on ted.id = tsr.dispatch_id
        left join t_project_proposal tpp on tpp.id = ted.project_id
        left join t_project_proposal tpp on ted.proposal_id = tpp.id
        <where>
            <if test="query.projectName != null and query.projectName != ''">
                and tpp.project_name like concat('%', #{query.projectName}, '%')
ruoyi-system/src/main/resources/mapper/system/TTestMethodConfirmSheetMapper.xml
@@ -29,7 +29,7 @@
               tpp.project_name AS projectName, ted.experiment_name AS experimentName, ted.experiment_code AS experimentCode
        from t_test_method_confirm_sheet tmcs
        left join t_experiment_dispatch ted on tmcs.dispatch_id = ted.id
        left join t_project_proposal tpp on ted.project_id = tpp.id
        left join t_project_proposal tpp on ted.proposal_id = tpp.id
        <where>
            <if test="query.projectName != null and query.projectName != ''">
                and tpp.project_name like concat('%', #{query.projectName}, '%')
ruoyi-system/src/main/resources/mapper/system/TTestMethodConfirmSheetOriginalMapper.xml
@@ -33,7 +33,7 @@
        left join t_test_method_confirm_sheet_term ttmcst on ttmcso.term_id = ttmcst.id
        left join t_test_method_confirm_sheet ttmcs on ttmcst.test_id = ttmcs.id
        left join t_experiment_dispatch ted on ttmcs.dispatch_id = ted.id
        left join t_project_proposal tpp on ted.project_id = tpp.id
        left join t_project_proposal tpp on ted.proposal_id = tpp.id
        <where>
            <if test="query.projectName != null and query.projectName != ''">
                and tpp.project_name like concat('%', #{query.projectName}, '%')