查询逻辑 联查name和code
This commit is contained in:
@@ -36,16 +36,25 @@ public class WmsStockVo {
|
||||
* 物品类型(raw_material/product)
|
||||
*/
|
||||
@ExcelProperty(value = "物品类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "r=aw_material/product")
|
||||
@ExcelDictFormat(readConverterExp = "raw_material/product")
|
||||
private String itemType;
|
||||
|
||||
/**
|
||||
* 物品ID(指向原材料或产品主键)
|
||||
*/
|
||||
@ExcelProperty(value = "物品ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "指=向原材料或产品主键")
|
||||
@ExcelDictFormat(readConverterExp = "指向原材料或产品主键")
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 物品名称(动态:产品或原材料)
|
||||
*/
|
||||
private String itemName;
|
||||
/**
|
||||
* 物品编码(动态:产品或原材料)
|
||||
*/
|
||||
private String itemCode;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
|
||||
@@ -4,6 +4,10 @@ import com.klp.domain.WmsStock;
|
||||
import com.klp.domain.vo.WmsStockVo;
|
||||
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.math.BigDecimal;
|
||||
|
||||
/**
|
||||
@@ -15,4 +19,9 @@ import java.math.BigDecimal;
|
||||
public interface WmsStockMapper extends BaseMapperPlus<WmsStockMapper, WmsStock, WmsStockVo> {
|
||||
|
||||
BigDecimal getStockByItemId(Long rawMaterialId);
|
||||
|
||||
/**
|
||||
* 分页联查物品名称和编码,支持Wrapper动态条件,返回Page<WmsStockVo>
|
||||
*/
|
||||
Page<WmsStockVo> selectVoPagePlus(Page<?> page, @Param("ew") Wrapper<WmsStock> wrapper);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class WmsStockServiceImpl implements IWmsStockService {
|
||||
@Override
|
||||
public TableDataInfo<WmsStockVo> queryPageList(WmsStockBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsStock> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsStockVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<WmsStockVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user