试验列表区分试验管理页面和报告审核页面
This commit is contained in:
@@ -156,24 +156,6 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
|||||||
return Result.error(result);
|
return Result.error(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: 0518 暂时注释掉
|
|
||||||
/* List<ExperimentSampleInfo> sampleInfoList = experiment.getSampleInfoList();
|
|
||||||
List<ExperimentIrradiationBoard> irradiationBoardList = experiment.getIrradiationBoardList();
|
|
||||||
List<ExperimentDeviationCondition> deviationConditionList = experiment.getDeviationConditionList();
|
|
||||||
List<ExperimentDeviationEquipment> deviationEquipmentList = experiment.getDeviationEquipmentList();
|
|
||||||
Set<String> sampleList = sampleInfoList.stream().map(v -> v.getSampleModel()).collect(Collectors.toUnmodifiableSet());
|
|
||||||
Set<String> boardList = irradiationBoardList.stream().map(v -> v.getSampleModel()).collect(Collectors.toUnmodifiableSet());
|
|
||||||
Set<String> conditionList = deviationConditionList.stream().map(v -> v.getSampleModel()).collect(Collectors.toUnmodifiableSet());
|
|
||||||
Set<String> equipmentList = deviationEquipmentList.stream().map(v -> v.getSampleModel()).collect(Collectors.toUnmodifiableSet());
|
|
||||||
if (!sampleList.equals(boardList)) {
|
|
||||||
return Result.error("辐照板信息不匹配!");
|
|
||||||
}
|
|
||||||
if (!sampleList.equals(conditionList)) {
|
|
||||||
return Result.error("偏置条件信息不匹配!");
|
|
||||||
}
|
|
||||||
if (!sampleList.equals(equipmentList)) {
|
|
||||||
return Result.error("加偏设备信息不匹配!");
|
|
||||||
}*/
|
|
||||||
experiment.setStatus(ExperimentStatus.PRE_TEST);
|
experiment.setStatus(ExperimentStatus.PRE_TEST);
|
||||||
experimentService.saveWithDetail(experiment);
|
experimentService.saveWithDetail(experiment);
|
||||||
|
|
||||||
|
|||||||
@@ -241,4 +241,11 @@ public class Experiment implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String reportStatus;
|
private String reportStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据是给哪个页面用的,用来区分试验管理和报告审核
|
||||||
|
*/
|
||||||
|
@Schema(description = "试验页面")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String pageName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,18 @@
|
|||||||
left join experiment_deviation_equipment d on d.experiment_id = e.id
|
left join experiment_deviation_equipment d on d.experiment_id = e.id
|
||||||
left join experiment_report r on r.experiment_id = e.id
|
left join experiment_report r on r.experiment_id = e.id
|
||||||
<where>
|
<where>
|
||||||
( e.supervisor=#{loginUser.id} or e.create_by=#{loginUser.username} or 'admin'=#{loginUser.username}
|
<choose>
|
||||||
or (r.auditor=#{loginUser.id} and r.status='PROOFREAD_PASS') or (r.proofreader=#{loginUser.id} and r.status='INIT')
|
<when test="#{experiment.pageName} == 'audit'">
|
||||||
or (r.confirmer=#{loginUser.id} and r.status='AUDIT_PASS' ))
|
AND (r.auditor=#{loginUser.id} and r.status='PROOFREAD_PASS') or (r.proofreader=#{loginUser.id} and r.status='INIT')
|
||||||
|
or (r.confirmer=#{loginUser.id} and r.status='AUDIT_PASS' ))
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
AND ( e.supervisor=#{loginUser.id} or e.create_by=#{loginUser.username} or 'admin'=#{loginUser.username}
|
||||||
|
or (r.auditor=#{loginUser.id} and r.status='PROOFREAD_PASS') or (r.proofreader=#{loginUser.id} and r.status='INIT')
|
||||||
|
or (r.confirmer=#{loginUser.id} and r.status='AUDIT_PASS' ))
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
|
||||||
<if test="experiment.name != null and experiment.name != ''">
|
<if test="experiment.name != null and experiment.name != ''">
|
||||||
and e.name like concat('%', #{experiment.name}, '%')
|
and e.name like concat('%', #{experiment.name}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user