|
@@ -21,6 +21,7 @@ import org.jeecg.modules.actualControl.billetActual.billetActual.service.IBillet
|
|
|
import org.jeecg.modules.actualControl.heatsActuals.entity.HeatsActuals;
|
|
|
import org.jeecg.modules.actualControl.heatsActuals.service.IHeatsActualsService;
|
|
|
import org.jeecg.modules.billet.billetAutoTmp.entity.BilletAutoTmp;
|
|
|
+import org.jeecg.modules.billet.billetAutoTmp.mapper.BilletAutoTmpMapper;
|
|
|
import org.jeecg.modules.billet.billetAutoTmp.service.IBilletAutoTmpService;
|
|
|
import org.jeecg.modules.billet.billetHotsend.entity.BilletHotsend;
|
|
|
import org.jeecg.modules.billet.billetHotsend.entity.BilletHotsendDetailsVo;
|
|
@@ -34,20 +35,25 @@ import org.jeecg.modules.billet.billetLiftingBill.entity.BilletLiftingBill;
|
|
|
import org.jeecg.modules.billet.billetLiftingBill.service.IBilletLiftingBillService;
|
|
|
import org.jeecg.modules.billet.operateLog.service.IOperateLogService;
|
|
|
import org.jeecg.modules.billet.rollClubOne.entity.RollClubOneDetails;
|
|
|
+import org.jeecg.modules.billet.rollClubOne.mapper.RollClubOneDetailsMapper;
|
|
|
import org.jeecg.modules.billet.rollClubOne.service.IRollClubOneDetailsService;
|
|
|
import org.jeecg.modules.billet.rollClubThree.entity.RollClubThree;
|
|
|
import org.jeecg.modules.billet.rollClubThree.entity.RollClubThreeDetails;
|
|
|
+import org.jeecg.modules.billet.rollClubThree.mapper.RollClubThreeDetailsMapper;
|
|
|
import org.jeecg.modules.billet.rollClubThree.service.IRollClubThreeDetailsService;
|
|
|
import org.jeecg.modules.billet.rollClubThree.service.IRollClubThreeService;
|
|
|
import org.jeecg.modules.billet.rollClubTwo.entity.RollClubTwo;
|
|
|
import org.jeecg.modules.billet.rollClubTwo.entity.RollClubTwoDetails;
|
|
|
+import org.jeecg.modules.billet.rollClubTwo.mapper.RollClubTwoDetailsMapper;
|
|
|
import org.jeecg.modules.billet.rollClubTwo.service.IRollClubTwoDetailsService;
|
|
|
import org.jeecg.modules.billet.rollClubTwo.service.IRollClubTwoService;
|
|
|
import org.jeecg.modules.billet.rollHeight.entity.DestinationStatisticsDetails;
|
|
|
import org.jeecg.modules.billet.rollHeight.entity.RollHeightDetails;
|
|
|
+import org.jeecg.modules.billet.rollHeight.mapper.RollHeightDetailsMapper;
|
|
|
import org.jeecg.modules.billet.rollHeight.service.IRollHeightDetailsService;
|
|
|
import org.jeecg.modules.billet.rollOutShipp.entity.RollOutShipp;
|
|
|
import org.jeecg.modules.billet.rollOutShipp.entity.RollOutShippDetails;
|
|
|
+import org.jeecg.modules.billet.rollOutShipp.mapper.RollOutShippDetailsMapper;
|
|
|
import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippDetailsService;
|
|
|
import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippService;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingAndLoadingVehicles;
|
|
@@ -158,6 +164,20 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
|
|
|
@Autowired
|
|
|
private StackingAndLoadingVehiclesMapper stackingAndLoadingVehiclesMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RollClubTwoDetailsMapper rollClubTwoDetailsMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RollClubThreeDetailsMapper rollClubThreeDetailsMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RollOutShippDetailsMapper rollOutShippDetailsMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private BilletAutoTmpMapper billetAutoTmpMapper;
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public void departHandle(BilletHotsendDetailsVo billetHotsendDetailsVo) {
|
|
|
StorageBill storageBill = billetHotsendDetailsVo.getStorageBill();
|
|
@@ -6160,6 +6180,34 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
return "切换棒线操作成功!";
|
|
|
}
|
|
|
|
|
|
+ public void fillHeatNoCountMapForBills(List<StorageBill> storageBills) {
|
|
|
+ if (oConvertUtils.isEmpty(storageBills)) {return;}
|
|
|
+
|
|
|
+ List<String> storageBillIds = storageBills.stream()
|
|
|
+ .map(StorageBill::getId)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ List<HeatNoCount> allCounts = new ArrayList<>();
|
|
|
+ allCounts.addAll(rollClubTwoDetailsMapper.countHeatNoGroupBy(storageBillIds));
|
|
|
+ allCounts.addAll(rollClubThreeDetailsMapper.countHeatNoGroupBy(storageBillIds));
|
|
|
+ allCounts.addAll(rollOutShippDetailsMapper.countHeatNoGroupBy(storageBillIds));
|
|
|
+ allCounts.addAll(billetAutoTmpMapper.countHeatNoGroupBy(storageBillIds));
|
|
|
+
|
|
|
+ // 聚合到 Map<storageBillId, Map<heatNo, count>>
|
|
|
+ Map<String, Map<String, Integer>> billHeatNoMap = new HashMap<>();
|
|
|
+ for (HeatNoCount dto : allCounts) {
|
|
|
+ billHeatNoMap
|
|
|
+ .computeIfAbsent(dto.getStorageBillId(), k -> new HashMap<>())
|
|
|
+ .merge(dto.getHeatNo(), dto.getCount(), Integer::sum);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置回每个 StorageBill 对象中
|
|
|
+ for (StorageBill bill : storageBills) {
|
|
|
+ Map<String, Integer> heatNoMap = billHeatNoMap.getOrDefault(bill.getId(), new HashMap<>());
|
|
|
+ bill.setHeatNoCountMap(heatNoMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 棒二切换到其他目的地的处理逻辑
|
|
|
*/
|