修改bug
This commit is contained in:
@@ -5,6 +5,7 @@ import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -44,8 +45,8 @@ public class WmsPurchasePlanDetailServiceImpl implements IWmsPurchasePlanDetailS
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsPurchasePlanDetailVo> queryPageList(WmsPurchasePlanDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsPurchasePlanDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsPurchasePlanDetailVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
QueryWrapper<WmsPurchasePlanDetail> qw = buildQueryWrapper(bo);
|
||||
Page<WmsPurchasePlanDetailVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), qw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -54,19 +55,19 @@ public class WmsPurchasePlanDetailServiceImpl implements IWmsPurchasePlanDetailS
|
||||
*/
|
||||
@Override
|
||||
public List<WmsPurchasePlanDetailVo> queryList(WmsPurchasePlanDetailBo bo) {
|
||||
LambdaQueryWrapper<WmsPurchasePlanDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
QueryWrapper<WmsPurchasePlanDetail> qw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(qw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<WmsPurchasePlanDetail> buildQueryWrapper(WmsPurchasePlanDetailBo bo) {
|
||||
private QueryWrapper<WmsPurchasePlanDetail> buildQueryWrapper(WmsPurchasePlanDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<WmsPurchasePlanDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getPlanId() != null, WmsPurchasePlanDetail::getPlanId, bo.getPlanId());
|
||||
lqw.eq(bo.getRawMaterialId() != null, WmsPurchasePlanDetail::getRawMaterialId, bo.getRawMaterialId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOwner()), WmsPurchasePlanDetail::getOwner, bo.getOwner());
|
||||
lqw.eq(bo.getQuantity() != null, WmsPurchasePlanDetail::getQuantity, bo.getQuantity());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), WmsPurchasePlanDetail::getUnit, bo.getUnit());
|
||||
return lqw;
|
||||
QueryWrapper<WmsPurchasePlanDetail> qw = new QueryWrapper<>();
|
||||
qw.eq(bo.getPlanId() != null, "wpd.plan_id", bo.getPlanId());
|
||||
qw.eq(bo.getRawMaterialId() != null, "wpd.raw_material_id", bo.getRawMaterialId());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getOwner()), "wpd.owner", bo.getOwner());
|
||||
qw.eq(bo.getQuantity() != null, "wpd.quantity", bo.getQuantity());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getUnit()), "wpd.unit", bo.getUnit());
|
||||
return qw;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user