|
@@ -29,7 +29,6 @@ import org.jeecg.modules.billetLiftingBill.service.IBilletLiftingBillService;
|
|
|
import org.jeecg.modules.connConfig.configMqtt.mapper.ConfigMqttMapper;
|
|
|
import org.jeecg.modules.operateLog.entity.OperateLog;
|
|
|
import org.jeecg.modules.operateLog.service.IOperateLogService;
|
|
|
-import org.jeecg.modules.push.utils.MqttClientCallback;
|
|
|
import org.jeecg.modules.push.utils.MqttClientUtil;
|
|
|
import org.jeecg.modules.push.utils.TopicType;
|
|
|
import org.jeecg.modules.rollClubThree.entity.RollClubThree;
|
|
@@ -44,8 +43,6 @@ import org.jeecg.modules.rollDeputyCross.entity.RollDeputyCross;
|
|
|
import org.jeecg.modules.rollDeputyCross.entity.RollDeputyCrossDetails;
|
|
|
import org.jeecg.modules.rollDeputyCross.service.IRollDeputyCrossDetailsService;
|
|
|
import org.jeecg.modules.rollDeputyCross.service.IRollDeputyCrossService;
|
|
|
-import org.jeecg.modules.rollHeight.entity.RollHeight;
|
|
|
-import org.jeecg.modules.rollHeight.entity.RollHeightDetails;
|
|
|
import org.jeecg.modules.rollHeight.service.IRollHeightDetailsService;
|
|
|
import org.jeecg.modules.rollHeight.service.IRollHeightService;
|
|
|
import org.jeecg.modules.rollOutShipp.entity.RollOutShipp;
|
|
@@ -60,11 +57,8 @@ import org.jeecg.modules.stackingAndLoadingVehicles.service.IStackingAndLoadingV
|
|
|
import org.jeecg.modules.stackingAndLoadingVehicles.service.IStackingDownLogService;
|
|
|
import org.jeecg.modules.stackingAndLoadingVehicles.service.IStackingUpLogService;
|
|
|
import org.jeecg.modules.stackingAndLoadingVehicles.vo.LoadingParams;
|
|
|
-import org.jeecg.modules.storageBill.entity.ShiftEnum;
|
|
|
-import org.jeecg.modules.storageBill.entity.ShiftGroupEnum;
|
|
|
import org.jeecg.modules.storageBill.entity.StorageBill;
|
|
|
import org.jeecg.modules.storageBill.service.IStorageBillService;
|
|
|
-import org.jeecg.modules.storageCarLog.entity.StorageCarLog;
|
|
|
import org.jeecg.modules.storageCarLog.service.IStorageCarLogService;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -73,11 +67,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
-
|
|
|
import java.util.*;
|
|
|
-import java.util.concurrent.CompletableFuture;
|
|
|
-import java.util.concurrent.TimeUnit;
|
|
|
-import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.concurrent.atomic.AtomicLong;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -317,8 +307,6 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
BilletLiftingBill billetLiftingBill = new BilletLiftingBill();
|
|
|
billetLiftingBill.setId(String.valueOf(IdWorker.getId()));
|
|
|
billetLiftingBill.setCcmNo(ccmNo);
|
|
|
- billetLiftingBill.setShiftGroup(shiftGroupHandle(ccmNo));
|
|
|
- billetLiftingBill.setShift(shiftHandle(ccmNo));
|
|
|
billetLiftingBill.setAddress(address);
|
|
|
billetLiftingBill.setLayer(layer);
|
|
|
billetLiftingBill.setVehicleNumber(jsonObject.getString("vehicleNumber"));
|
|
@@ -349,7 +337,6 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesLists = new ArrayList<>();
|
|
|
|
|
|
StackingAndLoadingVehicles stackingAndLoadingVehiclesInfo = baseMapper.selectOne(new LambdaQueryWrapper<StackingAndLoadingVehicles>()
|
|
|
- .eq(StackingAndLoadingVehicles::getCcmNo, ccmNo)
|
|
|
.eq(StackingAndLoadingVehicles::getLayer, layer)
|
|
|
.eq(StackingAndLoadingVehicles::getAddress, address)
|
|
|
.eq(StackingAndLoadingVehicles::getTypeConfigId, billetHotsendTypeConfig.getId())
|
|
@@ -361,31 +348,7 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
stackingAndLoadingVehiclesLists.add(stackingAndLoadingVehiclesInfo);
|
|
|
loadingParams.setStackingAndLoadingVehiclesList(stackingAndLoadingVehiclesLists);
|
|
|
String allBilletNos = stackingAndLoadingVehiclesInfo.getBilletNos();
|
|
|
- // 获取所有的坯号集合
|
|
|
- List<String> allBilletNoList = Arrays.asList(allBilletNos.split(","));
|
|
|
-
|
|
|
- LambdaQueryWrapper<BilletBasicInfo> queryWrapperBB = new LambdaQueryWrapper<BilletBasicInfo>()
|
|
|
- .eq(BilletBasicInfo::getCcmNo, Integer.valueOf(ccmNo))
|
|
|
- .in(BilletBasicInfo::getBilletNo, allBilletNoList);
|
|
|
- List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperBB);
|
|
|
- if (oConvertUtils.listIsEmpty(billetBasicInfoList)) {
|
|
|
- log.info("{}{}", "钢坯基础信息为空,C端自动化垛位装车保存失败", stackingAndLoadingVehiclesInfo.getBilletNos());
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
- // 2025 3.3,C端自动化推送保存、B端手动发车临时方案,
|
|
|
- LambdaQueryWrapper<StorageBill> queryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper2.eq(StorageBill::getPositionNum, Integer.valueOf(positionNum))
|
|
|
- .isNull(StorageBill::getOutTime);
|
|
|
- // 2号车位不验证铸机号
|
|
|
- if (!positionNum.equals("2")) {
|
|
|
- queryWrapper2.eq(StorageBill::getCcmNo, ccmNo);
|
|
|
- }
|
|
|
- StorageBill isStorageBill = storageBillService.getOne(queryWrapper2);
|
|
|
- if (oConvertUtils.isEmpty(isStorageBill)) {
|
|
|
- log.info("钢坯装运单不存在,车位号为:{},C端自动化垛位装车保存失败!", positionNum);
|
|
|
- return;
|
|
|
- }
|
|
|
// 截取钢坯的第九位字符,为最终铸机号
|
|
|
ccmNo = Optional.ofNullable(allBilletNos)
|
|
|
.filter(s -> !s.isEmpty())
|
|
@@ -400,14 +363,22 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
String shift = shiftHandle(ccmNo);
|
|
|
log.info("C端自动化垛位装车缓存中的班组、班别:{}", shiftGroup + ":" + shift);
|
|
|
if (oConvertUtils.isEmpty(shiftGroup) || oConvertUtils.isEmpty(shift)){
|
|
|
- log.info("{}{}", "班组班别获取为空,C端自动化垛位装车<保存>失败!", JSON.toJSON(isStorageBill));
|
|
|
+ log.info("{}{}", "班组班别获取为空,C端自动化垛位装车<保存>失败!", JSON.toJSON(jsonObject));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // 2025 3.3,C端自动化推送保存、B端手动发车临时方案,
|
|
|
+ LambdaQueryWrapper<StorageBill> queryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper2.eq(StorageBill::getPositionNum, Integer.valueOf(positionNum))
|
|
|
+ .isNull(StorageBill::getOutTime);
|
|
|
+ // 2号车位不验证铸机号
|
|
|
+ if (!positionNum.equals("2")) {
|
|
|
+ queryWrapper2.eq(StorageBill::getCcmNo, ccmNo);
|
|
|
+ }
|
|
|
+ StorageBill isStorageBill = storageBillService.getOne(queryWrapper2);
|
|
|
+ if (oConvertUtils.isEmpty(isStorageBill)) {
|
|
|
+ log.info("钢坯装运单不存在,车位号为:{},C端自动化垛位装车保存失败!", positionNum);
|
|
|
return;
|
|
|
}
|
|
|
- BilletHotsend billetHotsend = new BilletHotsend();
|
|
|
- billetHotsend.setCcmNo(ccmNo);
|
|
|
- billetHotsend.setShiftGroup(shiftGroup);
|
|
|
- billetHotsend.setShift(shift);
|
|
|
- loadingParams.setBilletHotsend(billetHotsend);
|
|
|
// 更新装运单铸机号、班别、班组
|
|
|
if ("0".equals(isStorageBill.getCcmNo())) {
|
|
|
// 更新铸机号,到装运单
|
|
@@ -421,17 +392,36 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ BilletHotsend billetHotsend = new BilletHotsend();
|
|
|
+ billetHotsend.setCcmNo(ccmNo);
|
|
|
+ billetHotsend.setShiftGroup(shiftGroup);
|
|
|
+ billetHotsend.setShift(shift);
|
|
|
+ loadingParams.setBilletHotsend(billetHotsend);
|
|
|
+
|
|
|
loadingParams.setStorageBill(isStorageBill);
|
|
|
|
|
|
log.info("{}{}", "自动化堆垛装车,装运单信息:", JSON.toJSON(isStorageBill));
|
|
|
|
|
|
StorageBill storageBill = loadingParams.getStorageBill();
|
|
|
|
|
|
- final double billetWeightTotal = billetBasicInfoList.stream().mapToDouble(BilletBasicInfo::getBilletWeight).sum();
|
|
|
+ // 获取所有的坯号集合
|
|
|
+ List<String> allBilletNoList = Arrays.asList(allBilletNos.split(","));
|
|
|
+
|
|
|
+ LambdaQueryWrapper<BilletBasicInfo> queryWrapperBB = new LambdaQueryWrapper<BilletBasicInfo>()
|
|
|
+ .eq(BilletBasicInfo::getCcmNo, Integer.valueOf(ccmNo))
|
|
|
+ .in(BilletBasicInfo::getBilletNo, allBilletNoList);
|
|
|
+ List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperBB);
|
|
|
+ if (oConvertUtils.listIsEmpty(billetBasicInfoList)) {
|
|
|
+ log.info("{}{}", "钢坯基础信息为空,C端自动化垛位装车保存失败", stackingAndLoadingVehiclesInfo.getBilletNos());
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
// 根据坯号查询吊运单信息。更新billetWeightTotal
|
|
|
BilletLiftingBill billetLiftingBillUpdate = billetLiftingBillService.getById(billetLiftingBill.getId());
|
|
|
if (oConvertUtils.isNotEmpty(billetLiftingBillUpdate)){
|
|
|
+ final double billetWeightTotal = billetBasicInfoList.stream().mapToDouble(BilletBasicInfo::getBilletWeight).sum();
|
|
|
+
|
|
|
billetLiftingBillUpdate.setShiftGroup(shiftGroup);
|
|
|
billetLiftingBillUpdate.setShift(shift);
|
|
|
// 维护吊运单,坯重、组坯号、炉号
|