From 741918a903e17b2ec7522556d2c043b8d35dd8a1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 15 六月 2026 17:42:58 +0800
Subject: [PATCH] 生产取消bom,不合格管理定制化
---
src/main/java/com/ruoyi/production/service/impl/ProductionOrderServiceImpl.java | 301 -------------------------------------------------
1 files changed, 2 insertions(+), 299 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductionOrderServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductionOrderServiceImpl.java
index 5c103b8..c62a17e 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductionOrderServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductionOrderServiceImpl.java
@@ -16,9 +16,7 @@
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.production.bean.dto.ProductionOperationTaskDto;
import com.ruoyi.production.bean.dto.ProductionOrderDto;
-import com.ruoyi.production.bean.vo.ProductionBomStructureVo;
import com.ruoyi.production.bean.vo.ProductionOperationTaskVo;
-import com.ruoyi.production.bean.vo.ProductionOrderPickVo;
import com.ruoyi.production.bean.vo.ProductionOrderVo;
import com.ruoyi.production.bean.vo.ProductionPlanVo;
import com.ruoyi.production.bean.vo.ProductionOrderWorkOrderDetailVo;
@@ -34,8 +32,6 @@
import com.ruoyi.production.service.ProductionOrderService;
import com.ruoyi.sales.mapper.SalesLedgerMapper;
import com.ruoyi.sales.mapper.SalesLedgerProductMapper;
-import com.ruoyi.stock.mapper.StockInventoryMapper;
-import com.ruoyi.stock.pojo.StockInventory;
import com.ruoyi.technology.mapper.*;
import com.ruoyi.technology.pojo.*;
import lombok.RequiredArgsConstructor;
@@ -58,18 +54,13 @@
private final ProductionOrderRoutingOperationMapper productionOrderRoutingOperationMapper;
private final ProductionOrderRoutingOperationParamMapper productionOrderRoutingOperationParamMapper;
private final ProductionOperationTaskMapper productionOperationTaskMapper;
- private final ProductionOrderBomMapper productionOrderBomMapper;
- private final ProductionBomStructureMapper productionBomStructureMapper;
private final ProductionOrderMapper productionOrderMapper;
private final ProductionProductMainMapper productionProductMainMapper;
private final ProductionProductOutputMapper productionProductOutputMapper;
- private final ProductionOrderPickMapper productionOrderPickMapper;
- private final ProductionOrderPickRecordMapper productionOrderPickRecordMapper;
private final QualityInspectMapper qualityInspectMapper;
private final QualityInspectParamMapper qualityInspectParamMapper;
private final QualityInspectFileMapper qualityInspectFileMapper;
private final ProductionPlanMapper productionPlanMapper;
- private final StockInventoryMapper stockInventoryMapper;
private final StorageAttachmentMapper storageAttachmentMapper;
private final StorageBlobMapper storageBlobMapper;
private final SalesLedgerMapper salesLedgerMapper;
@@ -78,8 +69,6 @@
private final TechnologyRoutingOperationMapper technologyRoutingOperationMapper;
private final TechnologyRoutingOperationParamMapper technologyRoutingOperationParamMapper;
private final TechnologyOperationMapper technologyOperationMapper;
- private final TechnologyBomMapper technologyBomMapper;
- private final TechnologyBomStructureMapper technologyBomStructureMapper;
private final FileUtil fileUtil;
@Override
@@ -212,9 +201,7 @@
@Override
public int syncProductionOrderSnapshot(Long productionOrderId) {
- // 鍚屾璁㈠崟宸ヨ壓銆佸伐搴忋�佸弬鏁板拰BOM蹇収
ProductionOrder productionOrder = this.getById(productionOrderId);
- // 鍙傛暟涓庡墠缃潯浠舵牎楠�
if (productionOrder == null) {
throw new ServiceException("鐢熶骇璁㈠崟涓嶅瓨鍦�");
}
@@ -225,42 +212,24 @@
if (technologyRouting == null) {
throw new ServiceException("宸ヨ壓璺嚎涓嶅瓨鍦�");
}
- // 璁㈠崟蹇収鎸夆�滃厛娓呭悗寤衡�濆鐞嗭紝淇濊瘉宸ヨ壓璺嚎銆佸伐搴忋�佸弬鏁般�丅OM 鍏ㄩ儴鏉ヨ嚜鍚屼竴鐗堟湰銆�
clearProductionSnapshot(productionOrderId);
- ProductionOrderBom orderBom = syncProductionOrderBomSnapshot(productionOrder, technologyRouting);
- //鐢熶骇璁㈠崟宸ヨ壓璺嚎琛�
ProductionOrderRouting orderRouting = new ProductionOrderRouting();
orderRouting.setProductionOrderId(productionOrder.getId());
orderRouting.setTechnologyRoutingId(technologyRouting.getId());
orderRouting.setProductModelId(technologyRouting.getProductModelId());
orderRouting.setProcessRouteCode(technologyRouting.getProcessRouteCode());
orderRouting.setDescription(technologyRouting.getDescription());
- orderRouting.setBomId(technologyRouting.getBomId());
- orderRouting.setOrderBomId(orderBom == null ? null : orderBom.getId());
productionOrderRoutingMapper.insert(orderRouting);
int syncedParamCount = 0;
- // 鏌ヨ骞跺噯澶囦笟鍔℃暟鎹�
List<TechnologyRoutingOperation> routingOperations = technologyRoutingOperationMapper.selectList(
Wrappers.<TechnologyRoutingOperation>lambdaQuery()
.eq(TechnologyRoutingOperation::getTechnologyRoutingId, technologyRouting.getId())
.orderByDesc(TechnologyRoutingOperation::getDragSort)
.orderByDesc(TechnologyRoutingOperation::getId));
- // Build task plan quantities from order BOM snapshot demand instead of recomputing from technology BOM units.
- Long rootProductModelId = orderBom != null && orderBom.getProductModelId() != null
- ? orderBom.getProductModelId()
- : productionOrder.getProductModelId();
- List<ProductionBomStructure> orderBomStructureList = orderBom == null || orderBom.getId() == null
- ? Collections.emptyList()
- : productionBomStructureMapper.selectList(
- Wrappers.<ProductionBomStructure>lambdaQuery()
- .eq(ProductionBomStructure::getProductionOrderBomId, orderBom.getId())
- .orderByAsc(ProductionBomStructure::getId));
- Map<String, BigDecimal> operationDemandedQuantityMap =
- buildOperationDemandedQuantityMap(orderBomStructureList, rootProductModelId);
+ BigDecimal orderQuantity = defaultDecimal(productionOrder.getQuantity());
Map<Long, String> operationNameMap = technologyOperationMapper.selectBatchIds(
- // 閬嶅巻澶勭悊鏁版嵁骞剁粍瑁呯粨鏋�
routingOperations.stream()
.map(TechnologyRoutingOperation::getTechnologyOperationId)
.filter(Objects::nonNull)
@@ -273,7 +242,6 @@
.max(Integer::compareTo)
.orElse(null);
for (TechnologyRoutingOperation sourceOperation : routingOperations) {
- // 璁㈠崟宸ュ簭淇濆瓨鐨勬槸宸ヨ壓宸ュ簭蹇収锛屽悗缁姤宸ュ彧渚濊禆蹇収锛屼笉鍐嶇洿鎺ュ紩鐢ㄥ伐鑹轰富鏁版嵁銆�
ProductionOrderRoutingOperation targetOperation = new ProductionOrderRoutingOperation();
targetOperation.setProductionOrderId(productionOrder.getId());
targetOperation.setTechnologyRoutingOperationId(sourceOperation.getId());
@@ -292,11 +260,7 @@
ProductionOperationTask task = new ProductionOperationTask();
task.setProductionOrderRoutingOperationId(targetOperation.getId());
task.setProductionOrderId(productionOrder.getId());
- task.setPlanQuantity(resolveTaskPlanQuantity(
- sourceOperation,
- operationDemandedQuantityMap,
- productionOrder,
- rootProductModelId));
+ task.setPlanQuantity(orderQuantity);
task.setCompleteQuantity(BigDecimal.ZERO);
task.setWorkOrderNo(generateNextTaskNo());
task.setStatus(2);
@@ -308,7 +272,6 @@
.eq(TechnologyRoutingOperationParam::getTechnologyRoutingOperationId, sourceOperation.getId())
.orderByAsc(TechnologyRoutingOperationParam::getId));
for (TechnologyRoutingOperationParam sourceParam : sourceParams) {
- // 宸ュ簭鎵ц鍙傛暟鍚屾牱鍋氬揩鐓э紝閬垮厤宸ヨ壓鍙傛暟璋冩暣褰卞搷宸蹭笅杈捐鍗曘��
ProductionOrderRoutingOperationParam targetParam = new ProductionOrderRoutingOperationParam();
targetParam.setProductionOrderId(productionOrder.getId());
targetParam.setProductionOrderRoutingOperationId(targetOperation.getId());
@@ -331,150 +294,12 @@
return syncedParamCount;
}
- private Map<String, BigDecimal> buildOperationDemandedQuantityMap(List<ProductionBomStructure> bomStructures,
- Long rootProductModelId) {
- if (bomStructures == null || bomStructures.isEmpty()) {
- return Collections.emptyMap();
- }
- Map<Long, ProductionBomStructure> structureById = bomStructures.stream()
- .filter(item -> item != null && item.getId() != null)
- .collect(Collectors.toMap(ProductionBomStructure::getId, item -> item, (left, right) -> left));
- Map<String, BigDecimal> demandedQuantityMap = new HashMap<>();
- Set<String> mergedOutputNodeKeySet = new HashSet<>();
- for (ProductionBomStructure bomStructure : bomStructures) {
- if (bomStructure == null || bomStructure.getTechnologyOperationId() == null) {
- continue;
- }
- // The BOM row points to the producing operation; task quantity should come from that operation's output node.
- ProductionBomStructure outputNode = resolveOperationOutputNode(bomStructure, structureById);
- Long outputProductModelId = resolveOutputProductModelId(outputNode, rootProductModelId);
- if (outputProductModelId == null) {
- continue;
- }
- String mergedOutputNodeKey = buildOperationOutputNodeKey(
- bomStructure.getTechnologyOperationId(),
- outputNode == null ? null : outputNode.getId(),
- outputProductModelId);
- if (!mergedOutputNodeKeySet.add(mergedOutputNodeKey)) {
- continue;
- }
- // demandedQuantity is already the order-level required output quantity for the current output node.
- BigDecimal demandedQuantity = defaultDecimal(outputNode == null ? null : outputNode.getDemandedQuantity());
- String key = buildOperationDemandedQuantityKey(bomStructure.getTechnologyOperationId(), outputProductModelId);
- demandedQuantityMap.merge(key, demandedQuantity, BigDecimal::add);
- }
- return demandedQuantityMap;
- }
-
- private BigDecimal resolveTaskPlanQuantity(TechnologyRoutingOperation sourceOperation,
- Map<String, BigDecimal> operationDemandedQuantityMap,
- ProductionOrder productionOrder,
- Long rootProductModelId) {
- if (sourceOperation == null || operationDemandedQuantityMap == null || operationDemandedQuantityMap.isEmpty()) {
- return defaultDecimal(productionOrder == null ? null : productionOrder.getQuantity());
- }
- Long outputProductModelId = sourceOperation.getProductModelId() != null
- ? sourceOperation.getProductModelId()
- : rootProductModelId;
- String key = buildOperationDemandedQuantityKey(sourceOperation.getTechnologyOperationId(), outputProductModelId);
- BigDecimal planQuantity = operationDemandedQuantityMap.get(key);
- return planQuantity != null ? planQuantity : defaultDecimal(productionOrder == null ? null : productionOrder.getQuantity());
- }
-
- private String buildOperationDemandedQuantityKey(Long operationId, Long outputProductModelId) {
- return String.valueOf(operationId) + "#" + String.valueOf(outputProductModelId);
- }
-
- private String buildOperationOutputNodeKey(Long operationId, Long outputNodeId, Long outputProductModelId) {
- return String.valueOf(operationId) + "#" + String.valueOf(outputNodeId) + "#" + String.valueOf(outputProductModelId);
- }
-
- private ProductionBomStructure resolveOperationOutputNode(ProductionBomStructure bomStructure,
- Map<Long, ProductionBomStructure> structureById) {
- if (bomStructure == null) {
- return null;
- }
- // The root node is the first output node; child rows use their direct parent as the current operation output.
- if (bomStructure.getParentId() == null) {
- return bomStructure;
- }
- ProductionBomStructure parent = structureById.get(bomStructure.getParentId());
- return parent != null ? parent : bomStructure;
- }
-
- private Long resolveOutputProductModelId(ProductionBomStructure outputNode,
- Long rootProductModelId) {
- if (outputNode == null) {
- return rootProductModelId;
- }
- return outputNode.getProductModelId() != null ? outputNode.getProductModelId() : rootProductModelId;
- }
-
- private ProductionOrderBom syncProductionOrderBomSnapshot(ProductionOrder productionOrder, TechnologyRouting technologyRouting) {
- // 鍚屾璁㈠崟BOM蹇収缁撴瀯
- if (technologyRouting.getBomId() == null) {
- return null;
- }
- TechnologyBom technologyBom = technologyBomMapper.selectById(technologyRouting.getBomId());
- if (technologyBom == null) {
- throw new ServiceException("宸ヨ壓BOM涓嶅瓨鍦�");
- }
- // 鏌ヨ骞跺噯澶囦笟鍔℃暟鎹�
- List<TechnologyBomStructure> structureList = technologyBomStructureMapper.selectList(
- Wrappers.<TechnologyBomStructure>lambdaQuery()
- .eq(TechnologyBomStructure::getBomId, technologyBom.getId())
- .orderByAsc(TechnologyBomStructure::getId));
- // 閬嶅巻澶勭悊鏁版嵁骞剁粍瑁呯粨鏋�
- TechnologyBomStructure root = structureList.stream().filter(item -> item.getParentId() == null).findFirst().orElse(null);
- BigDecimal orderQuantity = defaultDecimal(productionOrder.getQuantity());
-
- ProductionOrderBom orderBom = new ProductionOrderBom();
- orderBom.setProductionOrderId(productionOrder.getId());
- orderBom.setBomId(Long.valueOf(technologyBom.getId()));
- orderBom.setProductModelId(root != null ? root.getProductModelId() : productionOrder.getProductModelId());
- orderBom.setRemark(technologyBom.getRemark());
- orderBom.setBomNo(technologyBom.getBomNo());
- orderBom.setVersion(technologyBom.getVersion());
- // 鎸佷箙鍖栨垨杈撳嚭澶勭悊缁撴灉
- productionOrderBomMapper.insert(orderBom);
-
- Map<Long, Long> idMap = new HashMap<>();
- BigDecimal lastProcessDemandedQuantity = orderQuantity;
- for (TechnologyBomStructure source : structureList) {
- // 瀛愯妭鐐� parentId 闇�瑕佹槧灏勬垚鏂板揩鐓ц妭鐐� id锛屾墠鑳戒繚鐣欏師濮� BOM 灞傜骇銆�
- ProductionBomStructure target = new ProductionBomStructure();
- target.setProductionOrderId(productionOrder.getId());
- target.setProductionOrderBomId(orderBom.getId());
- target.setParentId(source.getParentId() == null ? null : idMap.get(source.getParentId()));
- target.setProductModelId(source.getProductModelId());
- target.setTechnologyOperationId(source.getOperationId());
- target.setUnitQuantity(source.getUnitQuantity());
- target.setDemandedQuantity(lastProcessDemandedQuantity.multiply(source.getUnitQuantity()));
- target.setUnit(source.getUnit());
- productionBomStructureMapper.insert(target);
- idMap.put(source.getId(), target.getId());
- lastProcessDemandedQuantity = target.getDemandedQuantity();
- }
- return orderBom;
- }
-
private void clearProductionSnapshot(Long productionOrderId) {
- // 娓呯悊璁㈠崟宸茬敓鎴愮殑宸ヨ壓涓嶣OM蹇収鏁版嵁
- boolean hasPickRecord = productionOrderPickRecordMapper.selectCount(
- // 鏌ヨ骞跺噯澶囦笟鍔℃暟鎹�
- Wrappers.<ProductionOrderPickRecord>lambdaQuery()
- .eq(ProductionOrderPickRecord::getProductionOrderId, productionOrderId)) > 0;
- // 鍙傛暟涓庡墠缃潯浠舵牎楠�
- if (hasPickRecord) {
- throw new ServiceException("鐢熶骇璁㈠崟宸插瓨鍦ㄩ鏂欒褰曪紝涓嶈兘閲嶆柊鐢熸垚蹇収");
- }
List<Long> taskIds = productionOperationTaskMapper.selectList(
Wrappers.<ProductionOperationTask>lambdaQuery()
.eq(ProductionOperationTask::getProductionOrderId, productionOrderId))
- // 閬嶅巻澶勭悊鏁版嵁骞剁粍瑁呯粨鏋�
.stream().map(ProductionOperationTask::getId).collect(Collectors.toList());
if (!taskIds.isEmpty()) {
- // 宸叉湁鎶ュ伐璁板綍璇存槑璁㈠崟宸插紑宸ワ紝姝ゆ椂涓嶅厑璁稿啀閲嶅缓蹇収銆�
boolean started = productionProductMainMapper.selectCount(
Wrappers.<ProductionProductMain>lambdaQuery()
.in(ProductionProductMain::getProductionOperationTaskId, taskIds)) > 0;
@@ -490,12 +315,6 @@
.eq(ProductionOrderRoutingOperation::getProductionOrderId, productionOrderId));
productionOrderRoutingMapper.delete(Wrappers.<ProductionOrderRouting>lambdaQuery()
.eq(ProductionOrderRouting::getProductionOrderId, productionOrderId));
- productionBomStructureMapper.delete(Wrappers.<ProductionBomStructure>lambdaQuery()
- .eq(ProductionBomStructure::getProductionOrderId, productionOrderId));
- productionOrderBomMapper.delete(Wrappers.<ProductionOrderBom>lambdaQuery()
- .eq(ProductionOrderBom::getProductionOrderId, productionOrderId));
- productionOrderPickMapper.delete(Wrappers.<ProductionOrderPick>lambdaQuery()
- .eq(ProductionOrderPick::getProductionOrderId, productionOrderId));
}
private LambdaQueryWrapper<ProductionOrder> buildQueryWrapper(ProductionOrderDto dto) {
@@ -1013,122 +832,6 @@
throw new ServiceException("鐢熶骇璁㈠崟涓嶅瓨鍦�");
}
return productionOrder.getId();
- }
-
- @Override
- public List<ProductionOrderPickVo> pick(Long productionOrderId) {
- // 鏌ヨ璁㈠崟棰嗘枡銆佹姇鏂欎笌閫�鏂欐槑缁�
- if (productionOrderId == null) {
- return Collections.emptyList();
- }
-
- // 鏌ヨ骞跺噯澶囦笟鍔℃暟鎹�
- ProductionOrderBom orderBom = productionOrderBomMapper.selectOne(
- Wrappers.<ProductionOrderBom>lambdaQuery()
- .eq(ProductionOrderBom::getProductionOrderId, productionOrderId)
- .orderByDesc(ProductionOrderBom::getId)
- .last("limit 1"));
- if (orderBom == null || orderBom.getId() == null) {
- return Collections.emptyList();
- }
-
- // 鏌ヨ瀹屾暣鐨凚OM缁撴瀯锛堝寘鎷牴鑺傜偣锛夛紝鐢ㄤ簬璁$畻灞傜骇闇�姹傛暟閲�
- List<ProductionBomStructureVo> bomStructureList = productionBomStructureMapper.listByBomId(orderBom.getId());
- if (bomStructureList == null || bomStructureList.isEmpty()) {
- return Collections.emptyList();
- }
-
- // 鏌ヨ鐢熶骇璁㈠崟鑾峰彇璁㈠崟鏁伴噺
- ProductionOrder productionOrder = productionOrderMapper.selectById(productionOrderId);
- BigDecimal orderQuantity = productionOrder != null ? defaultDecimal(productionOrder.getQuantity()) : BigDecimal.ZERO;
-
- // 鏋勫缓鏍戝舰缁撴瀯骞惰绠楀眰绾ч渶姹傛暟閲�
- Map<Long, ProductionBomStructureVo> structureByIdMap = bomStructureList.stream()
- .filter(s -> s != null && s.getId() != null)
- .collect(Collectors.toMap(ProductionBomStructureVo::getId, s -> s));
-
- // 鎸夊眰绾ц绠楅渶姹傛暟閲忥細瀛愮骇闇�姹傛暟閲� = 鐖剁骇闇�姹傛暟閲� 脳 瀛愮骇鍗曚綅浜у嚭鎵�闇�鏁伴噺
- for (ProductionBomStructureVo structure : bomStructureList) {
- if (structure == null) continue;
-
- if (structure.getParentId() == null || structure.getParentId() == 0) {
- // 鏍硅妭鐐癸細闇�姹傛暟閲� = 璁㈠崟鏁伴噺
- structure.setDemandedQuantity(orderQuantity);
- } else {
- // 瀛愯妭鐐癸細闇�姹傛暟閲� = 鐖剁骇闇�姹傛暟閲� 脳 瀛愮骇鍗曚綅浜у嚭鎵�闇�鏁伴噺
- ProductionBomStructureVo parent = structureByIdMap.get(structure.getParentId());
- if (parent != null) {
- BigDecimal parentDemandedQty = defaultDecimal(parent.getDemandedQuantity());
- BigDecimal unitQuantity = defaultDecimal(structure.getUnitQuantity());
- structure.setDemandedQuantity(parentDemandedQty.multiply(unitQuantity));
- }
- }
- }
-
- // 杩囨护鍑洪潪鏍硅妭鐐癸紙瀹為檯棰嗘枡椤癸級
- // 鎺掗櫎鎶曞叆鍝佷笌浜у嚭鍝佺浉鍚屼笖姣斾緥涓�1鐨勬儏鍐碉紙鑷韩鍔犲伐锛屼笉闇�瑕侀鏂欙級
- List<ProductionBomStructureVo> childStructureList = bomStructureList.stream()
- .filter(s -> s != null && s.getParentId() != null && s.getParentId() != 0)
- .filter(s -> {
- ProductionBomStructureVo parent = structureByIdMap.get(s.getParentId());
- if (parent == null) {
- return true;
- }
- // 鎶曞叆鍝佷笌浜у嚭鍝佺浉鍚屼笖姣斾緥涓�1鏃讹紝涓嶉渶瑕侀鏂�
- boolean sameProduct = Objects.equals(s.getProductModelId(), parent.getProductModelId());
- boolean unitRatio = BigDecimal.ONE.compareTo(defaultDecimal(s.getUnitQuantity())) == 0;
- return !(sameProduct && unitRatio);
- })
- .collect(Collectors.toList());
-
- // 閬嶅巻澶勭悊鏁版嵁骞剁粍瑁呯粨鏋�
- List<Long> productModelIds = childStructureList.stream()
- .map(ProductionBomStructureVo::getProductModelId)
- .filter(Objects::nonNull)
- .distinct()
- .collect(Collectors.toList());
- Map<Long, BigDecimal> stockQuantityMap = new HashMap<>();
- Map<Long, LinkedHashSet<String>> stockBatchNoMap = new HashMap<>();
- if (!productModelIds.isEmpty()) {
- List<StockInventory> stockList = stockInventoryMapper.selectList(
- Wrappers.<StockInventory>lambdaQuery()
- .in(StockInventory::getProductModelId, productModelIds));
- for (StockInventory stockItem : stockList) {
- if (stockItem == null || stockItem.getProductModelId() == null) {
- continue;
- }
- Long productModelId = stockItem.getProductModelId();
- stockQuantityMap.merge(productModelId, defaultDecimal(stockItem.getQualitity()), BigDecimal::add);
- String batchNo = stockItem.getBatchNo();
- if (batchNo != null && !batchNo.trim().isEmpty()) {
- stockBatchNoMap.computeIfAbsent(productModelId, key -> new LinkedHashSet<>()).add(batchNo);
- }
- }
- }
-
- List<ProductionOrderPickVo> pickList = new ArrayList<>();
- for (ProductionBomStructureVo structure : childStructureList) {
- if (structure == null || structure.getProductModelId() == null) {
- continue;
- }
- Long productModelId = structure.getProductModelId();
- ProductionOrderPickVo vo = new ProductionOrderPickVo();
- vo.setProductModelId(productModelId);
- vo.setOperationName(structure.getOperationName());
- vo.setTechnologyOperationId(structure.getTechnologyOperationId());
- vo.setProductName(structure.getProductName());
- vo.setModel(structure.getModel());
- vo.setDemandedQuantity(defaultDecimal(structure.getDemandedQuantity()));
- vo.setUnit(structure.getUnit());
- List<String> batchNoList = stockBatchNoMap.get(productModelId) == null
- ? Collections.emptyList()
- : new ArrayList<>(stockBatchNoMap.get(productModelId));
- vo.setBatchNoList(batchNoList);
- vo.setStockQuantity(stockQuantityMap.getOrDefault(productModelId, BigDecimal.ZERO));
- vo.setBom(true);
- pickList.add(vo);
- }
- return pickList;
}
@Override
--
Gitblit v1.9.3