联查name和code
This commit is contained in:
@@ -56,5 +56,16 @@ public class WmsOrderDetailVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@ExcelProperty(value = "产品名称")
|
||||
private String productName;
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
@ExcelProperty(value = "产品编码")
|
||||
private String productCode;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -68,5 +68,10 @@ public class WmsPurchasePlanDetailVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty(value = "原材料名称")
|
||||
private String rawMaterialName;
|
||||
@ExcelProperty(value = "原材料编码")
|
||||
private String rawMaterialCode;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ package com.klp.mapper;
|
||||
import com.klp.domain.WmsOrderDetail;
|
||||
import com.klp.domain.vo.WmsOrderDetailVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -18,4 +21,8 @@ public interface WmsOrderDetailMapper extends BaseMapperPlus<WmsOrderDetailMappe
|
||||
*/
|
||||
List<WmsOrderDetailVo> selectVoListByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 分页联查产品名称和编码,支持Wrapper动态条件,返回Page<WmsOrderDetailVo>
|
||||
*/
|
||||
Page<WmsOrderDetailVo> selectVoPagePlus(Page<?> page, @Param("ew") Wrapper<WmsOrderDetail> wrapper);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.klp.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.klp.domain.WmsPurchasePlanDetail;
|
||||
import com.klp.domain.vo.WmsPurchasePlanDetailVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
@@ -12,4 +14,5 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface WmsPurchasePlanDetailMapper extends BaseMapperPlus<WmsPurchasePlanDetailMapper, WmsPurchasePlanDetail, WmsPurchasePlanDetailVo> {
|
||||
|
||||
Page<WmsPurchasePlanDetailVo> selectVoPagePlus(Page<Object> build, LambdaQueryWrapper<WmsPurchasePlanDetail> lqw);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class WmsOrderDetailServiceImpl implements IWmsOrderDetailService {
|
||||
@Override
|
||||
public TableDataInfo<WmsOrderDetailVo> queryPageList(WmsOrderDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsOrderDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsOrderDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<WmsOrderDetailVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class WmsPurchasePlanDetailServiceImpl implements IWmsPurchasePlanDetailS
|
||||
@Override
|
||||
public TableDataInfo<WmsPurchasePlanDetailVo> queryPageList(WmsPurchasePlanDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsPurchasePlanDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsPurchasePlanDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<WmsPurchasePlanDetailVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class WmsPurchasePlanDetailServiceImpl implements IWmsPurchasePlanDetailS
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(WmsPurchasePlanDetailBo bo) {
|
||||
|
||||
|
||||
WmsPurchasePlanDetail add = BeanUtil.toBean(bo, WmsPurchasePlanDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
|
||||
Reference in New Issue
Block a user