|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.os.mes.prod.service.impl;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import com.os.common.exception.base.BaseException;
|
|
|
|
@ -51,16 +52,18 @@ public class ProdBomInfoServiceImpl implements IProdBomInfoService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<ProdBomInfo> selectProductionBomTreeList(ProdBomInfo prodBomInfo) {
|
|
|
|
|
List<ProdBomInfo> prodBomInfos = prodBomInfoMapper.selectProdBomInfoList(prodBomInfo);
|
|
|
|
|
List<ProdBomInfo> prodBomInfoList = new ArrayList<>();
|
|
|
|
|
ProdBomInfo info = prodBomInfoMapper.selectProdBomInfoByObjId(prodBomInfo.getObjId());
|
|
|
|
|
prodBomInfoList.add(info);
|
|
|
|
|
try {
|
|
|
|
|
ProdBomInfo bomInfo = new ProdBomInfo();
|
|
|
|
|
bomInfo.setAncestors(prodBomInfos.get(0).getObjId().toString());
|
|
|
|
|
bomInfo.setAncestors(info.getObjId().toString());
|
|
|
|
|
List<ProdBomInfo> infos = prodBomInfoMapper.selectProdBomInfoList(bomInfo);
|
|
|
|
|
prodBomInfos.addAll(infos);
|
|
|
|
|
prodBomInfoList.addAll(infos);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
return prodBomInfos;
|
|
|
|
|
return prodBomInfoList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|