Merge branch '0.8.X' of https://gitee.com/hdka/klp-oa into 0.8.X
This commit is contained in:
@@ -56,5 +56,22 @@ public class WmsProductBomVo {
|
|||||||
@ExcelProperty(value = "备注")
|
@ExcelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名称
|
||||||
|
*/
|
||||||
|
private String productName;
|
||||||
|
/**
|
||||||
|
* 产品编码
|
||||||
|
*/
|
||||||
|
private String productCode;
|
||||||
|
/**
|
||||||
|
* 原材料名称
|
||||||
|
*/
|
||||||
|
private String rawMaterialName;
|
||||||
|
/**
|
||||||
|
* 原材料编码
|
||||||
|
*/
|
||||||
|
private String rawMaterialCode;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ package com.klp.mapper;
|
|||||||
import com.klp.domain.WmsProductBom;
|
import com.klp.domain.WmsProductBom;
|
||||||
import com.klp.domain.vo.WmsProductBomVo;
|
import com.klp.domain.vo.WmsProductBomVo;
|
||||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
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;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -15,4 +18,9 @@ import java.util.List;
|
|||||||
public interface WmsProductBomMapper extends BaseMapperPlus<WmsProductBomMapper, WmsProductBom, WmsProductBomVo> {
|
public interface WmsProductBomMapper extends BaseMapperPlus<WmsProductBomMapper, WmsProductBom, WmsProductBomVo> {
|
||||||
|
|
||||||
List<WmsProductBom> listByProductId(Long productId);
|
List<WmsProductBom> listByProductId(Long productId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页联查产品和原材料名称编码,支持Wrapper动态条件,返回Page<WmsProductBomVo>
|
||||||
|
*/
|
||||||
|
Page<WmsProductBomVo> selectVoPagePlus(Page<?> page, @Param("ew") Wrapper<WmsProductBom> wrapper);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class WmsProductBomServiceImpl implements IWmsProductBomService {
|
|||||||
@Override
|
@Override
|
||||||
public TableDataInfo<WmsProductBomVo> queryPageList(WmsProductBomBo bo, PageQuery pageQuery) {
|
public TableDataInfo<WmsProductBomVo> queryPageList(WmsProductBomBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<WmsProductBom> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<WmsProductBom> lqw = buildQueryWrapper(bo);
|
||||||
Page<WmsProductBomVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<WmsProductBomVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,5 +20,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
and del_flag = 0
|
and del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 分页联查产品和原材料名称编码,支持Wrapper动态条件,返回Page<WmsProductBomVo> -->
|
||||||
|
<select id="selectVoPagePlus" resultType="com.klp.domain.vo.WmsProductBomVo">
|
||||||
|
SELECT
|
||||||
|
b.*,
|
||||||
|
p.product_name AS productName,
|
||||||
|
p.product_code AS productCode,
|
||||||
|
r.raw_material_name AS rawMaterialName,
|
||||||
|
r.raw_material_code AS rawMaterialCode
|
||||||
|
FROM wms_product_bom b
|
||||||
|
LEFT JOIN wms_product p ON b.product_id = p.product_id
|
||||||
|
LEFT JOIN wms_raw_material r ON b.raw_material_id = r.raw_material_id
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user