guoqiang пре 3 недеља
родитељ
комит
6a38ddc40b

+ 17 - 17
zgzt-sys-java/jeecg-module-conn/src/main/java/org/jeecg/modules/storageBill/service/impl/StorageBillServiceImpl.java

@@ -155,28 +155,28 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 storageBill.setCcmNo("0");
             }
             // 根据铸机号、班组、班别,创建时间倒序 只返回一条,查询储运配置信息
-//            LambdaQueryWrapper<ShiftConfiguration> queryWrapper1 = new LambdaQueryWrapper<ShiftConfiguration>();
-//            queryWrapper1.eq(ShiftConfiguration::getCcmNo, ccmNo)
-//                    .eq(ShiftConfiguration::getShiftGroup, shiftGroup)
-//                    .eq(ShiftConfiguration::getShift, shift)
-//                    .orderByDesc(ShiftConfiguration::getCreateTime)
-//                    .last("limit 1");
-//            ShiftConfiguration shiftConfiguration = shiftConfigurationService.getOne(queryWrapper1);
-//            if (shiftConfiguration != null && oConvertUtils.isNotEmpty(shiftConfiguration.getDestination())){
-//                LambdaQueryWrapper<BilletHotsendTypeConfig> queryWrapper3 = new LambdaQueryWrapper<>();
-//                queryWrapper3.eq(BilletHotsendTypeConfig::getCastMachine, ccmNo)
-//                        .eq(BilletHotsendTypeConfig::getId, shiftConfiguration.getDestination());
+            LambdaQueryWrapper<ShiftConfiguration> queryWrapper1 = new LambdaQueryWrapper<ShiftConfiguration>();
+            queryWrapper1.eq(ShiftConfiguration::getCcmNo, ccmNo)
+                    .eq(ShiftConfiguration::getShiftGroup, shiftGroup)
+                    .eq(ShiftConfiguration::getShift, shift)
+                    .orderByDesc(ShiftConfiguration::getCreateTime)
+                    .last("limit 1");
+            ShiftConfiguration shiftConfiguration = shiftConfigurationService.getOne(queryWrapper1);
+            if (shiftConfiguration != null && oConvertUtils.isNotEmpty(shiftConfiguration.getDestination())){
+                LambdaQueryWrapper<BilletHotsendTypeConfig> queryWrapper3 = new LambdaQueryWrapper<>();
+                queryWrapper3.eq(BilletHotsendTypeConfig::getCastMachine, ccmNo)
+                        .eq(BilletHotsendTypeConfig::getId, shiftConfiguration.getDestination());
 //                BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getOne(queryWrapper3);
 //                storageBill.setDestination(billetHotsendTypeConfig.getTypeName());
 //                storageBill.setTypeConfigId(shiftConfiguration.getDestination());
-//                storageBill.setBrandNum(shiftConfiguration.getSteelGrade());//牌号
-//                storageBill.setNewOldPlatform(shiftConfiguration.getNewOldPlatform());
-////                storageBill.setSize(shiftConfiguration.getSpec());
-//                storageBill.setTypeConfigId("1024");
-//            }else {
+                storageBill.setBrandNum(shiftConfiguration.getSteelGrade());//牌号
+                storageBill.setNewOldPlatform(shiftConfiguration.getNewOldPlatform());
+//                storageBill.setSize(shiftConfiguration.getSpec());
+                storageBill.setTypeConfigId("1024");
+            }else {
                 // C端自动化创建装运单时,默认未知目的地
                 storageBill.setTypeConfigId("1024");
-//            }
+            }
 
             storageBill.setAmountTotal(0);
             storageBill.setPanelAmountTotal(0);