This commit is contained in:
ls
2025-03-28 22:17:26 +08:00
parent b3e0d059d5
commit 725311ef88
4 changed files with 27 additions and 0 deletions

View File

@@ -135,6 +135,9 @@ public class Experiment implements Serializable {
@Excel(name = "状态", width = 15)
@Schema(description = "状态")
private String status;
@TableField(exist = false)
private List<String> statusList;
/**
* 样品信息
*/

View File

@@ -42,6 +42,18 @@
<if test="experiment.status != null and experiment.status != ''">
and e.status like concat('%', #{experiment.status}, '%')
</if>
<if test="experiment.status != null and experiment.status != ''">
and e.status like concat('%', #{experiment.status}, '%')
</if>
<if test="experiment.statusList != null and experiment.statusList != ''">
and e.status in
<foreach item="item" collection="experiment.statusList" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
<if test="loginUser.postText != null and loginUser.postText != ''">
order by ${loginUser.postText}

View File

@@ -273,6 +273,10 @@ public class ExperimentServiceImpl extends ServiceImpl<ExperimentMapper, Experim
@Override
public IPage<Experiment> join(Page<Experiment> page, Experiment experiment, SysUser loginUser) {
if (StringUtils.contains(experiment.getStatus(), ",")) {
experiment.setStatusList(List.of(experiment.getStatus().split(",")));
experiment.setStatus(null);
}
return baseMapper.join(page, experiment, loginUser);
}