报表调整
This commit is contained in:
parent
0bb6ecfa72
commit
3ad6f0c785
|
|
@ -156,14 +156,15 @@ public class BomReportApi extends BaseApi {
|
|||
|
||||
@PostMapping("forwardExport")
|
||||
@ApiOperation("bom-正查导出")
|
||||
public void export(@RequestBody ReverseReportQuery query, HttpServletResponse response) throws IOException {
|
||||
public void forwardExport(@RequestBody ReverseReportQuery query, HttpServletResponse response) throws IOException {
|
||||
|
||||
ResultVO resultVO = checkQueryParam(query);
|
||||
if (resultVO != null) {
|
||||
VUtils.isTure( true ).throwMessage(resultVO.getMsg());
|
||||
}
|
||||
|
||||
forwardReportService.exportBom(query,response);
|
||||
EecExcelUtil.setResponseExcelHeader(response, "Bom查看列表");
|
||||
forwardReportService.bomExport(query,response.getOutputStream());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,16 +25,16 @@ public class ForwardReportExcelVO {
|
|||
}
|
||||
|
||||
|
||||
@ExcelColumn("序号")
|
||||
// @ExcelColumn("序号")
|
||||
private String orderNumber;
|
||||
|
||||
@ExcelColumn("层级")
|
||||
private Integer levelNum;
|
||||
|
||||
public String getlevelNum(){
|
||||
return StrUtil.repeat(".",levelNum)+levelNum;
|
||||
|
||||
}
|
||||
// public String getlevelNum(){
|
||||
// return StrUtil.repeat(".",levelNum)+levelNum;
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
@ExcelColumn(value = "版本号")
|
||||
|
|
@ -47,6 +47,8 @@ public class ForwardReportExcelVO {
|
|||
@ExcelColumn("物料编码")
|
||||
private String materialNo;
|
||||
|
||||
@ExcelColumn("物料类别")
|
||||
private String categoryName;
|
||||
|
||||
@ExcelColumn("图号")
|
||||
private String drawingNo;
|
||||
|
|
@ -55,20 +57,17 @@ public class ForwardReportExcelVO {
|
|||
|
||||
|
||||
@ExcelColumn(value = "项目类别")
|
||||
|
||||
private String projectType;
|
||||
@ExcelColumn( "数量")
|
||||
private BigDecimal num;
|
||||
@ExcelColumn("单重")
|
||||
private BigDecimal unitWeight;
|
||||
|
||||
|
||||
|
||||
@ExcelColumn("单位")
|
||||
private String materialUnit;
|
||||
|
||||
|
||||
@ExcelColumn("总重")
|
||||
// @ExcelColumn("总重")
|
||||
private BigDecimal totalWeight;
|
||||
|
||||
|
||||
|
|
@ -82,9 +81,9 @@ public class ForwardReportExcelVO {
|
|||
private String deviseName;
|
||||
|
||||
//设计维护部门名称
|
||||
@ExcelColumn("设计维护部门")
|
||||
// @ExcelColumn("设计维护部门")
|
||||
private String deptName;
|
||||
@ExcelColumn("是否有BOM")
|
||||
// @ExcelColumn("是否有BOM")
|
||||
private String childBomStatus;
|
||||
|
||||
public String getChildBomStatus(){
|
||||
|
|
|
|||
|
|
@ -54,9 +54,23 @@ public class ForwardReportVO extends BaseMaterialVO {
|
|||
@ApiModelProperty(value = "数量")
|
||||
private BigDecimal num;
|
||||
|
||||
/**
|
||||
* 单重
|
||||
*/
|
||||
@ApiModelProperty(value = "单重")
|
||||
private BigDecimal unitWeight;
|
||||
|
||||
/**
|
||||
* 总重
|
||||
*/
|
||||
@ApiModelProperty(value = "总重")
|
||||
private BigDecimal totalWeight;
|
||||
|
||||
@ApiModelProperty(value = "创建人编码")
|
||||
private String createdBy;
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String deviseName;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "创建时间-有效开始时间")
|
||||
private LocalDateTime createdTime;
|
||||
|
|
|
|||
|
|
@ -120,34 +120,43 @@ public class ForwardReportService {
|
|||
}
|
||||
|
||||
|
||||
public void exportBom(ReverseReportQuery query,HttpServletResponse response) throws IOException {
|
||||
public void bomExport(ReverseReportQuery query,OutputStream outputStream) throws IOException {
|
||||
|
||||
//原始BOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.ORIGINALBOM.getValue()) == 0) {
|
||||
OriginalBomForwardReport originalBomForwardReport=new OriginalBomForwardReport(query);
|
||||
ReportBomVO reportBomVO = originalBomForwardReport.genReport();
|
||||
EecExcelUtil.setResponseExcelHeader(response, "原始BOM查看列表");
|
||||
exportExcel(reportBomVO.getChildNodes(),response.getOutputStream());
|
||||
|
||||
exportExcel(reportBomVO.getChildNodes(),outputStream);
|
||||
return;
|
||||
}
|
||||
|
||||
//EBOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.EBOM.getValue()) == 0) {
|
||||
EBomForwardReport eBomForwardReport = new EBomForwardReport(query);
|
||||
ReportBomVO reportBomVO = eBomForwardReport.genReport();
|
||||
EecExcelUtil.setResponseExcelHeader(response, "EBOM查看列表");
|
||||
exportExcel(reportBomVO.getChildNodes(),response.getOutputStream());
|
||||
|
||||
exportExcel(reportBomVO.getChildNodes(),outputStream);
|
||||
return;
|
||||
}
|
||||
|
||||
//PBOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.PBOM.getValue()) == 0) {
|
||||
PBomForwardReport pBomForwardReport=new PBomForwardReport(query);
|
||||
ReportBomVO reportBomVO = pBomForwardReport.genReport();
|
||||
EecExcelUtil.setResponseExcelHeader(response, "PBOM查看列表");
|
||||
exportExcel(reportBomVO.getChildNodes(),response.getOutputStream());
|
||||
|
||||
exportExcel(reportBomVO.getChildNodes(),outputStream);
|
||||
|
||||
return;
|
||||
}
|
||||
//MBOM
|
||||
if (query.getBomType().compareTo(ReportConstant.BomTypeEnum.MBOM.getValue()) == 0) {
|
||||
MBomForwardReport mBomForwardReport=new MBomForwardReport(query);
|
||||
|
||||
ReportBomVO reportBomVO = mBomForwardReport.genReport();
|
||||
|
||||
exportExcel(reportBomVO.getChildNodes(),outputStream);
|
||||
return;
|
||||
}
|
||||
|
||||
VUtils.isTure(true).throwMessage("错误的BOM类型");
|
||||
|
|
@ -156,16 +165,19 @@ public class ForwardReportService {
|
|||
}
|
||||
public void exportExcel( List<ForwardReportVO> list,OutputStream outputStream) throws IOException {
|
||||
|
||||
final ListSheet<ForwardReportExcelVO> listSheet = new ListSheet<ForwardReportExcelVO>() {
|
||||
Long n = 0L;
|
||||
Long pages = 1L;
|
||||
|
||||
@Override
|
||||
protected List<ForwardReportExcelVO> more() {
|
||||
return n++ < pages ? Convert.convert(new TypeReference<List<ForwardReportExcelVO>>() {
|
||||
}, list) : null;
|
||||
}
|
||||
};
|
||||
// final ListSheet<ForwardReportExcelVO> listSheet = new ListSheet<ForwardReportExcelVO>() {
|
||||
// Long n = 0L;
|
||||
// Long pages = 1L;
|
||||
//
|
||||
// @Override
|
||||
// protected List<ForwardReportExcelVO> more() {
|
||||
// return n++ < pages ? Convert.convert(new TypeReference<List<ForwardReportExcelVO>>() {
|
||||
// }, list) : null;
|
||||
// }
|
||||
// };
|
||||
List<ForwardReportExcelVO> exportList= Convert.convert( new TypeReference<List<ForwardReportExcelVO>>() {
|
||||
}, list);
|
||||
ListSheet<ForwardReportExcelVO> listSheet=new ListSheet<>(exportList);
|
||||
EecExcelUtil.eecExcel("BOM查看列表", listSheet, outputStream);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ public class MaterialMainService extends ServiceImpl<MaterialMainMapper, Materia
|
|||
public <T> void intiMaterialInfo(List<T> data, Function<T, String> getMaterialFun,String ... ignorePropertyList) {
|
||||
List<String> materialNos = data.stream().filter(u -> StrUtil.isNotBlank(getMaterialFun.apply(u))).map(u -> getMaterialFun.apply(u)).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(materialNos)) {
|
||||
|
||||
List<BaseMaterialVO> materialBaseInfos = SpringUtil.getBean(MaterialMainService.class).getMaterialBaseInfo(materialNos);
|
||||
Map<String, BaseMaterialVO> materialMp = ListCommonUtil.listToMap(materialBaseInfos, BaseMaterialVO::getMaterialNo);
|
||||
for (T t : data) {
|
||||
|
|
@ -184,7 +185,19 @@ public class MaterialMainService extends ServiceImpl<MaterialMainMapper, Materia
|
|||
}
|
||||
}
|
||||
}
|
||||
public <T> void intiMaterialInfoDrawingNo(List<T> data, Function<T, String> getMaterialFun,String ... ignorePropertyList) {
|
||||
List<String> materialNos = data.stream().filter(u -> StrUtil.isNotBlank(getMaterialFun.apply(u))).map(u -> getMaterialFun.apply(u)).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(materialNos)) {
|
||||
|
||||
List<BaseMaterialVO> materialBaseInfos = SpringUtil.getBean(MaterialMainMapper.class).getMaterialByAnyNo(materialNos);
|
||||
Map<String, BaseMaterialVO> materialMp = ListCommonUtil.listToMap(materialBaseInfos, BaseMaterialVO::getDrawingNo);
|
||||
for (T t : data) {
|
||||
if (StrUtil.isNotBlank(getMaterialFun.apply(t)) && materialMp.containsKey(getMaterialFun.apply(t))) {
|
||||
BeanUtil.copyProperties(materialMp.get(getMaterialFun.apply(t)), t,ignorePropertyList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过图号初始化BOM信息
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class EBomFormalTreeTask extends RecursiveTask<List<BomNewEbomParentForma
|
|||
BomNewEbomParentFormalEntity ebomParentEntity = parentEntityMap.get(detailVO.getBomRowId());
|
||||
detailVO.setChildBomRowId(ebomParentEntity.getRowId());
|
||||
detailVO.setCreatedTime(ebomParentEntity.getCreatedTime());
|
||||
// detailVO.setBomRowId(ebomParentEntity.getRowId());
|
||||
|
||||
detailVO.setSourceRowId(ebomParentEntity.getSourceRowId());
|
||||
detailVO.setCurrentVersion(ebomParentEntity.getCurrentVersion());
|
||||
detailVO.setDeviseUserCode(ebomParentEntity.getDeviseUserCode());
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import cn.hutool.extra.spring.SpringUtil;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||
import com.nflg.product.bomnew.constant.EBomConstant;
|
||||
import com.nflg.product.bomnew.constant.ReportConstant;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentFormalEntity;
|
||||
|
|
@ -17,6 +18,7 @@ import com.nflg.product.bomnew.pojo.query.ReverseReportQuery;
|
|||
import com.nflg.product.bomnew.pojo.vo.*;
|
||||
import com.nflg.product.bomnew.service.BomNewEbomChildFormalService;
|
||||
import com.nflg.product.bomnew.service.BomNewEbomParentFormalService;
|
||||
import com.nflg.product.bomnew.service.MaterialMainService;
|
||||
import com.nflg.product.bomnew.service.domain.BaseForwardReport;
|
||||
import com.nflg.product.bomnew.util.ListCommonUtil;
|
||||
import com.nflg.product.bomnew.util.VersionUtil;
|
||||
|
|
@ -105,12 +107,9 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
ForwardReportVO forwardReportVO = Convert.convert(ForwardReportVO.class, parentFormal);
|
||||
forwardReportVO.setCreatedTime(parentFormal.getConvertToEbomTime());
|
||||
|
||||
// QueryWrapper<BomNewEbomChildFormalEntity> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.lambda().eq(BomNewEbomChildFormalEntity::getParentRowId, parentFormal.getRowId());
|
||||
//
|
||||
// List<BomNewEbomChildFormalEntity> list = SpringUtil.getBean(BomNewEbomChildFormalService.class).list(queryWrapper);
|
||||
//
|
||||
|
||||
List<BomNewEbomParentFormalVO> list = SpringUtil.getBean(BomNewEbomParentFormalService.class).getBaseMapper().getParentChild(parentFormal.getRowId());
|
||||
initMaterialInfo(list);
|
||||
List<ForwardReportVO> nodeList = null;
|
||||
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
|
|
@ -123,7 +122,10 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
vo.setCreatedTime(forwardReportVO.getCreatedTime());
|
||||
vo.setLevelNum(1);
|
||||
vo.setOrderNumber(orderNum.incrementAndGet() + "");
|
||||
// vo.setOrderNumber("");
|
||||
vo.setDeviseName(forwardReportVO.getDeviseName());
|
||||
vo.setCurrentVersion(forwardReportVO.getCurrentVersion());
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Collections.sort(nodeList, (option0, option1) -> option0.getOrderNumber().compareTo(option1.getOrderNumber()));
|
||||
|
|
@ -181,9 +183,13 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
ForkJoinTask<List<BomNewEbomParentFormalVO>> submit = pool.submit(task);
|
||||
|
||||
List<BomNewEbomParentFormalVO> bomList = submit.join();
|
||||
initMaterialInfo(bomList);
|
||||
return bomList;
|
||||
}
|
||||
void initMaterialInfo( List<BomNewEbomParentFormalVO> list){
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(list,BomNewEbomParentFormalVO::getMaterialNo, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT2);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 多层
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import cn.hutool.core.util.StrUtil;
|
|||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||
import com.nflg.product.bomnew.constant.EBomConstant;
|
||||
import com.nflg.product.bomnew.constant.MaterialMainConstant;
|
||||
import com.nflg.product.bomnew.constant.ReportConstant;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
|
||||
|
|
@ -17,13 +18,11 @@ import com.nflg.product.bomnew.pojo.entity.BomNewMbomDetailEntity;
|
|||
import com.nflg.product.bomnew.pojo.entity.BomNewMbomParentEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.query.ReverseReportQuery;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.ForwardReportVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.ReportBomVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.ReportBomVersionVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.*;
|
||||
import com.nflg.product.bomnew.service.BomNewMbomDetailService;
|
||||
import com.nflg.product.bomnew.service.BomNewMbomParentService;
|
||||
import com.nflg.product.bomnew.service.BomNewPbomParentFormalService;
|
||||
import com.nflg.product.bomnew.service.MaterialMainService;
|
||||
import com.nflg.product.bomnew.service.domain.BaseForwardReport;
|
||||
import nflg.product.common.constant.STATE;
|
||||
|
||||
|
|
@ -177,6 +176,7 @@ public class MBomForwardReport extends BaseForwardReport {
|
|||
while (!rowIdList.isEmpty()) {
|
||||
List<BomNewMbomMiddleVO> childList = SpringUtil.getBean(BomNewMbomParentService.class).getBaseMapper().getParentChild(rowIdList, bomRowId);
|
||||
rowIdList.clear();
|
||||
initMaterialInfo(childList);
|
||||
if (CollUtil.isNotEmpty(childList)) {
|
||||
reportVOList.addAll(convertToReportData(childList, levelNum));
|
||||
levelNum++;
|
||||
|
|
@ -218,7 +218,9 @@ public class MBomForwardReport extends BaseForwardReport {
|
|||
|
||||
}
|
||||
|
||||
|
||||
void initMaterialInfo( List<BomNewMbomMiddleVO> list){
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(list,BomNewMbomMiddleVO::getMaterialNo, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT2);
|
||||
}
|
||||
/**
|
||||
* 单层
|
||||
*
|
||||
|
|
@ -237,6 +239,9 @@ public class MBomForwardReport extends BaseForwardReport {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 汇总
|
||||
* @return
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
|
|||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||
import com.nflg.product.bomnew.constant.EBomConstant;
|
||||
import com.nflg.product.bomnew.constant.OriginalStatusEnum;
|
||||
import com.nflg.product.bomnew.constant.ReportConstant;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentFormalEntity;
|
||||
|
|
@ -15,6 +16,7 @@ import com.nflg.product.bomnew.pojo.query.ReverseReportQuery;
|
|||
import com.nflg.product.bomnew.pojo.vo.*;
|
||||
import com.nflg.product.bomnew.service.BomNewEbomParentFormalService;
|
||||
import com.nflg.product.bomnew.service.BomNewOriginalParentService;
|
||||
import com.nflg.product.bomnew.service.MaterialMainService;
|
||||
import com.nflg.product.bomnew.service.domain.BaseForwardReport;
|
||||
import com.nflg.product.bomnew.service.domain.EBom.EBomFormalTreeTask;
|
||||
import com.nflg.product.bomnew.util.VersionUtil;
|
||||
|
|
@ -94,6 +96,7 @@ public class OriginalBomForwardReport extends BaseForwardReport {
|
|||
// List<BomNewEbomChildFormalEntity> list = SpringUtil.getBean(BomNewEbomChildFormalService.class).list(queryWrapper);
|
||||
//
|
||||
List<BomOriginalListVO> list = SpringUtil.getBean(BomNewOriginalParentService.class).getBaseMapper().getParentChild(parentFormal.getRowId());
|
||||
initMaterialInfo(list);
|
||||
List<ForwardReportVO> nodeList=null;
|
||||
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
|
|
@ -104,8 +107,10 @@ public class OriginalBomForwardReport extends BaseForwardReport {
|
|||
nodeList) {
|
||||
vo.setCreatedTime(parentFormal.getConvertToEbomTime());
|
||||
vo.setLevelNum(1);
|
||||
vo.setCurrentVersion(parentFormal.getCurrentVersion());
|
||||
vo.setDeviseName(parentFormal.getDeviseName());
|
||||
vo.setOrderNumber(noNum+"");noNum++;
|
||||
// vo.setOrderNumber("");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -115,6 +120,12 @@ public class OriginalBomForwardReport extends BaseForwardReport {
|
|||
|
||||
|
||||
|
||||
void initMaterialInfo( List<BomOriginalListVO> list){
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfoDrawingNo(list,BomOriginalListVO::getDrawingNo, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* bomid下所有数据
|
||||
*
|
||||
|
|
@ -127,6 +138,7 @@ public class OriginalBomForwardReport extends BaseForwardReport {
|
|||
ForkJoinTask<List<BomOriginalListVO>> submit = pool.submit(task);
|
||||
|
||||
List<BomOriginalListVO> bomList = submit.join();
|
||||
initMaterialInfo(bomList);
|
||||
return bomList;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
|
|||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||
import com.nflg.product.bomnew.constant.EBomConstant;
|
||||
import com.nflg.product.bomnew.constant.ReportConstant;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentFormalEntity;
|
||||
|
|
@ -14,10 +15,7 @@ import com.nflg.product.bomnew.pojo.entity.BomNewPbomChildFormalEntity;
|
|||
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.query.ReverseReportQuery;
|
||||
import com.nflg.product.bomnew.pojo.vo.*;
|
||||
import com.nflg.product.bomnew.service.BomNewEbomChildFormalService;
|
||||
import com.nflg.product.bomnew.service.BomNewEbomParentFormalService;
|
||||
import com.nflg.product.bomnew.service.BomNewPbomChildFormalService;
|
||||
import com.nflg.product.bomnew.service.BomNewPbomParentFormalService;
|
||||
import com.nflg.product.bomnew.service.*;
|
||||
import com.nflg.product.bomnew.service.domain.BaseForwardReport;
|
||||
import com.nflg.product.bomnew.service.domain.EBom.EBomFormalTreeTask;
|
||||
import com.nflg.product.bomnew.util.VersionUtil;
|
||||
|
|
@ -119,6 +117,7 @@ public class PBomForwardReport extends BaseForwardReport {
|
|||
// List<BomNewPbomChildFormalEntity> list = SpringUtil.getBean(BomNewPbomChildFormalService.class).list(queryWrapper);
|
||||
|
||||
List<BomNewPbomParentFormalVO> list = SpringUtil.getBean(BomNewPbomParentFormalService.class).getBaseMapper().getParentChild(parentFormal.getRowId());
|
||||
initMaterialInfo(list);
|
||||
List<ForwardReportVO> nodeList=null;
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
|
||||
|
|
@ -128,6 +127,8 @@ public class PBomForwardReport extends BaseForwardReport {
|
|||
for (ForwardReportVO vo :
|
||||
nodeList) {
|
||||
vo.setCreatedTime(forwardReportVO.getCreatedTime());
|
||||
vo.setDeviseName(forwardReportVO.getDeviseName());
|
||||
vo.setCurrentVersion(forwardReportVO.getCurrentVersion());
|
||||
vo.setLevelNum(1);
|
||||
vo.setOrderNumber(noNum+"");
|
||||
noNum++;
|
||||
|
|
@ -139,7 +140,9 @@ public class PBomForwardReport extends BaseForwardReport {
|
|||
return buildReportBomVo(forwardReportVO,nodeList);
|
||||
}
|
||||
|
||||
|
||||
void initMaterialInfo( List<BomNewPbomParentFormalVO> list){
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(list,BomNewPbomParentFormalVO::getMaterialNo, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT2);
|
||||
}
|
||||
/**
|
||||
* 版本
|
||||
*
|
||||
|
|
@ -192,6 +195,7 @@ public class PBomForwardReport extends BaseForwardReport {
|
|||
ForkJoinTask<List<BomNewPbomParentFormalVO>> submit = pool.submit(task);
|
||||
|
||||
List<BomNewPbomParentFormalVO> bomList = submit.join();
|
||||
initMaterialInfo(bomList);
|
||||
return bomList;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
</select>
|
||||
<select id="getParentChild" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentFormalVO">
|
||||
select *,bom_version_row_id as bom_row_id
|
||||
from t_bom_new_ebom_child
|
||||
from t_bom_new_ebom_child_formal
|
||||
where parent_row_id = #{rowId}
|
||||
order by order_number
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue