Merge remote-tracking branch 'origin/master'
| | |
| | | import com.ruoyi.common.enums.QATestItemStatusEnum; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.TQaTestItemDTO; |
| | | import com.ruoyi.system.dto.TQaTestItemEvaluateDTO; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.model.TQaTestItem; |
| | | import com.ruoyi.system.model.TQaTestItemReport; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | } |
| | | return R.ok(qaTestItemService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取QA检测项管理评定列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItem:evaluateList')") |
| | | @ApiOperation(value = "获取QA检测项管理评定列表", response = TQaTestItemQuery.class) |
| | | @PostMapping(value = "/api/t-qa-test-item/evaluateList") |
| | | public R<PageInfo<TQaTestItemVO>> evaluateList(@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.evaluateList(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 评定QA检测项管理 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItem:evaluate')") |
| | | @Log(title = "QA检测项管理信息-评定QA检测项管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "评定QA检测项管理",response = TQaTestItemEvaluateDTO.class) |
| | | @PostMapping(value = "/api/t-qa-test-item/evaluate") |
| | | public R<Boolean> evaluate(@RequestBody String param) { |
| | | TQaTestItemEvaluateDTO dto = JSON.parseObject(param,TQaTestItemEvaluateDTO.class); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | TQaTestItem testItem = qaTestItemService.getById(dto); |
| | | testItem.setStatus(QATestItemStatusEnum.EVALUATED.getCode()); |
| | | testItem.setEvaluatePersonId(userId); |
| | | testItem.setEvaluateTime(LocalDateTime.now()); |
| | | testItem.setEvaluateScore(dto.getEvaluateScore()); |
| | | qaTestItemService.updateById(testItem); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.AuditStatusDTO; |
| | | import com.ruoyi.system.dto.TQaTestItemReportDTO; |
| | | import com.ruoyi.system.mapper.TQaReportFileMapper; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.model.TQaReportFile; |
| | | import com.ruoyi.system.model.TQaTestItemReport; |
| | | import com.ruoyi.system.query.TQaTestItemReportQuery; |
| | | 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> |
| | |
| | | /** |
| | | * 获取QA检测项报告管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取QA检测项报告管理下拉列表-化验师使用") |
| | | @ApiOperation(value = "获取QA检测项报告管理下拉列表-化验师使用、评定使用") |
| | | @GetMapping(value = "/open/t-qa-test-item-report/getListByItemId") |
| | | public R<List<TQaTestItemReport>> getListByItemId(@RequestParam String itemId) { |
| | | List<TQaTestItemReport> list = qaTestItemReportService.list(Wrappers.lambdaQuery(TQaTestItemReport.class) |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.TQaTestItemDTO; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TQaTestItemReportQuery; |
| | | import com.ruoyi.system.query.TResultWorkEvaluateQuery; |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 实验员工作评定 前端控制器 |
| | | * 实验结果工作评定 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-04-08 |
| | | */ |
| | | @Api(tags = "实验结果工作评定管理") |
| | | @RestController |
| | | @RequestMapping("/t-result-work-evaluate") |
| | | public class TResultWorkEvaluateController { |
| | |
| | | this.projectTeamStaffService = projectTeamStaffService; |
| | | this.sysUserService = sysUserService; |
| | | } |
| | | |
| | | /** |
| | | * 添加QA检测项管理管理 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:resultWorkEvaluate:add')") |
| | | @Log(title = "QA检测项管理信息-新增QA检测项管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加QA检测项管理",response = TQaTestItemDTO.class) |
| | | @PostMapping(value = "/api/t-qa-test-item/add") |
| | | public R<Boolean> add(@RequestBody String param) { |
| | | TQaTestItemDTO dto = JSON.parseObject(param,TQaTestItemDTO.class); |
| | | // resultWorkEvaluateService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "项目组总积分分页列表",tags = "项目组总积分",response = TQaTestItemReportQuery.class) |
| | | @PostMapping(value = "/api/t-result-work-evaluate/pageList") |
| | | public R<PageInfo<TResultWorkEvaluateVO>> pageList(@RequestBody String param) { |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @ApiModel(value = "QA检测项评定DTO") |
| | | public class TQaTestItemEvaluateDTO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "检测项id") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "评定分数 逗号分隔") |
| | | private String evaluateScore; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TQaTestItemVO> pageList(@Param("query") TQaTestItemQuery query, @Param("pageInfo")PageInfo<TQaTestItemVO> pageInfo); |
| | | /** |
| | | * 分页查询QA检测项 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TQaTestItemVO> evaluateList(@Param("query") TQaTestItemQuery query, @Param("pageInfo")PageInfo<TQaTestItemVO> pageInfo); |
| | | } |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | @TableField("team_id") |
| | | private String teamId; |
| | | |
| | | @ApiModelProperty(value = "提交用户id、化验师") |
| | | @TableField("commit_person_id") |
| | | private Long commitPersonId; |
| | | |
| | | @ApiModelProperty(value = "报告标题") |
| | | @TableField("report_title") |
| | | private String reportTitle; |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | @TableField("team_id") |
| | | private String teamId; |
| | | |
| | | @ApiModelProperty(value = "实验员id") |
| | | @TableField("tester_id") |
| | | private Long testerId; |
| | | |
| | | @ApiModelProperty(value = "任务内容") |
| | | @TableField("task_content") |
| | | private String taskContent; |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TQaTestItemVO> pageList(TQaTestItemQuery query); |
| | | /** |
| | | * 分页查询QA检测项管理 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TQaTestItemVO> evaluateList(TQaTestItemQuery query); |
| | | } |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TQaTestItemVO> evaluateList(TQaTestItemQuery query) { |
| | | PageInfo<TQaTestItemVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TQaTestItemVO> list = this.baseMapper.evaluateList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | } |
| | |
| | | ORDER BY tqti.create_time DESC |
| | | </select> |
| | | |
| | | <select id="evaluateList" resultType="com.ruoyi.system.vo.TQaTestItemVO"> |
| | | select tqti.id, tqti.team_id, tqti.item_name, tqti.item_code, tqti.remark, tqti.status, tqti.evaluate_person_id, |
| | | tqti.evaluate_time, tqti.evaluate_score, tqti.create_time, tqti.update_time, tqti.create_by, tqti.update_by, tqti.disabled, |
| | | tpt.team_name as teamName |
| | | from t_qa_test_item tqti |
| | | left join t_project_team tpt on tpt.id = tqti.team_id |
| | | <where> |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and tpt.team_name like concat('%', #{query.teamName}, '%') |
| | | </if> |
| | | <if test="query.itemName != null and query.itemName != ''"> |
| | | and tqti.item_name like concat('%', #{query.itemName}, '%') |
| | | </if> |
| | | <if test="query.itemCode != null and query.itemCode != ''"> |
| | | and tqti.item_code like concat('%', #{query.itemCode}) |
| | | </if> |
| | | <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.status in (2,3) |
| | | AND tqti.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tqti.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TTesterOtherTask"> |
| | | <id column="id" property="id" /> |
| | | <result column="team_id" property="teamId" /> |
| | | <result column="tester_id" property="testerId" /> |
| | | <result column="task_content" property="taskContent" /> |
| | | <result column="task_time" property="taskTime" /> |
| | | <result column="evaluate_score" property="evaluateScore" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, team_id, task_content, task_time, evaluate_score, evaluate_time, create_time, update_time, create_by, update_by, disabled |
| | | id, team_id,tester_id, task_content, task_time, evaluate_score, evaluate_time, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | |
| | | </mapper> |