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