1020分工厂

This commit is contained in:
大米 2024-01-18 11:39:30 +08:00
parent b3b9a85b5f
commit ba97872897
1 changed files with 79 additions and 68 deletions

View File

@ -160,6 +160,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
/**
* 获取物料所有子级
*
* @param materialNo
* @param
* @return
@ -187,7 +188,6 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
}
/**
*
*
@ -202,6 +202,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
/**
* 导出工作列表
*
* @param query
* @param response
* @throws IOException
@ -215,6 +216,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
/**
* 导出正式工作表
*
* @param query
* @param response
* @throws IOException
@ -512,6 +514,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
return result;
}
public void generateDrawingNo(List<BomNewPbomParentVO> saveBomDetailParamDTO, Long bomRowID, String parentDrawingNo) {
List<BomNewPbomParentVO> firstLevelBoms = saveBomDetailParamDTO.stream().filter(u -> u.getParentRowId().equals(bomRowID)).collect(Collectors.toList());
parentDrawingNo = StrUtil.isNotBlank(parentDrawingNo) ? parentDrawingNo : "";
@ -604,11 +607,19 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
break;
}
}
if(child.getProjectType().equals("Q")){
intiQFac(child,childrenVO);
}else {
intiNotQFac(child,childrenVO);
}
//Q项
List<BomNewPbomParentVO> qList = childrenVO.stream().filter(u -> u.getProjectType().equals("Q")).collect(Collectors.toList());
{
for (BomNewPbomParentVO qVo : qList) {
intiQFac(qVo, childrenVO);
}
}
//非Q
List<BomNewPbomParentVO> noQList = childrenVO.stream().filter(u -> !u.getProjectType().equals("Q")).collect(Collectors.toList());
{
for (BomNewPbomParentVO noQVo : noQList) {
intiNotQFac(noQVo, childrenVO);
}
}
if (CollUtil.isNotEmpty(result)) {
@ -617,6 +628,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
return true;
}
//处理Q下子级分工厂
private void intiQFac(BomNewPbomParentVO parentVO, List<BomNewPbomParentVO> child) {
@ -624,6 +636,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
setSubNodeFac(parentVO, child, parentVO.getProductionFactoryCode());
}
//非Q
private void intiNotQFac(BomNewPbomParentVO parentVO, List<BomNewPbomParentVO> child) {
@ -640,7 +653,6 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
}
}
private void setParentFac(BomNewPbomParentVO parentVO, List<BomNewPbomParentVO> child, String facCode) {
@ -667,8 +679,6 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
}
public void reConvertToMBom(Long bomRowId, List<Long> backRowId) {
@ -722,6 +732,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
/**
* MBOM退回后重新发布调用
*
* @param bomRowId
* @return
* @throws ExecutionException
@ -858,7 +869,6 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
}
/**
* 获取CRM 订单号
*
@ -872,6 +882,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
/**
* 发起变更
*
* @param bomRowId
*/
@Transactional(rollbackFor = Exception.class)