Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition
This commit is contained in:
commit
44dd7ae71f
|
|
@ -21,7 +21,7 @@ import java.util.Set;
|
|||
*/
|
||||
public interface BomNewEbomParentFormalMapper extends BaseMapper<BomNewEbomParentFormalEntity > {
|
||||
|
||||
List<BomNewEbomParentFormalVO> getParentChild(@Param("rowId") Long rowId);
|
||||
// List<BomNewEbomParentFormalVO> getParentChild(@Param("rowId") Long rowId);
|
||||
|
||||
List<BomNewEbomParentFormalVO> getParentChildBatch(@Param("rowIds") List<Long> rowIds);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class ForwardReportVO extends BaseMaterialVO {
|
|||
|
||||
@ApiModelProperty(value = "创建人编码")
|
||||
private String createdBy;
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@ApiModelProperty(value = "设计人")
|
||||
private String deviseName;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
|
|||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentFormalVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -24,6 +26,21 @@ import java.util.stream.Collectors;
|
|||
public class BomNewEbomParentFormalService extends ServiceImpl<BomNewEbomParentFormalMapper, BomNewEbomParentFormalEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
public List<BomNewEbomParentFormalVO> getParentChild( Long rowId) {
|
||||
List<Long> ids=new ArrayList<>();
|
||||
ids.add(rowId);
|
||||
return getParentChildBatch(ids);
|
||||
}
|
||||
|
||||
public List<BomNewEbomParentFormalVO> getParentChildBatch( List<Long> rowIds){
|
||||
return this.baseMapper.getParentChildBatch(rowIds);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void copyEbomFormal(Long eBomRowId) {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import com.nflg.product.bomnew.pojo.entity.BomNewPbomChildEntity;
|
|||
import com.nflg.product.bomnew.pojo.entity.BomNewPbomChildFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewPbomParentFormalVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -24,6 +26,25 @@ import java.util.stream.Collectors;
|
|||
public class BomNewPbomParentFormalService extends ServiceImpl<BomNewPbomParentFormalMapper, BomNewPbomParentFormalEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
public List<BomNewPbomParentFormalVO> getParentChild( Long rowId) {
|
||||
|
||||
List<Long> rowIds=new ArrayList<>();
|
||||
rowIds.add(rowId);
|
||||
return getParentChildBatch(rowIds);
|
||||
}
|
||||
|
||||
public List<BomNewPbomParentFormalVO> getParentChildBatch( List<Long> rowIds) {
|
||||
|
||||
return this.getBaseMapper().getParentChildBatch(rowIds);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 拷贝pbom已发布数
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import cn.hutool.core.convert.Convert;
|
|||
import cn.hutool.core.lang.TypeReference;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nflg.product.bomnew.constant.EBomConstant;
|
||||
import com.nflg.product.bomnew.constant.OriginalConstant;
|
||||
import com.nflg.product.bomnew.constant.ReportConstant;
|
||||
import com.nflg.product.bomnew.pojo.entity.*;
|
||||
import com.nflg.product.bomnew.pojo.query.ChildBomReportQuery;
|
||||
|
|
@ -15,6 +17,8 @@ import com.nflg.product.bomnew.service.domain.MBom.MBomForwardReport;
|
|||
import com.nflg.product.bomnew.service.domain.OriginalBom.OriginalBomForwardReport;
|
||||
import com.nflg.product.bomnew.service.domain.PBom.PBomForwardReport;
|
||||
import com.nflg.product.bomnew.util.EecExcelUtil;
|
||||
import com.nflg.product.bomnew.util.ListCommonUtil;
|
||||
import com.nflg.product.bomnew.util.MaterialshouldBomExistUtil;
|
||||
import com.nflg.product.bomnew.util.VUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.ttzero.excel.entity.ListSheet;
|
||||
|
|
@ -23,9 +27,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;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class ForwardReportService {
|
||||
|
|
@ -155,26 +158,41 @@ public class ForwardReportService {
|
|||
|
||||
|
||||
List<ForwardReportVO> chilidEBomList(ChildBomReportQuery query) {
|
||||
// QueryWrapper<BomNewEbomChildFormalEntity> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.lambda().eq(BomNewEbomChildFormalEntity::getParentRowId, query.getBomRowId());
|
||||
// List<BomNewEbomChildFormalEntity> list = SpringUtil.getBean(BomNewEbomChildFormalService.class).list(queryWrapper);
|
||||
BomNewEbomParentFormalEntity parentEntity=SpringUtil.getBean(BomNewEbomParentFormalService .class).getById(query.getBomRowId());
|
||||
List<BomNewEbomParentFormalVO> list = SpringUtil.getBean(BomNewEbomParentFormalService .class).getBaseMapper().getParentChild(query.getBomRowId());
|
||||
BomNewEbomParentFormalEntity parentEntity=SpringUtil.getBean(BomNewEbomParentFormalService .class).getById(query.getBomRowId());
|
||||
List<BomNewEbomParentFormalVO> parentChildList = SpringUtil.getBean(BomNewEbomParentFormalService.class). getParentChild(query.getBomRowId());
|
||||
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(parentChildList, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||
|
||||
List<ForwardReportVO> childBomLit = Convert.convert(
|
||||
new TypeReference<List<ForwardReportVO>>() {
|
||||
List<Long> bomRowIds=parentChildList.stream().filter(u -> Objects.nonNull(u.getBomRowId()) && u.getBomRowId()>0 ).map(BomNewEbomParentFormalVO::getBomRowId).collect(Collectors.toList());
|
||||
Map<Long, BomNewEbomParentFormalEntity> parentEntityMap=null;
|
||||
if(CollUtil.isNotEmpty(bomRowIds)) {
|
||||
List<BomNewEbomParentFormalEntity> bomlist = SpringUtil.getBean(BomNewEbomParentFormalService.class).lambdaQuery().in(BomNewEbomParentFormalEntity::getRowId, bomRowIds).list();
|
||||
|
||||
}, list);
|
||||
parentEntityMap = ListCommonUtil.listToMap(bomlist, BomNewEbomParentFormalEntity::getRowId);
|
||||
|
||||
|
||||
|
||||
for (ForwardReportVO vo:
|
||||
childBomLit) {
|
||||
vo.setDeviseName(parentEntity.getDeviseName());
|
||||
vo.setCurrentVersion(parentEntity.getCurrentVersion());
|
||||
vo.setExpireEndTime(parentEntity.getConvertToEbomTime());
|
||||
}
|
||||
for (BomNewEbomParentFormalVO vo :
|
||||
parentChildList) {
|
||||
|
||||
if (Objects.nonNull(parentEntityMap) && parentEntityMap.containsKey(vo.getBomRowId())) {
|
||||
BomNewEbomParentFormalEntity ebomParentEntity = parentEntityMap.get(vo.getBomRowId());
|
||||
vo.setDeviseName(ebomParentEntity.getDeviseName());
|
||||
vo.setDeviseUserCode(ebomParentEntity.getDeviseUserCode());
|
||||
vo.setCurrentVersion(ebomParentEntity.getCurrentVersion());
|
||||
vo.setExpireEndTime(ebomParentEntity.getConvertToEbomTime());
|
||||
}else{
|
||||
vo.setDeviseName(parentEntity.getDeviseName());
|
||||
vo.setDeviseUserCode(parentEntity.getDeviseUserCode());
|
||||
if (MaterialshouldBomExistUtil.checkShouldBomExist(vo)) {
|
||||
vo.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
||||
}
|
||||
else {
|
||||
vo.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<ForwardReportVO> childBomLit = Convert.convert(new TypeReference<List<ForwardReportVO>>() {}, parentChildList);
|
||||
|
||||
|
||||
return childBomLit;
|
||||
|
|
@ -185,18 +203,47 @@ public class ForwardReportService {
|
|||
|
||||
BomNewPbomParentFormalEntity parentEntity= SpringUtil.getBean(BomNewPbomParentFormalService .class).getById(query.getBomRowId());
|
||||
|
||||
List<BomNewPbomParentFormalVO> list = SpringUtil.getBean(BomNewPbomParentFormalService .class).getBaseMapper().getParentChild(query.getBomRowId());
|
||||
List<BomNewPbomParentFormalVO> parentChildList = SpringUtil.getBean(BomNewPbomParentFormalService .class).getParentChild(query.getBomRowId());
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(parentChildList, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||
List<Long> bomRowIds=parentChildList.stream().filter(u -> Objects.nonNull(u.getBomRowId()) && u.getBomRowId()>0 ).map(BomNewPbomParentFormalVO::getBomRowId).collect(Collectors.toList());
|
||||
|
||||
|
||||
Map<Long, BomNewPbomParentFormalEntity> parentEntityMap=null;
|
||||
if(CollUtil.isNotEmpty(bomRowIds)) {
|
||||
List<BomNewPbomParentFormalEntity > bomlist = SpringUtil.getBean(BomNewPbomParentFormalService.class ).lambdaQuery().in(BomNewPbomParentFormalEntity::getRowId, bomRowIds).list();
|
||||
|
||||
parentEntityMap = ListCommonUtil.listToMap(bomlist, BomNewPbomParentFormalEntity::getRowId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (BomNewPbomParentFormalVO vo:
|
||||
parentChildList) {
|
||||
|
||||
if (Objects.nonNull(parentEntityMap) && parentEntityMap.containsKey(vo.getBomRowId())) {
|
||||
BomNewPbomParentFormalEntity pbomParentEntity = parentEntityMap.get(vo.getBomRowId());
|
||||
|
||||
vo.setDeviseName(pbomParentEntity.getDeviseName());
|
||||
vo.setCurrentVersion(pbomParentEntity.getCurrentVersion());
|
||||
vo.setExpireEndTime(pbomParentEntity.getReleaseTime());
|
||||
}else{
|
||||
vo.setExpireEndTime(parentEntity.getReleaseTime());
|
||||
vo.setDeviseName(parentEntity.getDeviseName());
|
||||
vo.setDeviseUserCode(parentEntity.getDeviseUserCode());
|
||||
if (MaterialshouldBomExistUtil.checkShouldBomExist(vo)) {
|
||||
vo.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
||||
}
|
||||
else {
|
||||
vo.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<ForwardReportVO> childBomLit = Convert.convert(
|
||||
new TypeReference<List<ForwardReportVO>>() {
|
||||
|
||||
}, list);
|
||||
|
||||
for (ForwardReportVO vo:
|
||||
childBomLit) {
|
||||
vo.setDeviseName(parentEntity.getDeviseName());
|
||||
vo.setCurrentVersion(parentEntity.getCurrentVersion());
|
||||
vo.setExpireEndTime(parentEntity.getReleaseTime());
|
||||
}
|
||||
}, parentChildList);
|
||||
|
||||
return childBomLit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,19 +3,24 @@ package com.nflg.product.bomnew.service.domain.EBom;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.nflg.product.bomnew.constant.EBomConstant;
|
||||
import com.nflg.product.bomnew.constant.OriginalConstant;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentFormalVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
|
||||
import com.nflg.product.bomnew.service.BomNewEbomParentFormalService;
|
||||
import com.nflg.product.bomnew.service.BomNewEbomParentService;
|
||||
import com.nflg.product.bomnew.service.MaterialMainService;
|
||||
import com.nflg.product.bomnew.util.ListCommonUtil;
|
||||
import com.nflg.product.bomnew.util.MaterialshouldBomExistUtil;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.RecursiveTask;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -47,31 +52,54 @@ public class EBomFormalTreeTask extends RecursiveTask<List<BomNewEbomParentForma
|
|||
vo.setLevelNum(levelNum);
|
||||
}
|
||||
|
||||
List<Long> bomRowIds=bomDetail.stream().filter(u -> u.getBomRowId()>0 ).map(BomNewEbomParentFormalVO::getBomRowId).collect(Collectors.toList());
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(bomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||
|
||||
List<Long> bomRowIds=bomDetail.stream().filter(u -> Objects.nonNull(u.getBomRowId()) && u.getBomRowId()>0 ).map(BomNewEbomParentFormalVO::getBomRowId).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(bomRowIds)) {
|
||||
|
||||
List<BomNewEbomParentFormalEntity > bomlist = SpringUtil.getBean(BomNewEbomParentFormalService.class ).lambdaQuery().in(BomNewEbomParentFormalEntity::getRowId, bomRowIds).list();
|
||||
Map<Long, BomNewEbomParentFormalEntity> parentEntityMap = ListCommonUtil.listToMap(bomlist, BomNewEbomParentFormalEntity::getRowId);
|
||||
for (BomNewEbomParentFormalVO detailVO : bomDetail) {
|
||||
if (parentEntityMap.containsKey(detailVO.getBomRowId())) {
|
||||
BomNewEbomParentFormalEntity ebomParentEntity = parentEntityMap.get(detailVO.getBomRowId());
|
||||
detailVO.setChildBomRowId(ebomParentEntity.getRowId());
|
||||
detailVO.setCreatedTime(ebomParentEntity.getCreatedTime());
|
||||
// detailVO.setCreatedTime(ebomParentEntity.getCreatedTime());
|
||||
|
||||
detailVO.setSourceRowId(ebomParentEntity.getSourceRowId());
|
||||
detailVO.setCurrentVersion(ebomParentEntity.getCurrentVersion());
|
||||
detailVO.setDeviseName(ebomParentEntity.getDeviseName());
|
||||
detailVO.setDeviseUserCode(ebomParentEntity.getDeviseUserCode());
|
||||
detailVO.setDeptName(ebomParentEntity.getDeptName());
|
||||
detailVO.setDeviseName(ebomParentEntity.getDeviseName());
|
||||
detailVO.setBomExist(ebomParentEntity.getBomExist());
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//无Bom
|
||||
BomNewEbomParentFormalEntity ebomParentEntity = SpringUtil.getBean(BomNewEbomParentFormalService.class).lambdaQuery().eq(BomNewEbomParentFormalEntity::getRowId, bomDetail.get(0).getParentRowId()).one();
|
||||
List<BomNewEbomParentFormalVO> noBomList = bomDetail.stream().filter(u -> Objects.isNull(u.getBomRowId() )||u.getBomRowId() == 0).collect(Collectors.toList());
|
||||
if(CollUtil.isNotEmpty(noBomList)) {
|
||||
for (BomNewEbomParentFormalVO detailVO : noBomList) {
|
||||
|
||||
// detailVO.setCreatedTime(ebomParentEntity.getCreatedTime());
|
||||
detailVO.setDeviseUserCode(ebomParentEntity.getDeviseUserCode());
|
||||
detailVO.setDeptName(ebomParentEntity.getDeptName());
|
||||
detailVO.setDeviseName(ebomParentEntity.getDeviseName());
|
||||
detailVO.setDeviseUserCode(ebomParentEntity.getDeviseUserCode());
|
||||
if (MaterialshouldBomExistUtil.checkShouldBomExist(detailVO)) {
|
||||
detailVO.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
||||
} else {
|
||||
detailVO.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.nflg.product.bomnew.service.domain.EBom;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
|
|
@ -11,6 +12,7 @@ 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.OriginalConstant;
|
||||
import com.nflg.product.bomnew.constant.ReportConstant;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentFormalEntity;
|
||||
|
|
@ -21,6 +23,7 @@ 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.MaterialshouldBomExistUtil;
|
||||
import com.nflg.product.bomnew.util.VersionUtil;
|
||||
import nflg.product.common.constant.STATE;
|
||||
|
||||
|
|
@ -39,7 +42,7 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
|
||||
public EBomForwardReport(ReverseReportQuery query) {
|
||||
|
||||
super(query);
|
||||
super(query);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -51,7 +54,7 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
}
|
||||
if (query.getVersionStrategy().compareTo(ReportConstant.VersionStrategyEnum.NEW.getValue()) == 0) {
|
||||
queryWrapper.lambda().eq(BomNewEbomParentFormalEntity::getCurrentVersion, getMaxVersion());
|
||||
} else if(query.getVersionStrategy().compareTo(ReportConstant.VersionStrategyEnum.DEFINE.getValue()) == 0) {
|
||||
} else if (query.getVersionStrategy().compareTo(ReportConstant.VersionStrategyEnum.DEFINE.getValue()) == 0) {
|
||||
queryWrapper.lambda().eq(BomNewEbomParentFormalEntity::getCurrentVersion, query.getBomVersion());
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +76,6 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
}
|
||||
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -105,42 +107,73 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
*/
|
||||
ReportBomVO singleReport() {
|
||||
|
||||
List<BomNewEbomParentFormalEntity> listParent=getParent();
|
||||
List<BomNewEbomParentFormalEntity> listParent = getParent();
|
||||
BomNewEbomParentFormalEntity parentFormal0 = listParent.get(0);
|
||||
ForwardReportVO forwardReportVO = Convert.convert(ForwardReportVO.class, parentFormal0);
|
||||
|
||||
|
||||
List<ForwardReportVO> nodesList = new ArrayList<>();
|
||||
for(BomNewEbomParentFormalEntity parentFormal:listParent) {
|
||||
for (BomNewEbomParentFormalEntity parentFormal : listParent) {
|
||||
|
||||
|
||||
List<BomNewEbomParentFormalVO> list = SpringUtil.getBean(BomNewEbomParentFormalService.class).getBaseMapper().getParentChild(parentFormal.getRowId());
|
||||
initMaterialInfo(list);
|
||||
List<BomNewEbomParentFormalVO> parentChildList = SpringUtil.getBean(BomNewEbomParentFormalService.class).getParentChild(parentFormal.getRowId());
|
||||
initMaterialInfo(parentChildList);
|
||||
|
||||
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
if (CollectionUtil.isNotEmpty(parentChildList)) {
|
||||
|
||||
List<ForwardReportVO> nodeList = Convert.convert(new TypeReference<List<ForwardReportVO>>() {
|
||||
}, list);
|
||||
List<Long> bomRowIds = parentChildList.stream().filter(u -> Objects.nonNull(u.getBomRowId()) && u.getBomRowId() > 0).map(BomNewEbomParentFormalVO::getBomRowId).collect(Collectors.toList());
|
||||
Map<Long, BomNewEbomParentFormalEntity> parentEntityMap=null;
|
||||
if(CollUtil.isNotEmpty(bomRowIds)) {
|
||||
List<BomNewEbomParentFormalEntity> bomlist = SpringUtil.getBean(BomNewEbomParentFormalService.class).lambdaQuery().in(BomNewEbomParentFormalEntity::getRowId, bomRowIds).list();
|
||||
|
||||
parentEntityMap = ListCommonUtil.listToMap(bomlist, BomNewEbomParentFormalEntity::getRowId);
|
||||
}
|
||||
AtomicInteger orderNum = new AtomicInteger();
|
||||
for (ForwardReportVO vo :
|
||||
nodeList) {
|
||||
// vo.setCreatedTime(forwardReportVO.getCreatedTime());
|
||||
vo.setExpireEndTime(parentFormal.getConvertToEbomTime());
|
||||
vo.setLevelNum(1);
|
||||
vo.setOrderNumber(orderNum.incrementAndGet() + "");
|
||||
vo.setDeviseName(forwardReportVO.getDeviseName());
|
||||
vo.setCurrentVersion(forwardReportVO.getCurrentVersion());
|
||||
for (BomNewEbomParentFormalVO vo :
|
||||
parentChildList) {
|
||||
|
||||
if (Objects.nonNull(parentEntityMap) && parentEntityMap.containsKey(vo.getBomRowId())) {
|
||||
// vo.setCreatedTime(forwardReportVO.getCreatedTime());
|
||||
// vo.setExpireEndTime(parentFormal.getConvertToEbomTime());
|
||||
|
||||
BomNewEbomParentFormalEntity ebomParentEntity = parentEntityMap.get(vo.getBomRowId());
|
||||
vo.setLevelNum(1);
|
||||
vo.setOrderNumber(orderNum.incrementAndGet() + "");
|
||||
vo.setDeviseName(ebomParentEntity.getDeviseName());
|
||||
vo.setDeviseUserCode(ebomParentEntity.getDeviseUserCode());
|
||||
vo.setCurrentVersion(ebomParentEntity.getCurrentVersion());
|
||||
|
||||
|
||||
} else {
|
||||
vo.setLevelNum(1);
|
||||
vo.setOrderNumber(orderNum.incrementAndGet() + "");
|
||||
vo.setDeviseName(parentFormal.getDeviseName());
|
||||
vo.setDeviseName(parentFormal.getDeviseUserCode());
|
||||
if (MaterialshouldBomExistUtil.checkShouldBomExist(vo)) {
|
||||
vo.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
||||
} else {
|
||||
vo.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
nodesList.addAll(nodeList);
|
||||
|
||||
|
||||
|
||||
// Collections.sort(nodeList, (option0, option1) -> option0.getOrderNumber().compareTo(option1.getOrderNumber()));
|
||||
|
||||
}
|
||||
|
||||
List<ForwardReportVO> nodeList = Convert.convert(new TypeReference<List<ForwardReportVO>>() {
|
||||
}, parentChildList);
|
||||
nodesList.addAll(nodeList);
|
||||
|
||||
}
|
||||
|
||||
return buildReportBomVo(forwardReportVO,nodesList);
|
||||
return buildReportBomVo(forwardReportVO, nodesList);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -185,18 +218,19 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
synchronized List<BomNewEbomParentFormalVO> bomDetailList(Long bomRowId) {
|
||||
List<BomNewEbomParentFormalVO> childList = SpringUtil.getBean(BomNewEbomParentFormalService.class).getBaseMapper().getParentChild(bomRowId);
|
||||
synchronized List<BomNewEbomParentFormalVO> bomDetailList(Long bomRowId) {
|
||||
List<BomNewEbomParentFormalVO> childList = SpringUtil.getBean(BomNewEbomParentFormalService.class).getParentChild(bomRowId);
|
||||
EBomFormalTreeTask task = new EBomFormalTreeTask(childList);
|
||||
ForkJoinPool pool = new ForkJoinPool();
|
||||
ForkJoinTask<List<BomNewEbomParentFormalVO>> submit = pool.submit(task);
|
||||
|
||||
List<BomNewEbomParentFormalVO> bomList = submit.join();
|
||||
initMaterialInfo(bomList);
|
||||
initMaterialInfo(bomList);
|
||||
return bomList;
|
||||
}
|
||||
void initMaterialInfo( List<BomNewEbomParentFormalVO> list){
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(list,BomNewEbomParentFormalVO::getMaterialNo, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT2);
|
||||
|
||||
void initMaterialInfo(List<BomNewEbomParentFormalVO> list) {
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(list, BomNewEbomParentFormalVO::getMaterialNo, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT2);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -208,35 +242,33 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
ReportBomVO multiReport() {
|
||||
|
||||
|
||||
|
||||
List<BomNewEbomParentFormalEntity> listParent=getParent();
|
||||
List<BomNewEbomParentFormalEntity> listParent = getParent();
|
||||
BomNewEbomParentFormalEntity parentFormal0 = listParent.get(0);
|
||||
ForwardReportVO forwardReportVO = Convert.convert(ForwardReportVO.class, parentFormal0);
|
||||
|
||||
|
||||
List<ForwardReportVO> nodesList=new ArrayList<>();
|
||||
for(BomNewEbomParentFormalEntity parentFormal :listParent){
|
||||
List<ForwardReportVO> nodesList = new ArrayList<>();
|
||||
for (BomNewEbomParentFormalEntity parentFormal : listParent) {
|
||||
|
||||
|
||||
List<BomNewEbomParentFormalVO> bomList = bomDetailList(parentFormal.getRowId());
|
||||
List<ForwardReportVO> convertBomList = Convert.convert(new TypeReference<List<ForwardReportVO>>() {
|
||||
}, bomList);
|
||||
List<BomNewEbomParentFormalVO> bomList = bomDetailList(parentFormal.getRowId());
|
||||
List<ForwardReportVO> convertBomList = Convert.convert(new TypeReference<List<ForwardReportVO>>() {
|
||||
}, bomList);
|
||||
|
||||
sumLevel(convertBomList);
|
||||
sumLevel(convertBomList);
|
||||
|
||||
//转化为树结构
|
||||
List<ForwardReportVO> nodeList = showDataStyle(convertBomList, parentFormal.getRowId());
|
||||
//转化为树结构
|
||||
List<ForwardReportVO> nodeList = showDataStyle(convertBomList, parentFormal.getRowId());
|
||||
nodesList.addAll(nodeList);
|
||||
for (ForwardReportVO vo :
|
||||
nodeList) {
|
||||
for (ForwardReportVO vo :
|
||||
nodeList) {
|
||||
|
||||
vo.setDeviseName(parentFormal.getDeviseName());
|
||||
vo.setExpireEndTime(parentFormal.getConvertToEbomTime());
|
||||
}
|
||||
// vo.setDeviseName(parentFormal.getDeviseName());
|
||||
vo.setExpireEndTime(parentFormal.getConvertToEbomTime());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return buildReportBomVo(forwardReportVO,nodesList,query.getDataType());
|
||||
return buildReportBomVo(forwardReportVO, nodesList, query.getDataType());
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -249,12 +281,12 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
* @return
|
||||
*/
|
||||
ReportBomVO sumReport() {
|
||||
List<BomNewEbomParentFormalEntity> listParent=getParent();
|
||||
List<BomNewEbomParentFormalEntity> listParent = getParent();
|
||||
BomNewEbomParentFormalEntity parentFormal0 = listParent.get(0);
|
||||
ForwardReportVO forwardReportVO = Convert.convert(ForwardReportVO.class, parentFormal0);
|
||||
|
||||
List<ForwardReportVO> nodesList=new ArrayList<>();
|
||||
for(BomNewEbomParentFormalEntity parentFormal :listParent) {
|
||||
List<ForwardReportVO> nodesList = new ArrayList<>();
|
||||
for (BomNewEbomParentFormalEntity parentFormal : listParent) {
|
||||
|
||||
List<BomNewEbomParentFormalVO> bomList = bomDetailList(parentFormal.getRowId());
|
||||
List<ForwardReportVO> convertBomList = Convert.convert(new TypeReference<List<ForwardReportVO>>() {
|
||||
|
|
@ -277,13 +309,10 @@ public class EBomForwardReport extends BaseForwardReport {
|
|||
}
|
||||
|
||||
}
|
||||
return buildReportBomVo(forwardReportVO,nodesList);
|
||||
return buildReportBomVo(forwardReportVO, nodesList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public ReportBomVO genReport() {
|
||||
//单层
|
||||
if (query.getQueryType().compareTo(ReportConstant.QueryTypeEnum.SINGLE.getValue()) == 0) {
|
||||
|
|
|
|||
|
|
@ -2,19 +2,25 @@ package com.nflg.product.bomnew.service.domain.PBom;
|
|||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.nflg.product.bomnew.constant.EBomConstant;
|
||||
import com.nflg.product.bomnew.constant.OriginalConstant;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentFormalVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewPbomChildVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewPbomParentFormalVO;
|
||||
import com.nflg.product.bomnew.service.BomNewEbomParentFormalService;
|
||||
import com.nflg.product.bomnew.service.BomNewPbomParentFormalService;
|
||||
import com.nflg.product.bomnew.service.MaterialMainService;
|
||||
import com.nflg.product.bomnew.util.ListCommonUtil;
|
||||
import com.nflg.product.bomnew.util.MaterialshouldBomExistUtil;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.RecursiveTask;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -43,24 +49,27 @@ public class PBomFormalTreeTask extends RecursiveTask<List<BomNewPbomParentForma
|
|||
bomDetail ) {
|
||||
vo.setLevelNum(levelNum);
|
||||
}
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(bomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||
|
||||
List<Long> bomRowIds=bomDetail.stream().filter(u -> u.getBomRowId()>0 ).map(BomNewPbomParentFormalVO::getBomRowId).collect(Collectors.toList());
|
||||
|
||||
if (CollUtil.isNotEmpty(bomRowIds)) {
|
||||
List<BomNewPbomParentFormalEntity> bomlist = SpringUtil.getBean(BomNewPbomParentFormalService.class ).lambdaQuery().in(BomNewPbomParentFormalEntity::getRowId, bomRowIds).list();
|
||||
Map<Long, BomNewPbomParentFormalEntity> parentEntityMap = ListCommonUtil.listToMap(bomlist, BomNewPbomParentFormalEntity::getRowId);
|
||||
|
||||
List<BomNewEbomParentFormalEntity > bomlist = SpringUtil.getBean(BomNewEbomParentFormalService.class ).lambdaQuery().in(BomNewEbomParentFormalEntity::getRowId, bomRowIds).list();
|
||||
Map<Long, BomNewEbomParentFormalEntity> parentEntityMap = ListCommonUtil.listToMap(bomlist, BomNewEbomParentFormalEntity::getRowId);
|
||||
for (BomNewPbomParentFormalVO detailVO : bomDetail) {
|
||||
if (parentEntityMap.containsKey(detailVO.getBomRowId())) {
|
||||
BomNewEbomParentFormalEntity ebomParentEntity = parentEntityMap.get(detailVO.getBomRowId());
|
||||
detailVO.setCreatedTime(ebomParentEntity.getCreatedTime());
|
||||
BomNewPbomParentFormalEntity pbomParentEntity = parentEntityMap.get(detailVO.getBomRowId());
|
||||
// detailVO.setCreatedTime(ebomParentEntity.getCreatedTime());
|
||||
// detailVO.setBomRowId(ebomParentEntity.getRowId());
|
||||
detailVO.setSourceRowId(ebomParentEntity.getSourceRowId());
|
||||
detailVO.setCurrentVersion(ebomParentEntity.getCurrentVersion());
|
||||
detailVO.setDeviseUserCode(ebomParentEntity.getDeviseUserCode());
|
||||
detailVO.setDeptName(ebomParentEntity.getDeptName());
|
||||
detailVO.setDeviseName(ebomParentEntity.getDeviseName());
|
||||
detailVO.setBomExist(ebomParentEntity.getBomExist());
|
||||
|
||||
detailVO.setCurrentVersion(pbomParentEntity.getCurrentVersion());
|
||||
detailVO.setDeviseUserCode(pbomParentEntity.getDeviseUserCode());
|
||||
detailVO.setDeviseName(pbomParentEntity.getDeviseName());
|
||||
detailVO.setDeptName(pbomParentEntity.getDeptName());
|
||||
|
||||
detailVO.setBomExist(pbomParentEntity.getBomExist());
|
||||
detailVO.setExpireEndTime(pbomParentEntity.getReleaseTime());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -69,6 +78,26 @@ public class PBomFormalTreeTask extends RecursiveTask<List<BomNewPbomParentForma
|
|||
}
|
||||
|
||||
|
||||
//无Bom
|
||||
BomNewPbomParentFormalEntity pbomParentEntity = SpringUtil.getBean(BomNewPbomParentFormalService.class).lambdaQuery().eq(BomNewPbomParentFormalEntity::getRowId, bomDetail.get(0).getParentRowId()).one();
|
||||
List<BomNewPbomParentFormalVO> noBomList = bomDetail.stream().filter(u -> Objects.isNull(u.getBomRowId() )||u.getBomRowId() == 0).collect(Collectors.toList());
|
||||
if(CollUtil.isNotEmpty(noBomList)) {
|
||||
for (BomNewPbomParentFormalVO detailVO : noBomList) {
|
||||
|
||||
// detailVO.setCreatedTime(ebomParentEntity.getCreatedTime());
|
||||
detailVO.setDeviseUserCode(pbomParentEntity.getDeviseUserCode());
|
||||
detailVO.setDeptName(pbomParentEntity.getDeptName());
|
||||
detailVO.setDeviseName(pbomParentEntity.getDeviseName());
|
||||
detailVO.setDeviseUserCode(pbomParentEntity.getDeviseUserCode());
|
||||
detailVO.setExpireEndTime(pbomParentEntity.getReleaseTime());
|
||||
if (MaterialshouldBomExistUtil.checkShouldBomExist(detailVO)) {
|
||||
detailVO.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
||||
} else {
|
||||
detailVO.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -87,7 +116,7 @@ public class PBomFormalTreeTask extends RecursiveTask<List<BomNewPbomParentForma
|
|||
levelNumAdd();
|
||||
List<Long> childBowIds = bomDetail.stream().filter(u-> u.getBomRowId()!=null && u.getBomRowId() > 0).map(u->u.getBomRowId()).collect(Collectors.toList());
|
||||
if(CollUtil.isNotEmpty(childBowIds)) {
|
||||
List<BomNewPbomParentFormalVO> bom = SpringUtil.getBean(BomNewPbomParentFormalService.class).getBaseMapper().getParentChildBatch(childBowIds);
|
||||
List<BomNewPbomParentFormalVO> bom = SpringUtil.getBean(BomNewPbomParentFormalService.class).getParentChildBatch(childBowIds);
|
||||
PBomFormalTreeTask task = new PBomFormalTreeTask(bom);
|
||||
task.setLevelNum(levelNum);
|
||||
task.fork();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.nflg.product.bomnew.service.domain.PBom;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
|
|
@ -8,6 +9,7 @@ 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.OriginalConstant;
|
||||
import com.nflg.product.bomnew.constant.ReportConstant;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildFormalEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentFormalEntity;
|
||||
|
|
@ -18,6 +20,8 @@ import com.nflg.product.bomnew.pojo.vo.*;
|
|||
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.ListCommonUtil;
|
||||
import com.nflg.product.bomnew.util.MaterialshouldBomExistUtil;
|
||||
import com.nflg.product.bomnew.util.VersionUtil;
|
||||
import nflg.product.common.constant.STATE;
|
||||
|
||||
|
|
@ -117,30 +121,56 @@ public class PBomForwardReport extends BaseForwardReport {
|
|||
listParent ) {
|
||||
|
||||
|
||||
List<BomNewPbomParentFormalVO> list = SpringUtil.getBean(BomNewPbomParentFormalService.class).getBaseMapper().getParentChild(parentFormal.getRowId());
|
||||
initMaterialInfo(list);
|
||||
List<BomNewPbomParentFormalVO> parentChildList = SpringUtil.getBean(BomNewPbomParentFormalService.class).getParentChild(parentFormal.getRowId());
|
||||
initMaterialInfo(parentChildList);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
if (CollectionUtil.isNotEmpty(parentChildList)) {
|
||||
Map<Long, BomNewPbomParentFormalEntity> parentEntityMap=null;
|
||||
|
||||
List<ForwardReportVO> nodeList = Convert.convert(new TypeReference<List<ForwardReportVO>>() {
|
||||
}, list);
|
||||
nodesList.addAll(nodeList);
|
||||
int noNum=1;
|
||||
for (ForwardReportVO vo :
|
||||
nodeList) {
|
||||
List<Long> bomRowIds = parentChildList.stream().filter(u -> Objects.nonNull(u.getBomRowId()) && u.getBomRowId() > 0).map(BomNewPbomParentFormalVO::getBomRowId).collect(Collectors.toList());
|
||||
if(CollUtil.isNotEmpty(bomRowIds)) {
|
||||
List<BomNewPbomParentFormalEntity> bomlist = SpringUtil.getBean(BomNewPbomParentFormalService.class).lambdaQuery().in(BomNewPbomParentFormalEntity::getRowId, bomRowIds).list();
|
||||
|
||||
vo.setExpireEndTime(parentFormal.getReleaseTime());
|
||||
vo.setDeviseName(forwardReportVO.getDeviseName());
|
||||
vo.setCurrentVersion(forwardReportVO.getCurrentVersion());
|
||||
vo.setLevelNum(1);
|
||||
vo.setOrderNumber(noNum+"");
|
||||
noNum++;
|
||||
parentEntityMap = ListCommonUtil.listToMap(bomlist, BomNewPbomParentFormalEntity::getRowId);
|
||||
}
|
||||
|
||||
int noNum = 1;
|
||||
for (BomNewPbomParentFormalVO vo :
|
||||
parentChildList) {
|
||||
if (Objects.nonNull(parentEntityMap) && parentEntityMap.containsKey(vo.getBomRowId())) {
|
||||
|
||||
BomNewPbomParentFormalEntity ebomParentEntity = parentEntityMap.get(vo.getBomRowId());
|
||||
|
||||
vo.setExpireEndTime(ebomParentEntity.getReleaseTime());
|
||||
vo.setDeviseName(ebomParentEntity.getDeviseName());
|
||||
vo.setDeviseUserCode(ebomParentEntity.getDeviseUserCode());
|
||||
|
||||
vo.setCurrentVersion(ebomParentEntity.getCurrentVersion());
|
||||
vo.setLevelNum(1);
|
||||
vo.setOrderNumber(noNum + "");
|
||||
noNum++;
|
||||
|
||||
|
||||
} else {
|
||||
vo.setLevelNum(1);
|
||||
vo.setOrderNumber(noNum + "");
|
||||
vo.setDeviseName(parentFormal.getDeviseName());
|
||||
vo.setDeviseName(parentFormal.getDeviseUserCode());
|
||||
vo.setExpireEndTime(parentFormal.getReleaseTime());
|
||||
if (MaterialshouldBomExistUtil.checkShouldBomExist(vo)) {
|
||||
vo.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
||||
} else {
|
||||
vo.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
||||
}
|
||||
noNum++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
List<ForwardReportVO> nodeList = Convert.convert(new TypeReference<List<ForwardReportVO>>() {
|
||||
}, parentChildList);
|
||||
nodesList.addAll(nodeList);
|
||||
}
|
||||
return buildReportBomVo(forwardReportVO,nodesList);
|
||||
}
|
||||
|
|
@ -167,8 +197,6 @@ public class PBomForwardReport extends BaseForwardReport {
|
|||
|
||||
queryWrapper.lambda().orderByAsc(BomNewPbomParentFormalEntity::getCurrentVersion);
|
||||
|
||||
|
||||
|
||||
List<BomNewPbomParentFormalEntity> list = SpringUtil.getBean(BomNewPbomParentFormalService.class).list(queryWrapper);
|
||||
if (CollectionUtil.isEmpty(list)) {
|
||||
throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("未查到物料编码{}版本信息", query.getMaterialNo()));
|
||||
|
|
@ -195,7 +223,7 @@ public class PBomForwardReport extends BaseForwardReport {
|
|||
* @return
|
||||
*/
|
||||
List<BomNewPbomParentFormalVO> bomDetailList(Long bomRowId) {
|
||||
List<BomNewPbomParentFormalVO> childList = SpringUtil.getBean(BomNewPbomParentFormalService.class).getBaseMapper().getParentChild(bomRowId);
|
||||
List<BomNewPbomParentFormalVO> childList = SpringUtil.getBean(BomNewPbomParentFormalService.class).getParentChild(bomRowId);
|
||||
PBomFormalTreeTask task = new PBomFormalTreeTask(childList);
|
||||
ForkJoinPool pool = new ForkJoinPool();
|
||||
ForkJoinTask<List<BomNewPbomParentFormalVO>> submit = pool.submit(task);
|
||||
|
|
@ -239,8 +267,8 @@ public class PBomForwardReport extends BaseForwardReport {
|
|||
nodeList) {
|
||||
|
||||
|
||||
vo.setDeviseName(parentFormal.getDeviseName());
|
||||
vo.setCreatedTime(parentFormal.getCreatedTime());
|
||||
// vo.setDeviseName(parentFormal.getDeviseName());
|
||||
// vo.setCreatedTime(parentFormal.getCreatedTime());
|
||||
vo.setExpireEndTime(parentFormal.getReleaseTime());
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@
|
|||
#{rowId}
|
||||
</foreach>
|
||||
</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_formal
|
||||
where parent_row_id = #{rowId}
|
||||
order by order_number
|
||||
</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_formal-->
|
||||
<!-- where parent_row_id = #{rowId}-->
|
||||
<!-- order by order_number-->
|
||||
<!-- </select>-->
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -68,12 +68,12 @@
|
|||
#{rowId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getParentChild" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentFormalVO">
|
||||
select *,bom_version_row_id as bom_row_id
|
||||
from t_bom_new_pbom_child_formal
|
||||
where parent_row_id = #{rowId}
|
||||
order by order_number
|
||||
</select>
|
||||
<!-- <select id="getParentChild" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentFormalVO">-->
|
||||
<!-- select *,bom_version_row_id as bom_row_id-->
|
||||
<!-- from t_bom_new_pbom_child_formal-->
|
||||
<!-- where parent_row_id = #{rowId}-->
|
||||
<!-- order by order_number-->
|
||||
<!-- </select>-->
|
||||
|
||||
|
||||
<!--pbom单层反查-->
|
||||
|
|
|
|||
Loading…
Reference in New Issue