|
|
|
|
@ -48,7 +48,7 @@ public class ConfinementService extends ServiceImpl<ConfinementMapper, Confineme
|
|
|
|
|
} |
|
|
|
|
//查询条件:姓名、部门、事由、禁闭时间(大于或者等于开始时间,小于或者等于结束时间)
|
|
|
|
|
queryWrapper.like(StrUtil.isNotBlank(param.getName()), "c1.name", StrUtil.trim(param.getName())) |
|
|
|
|
.like(StrUtil.isNotBlank(param.getMatter()), "c1.matter", StrUtil.trim(param.getMatter())); |
|
|
|
|
.or().like(StrUtil.isNotBlank(param.getMatter()), "c1.matter", StrUtil.trim(param.getMatter())); |
|
|
|
|
if (CollectionUtils.isNotEmpty(param.getConfinementTime())) { |
|
|
|
|
queryWrapper.le("c1.end_time", param.getConfinementTime().get(1)) |
|
|
|
|
.ge("c1.start_time", param.getConfinementTime().get(0)); |
|
|
|
|
@ -71,17 +71,12 @@ public class ConfinementService extends ServiceImpl<ConfinementMapper, Confineme
|
|
|
|
|
public Page<ConfinementVo> GetExportData(ConfinementQueryParam param){ |
|
|
|
|
QueryWrapper<Confinement> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
//查询条件:id、姓名、部门、事由、禁闭时间(大于或者等于开始时间,小于或者等于结束时间)
|
|
|
|
|
if(StrUtil.isNotEmpty(param.getId())){ |
|
|
|
|
queryWrapper.like(StrUtil.isBlank(param.getId()),"c1.id",StrUtil.trim(param.getId())); |
|
|
|
|
} |
|
|
|
|
if(StrUtil.isNotEmpty(param.getName())){ |
|
|
|
|
queryWrapper.like(StrUtil.isBlank(param.getName()), "c1.name", StrUtil.trim(param.getName())); |
|
|
|
|
} |
|
|
|
|
queryWrapper.like(StrUtil.isNotBlank(param.getId()),"c1.id",StrUtil.trim(param.getId())) |
|
|
|
|
.or().like(StrUtil.isNotBlank(param.getName()), "c1.name", StrUtil.trim(param.getName())); |
|
|
|
|
if(StrUtil.isNotEmpty(param.getMatter())){ |
|
|
|
|
queryWrapper.like(StrUtil.isBlank(param.getMatter()), "c1.matter", StrUtil.trim(param.getMatter())); |
|
|
|
|
queryWrapper.or().like(StrUtil.isBlank(param.getMatter()), "c1.matter", StrUtil.trim(param.getMatter())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(param.getConfinementTime())) { |
|
|
|
|
queryWrapper.le("c1.end_time", param.getConfinementTime().get(1)) |
|
|
|
|
.ge("c1.start_time", param.getConfinementTime().get(0)); |
|
|
|
|
@ -98,5 +93,6 @@ public class ConfinementService extends ServiceImpl<ConfinementMapper, Confineme
|
|
|
|
|
//todo 排序
|
|
|
|
|
|
|
|
|
|
return baseMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper); |
|
|
|
|
// return baseMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|