| | |
| | | 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.*; |
| | | 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.vo.TQaProduceReportVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2025-04-08 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中试、生产验证分析报告;辅料;产品报告管理") |
| | | @RestController |
| | | @RequestMapping("") |
| | |
| | | } |
| | | } |
| | | return R.ok(qaProduceReportService.evaluateList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取中试、生产验证分析报告;辅料;产品报告管理评定列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:evaluateList')") |
| | | @ApiOperation(value = "获取中试、生产验证分析报告;辅料;产品报告管理评定数量统计", response = TQaProduceReportQuery.class) |
| | | @PostMapping(value = "/api/t-qa-produce-report/evaluateCount") |
| | | public R<Map<String,Integer>> evaluateCount(@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); |
| | | } |
| | | } |
| | | Map<String,Integer> map = qaProduceReportService.evaluateCount(query); |
| | | return R.ok(map); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItem:evaluate')") |
| | | @Log(title = "中试、生产验证分析报告;辅料;产品报告管理信息-评定中试、生产验证分析报告;辅料;产品报告管理信息", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "评定QA检测项管理",response = TQaProduceReportEvaluateDTO.class) |
| | | @ApiOperation(value = "评定中试、生产验证分析报告;辅料;产品报告管理信息",response = TQaProduceReportEvaluateDTO.class) |
| | | @PostMapping(value = "/api/t-qa-produce-report/evaluate") |
| | | public R<Boolean> evaluate(@RequestBody String param) { |
| | | TQaProduceReportEvaluateDTO dto = JSON.parseObject(param,TQaProduceReportEvaluateDTO.class); |
| | |
| | | qaProduceReportService.updateById(qaProduceReport); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |