Browse Source

Merge branch 'dev-V1.2' of http://146.56.199.25:3000/zhuibobo/EnforcementCode-2.0 into dev-V1.2

dev-V1.2
wangmingyong@163.com 2 weeks ago
parent
commit
9e27c11452
  1. 18
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EfcodeCpNoticeServiceImpl.java

18
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EfcodeCpNoticeServiceImpl.java

@ -115,10 +115,8 @@ public class EfcodeCpNoticeServiceImpl implements IEfcodeCpNoticeService {
@Override @Override
public TableDataInfo<EfcodeCpNoticeVo> entQueryMyPageList(EfcodeCpNoticeBo bo, PageQuery pageQuery) { public TableDataInfo<EfcodeCpNoticeVo> entQueryMyPageList(EfcodeCpNoticeBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<EfcodeCpNotice> lqw = buildQueryWrapper(bo); LambdaQueryWrapper<EfcodeCpNotice> lqw = buildQueryWrapper(bo);
lqw.eq(EfcodeCpNotice::getEnterpriseNumber,bo.getEnterpriseNumber()); // 企业端只查询已发布(待执法)的预告
lqw.eq(EfcodeCpNotice::getStatus, 1L); lqw.eq(EfcodeCpNotice::getStatus, 1L);
// 过滤已删除
lqw.eq(EfcodeCpNotice::getIsDelete, 0);
// 按创建时间倒序 // 按创建时间倒序
lqw.orderByDesc(EfcodeCpNotice::getCreateTime); lqw.orderByDesc(EfcodeCpNotice::getCreateTime);
Page<EfcodeCpNoticeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); Page<EfcodeCpNoticeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
@ -352,16 +350,18 @@ public class EfcodeCpNoticeServiceImpl implements IEfcodeCpNoticeService {
lqw.like(StringUtils.isNotBlank(bo.getBureauDeptName()), EfcodeCpNotice::getBureauDeptName, bo.getBureauDeptName()); lqw.like(StringUtils.isNotBlank(bo.getBureauDeptName()), EfcodeCpNotice::getBureauDeptName, bo.getBureauDeptName());
lqw.eq(StringUtils.isNotBlank(bo.getEnterpriseId()), EfcodeCpNotice::getEnterpriseId, bo.getEnterpriseId()); lqw.eq(StringUtils.isNotBlank(bo.getEnterpriseId()), EfcodeCpNotice::getEnterpriseId, bo.getEnterpriseId());
lqw.like(StringUtils.isNotBlank(bo.getEnterpriseName()), EfcodeCpNotice::getEnterpriseName, bo.getEnterpriseName()); lqw.like(StringUtils.isNotBlank(bo.getEnterpriseName()), EfcodeCpNotice::getEnterpriseName, bo.getEnterpriseName());
//企业统一信用代码(为空时不作为查询条件)
lqw.eq(StringUtils.isNotBlank(bo.getEnterpriseNumber()), EfcodeCpNotice::getEnterpriseNumber, bo.getEnterpriseNumber());
lqw.eq(bo.getStatus() != null, EfcodeCpNotice::getStatus, bo.getStatus()); lqw.eq(bo.getStatus() != null, EfcodeCpNotice::getStatus, bo.getStatus());
lqw.eq(bo.getIsDelete() != null, EfcodeCpNotice::getIsDelete, bo.getIsDelete()); // 过滤已删除
lqw.eq(EfcodeCpNotice::getIsDelete, 0);
// 搜索值(多字段模糊匹配) // 搜索值(多字段模糊匹配)
if (StringUtils.isNotBlank(bo.getSearchValue())) { if (StringUtils.isNotBlank(bo.getSearchValue())) {
String sv = bo.getSearchValue(); String sv = bo.getSearchValue();
lqw.and(wrapper -> wrapper lqw.and(wrapper -> wrapper
.like(StringUtils.isNotBlank(bo.getBureauDeptName()), EfcodeCpNotice::getBureauDeptName, sv) .like(EfcodeCpNotice::getBureauDeptName, sv)
.or().like(StringUtils.isNotBlank(bo.getEnterpriseName()), EfcodeCpNotice::getEnterpriseName, sv) .or().like(EfcodeCpNotice::getEnterpriseName, sv)
.or().like(StringUtils.isNotBlank(bo.getEnforceContent()), EfcodeCpNotice::getEnforceContent, sv) .or().like(EfcodeCpNotice::getEnforceContent, sv)
); );
} }
@ -395,6 +395,8 @@ public class EfcodeCpNoticeServiceImpl implements IEfcodeCpNoticeService {
lqw.apply("DATE_FORMAT(enforce_date, '%Y-%m') = {0}", bo.getDateSearch()); lqw.apply("DATE_FORMAT(enforce_date, '%Y-%m') = {0}", bo.getDateSearch());
} }
return lqw; return lqw;
} }

Loading…
Cancel
Save