diff --git a/src/main/java/com/gaotao/modules/productionReturn/service/impl/ProductionReturnServiceImpl.java b/src/main/java/com/gaotao/modules/productionReturn/service/impl/ProductionReturnServiceImpl.java
index 2e4bace..b7bf737 100644
--- a/src/main/java/com/gaotao/modules/productionReturn/service/impl/ProductionReturnServiceImpl.java
+++ b/src/main/java/com/gaotao/modules/productionReturn/service/impl/ProductionReturnServiceImpl.java
@@ -99,11 +99,11 @@ public class ProductionReturnServiceImpl implements ProductionReturnService {
.map(label -> (String) label.get("labelCode"))
.collect(Collectors.toList());
- // 3. 更新SFDC_ROLLS表中标签状态为"已入库"
- int updatedLabels = productionReturnMapper.updateSfdcRollsStatus(labelCodes, "已入库", site, buNo);
- if (updatedLabels != labelCodes.size()) {
- throw new RuntimeException("部分标签状态更新失败");
- }
+// // 3. 更新SFDC_ROLLS表中标签状态为"已入库"
+// int updatedLabels = productionReturnMapper.updateSfdcRollsStatus(labelCodes, "已入库", site, buNo);
+// if (updatedLabels != labelCodes.size()) {
+// throw new RuntimeException("部分标签状态更新失败");
+// }
// 5. 插入库存数据
insertInventoryStock(orderNo, warehouseId, locationCode, labels, site, buNo);
@@ -155,24 +155,24 @@ public class ProductionReturnServiceImpl implements ProductionReturnService {
// 转换数量
BigDecimal quantity = convertToDecimal(quantityObj);
- // 查询库存是否已存在
- InventoryStock existingStock = inventoryStockService.getByRollNo(labelCode, actualSite, actualBuNo, partNo, warehouseId, locationCode, batchNo);
-
- if (existingStock != null) {
- // 库存已存在,更新数量
- logger.info("库存记录已存在,更新数量,标签: {}, 原数量: {}, 增加数量: {}",
- labelCode, existingStock.getQtyOnHand(), quantity);
+// // 查询库存是否已存在
+// InventoryStock existingStock = inventoryStockService.getByRollNo(labelCode, actualSite, actualBuNo, partNo, warehouseId, locationCode, batchNo);
+//
+// if (existingStock != null) {
+// // 库存已存在,更新数量
+// logger.info("库存记录已存在,更新数量,标签: {}, 原数量: {}, 增加数量: {}",
+// labelCode, existingStock.getQtyOnHand(), quantity);
boolean updateSuccess = inventoryStockService.updateInventoryQuantity(labelCode, quantity, actualSite, actualBuNo, partNo, warehouseId, locationCode, batchNo);
if (!updateSuccess) {
throw new RuntimeException("更新库存数量失败,标签: " + labelCode);
}
updatedCount++;
- } else {
- // 库存不存在,创建新记录
- InventoryStock inventoryStock = createNewInventoryStock(labelCode, partNo, warehouseId, locationCode, batchNo, quantity, orderNo, currentDate, actualSite, actualBuNo);
- newInventoryList.add(inventoryStock);
- }
+// } else {
+// // 库存不存在,创建新记录
+// InventoryStock inventoryStock = createNewInventoryStock(labelCode, partNo, warehouseId, locationCode, batchNo, quantity, orderNo, currentDate, actualSite, actualBuNo);
+// newInventoryList.add(inventoryStock);
+// }
}
// 批量插入新的库存记录
@@ -345,7 +345,7 @@ public class ProductionReturnServiceImpl implements ProductionReturnService {
transDetail.setTransqty(quantity);
transDetail.setDirection("+");
transDetail.setOrderref2(buNo);
- transDetail.setRemark("生产订单入库上架");
+ transDetail.setRemark("生产退仓上架");
transDetailList.add(transDetail);
itemNo += 1.0;
}
diff --git a/src/main/resources/mapper/inventoryStock/InventoryStockMapper.xml b/src/main/resources/mapper/inventoryStock/InventoryStockMapper.xml
index 192f1d2..620b860 100644
--- a/src/main/resources/mapper/inventoryStock/InventoryStockMapper.xml
+++ b/src/main/resources/mapper/inventoryStock/InventoryStockMapper.xml
@@ -127,10 +127,10 @@
WHERE roll_no = #{rollNo}
AND site = #{site}
AND bu_no = #{buNo}
- and part_no= #{partNo}
- and warehouse_id = #{warehouseId}
- and location_id = #{locationCode}
- and batch_no = #{batchNo}
+
+
+
+
diff --git a/src/main/resources/mapper/productionReturn/ProductionReturnMapper.xml b/src/main/resources/mapper/productionReturn/ProductionReturnMapper.xml
index 4aa97b2..2b15f9c 100644
--- a/src/main/resources/mapper/productionReturn/ProductionReturnMapper.xml
+++ b/src/main/resources/mapper/productionReturn/ProductionReturnMapper.xml
@@ -43,17 +43,42 @@