wenminjie
2026-07-13 0220811fbcffd4bd4df334502a2af272ae29f1e3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInspectionReportController.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.utils.SecurityUtils;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.TInspectionReportDTO;
import com.ruoyi.system.mapper.SysUserMapper;
@@ -147,8 +148,13 @@
    @PostMapping(value = "/api/t-inspection-report/update")
    public R<Boolean> update(@RequestBody String param) {
        TInspectionReportDTO dto = JSON.parseObject(param,TInspectionReportDTO.class);
        if (SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
            dto.setStatus(null);
        }
        inspectionReportService.updateById(dto);
        if(dto.getStatus() != -1){
        if(dto.getStatus() != null && dto.getStatus() != -1){
            // 通过当前用户查询项目组
            Long userId = tokenService.getLoginUser().getUserId();
            TProjectTeamStaff projectTeamStaff = projectTeamStaffService.getOne(Wrappers.lambdaQuery(TProjectTeamStaff.class)
@@ -180,9 +186,13 @@
        BeanUtils.copyProperties(inspectionReport, inspectionReportVO);
        // 查询实验调度
        TExperimentDispatch experimentDispatch = experimentDispatchService.getById(inspectionReportVO.getDispatchId());
        // 查询项目课题
        TProjectProposal projectProposal = projectProposalService.getById(experimentDispatch.getProposalId());
        experimentDispatch.setProjectName(projectProposal.getProjectName());
        if (experimentDispatch != null) {
            // 查询项目课题
            TProjectProposal projectProposal = projectProposalService.getById(experimentDispatch.getProposalId());
            experimentDispatch.setProjectName(projectProposal.getProjectName());
            experimentDispatch.setProjectCode(projectProposal.getProjectCode());
        }
        // 查询实验调度人员
        List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class)
                .eq(TExperimentDispatchParticipants::getDispatchId, inspectionReportVO.getDispatchId()));