Explorar el Código

钢坯装运单-分页列表查询总支数判断堆垛不为空的情况

lingpeng.li hace 2 meses
padre
commit
d0028482dd

+ 1 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubThree/service/impl/RollClubThreeDetailsServiceImpl.java

@@ -123,7 +123,7 @@ public class RollClubThreeDetailsServiceImpl extends ServiceImpl<RollClubThreeDe
                 }).collect(Collectors.toList());
 
 
-        // 8. 组装最终对象
+        // 7. 组装最终对象
         rollOnDutyVo.setRollOnDutyRecordList(recordVoList);
         rollOnDutyVo.setRollOnDutyDetailList(detailVoList);
         rollOnDutyVo.setRollOnDutyInfoList(infoVoList);

+ 5 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/controller/StorageBillController.java

@@ -154,7 +154,11 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 
 		// 4. 计算 `amountTotal`
 		Map<String, Long> billetCountMap = billetAutoTmpList.stream()
-				.collect(Collectors.groupingBy(BilletAutoTmp::getStorageBillId, Collectors.counting()));
+				.collect(Collectors.groupingBy(
+						BilletAutoTmp::getStorageBillId,
+						Collectors.summingLong(tmp -> (tmp.getStackAddr() != null && !tmp.getStackAddr().isEmpty()) ? 4L : 1L)
+				));
+
 
 		List<StorageBill> filteredRecords = allRecords.stream()
 				.peek(bill -> bill.setAmountTotal(