实用工具bug修复
This commit is contained in:
@ -9,6 +9,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 实用工具业务对象 bus_sygj
|
||||
*
|
||||
@ -63,5 +65,10 @@ public class BusSygjBo extends BaseEntity {
|
||||
*/
|
||||
private String gnms;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private List<Long> collect;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -9,6 +9,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件中心业务对象 bus_wjzx
|
||||
*
|
||||
@ -56,5 +58,7 @@ public class BusWjzxBo extends BaseEntity {
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
private List<Long> collect;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -34,7 +34,8 @@ public interface IBusWjzxService extends IService<BusWjzx>{
|
||||
* @param pageQuery 分页参数
|
||||
* @return 文件中心分页列表
|
||||
*/
|
||||
TableDataInfo<BusWjzxVo> queryPageList(BusWjzxBo bo, PageQuery pageQuery); /**
|
||||
TableDataInfo<BusWjzxVo> queryPageList(BusWjzxBo bo, PageQuery pageQuery);
|
||||
/**
|
||||
* 分页查询文件中心列表
|
||||
*
|
||||
* @return 文件中心分页列表
|
||||
|
||||
@ -16,6 +16,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.project.domain.BusProjectDept;
|
||||
import org.dromara.project.mapper.BusProjectDeptMapper;
|
||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -28,6 +30,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 实用工具Service业务层处理
|
||||
@ -44,6 +48,8 @@ public class BusSygjServiceImpl extends ServiceImpl<BusSygjMapper, BusSygj> impl
|
||||
|
||||
private final SysOssServiceImpl sysOssService;
|
||||
|
||||
private final BusProjectDeptMapper busProjectDeptMapper;
|
||||
|
||||
/**
|
||||
* 查询实用工具
|
||||
*
|
||||
@ -64,6 +70,12 @@ public class BusSygjServiceImpl extends ServiceImpl<BusSygjMapper, BusSygj> impl
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusSygjVo> queryPageList(BusSygjBo bo, PageQuery pageQuery) {
|
||||
// 查询改项目下的公司
|
||||
if (bo.getProjectId() == null)throw new RuntimeException("项目id不能为空");
|
||||
BusProjectDept busProjectDept = busProjectDeptMapper.selectOne(new LambdaQueryWrapper<BusProjectDept>().eq(BusProjectDept::getProjectId, bo.getProjectId()));
|
||||
List<BusProjectDept> busProjectDepts = busProjectDeptMapper.selectList(new LambdaQueryWrapper<BusProjectDept>().eq(BusProjectDept::getDeptId, busProjectDept.getDeptId()));
|
||||
List<Long> collect = busProjectDepts.stream().map(BusProjectDept::getProjectId).collect(Collectors.toList());
|
||||
bo.setCollect(collect);
|
||||
LambdaQueryWrapper<BusSygj> lqw = buildQueryWrapper(bo);
|
||||
Page<BusSygjVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
@ -90,7 +102,8 @@ public class BusSygjServiceImpl extends ServiceImpl<BusSygjMapper, BusSygj> impl
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), BusSygj::getAuditStatus, bo.getAuditStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getType()), BusSygj::getType, bo.getType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getGnms()), BusSygj::getGnms, bo.getGnms());
|
||||
lqw.eq(bo.getProjectId() != null , BusSygj::getProjectId, bo.getProjectId());
|
||||
// lqw.eq(bo.getProjectId() != null , BusSygj::getProjectId, bo.getProjectId());
|
||||
lqw.in(bo.getCollect() != null , BusSygj::getProjectId, bo.getCollect());
|
||||
lqw.eq(bo.getCreateBy() != null, BusSygj::getCreateBy, bo.getCreateBy());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.bigscreen.domain.BusSygj;
|
||||
import org.dromara.bigscreen.domain.BusWjzx;
|
||||
import org.dromara.bigscreen.domain.dto.BusWjzxBo;
|
||||
import org.dromara.bigscreen.domain.vo.BusWjzxSjDateVo;
|
||||
@ -19,6 +20,8 @@ import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.domain.BusProjectDept;
|
||||
import org.dromara.project.mapper.BusProjectDeptMapper;
|
||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -28,6 +31,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 文件中心Service业务层处理
|
||||
@ -44,6 +48,8 @@ public class BusWjzxServiceImpl extends ServiceImpl<BusWjzxMapper, BusWjzx> impl
|
||||
|
||||
private final SysOssServiceImpl sysOssService;
|
||||
|
||||
private final BusProjectDeptMapper busProjectDeptMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询文件中心
|
||||
@ -65,6 +71,13 @@ public class BusWjzxServiceImpl extends ServiceImpl<BusWjzxMapper, BusWjzx> impl
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusWjzxVo> queryPageList(BusWjzxBo bo, PageQuery pageQuery) {
|
||||
// 查询改项目下的公司
|
||||
if (bo.getProjectId() == null)throw new RuntimeException("项目id不能为空");
|
||||
BusProjectDept busProjectDept = busProjectDeptMapper.selectOne(new LambdaQueryWrapper<BusProjectDept>().eq(BusProjectDept::getProjectId, bo.getProjectId()));
|
||||
List<BusProjectDept> busProjectDepts = busProjectDeptMapper.selectList(new LambdaQueryWrapper<BusProjectDept>().eq(BusProjectDept::getDeptId, busProjectDept.getDeptId()));
|
||||
List<Long> collect = busProjectDepts.stream().map(BusProjectDept::getProjectId).collect(Collectors.toList());
|
||||
bo.setCollect(collect);
|
||||
|
||||
LambdaQueryWrapper<BusWjzx> lqw = buildQueryWrapper(bo);
|
||||
Page<BusWjzxVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
@ -98,7 +111,8 @@ public class BusWjzxServiceImpl extends ServiceImpl<BusWjzxMapper, BusWjzx> impl
|
||||
LambdaQueryWrapper<BusWjzx> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(BusWjzx::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getWjm()), BusWjzx::getWjm, bo.getWjm());
|
||||
lqw.eq(bo.getProjectId() != null, BusWjzx::getProjectId, bo.getProjectId());
|
||||
// lqw.eq(bo.getProjectId() != null, BusWjzx::getProjectId, bo.getProjectId());
|
||||
lqw.in(bo.getCollect() != null , BusWjzx::getProjectId, bo.getCollect());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), BusWjzx::getAuditStatus, bo.getAuditStatus());
|
||||
lqw.eq(bo.getCreateBy() != null, BusWjzx::getCreateBy, bo.getCreateBy());
|
||||
return lqw;
|
||||
|
||||
Reference in New Issue
Block a user