|
|
|
|
@@ -1,11 +1,13 @@
|
|
|
|
|
package com.klp.service.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
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.toolkit.Wrappers;
|
|
|
|
|
import com.klp.common.utils.StringUtils;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.klp.domain.bo.WmsSchedulePlanDetailBo;
|
|
|
|
|
@@ -43,8 +45,8 @@ public class WmsSchedulePlanDetailServiceImpl implements IWmsSchedulePlanDetailS
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public TableDataInfo<WmsSchedulePlanDetailVo> queryPageList(WmsSchedulePlanDetailBo bo, PageQuery pageQuery) {
|
|
|
|
|
LambdaQueryWrapper<WmsSchedulePlanDetail> lqw = buildQueryWrapper(bo);
|
|
|
|
|
Page<WmsSchedulePlanDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
|
|
|
QueryWrapper<WmsSchedulePlanDetail> lqw = buildQueryWrapper(bo);
|
|
|
|
|
Page<WmsSchedulePlanDetailVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
|
|
|
|
return TableDataInfo.build(result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -53,19 +55,21 @@ public class WmsSchedulePlanDetailServiceImpl implements IWmsSchedulePlanDetailS
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<WmsSchedulePlanDetailVo> queryList(WmsSchedulePlanDetailBo bo) {
|
|
|
|
|
LambdaQueryWrapper<WmsSchedulePlanDetail> lqw = buildQueryWrapper(bo);
|
|
|
|
|
QueryWrapper<WmsSchedulePlanDetail> lqw = buildQueryWrapper(bo);
|
|
|
|
|
return baseMapper.selectVoList(lqw);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private LambdaQueryWrapper<WmsSchedulePlanDetail> buildQueryWrapper(WmsSchedulePlanDetailBo bo) {
|
|
|
|
|
private QueryWrapper<WmsSchedulePlanDetail> buildQueryWrapper(WmsSchedulePlanDetailBo bo) {
|
|
|
|
|
Map<String, Object> params = bo.getParams();
|
|
|
|
|
LambdaQueryWrapper<WmsSchedulePlanDetail> lqw = Wrappers.lambdaQuery();
|
|
|
|
|
lqw.eq(bo.getPlanId() != null, WmsSchedulePlanDetail::getPlanId, bo.getPlanId());
|
|
|
|
|
lqw.eq(bo.getLineId() != null, WmsSchedulePlanDetail::getLineId, bo.getLineId());
|
|
|
|
|
lqw.eq(bo.getProductId() != null, WmsSchedulePlanDetail::getProductId, bo.getProductId());
|
|
|
|
|
lqw.eq(bo.getQuantity() != null, WmsSchedulePlanDetail::getQuantity, bo.getQuantity());
|
|
|
|
|
lqw.eq(bo.getStartDate() != null, WmsSchedulePlanDetail::getStartDate, bo.getStartDate());
|
|
|
|
|
lqw.eq(bo.getEndDate() != null, WmsSchedulePlanDetail::getEndDate, bo.getEndDate());
|
|
|
|
|
QueryWrapper<WmsSchedulePlanDetail> lqw = Wrappers.query();
|
|
|
|
|
//联查需要取别名
|
|
|
|
|
lqw.eq("wspd.del_flag", 0);
|
|
|
|
|
lqw.eq( "wspd.plan_id", bo.getPlanId());
|
|
|
|
|
lqw.eq("wspd.line_id", bo.getLineId());
|
|
|
|
|
lqw.eq("wspd.product_id", bo.getProductId());
|
|
|
|
|
lqw.eq("wspd.quantity", bo.getQuantity());
|
|
|
|
|
lqw.eq("wspd.start_date", bo.getStartDate());
|
|
|
|
|
lqw.eq("wspd.end_date", bo.getEndDate());
|
|
|
|
|
return lqw;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|