Răsfoiți Sursa

调整推钢室界面 统计数据逻辑

guoqiang 1 zi în urmă
părinte
comite
4d2d2429c4

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

@@ -2309,19 +2309,42 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 												.mapToDouble(BilletBasicInfo::getBilletWeight)
 												.sum();
 										totalWeight = Math.round(totalWeight * 10000) / 10000.0;
-
 										// 统计每组的总数
 										int totalCount = list.size();
-
 										// 创建每组的结果Map
 										Map<String, Object> groupResult = new HashMap<>();
 										groupResult.put("lengthTotalWeight", totalWeight);
 										groupResult.put("lengthTotalCount", totalCount);
+										//棒一统计
+										long rollClubOneCount = list.stream()
+												.filter(billet -> "roll_club_one".equals(billet.getBelongTable()))
+												.count();
+										groupResult.put("rollClubOneCount", (int) rollClubOneCount);
+										// 棒二统计
+										long rollClubTwoCount = list.stream()
+												.filter(billet -> "roll_club_two".equals(billet.getBelongTable()))
+												.count();
+										groupResult.put("rollClubTwoCount", (int) rollClubTwoCount);
+										// 付跨统计
+										long rollDeputyCrossCount = list.stream()
+												.filter(billet -> "roll_deputy_cross".equals(billet.getBelongTable()))
+												.count();
+										groupResult.put("rollDeputyCrossCount", (int) rollClubTwoCount);
+										// 棒三统计
+										long rollClubThreeCount = list.stream()
+												.filter(billet -> "roll_club_three".equals(billet.getBelongTable()))
+												.count();
+										groupResult.put("rollClubThreeCount", (int) rollClubThreeCount);
+										// 堆垛统计
+										long stackingAndLoadingVehiclesCount = list.stream()
+												.filter(billet -> "stacking_and_loading_vehicles".equals(billet.getBelongTable()))
+												.count();
+										groupResult.put("stackingAndLoadingVehiclesCount", (int) stackingAndLoadingVehiclesCount);
+										// roll_out_shipp = 上若 roll_club_one = 棒一  roll_club_three = 棒三 roll_club_two = 棒二 stacking_and_loading_vehicles = 堆垛 roll_deputy_cross = 付跨 定义数据
 										return groupResult;
 									}
 							)
 					));
-
 			// 将Integer键转换为String键
 			Map<String, Map<String, Object>> stringKeyMap = lengthResultMap.entrySet().stream()
 					.collect(Collectors.toMap(

+ 2 - 2
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/service/impl/StorageBillServiceImpl.java

@@ -2522,8 +2522,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
         LambdaQueryWrapper<BilletBasicInfo> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(BilletBasicInfo::getCcmNo, ccmNo)
                 .eq(BilletBasicInfo::getShift, shift)
-                .eq(BilletBasicInfo::getShiftGroup, shiftGroup)
-                .ne(BilletBasicInfo::getBhtcId, "1025");
+                .eq(BilletBasicInfo::getShiftGroup, shiftGroup);
+        queryWrapper.and(wrapper -> wrapper.ne(BilletBasicInfo::getBhtcId, 1025).or().isNull(BilletBasicInfo::getBhtcId));
         if (oConvertUtils.isEmpty(changeShiftId)) {
             // 当 changeShiftId 为空时,时间范围从 createTime 到当前时间
             queryWrapper.between(BilletBasicInfo::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());