|
@@ -3043,7 +3043,9 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
|
|
|
// 根据铸机号、班组、班别、创建时间 查询垛位起剁明细表
|
|
|
LambdaQueryWrapper<StackingUpLog> stackingUpLogQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
- stackingUpLogQueryWrapper.eq(StackingUpLog::getCcmNo, ccmNo);
|
|
|
+ stackingUpLogQueryWrapper.eq(StackingUpLog::getCcmNo, ccmNo)
|
|
|
+ .eq(StackingUpLog::getShift, shift)
|
|
|
+ .eq(StackingUpLog::getShiftGroup, shiftGroup);
|
|
|
|
|
|
stackingUpLogQueryWrapper.between(StackingUpLog::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
|
|
|
|
|
@@ -3070,9 +3072,13 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
LambdaQueryWrapper<RollClubTwoDetails> queryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
if (idList != null && !idList.isEmpty()) {
|
|
|
queryWrapper2.eq(RollClubTwoDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubTwoDetails::getShift, shift)
|
|
|
+ .eq(RollClubTwoDetails::getShiftGroup, shiftGroup)
|
|
|
.in(RollClubTwoDetails::getStorageBillId, idList);
|
|
|
} else {
|
|
|
- queryWrapper2.eq(RollClubTwoDetails::getCcmNo, ccmNo);
|
|
|
+ queryWrapper2.eq(RollClubTwoDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubTwoDetails::getShift, shift)
|
|
|
+ .eq(RollClubTwoDetails::getShiftGroup, shiftGroup);
|
|
|
}
|
|
|
|
|
|
List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(queryWrapper2);
|
|
@@ -3086,9 +3092,13 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
LambdaQueryWrapper<RollClubThreeDetails> queryWrapper3 = new LambdaQueryWrapper<>();
|
|
|
if (idList != null && !idList.isEmpty()) {
|
|
|
queryWrapper3.eq(RollClubThreeDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubThreeDetails::getShift, shift)
|
|
|
+ .eq(RollClubThreeDetails::getShiftGroup, shiftGroup)
|
|
|
.in(RollClubThreeDetails::getStorageBillId, idList);
|
|
|
} else {
|
|
|
- queryWrapper3.eq(RollClubThreeDetails::getCcmNo, ccmNo);
|
|
|
+ queryWrapper3.eq(RollClubThreeDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubThreeDetails::getShift, shift)
|
|
|
+ .eq(RollClubThreeDetails::getShiftGroup, shiftGroup);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -3115,9 +3125,13 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
LambdaQueryWrapper<RollOutShippDetails> queryWrapper5 = new LambdaQueryWrapper<>();
|
|
|
if (idList != null && !idList.isEmpty()) {
|
|
|
queryWrapper5.eq(RollOutShippDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollOutShippDetails::getShift, shift)
|
|
|
+ .eq(RollOutShippDetails::getShiftGroup, shiftGroup)
|
|
|
.in(RollOutShippDetails::getStorageBillId, idList);
|
|
|
} else {
|
|
|
- queryWrapper5.eq(RollOutShippDetails::getCcmNo, ccmNo);
|
|
|
+ queryWrapper5.eq(RollOutShippDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollOutShippDetails::getShift, shift)
|
|
|
+ .eq(RollOutShippDetails::getShiftGroup, shiftGroup);
|
|
|
}
|
|
|
|
|
|
List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippDetailsService.list(queryWrapper5);
|
|
@@ -3617,7 +3631,6 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
|
|
|
if (oConvertUtils.listIsEmpty(storageBillList)){
|
|
|
log.info("{}{}", "查询当班装运单信息为空!", ccmNo);
|
|
|
- return onDutyStorageBillStatistics;
|
|
|
}
|
|
|
int allCarNum = storageBillList.size();
|
|
|
List<DestinationStatisticsDetails> statisticsDetailsList1 = new ArrayList<>();
|
|
@@ -3629,7 +3642,13 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
for (StorageBill storageBill : storageBillList) {
|
|
|
if ("棒二".equals(storageBill.getDestination())) {
|
|
|
LambdaQueryWrapper<RollClubTwoDetails> queryWrapper3 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper3.eq(RollClubTwoDetails::getCcmNo, ccmNo).eq(RollClubTwoDetails::getStorageBillId, storageBill.getId());
|
|
|
+ queryWrapper3.eq(RollClubTwoDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubTwoDetails::getShift,shift)
|
|
|
+ .eq(RollClubTwoDetails::getShiftGroup,shiftGroup);
|
|
|
+
|
|
|
+ if (storageBill != null && storageBill.getId() != null) {
|
|
|
+ queryWrapper3.eq(RollClubTwoDetails::getStorageBillId, storageBill.getId());
|
|
|
+ }
|
|
|
List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(queryWrapper3);
|
|
|
if (oConvertUtils.listIsNotEmpty(rollClubTwoDetailsList)) {
|
|
|
List<DestinationStatisticsDetails> currentList1 = rollClubTwoDetailsList.stream()
|
|
@@ -3655,7 +3674,13 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
|
|
|
if ("棒三".equals(storageBill.getDestination())) {
|
|
|
LambdaQueryWrapper<RollClubThreeDetails> queryWrapper3 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper3.eq(RollClubThreeDetails::getCcmNo, ccmNo).eq(RollClubThreeDetails::getStorageBillId, storageBill.getId());
|
|
|
+ queryWrapper3.eq(RollClubThreeDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubThreeDetails::getShift,shift)
|
|
|
+ .eq(RollClubThreeDetails::getShiftGroup,shiftGroup);
|
|
|
+
|
|
|
+ if (storageBill != null && storageBill.getId() != null) {
|
|
|
+ queryWrapper3.eq(RollClubThreeDetails::getStorageBillId, storageBill.getId());
|
|
|
+ }
|
|
|
List<RollClubThreeDetails> rollClubThreeDetailsList = rollClubThreeDetailsService.list(queryWrapper3);
|
|
|
if (oConvertUtils.listIsNotEmpty(rollClubThreeDetailsList)) {
|
|
|
List<DestinationStatisticsDetails> currentList2 = rollClubThreeDetailsList.stream()
|
|
@@ -3681,7 +3706,13 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
|
|
|
if ("上若".equals(storageBill.getDestination())) {
|
|
|
LambdaQueryWrapper<RollOutShippDetails> queryWrapper3 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper3.eq(RollOutShippDetails::getCcmNo, ccmNo).eq(RollOutShippDetails::getStorageBillId, storageBill.getId());
|
|
|
+ queryWrapper3.eq(RollOutShippDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollOutShippDetails::getShift,shift)
|
|
|
+ .eq(RollOutShippDetails::getShiftGroup,shiftGroup);
|
|
|
+
|
|
|
+ if (storageBill != null && storageBill.getId() != null) {
|
|
|
+ queryWrapper3.eq(RollOutShippDetails::getStorageBillId, storageBill.getId());
|
|
|
+ }
|
|
|
List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippDetailsService.list(queryWrapper3);
|
|
|
if (oConvertUtils.listIsNotEmpty(rollOutShippDetailsList)) {
|
|
|
List<DestinationStatisticsDetails> currentList3 = rollOutShippDetailsList.stream()
|
|
@@ -3732,7 +3763,9 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
|
|
|
// 根据铸机号、班组、班别、创建时间 查询垛位起剁明细表
|
|
|
LambdaQueryWrapper<StackingUpLog> stackingUpLogQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
- stackingUpLogQueryWrapper.eq(StackingUpLog::getCcmNo, ccmNo);
|
|
|
+ stackingUpLogQueryWrapper.eq(StackingUpLog::getCcmNo, ccmNo)
|
|
|
+ .eq(StackingUpLog::getShift,shift)
|
|
|
+ .eq(StackingUpLog::getShiftGroup,shiftGroup);
|
|
|
|
|
|
stackingUpLogQueryWrapper.between(StackingUpLog::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
|
|
|
|
|
@@ -3797,8 +3830,16 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
|
|
|
// 根据铸机号、班组、班别、时间范围。查询棒二明细表
|
|
|
LambdaQueryWrapper<RollClubTwoDetails> queryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper2.eq(RollClubTwoDetails::getCcmNo, ccmNo)
|
|
|
- .in(RollClubTwoDetails::getStorageBillId, idList);
|
|
|
+ if (idList != null && !idList.isEmpty()) {
|
|
|
+ queryWrapper2.eq(RollClubTwoDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubTwoDetails::getShift, shift)
|
|
|
+ .eq(RollClubTwoDetails::getShiftGroup, shiftGroup)
|
|
|
+ .in(RollClubTwoDetails::getStorageBillId, idList);
|
|
|
+ } else {
|
|
|
+ queryWrapper2.eq(RollClubTwoDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubTwoDetails::getShift, shift)
|
|
|
+ .eq(RollClubTwoDetails::getShiftGroup, shiftGroup);
|
|
|
+ }
|
|
|
|
|
|
List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(queryWrapper2);
|
|
|
if (oConvertUtils.listIsNotEmpty(rollClubTwoDetailsList)){
|
|
@@ -3818,8 +3859,16 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
|
|
|
// 根据铸机号、班组、班别、时间范围。查询棒三明细表
|
|
|
LambdaQueryWrapper<RollClubThreeDetails> queryWrapper3 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper3.eq(RollClubThreeDetails::getCcmNo, ccmNo)
|
|
|
- .in(RollClubThreeDetails::getStorageBillId, idList);
|
|
|
+ if (idList != null && !idList.isEmpty()) {
|
|
|
+ queryWrapper3.eq(RollClubThreeDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubThreeDetails::getShift, shift)
|
|
|
+ .eq(RollClubThreeDetails::getShiftGroup, shiftGroup)
|
|
|
+ .in(RollClubThreeDetails::getStorageBillId, idList);
|
|
|
+ } else {
|
|
|
+ queryWrapper3.eq(RollClubThreeDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollClubThreeDetails::getShift, shift)
|
|
|
+ .eq(RollClubThreeDetails::getShiftGroup, shiftGroup);
|
|
|
+ }
|
|
|
|
|
|
List<RollClubThreeDetails> rollClubThreeDetailsList = rollClubThreeDetailsService.list(queryWrapper3);
|
|
|
if (oConvertUtils.listIsNotEmpty(rollClubThreeDetailsList)){
|
|
@@ -3845,7 +3894,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
.between(RollHeightDetails::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
|
|
|
|
|
|
List<RollHeightDetails> rollHeightDetailsList = rollHeightDetailsService.list(queryWrapper4);
|
|
|
- if (oConvertUtils.listIsNotEmpty(rollClubTwoDetailsList)){
|
|
|
+ if (oConvertUtils.listIsNotEmpty(rollHeightDetailsList)){
|
|
|
// 高线总支数 高线属于热送
|
|
|
int hotSendHeightSum = rollHeightDetailsList.stream()
|
|
|
.mapToInt(details -> details.getStackAddr() != null && !details.getStackAddr().isEmpty() ? 4 : 1).sum();
|
|
@@ -3865,8 +3914,16 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
|
|
|
// 根据铸机号、班组、班别、时间范围。查询上若明细表
|
|
|
LambdaQueryWrapper<RollOutShippDetails> queryWrapper5 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper5.eq(RollOutShippDetails::getCcmNo, ccmNo)
|
|
|
- .in(RollOutShippDetails::getStorageBillId, idList);
|
|
|
+ if (idList != null && !idList.isEmpty()) {
|
|
|
+ queryWrapper5.eq(RollOutShippDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollOutShippDetails::getShift, shift)
|
|
|
+ .eq(RollOutShippDetails::getShiftGroup, shiftGroup)
|
|
|
+ .in(RollOutShippDetails::getStorageBillId, idList);
|
|
|
+ } else {
|
|
|
+ queryWrapper5.eq(RollOutShippDetails::getCcmNo, ccmNo)
|
|
|
+ .eq(RollOutShippDetails::getShift, shift)
|
|
|
+ .eq(RollOutShippDetails::getShiftGroup, shiftGroup);
|
|
|
+ }
|
|
|
|
|
|
List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippDetailsService.list(queryWrapper5);
|
|
|
if (oConvertUtils.listIsNotEmpty(rollOutShippDetailsList)){
|
|
@@ -4198,6 +4255,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
shift = billetHotsendChangeShift.getShift();
|
|
|
}
|
|
|
|
|
|
+ onDutySteelVo.setShiftGroup(shiftGroup);
|
|
|
+ onDutySteelVo.setShift(shift);
|
|
|
|
|
|
// 根据铸机号、班组、班别,amountTotal不等于0 ,查询当班装运单信息
|
|
|
LambdaQueryWrapper<StorageBill> queryWrapper2 = new LambdaQueryWrapper<>();
|