Commit c9a26c00 by lijingjing

内容排序

parent 3cff24f2
......@@ -537,6 +537,7 @@ public class EntrustController extends ServiceController {
));
// 获取当前用户分组
entrust.setGroupNameList(userInfoService.getCurGroupNameList());
entrust.setTesterId(getAccount().getUserId());
return success(entrustService.pageEntrustByItemDataHis(getPage(), entrust));
}
......
......@@ -26,7 +26,7 @@ public class EntrustReportTemplateConfigServiceImpl extends BaseServiceImpl<Entr
@Override
public Page<EntrustReportTemplateConfig> page(Page<EntrustReportTemplateConfig> page, EntrustReportTemplateConfig entrustReportTemplateConfig) {
Wrapper wrapper = new EntityWrapper<>(entrustReportTemplateConfig);
wrapper.orderBy("ctime",true);
return this.page(page, wrapper);
}
......
......@@ -39,6 +39,7 @@ public class EntrustReportTemplateServiceImpl extends BaseServiceImpl<EntrustRep
if (StringUtils.isNotBlank(name)) {
wrapper.like("name", name);
}
wrapper.orderBy("class_type").orderBy("name");
return this.page(page, wrapper);
}
......@@ -71,7 +72,7 @@ public class EntrustReportTemplateServiceImpl extends BaseServiceImpl<EntrustRep
@Override
public boolean updateTemplateById(EntrustReportTemplate entrustReportTemplate, Account account) {
RestAssert.fail(null == entrustReportTemplate.getId(),"报告模板ID为空");
RestAssert.fail(null == entrustReportTemplate.getId(), "报告模板ID为空");
entrustReportTemplate.setLid(account.getUserId()).setLtime(new Date());
return baseMapper.updateTemplateById(entrustReportTemplate);
}
......
......@@ -62,8 +62,8 @@
and exists (
select 1 from entrust_sample s
join entrust_sample_prepare p on p.entrust_sample_id = s.id
where s.deleted = 0 and p.deleted = 0 and p.entrust_sample_id is not null
and s.entrust_id = e.id and p.status = #{vo.prepareStatus}
where s.deleted = 0 and p.deleted = 0 and s.entrust_id = e.id
and p.entrust_sample_id is not null and p.status = #{vo.prepareStatus}
)
</if>
<if test="null != vo.prepareNotStatus">
......@@ -104,15 +104,19 @@
<if test="null != vo.itemStatus">
AND exists (
select 1 from entrust_sample_item i join entrust_sample s on i.entrust_sample_id = s.id
where s.deleted = 0 and i.deleted = 0 and s.entrust_id = e.id and i.status = #{vo.itemStatus}
select 1 from entrust_sample_item i
join entrust_sample s on i.entrust_sample_id = s.id
where s.deleted = 0 and i.deleted = 0
and s.entrust_id = e.id and i.status = #{vo.itemStatus}
)
</if>
<if test="null!=vo.testerId">
and exists (
select 1 from entrust_sample_item i join entrust_sample s on i.entrust_sample_id = s.id
where s.deleted = 0 and i.deleted = 0 and s.entrust_id = e.id and i.tester_id = #{vo.testerId}
select 1 from entrust_sample_item i
join entrust_sample s on i.entrust_sample_id = s.id
where s.deleted = 0 and i.deleted = 0
and s.entrust_id = e.id and i.tester_id = #{vo.testerId}
)
</if>
......@@ -175,17 +179,17 @@
<if test="null!=vo.itemStatus">
and exists (
select 1 from entrust_sample es,entrust_sample_item esi
where es.id = esi.entrust_sample_id
and es.deleted = 0 and esi.deleted = 0
select 1 from entrust_sample es
join entrust_sample_item esi on esi.entrust_sample_id = es.id
where es.deleted = 0 and esi.deleted = 0 and es.entrust_id = e.id
and esi.status = #{vo.itemStatus}
)
</if>
<if test="null!=vo.itemStatusEnumList">
and exists (
select 1 from entrust_sample es,entrust_sample_item esi
where es.id = esi.entrust_sample_id
and es.deleted = 0 and esi.deleted = 0
select 1 from entrust_sample es
join entrust_sample_item esi on esi.entrust_sample_id = es.id
where es.deleted = 0 and esi.deleted = 0 and es.entrust_id = e.id
and esi.status IN
<foreach collection="vo.itemStatusEnumList" index="index" item="status" open="(" separator="," close=")">
#{status}
......@@ -194,9 +198,9 @@
</if>
<if test="null!=vo.testerId">
and exists (
select 1 from entrust_sample es,entrust_sample_item esi
where es.id = esi.entrust_sample_id
and es.deleted = 0 and esi.deleted = 0
select 1 from entrust_sample es
join entrust_sample_item esi on esi.entrust_sample_id = es.id
where es.deleted = 0 and esi.deleted = 0 and es.entrust_id = e.id
and esi.tester_id = #{vo.testerId}
)
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment