| | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | 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.common.enums.*; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.AuditStatusDTO; |
| | | import com.ruoyi.system.dto.TQaProduceReportDTO; |
| | | import com.ruoyi.system.dto.TQaProduceReportEvaluateDTO; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.model.TQaProduceReport; |
| | |
| | | } |
| | | } |
| | | return R.ok(qaProduceReportService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取中试、生产验证分析报告;辅料;产品报告管理评定列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaProduceReport:evaluateList')") |
| | | @ApiOperation(value = "获取中试、生产验证分析报告;辅料;产品报告管理评定列表", response = TQaProduceReportQuery.class) |
| | | @PostMapping(value = "/api/t-qa-produce-report/evaluateList") |
| | | public R<PageInfo<TQaProduceReportVO>> evaluateList(@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.evaluateList(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 评定QA检测项管理 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:qaTestItem:evaluate')") |
| | | @Log(title = "中试、生产验证分析报告;辅料;产品报告管理信息-评定中试、生产验证分析报告;辅料;产品报告管理信息", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "评定QA检测项管理",response = TQaProduceReportEvaluateDTO.class) |
| | | @PostMapping(value = "/api/t-qa-produce-report/evaluate") |
| | | public R<Boolean> evaluate(@RequestBody String param) { |
| | | TQaProduceReportEvaluateDTO dto = JSON.parseObject(param,TQaProduceReportEvaluateDTO.class); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | TQaProduceReport qaProduceReport = qaProduceReportService.getById(dto); |
| | | qaProduceReport.setStatus(QAProduceReportStatusEnum.EVALUATED.getCode()); |
| | | qaProduceReport.setEvaluatePersonId(userId); |
| | | qaProduceReport.setEvaluateTime(LocalDateTime.now()); |
| | | qaProduceReport.setEvaluateScore(dto.getEvaluateScore()); |
| | | qaProduceReportService.updateById(qaProduceReport); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.QaReportTypeEnum; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.*; |
| | | import com.ruoyi.system.dto.BatchCollectSamplesDTO; |
| | | import com.ruoyi.system.dto.BatchSendSamplesDTO; |
| | | import com.ruoyi.system.dto.TSamplingRecordDTO; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TSamplingRecordQuery; |
| | |
| | | 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.text.SimpleDateFormat; |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:sendSamples')") |
| | | @Log(title = "取样记录信息-批量送样", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "批量送样") |
| | | @ApiOperation(value = "批量送样",response = BatchSendSamplesDTO.class) |
| | | @PostMapping(value = "/open/t-sampling-record/batchSendSamples") |
| | | public R<Boolean> batchSendSamples(@RequestBody String param) { |
| | | BatchSendSamplesDTO batchSendSamplesDTO = JSON.parseObject(param, BatchSendSamplesDTO.class); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:collectSamples')") |
| | | @Log(title = "取样记录信息-批量收样", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "批量收样") |
| | | @ApiOperation(value = "批量收样",response = BatchCollectSamplesDTO.class) |
| | | @PostMapping(value = "/open/t-sampling-record/batchCollectSamples") |
| | | public R<Boolean> batchCollectSamples(@RequestBody String param) { |
| | | BatchCollectSamplesDTO batchCollectSamplesDTO = JSON.parseObject(param, BatchCollectSamplesDTO.class); |
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 = "中试、生产验证分析报告;辅料;产品报告管理信息评定DTO") |
| | | public class TQaProduceReportEvaluateDTO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "中试、生产验证分析报告;辅料;产品报告管理信息id") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "评定分数 逗号分隔") |
| | | private String evaluateScore; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TQaProduceReportVO> pageList(@Param("query") TQaProduceReportQuery query, @Param("pageInfo")PageInfo<TQaProduceReportVO> pageInfo); |
| | | /** |
| | | * 分页查询评定列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TQaProduceReportVO> evaluateList(@Param("query") TQaProduceReportQuery query, @Param("pageInfo")PageInfo<TQaProduceReportVO> 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 = "提交人") |
| | | @TableField("commit_person_id") |
| | | private Long commitPersonId; |
| | | |
| | | @ApiModelProperty(value = "检测项名称") |
| | | @TableField("item_name") |
| | | private String itemName; |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | private String samplingId; |
| | | |
| | | @ApiModelProperty(value = "工艺时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField("process_time") |
| | | private LocalDateTime processTime; |
| | | private String processTime; |
| | | |
| | | @ApiModelProperty(value = "取样名称") |
| | | @TableField("sampling_name") |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TQaProduceReportVO> pageList(TQaProduceReportQuery query); |
| | | /** |
| | | * 获取中试、生产验证分析报告;辅料;产品报告管理分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TQaProduceReportVO> evaluateList(TQaProduceReportQuery query); |
| | | } |
| | |
| | | import com.ruoyi.system.model.TQaProduceReport; |
| | | import com.ruoyi.system.query.TQaProduceReportQuery; |
| | | import com.ruoyi.system.service.TQaProduceReportService; |
| | | import com.ruoyi.system.vo.TExperimentResultReportVO; |
| | | import com.ruoyi.system.vo.TQaProduceReportVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | @Override |
| | | public PageInfo<TQaProduceReportVO> evaluateList(TQaProduceReportQuery query) { |
| | | PageInfo<TQaProduceReportVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TQaProduceReportVO> list = this.baseMapper.evaluateList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | @Data |
| | | @ApiModel(value = "取样记录VO") |
| | | public class TSamplingRecordVO extends TSamplingRecord { |
| | | @ApiModelProperty(value = "项目课题方案") |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "实验编号") |
| | | private String experimentCode; |
| | | |
| | | @ApiModelProperty(value = "实验名称") |
| | | private String experimentName; |
| | | @ApiModelProperty(value = "取样操作记录集合") |
| | | private List<TSamplingRecordOperation> samplingRecordOperations; |
| | | @ApiModelProperty(value = "实验调度信息") |
| | |
| | | </where> |
| | | ORDER BY tqpr.create_time DESC |
| | | </select> |
| | | <select id="evaluateList" resultType="com.ruoyi.system.vo.TQaProduceReportVO"> |
| | | select tqpr.id, tqpr.team_id, tqpr.report_title, tqpr.report_code, tqpr.develop_person, tqpr.develop_date, |
| | | tqpr.report_text, tqpr.report_type, tqpr.audit_person_id, tqpr.audit_time, tqpr.audit_remark, tqpr.status, |
| | | tqpr.evaluate_person_id, tqpr.evaluate_time, tqpr.evaluate_score, tqpr.create_time, tqpr.update_time, |
| | | tqpr.create_by, tqpr.update_by, tqpr.disabled, tpt.team_name as teamName |
| | | from t_qa_produce_report tqpr |
| | | left join t_project_team tpt on tpt.id = tqpr.team_id |
| | | <where> |
| | | <if test="query.reportTitle != null and query.reportTitle != ''"> |
| | | and tqpr.report_title like concat('%', #{query.reportTitle}, '%') |
| | | </if> |
| | | <if test="query.reportCode != null and query.reportCode != ''"> |
| | | and tqpr.report_code like concat('%', #{query.reportCode}, '%') |
| | | </if> |
| | | <if test="query.teamName != null and query.teamName != ''"> |
| | | and tpt.team_name like concat('%', #{query.teamName}, '%') |
| | | </if> |
| | | <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.status in (2,3) |
| | | AND tqpr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tqpr.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TQaTestItem"> |
| | | <id column="id" property="id" /> |
| | | <result column="team_id" property="teamId" /> |
| | | <result column="commit_person_id" property="commitPersonId" /> |
| | | <result column="item_name" property="itemName" /> |
| | | <result column="item_code" property="itemCode" /> |
| | | <result column="remark" property="remark" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, team_id, item_name, item_code, remark, status, evaluate_person_id, evaluate_time, evaluate_score, create_time, update_time, create_by, update_by, disabled |
| | | id, team_id,commit_person_id, item_name, item_code, remark, status, evaluate_person_id, evaluate_time, evaluate_score, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" 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, |
| | | select tqti.id, tqti.team_id,tqti.commit_person_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 |
| | |
| | | </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, |
| | | select tqti.id, tqti.team_id,tqti.commit_person_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 |