手动组装时显示物料库存
This commit is contained in:
parent
3eb5b1458f
commit
8641de0a3f
@ -42,6 +42,10 @@ public class MbbProduBom extends BaseEntity
|
||||
@Excel(name = "标准用量")
|
||||
private Integer standardDosage;
|
||||
|
||||
/** 标准用量 */
|
||||
@Excel(name = "当期库存")
|
||||
private Long currentInventory;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
@ -154,6 +158,14 @@ public class MbbProduBom extends BaseEntity
|
||||
return attr4;
|
||||
}
|
||||
|
||||
public Long getCurrentInventory() {
|
||||
return currentInventory;
|
||||
}
|
||||
|
||||
public void setCurrentInventory(Long currentInventory) {
|
||||
this.currentInventory = currentInventory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
@ -2,6 +2,7 @@ package com.ktg.mes.md.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.common.utils.DateUtils;
|
||||
import com.ktg.mes.md.mapper.BaseKnifeMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
@ -24,6 +25,9 @@ public class BomRouteServiceImpl implements IBomRouteService
|
||||
@Autowired
|
||||
private BomRouteMapper bomRouteMapper;
|
||||
|
||||
@Autowired
|
||||
private BaseKnifeMapper baseKnifeMapper;
|
||||
|
||||
/**
|
||||
* 查询BOM头
|
||||
*
|
||||
@ -33,7 +37,11 @@ public class BomRouteServiceImpl implements IBomRouteService
|
||||
@Override
|
||||
public BomRoute selectBomRouteByBomRouteId(Long bomRouteId)
|
||||
{
|
||||
return bomRouteMapper.selectBomRouteByBomRouteId(bomRouteId);
|
||||
BomRoute bomRoute = bomRouteMapper.selectBomRouteByBomRouteId(bomRouteId);
|
||||
bomRoute.getMbbProduBomList().forEach(item -> {
|
||||
item.setCurrentInventory(this.baseKnifeMapper.countBaseKnife(item.getMdItemId()));
|
||||
});
|
||||
return bomRoute;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user