查子级
This commit is contained in:
parent
13371a7f20
commit
465d760d69
|
|
@ -24,6 +24,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
|
|
@ -34,7 +36,8 @@ public class ForwardReportService {
|
|||
|
||||
//原始BOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.ORIGINALBOM.getValue()) == 0) {
|
||||
return null;
|
||||
// OriginalBomForwardReport originalBomForwardReport = new OriginalBomForwardReport(query);
|
||||
return null;
|
||||
}
|
||||
|
||||
//EBOM
|
||||
|
|
@ -84,7 +87,7 @@ public class ForwardReportService {
|
|||
}
|
||||
//MBOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.MBOM.getValue()) == 0) {
|
||||
|
||||
return chilidMBomList(query);
|
||||
}
|
||||
|
||||
VUtils.isTure(true).throwMessage("错误的BOM类型");
|
||||
|
|
@ -194,6 +197,30 @@ public class ForwardReportService {
|
|||
return childBomLit;
|
||||
}
|
||||
|
||||
List<ForwardReportVO> chilidMBomList(ChildBomReportQuery query) {
|
||||
List<Long> rowIds=new ArrayList<>(Arrays.asList(query.getBomRowId())) ;
|
||||
List<BomNewMbomMiddleVO> list = SpringUtil.getBean(BomNewMbomParentService .class).getBaseMapper().getParentChild(rowIds,null);
|
||||
|
||||
for (BomNewMbomMiddleVO item:
|
||||
list) {
|
||||
Long bomRowId=item.getBomRowId();
|
||||
item.setRemark(item.getBomMaterialNo());
|
||||
item.setBomRowId(item.getBomVersionRowId());
|
||||
|
||||
if (item.getParentRowId().longValue() == 0l) {
|
||||
item.setParentRowId(bomRowId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
List<ForwardReportVO> childBomLit = Convert.convert(
|
||||
new TypeReference<List<ForwardReportVO>>() {
|
||||
|
||||
}, list);
|
||||
return childBomLit;
|
||||
}
|
||||
|
||||
|
||||
List<ForwardReportVO> chilidOriginalBomList(ChildBomReportQuery query) {
|
||||
List<BomOriginalListVO> list = SpringUtil.getBean(BomNewOriginalParentService .class).getBaseMapper().getParentChild(query.getBomRowId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue