update 物料BOM加单位显示

master
yinq 2 weeks ago
parent 3880c725fa
commit 116b21de45

@ -169,4 +169,6 @@ public class ProdMaterialBomVo implements Serializable {
private String materialTypeName;//join字段
private String unitName;//子物料单位
}

@ -79,7 +79,7 @@ public class BaseMaterialTypeServiceImpl implements IBaseMaterialTypeService {
.eq(StringUtils.isNotBlank(bo.getMaterialSubclass()), BaseMaterialType::getMaterialSubclass, bo.getMaterialSubclass())
.eq(bo.getProcessId() != null, BaseMaterialType::getProcessId, bo.getProcessId())
.eq(StringUtils.isNotBlank(bo.getActiveFlag()), BaseMaterialType::getActiveFlag, bo.getActiveFlag())
.orderByDesc(BaseMaterialType::getCreateTime);
.orderByAsc(BaseMaterialType::getCreateTime);
return lqw;
}

@ -235,7 +235,7 @@ public class ProdMaterialBomServiceImpl implements IProdMaterialBomService {
ProdMaterialBomVo topProdMaterialBomVo = new ProdMaterialBomVo();
topProdMaterialBomVo.setMaterialBomId(0L);
topProdMaterialBomVo.setMaterialName("生产BOM");
topProdMaterialBomVo.setMaterialTypeId(-1L);
topProdMaterialBomVo.setMaterialTypeId(1L);
prodMaterialBomVos.add(topProdMaterialBomVo);
List<Long> tempList = prodMaterialBomVos.stream().map(ProdMaterialBomVo::getMaterialBomId).collect(Collectors.toList());

@ -41,13 +41,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
pmb.standard_amount,
bmi.material_name,
bsb.material_type_id,
bmui.unit_name,
bmt.matrial_type_code as material_type_code,
bmt.matrial_type_name as material_type_name
from base_structure_bom bsb
left join prod_material_bom pmb on pmb.material_type_id = bsb.material_type_id and pmb.parent_id = #{parentId}
left join base_material_info bmi on pmb.material_id=bmi.material_id
left join base_material_type bmt on bsb.material_type_id = bmt.matrial_type_id
LEFT JOIN base_measurement_unit_info bmui ON bmui.unit_id = bmi.material_unit_id
<where>
<if test="materialTypeCode != null and materialTypeCode != ''">and bmt.matrial_type_code like concat('%', #{materialTypeCode},
'%')

Loading…
Cancel
Save