| | |
| | | */ |
| | | @Api(tags = "实验调度管理") |
| | | @RestController |
| | | @RequestMapping("/t-experiment-dispatch") |
| | | @RequestMapping("") |
| | | public class TExperimentDispatchController { |
| | | |
| | | private final TExperimentDispatchService experimentDispatchService; |
| | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | /** |
| | | * 添加实验调度管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改实验调度 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看实验调度详情 |
| | | */ |
| | | @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) { |
| | |
| | | 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))); |
| | | // 查询参与人员 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询化验师的通过签字的实验调度 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除实验调度 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除实验调度 |
| | | */ |
| | | @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); |
| | |
| | | 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(); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 获取实验结果汇报管理列表 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 添加实验结果汇报管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改实验结果汇报 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改实验结果汇报 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看实验结果汇报详情 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 删除实验结果汇报 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除实验结果汇报 |
| | | */ |
| | | @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") |
| | |
| | | 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; |
| | |
| | | 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> |
| | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | /** |
| | | * 通过实验调度查询查询组别列表 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改实验方案 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看实验方案详情 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 删除实验方案 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除实验方案 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除实验方案 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除实验方案 |
| | | */ |
| | | @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") |
| | |
| | | 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> |
| | |
| | | */ |
| | | @Api(tags = "可研、可行、工艺开发工具、验证发布报告管理") |
| | | @RestController |
| | | @RequestMapping("/t-feasibility-study-report") |
| | | @RequestMapping("") |
| | | public class TFeasibilityStudyReportController { |
| | | |
| | | private final TFeasibilityStudyReportService feasibilityStudyReportService; |
| | |
| | | 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") |
| | |
| | | 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); |
| | |
| | | /** |
| | | * 修改可研、可行、工艺开发工具、验证发布报告管理 |
| | | */ |
| | | @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") |
| | |
| | | .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); |
| | |
| | | /** |
| | | * 查看可研、可行、工艺开发工具、验证发布报告管理详情 |
| | | */ |
| | | @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) { |
| | |
| | | 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") |
| | |
| | | /** |
| | | * 批量删除可研、可行、工艺开发工具、验证发布报告管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 撤销可研、可行、工艺开发工具、验证发布报告管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 审核可研、可行、工艺开发工具、验证发布报告管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 获取检验报告管理列表 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 添加检验报告管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改检验报告 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看检验报告详情 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 删除检验报告 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除检验报告 |
| | | */ |
| | | @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") |
| | |
| | | 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; |
| | |
| | | /** |
| | | * 获取项目课题方案管理列表 |
| | | */ |
| | | @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") |
| | |
| | | .like(TProjectProposal::getProjectCode, projectProposalNo)); |
| | | projectProposalNo = projectProposalNo + String.format("%02d", count+1); |
| | | dto.setProjectCode(projectProposalNo); |
| | | |
| | | dto.setCommitUserId(userId); |
| | | projectProposalService.save(dto); |
| | | return R.ok(); |
| | | } |
| | |
| | | /** |
| | | * 修改项目课题方案 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看项目课题方案详情 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 删除项目课题方案 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除项目课题方案 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改项目课题方案 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改项目课题方案 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 获取项目组管理列表 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 添加项目组管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改项目组 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看项目组详情 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 删除项目组 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除项目组 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改项目组 |
| | | */ |
| | | @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") |
| | |
| | | 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; |
| | |
| | | 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> |
| | |
| | | */ |
| | | @Api(tags = "中试、生产验证分析报告;辅料;产品报告管理") |
| | | @RestController |
| | | @RequestMapping("/t-qa-produce-report") |
| | | @RequestMapping("") |
| | | public class TQaProduceReportController { |
| | | |
| | | private final TQaProduceReportService qaProduceReportService; |
| | |
| | | /** |
| | | * 获取中试、生产验证分析报告;辅料;产品报告管理列表 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改中试、生产验证分析报告;辅料;产品报告管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看中试、生产验证分析报告;辅料;产品报告管理详情 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 删除中试、生产验证分析报告;辅料;产品报告管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除中试、生产验证分析报告;辅料;产品报告管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 撤销中试、生产验证分析报告;辅料;产品报告管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 审核中试、生产验证分析报告;辅料;产品报告管理 |
| | | */ |
| | | @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") |
| | |
| | | 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; |
| | |
| | | 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> |
| | |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改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") |
| | |
| | | /** |
| | | * 查看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) { |
| | |
| | | /** |
| | | * 删除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") |
| | |
| | | /** |
| | | * 批量删除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") |
| | |
| | | /** |
| | | * 修改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") |
| | |
| | | /** |
| | | * 获取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) { |
| | |
| | | /** |
| | | * 添加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") |
| | |
| | | /** |
| | | * 修改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") |
| | |
| | | /** |
| | | * 查看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) { |
| | |
| | | /** |
| | | * 删除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") |
| | |
| | | /** |
| | | * 批量删除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") |
| | |
| | | /** |
| | | * 撤销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") |
| | |
| | | /** |
| | | * 审核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") |
| | |
| | | */ |
| | | @Api(tags = "取样记录管理") |
| | | @RestController |
| | | @RequestMapping("/t-sampling-record") |
| | | @RequestMapping("") |
| | | public class TSamplingRecordController { |
| | | |
| | | private final TSamplingRecordService samplingRecordService; |
| | |
| | | /** |
| | | * 获取取样记录管理列表 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 添加取样记录管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改取样记录 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改取样操作记录 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改取样操作记录 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看取样记录详情 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 删除取样记录 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除取样记录 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量送样 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除取样记录 |
| | | */ |
| | | @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") |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | /** |
| | | * 添加检验方法确认单管理 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 修改检验方法确认单 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看检验方法确认单详情 |
| | | */ |
| | | @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) { |
| | |
| | | .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") |
| | |
| | | /** |
| | | * 批量删除检验方法确认单 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 批量删除检验方法确认单 |
| | | */ |
| | | @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(); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Api(tags = "原始检测项管理") |
| | | @RestController |
| | | @RequestMapping("/t-test-method-confirm-sheet-original") |
| | | @RequestMapping("") |
| | | public class TTestMethodConfirmSheetOriginalController { |
| | | |
| | | private final TokenService tokenService; |
| | |
| | | /** |
| | | * 获取检验方法确认单管理列表 |
| | | */ |
| | | @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) { |
| | |
| | | /** |
| | | * 修改检验方法确认单 |
| | | */ |
| | | @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") |
| | |
| | | /** |
| | | * 查看检验方法确认单详情 |
| | | */ |
| | | @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) { |
| | |
| | | @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) |
| | |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:role')") |
| | | // @PreAuthorize("@ss.hasPermi('system:role')") |
| | | @ApiOperation(value = "角色列表不分页") |
| | | @PostMapping("/system/role/listNotPage") |
| | | public AjaxResult list() |
| | |
| | | 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() |
| | |
| | | /** |
| | | * 根据角色编号获取详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:role:query')") |
| | | // @PreAuthorize("@ss.hasPermi('system:role:query')") |
| | | @GetMapping(value = "/system/role/{roleId}") |
| | | public AjaxResult getInfo(@PathVariable Long roleId) |
| | | { |
| | |
| | | /** |
| | | * 新增角色 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:role:add')") |
| | | // @PreAuthorize("@ss.hasPermi('system:role:add')") |
| | | @ApiOperation(value = "新增角色") |
| | | @Log(title = "角色信息-新增角色", businessType = BusinessType.INSERT) |
| | | @PostMapping("/system/role/add") |
| | |
| | | /** |
| | | * 修改保存角色 |
| | | */ |
| | | @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") |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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.*; |
| | | |
| | |
| | | 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); |
| | |
| | | |
| | | @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); |
| | | } |
| | | |
| | |
| | | } |
| | | user.setCreateBy(getUsername()); |
| | | user.setPassword(SecurityUtils.encryptPassword("123456")); |
| | | user.setRoleType(Integer.parseInt(user.getRoleId().toString())); |
| | | userService.insertUser(user); |
| | | return R.ok(); |
| | | } |
| | |
| | | if(StringUtils.isNotEmpty(user.getPassword())){ |
| | | user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); |
| | | } |
| | | user.setRoleType(Integer.parseInt(user.getRoleId().toString())); |
| | | return R.ok(userService.updateUser(user)); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "签字") |
| | | private String confirmSign; |
| | | |
| | | @ApiModelProperty(value = "审核状态 -1=草稿箱 1=待确认 2=通过 3=驳回 4=已撤回 5=已封存") |
| | | private Integer auditStatus; |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "参与人员名称拼接") |
| | | @TableField(exist = false) |
| | | private String participantsName; |
| | | |
| | | } |
| | |
| | | @TableField("user_id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "角色类型 3=工艺工程师 4=实验员 5=化验师") |
| | | @ApiModelProperty(value = "角色类型 3=工艺工程师 4=化验师 5=实验员") |
| | | @TableField("role_type") |
| | | private Integer roleType; |
| | | |
| | |
| | | @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; |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value="可研、可行、工艺开发工具、验证发布报告管理查询参数query") |
| | | public class TFeasibilityStudyReportQuery extends TimeRangeQueryBody { |
| | |
| | | @ApiModelProperty(value = "状态 -1=草稿箱 1=待审核 2=待评定 3=已评定 4=已驳回 5=已撤回") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "项目组id集合 前端忽略") |
| | | private List<String> teamIds; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "中试、生产验证分析报告;辅料;产品报告查询条件query") |
| | | public class TQaProduceReportQuery extends BasePage { |
| | |
| | | @ApiModelProperty(value = "状态 -1=草稿箱 1=待审核 2=已通过待评定 3=已评定 4=已驳回 5=已撤销 ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "项目组id集合 前端忽略") |
| | | private List<String> teamIds; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "检测项查询分页query") |
| | | public class TQaTestItemQuery extends BasePage { |
| | |
| | | |
| | | @ApiModelProperty(value = "状态 -1=草稿箱 1=已提交 2=待评定 3=已评定") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "项目组id集合 前端忽略") |
| | | private List<String> teamIds; |
| | | |
| | | } |
| | |
| | | void updatePassword(Long id, String s); |
| | | |
| | | long selectIdByPhone(String phonenumber); |
| | | |
| | | /** |
| | | * 根据角色筛选用户,区分项目组 |
| | | * @param userIds |
| | | * @param nickName |
| | | * @return |
| | | */ |
| | | List<SysUser> listByRole(List<Long> userIds, String nickName); |
| | | } |
| | |
| | | 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) { |
| | |
| | | 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; |
| | | |
| | |
| | | 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; |
| | |
| | | |
| | | @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; |
| | |
| | | |
| | | 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; |
| | |
| | | @ApiModelProperty(value = "项目组名称") |
| | | private String teamName; |
| | | |
| | | @ApiModelProperty(value = "项目组信息") |
| | | private TProjectTeam projectTeam; |
| | | |
| | | @ApiModelProperty(value = "项目组成员名称拼接") |
| | | private String staffNames; |
| | | |
| | | @ApiModelProperty(value = "报告文件") |
| | | private List<TFeasibilityReportFile> feasibilityReportFiles; |
| | | |
| | |
| | | @ApiModelProperty(value = "实验编号") |
| | | private String experimentCode; |
| | | |
| | | @ApiModelProperty(value = "审核人姓名") |
| | | private String auditPersonName; |
| | | |
| | | |
| | | } |
| | |
| | | <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( |
| | |
| | | <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} |
| | |
| | | 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}, '%') |
| | |
| | | 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} |
| | |
| | | <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 |
| | |
| | | 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}, '%') |
| | |
| | | <!-- 通用查询映射结果 --> |
| | | <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" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <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 |
| | |
| | | <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 |
| | |
| | | <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 |
| | |
| | | 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}, '%') |
| | |
| | | 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}, '%') |
| | |
| | | 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}, '%') |