فهرست منبع

移除不用的代码

qiangxuan 4 هفته پیش
والد
کامیت
7d951bb3b2

+ 0 - 8
zgzt-sys-java/jeecg-module-conn/src/main/java/org/jeecg/modules/push/utils/MqttClientCallback.java

@@ -212,14 +212,6 @@ public class MqttClientCallback implements MqttCallback, MqttCallbackExtended{
                         log.info("{}{}", "mqtt处理堆垛保存消息出错: ", e.getMessage());
                     }
                     return;
-                case SYN_STACKING_AND_LOADING_VEHICLES_STACK_DEPART:
-                    try {
-                        JSONObject jsonObject = JSON.parseObject(payload);
-//                        stackingAndLoadingVehiclesService.autoStackDirectDepart(jsonObject);
-                    } catch (Exception e) {
-                        log.info("{}{}", "mqtt处理堆垛直接发车消息出错: ", e.getMessage());
-                    }
-                    return;
                 case TRACE_BILLETASSEMBLYNUMBER_BILLET_ADD:
                     try {
                         BilletAssemblyNumber billetAssemblyNumber = JSON.parseObject(payload, BilletAssemblyNumber.class);

+ 0 - 10
zgzt-sys-java/jeecg-module-conn/src/main/java/org/jeecg/modules/stackingAndLoadingVehicles/controller/StackingAndLoadingVehiclesController.java

@@ -26,7 +26,6 @@ public class StackingAndLoadingVehiclesController extends JeecgController<Stacki
 	 @Autowired
 	 private IStackingAndLoadingVehiclesService stackingAndLoadingVehiclesService;
 
-
 	 @ApiOperation(value="自动化新增堆垛测试", notes="自动化新增堆垛测试")
 	 @PostMapping(value = "/addStacking")
 	 public Result<?> addStacking(@RequestBody JSONObject jsonObject){
@@ -34,7 +33,6 @@ public class StackingAndLoadingVehiclesController extends JeecgController<Stacki
 		 return Result.OK("自动化新增堆垛测试成功!");
 	 }
 
-
 	 @ApiOperation(value="自动化堆垛装车保存测试", notes="自动化堆垛装车保存测试")
 	 @PostMapping(value = "/autoSaveStackLoading")
 	 public Result<?> autoSaveStackLoading(@RequestBody JSONObject jsonObject){
@@ -42,14 +40,6 @@ public class StackingAndLoadingVehiclesController extends JeecgController<Stacki
 		 return Result.OK("自动化堆垛装车保存测试成功!");
 	 }
 
-
-	 @ApiOperation(value="自动化堆垛装车发车测试", notes="自动化堆垛装车发车测试")
-	 @PostMapping(value = "/autoDepartStackLoading")
-	 public Result<?> autoDepartStackLoading(@RequestBody JSONObject jsonObject){
-		 stackingAndLoadingVehiclesService.autoDepartStackLoading(jsonObject);
-		 return Result.OK("自动化堆垛装车发车测试成功!");
-	 }
-
 	 @ApiOperation(value="自动化垛位清理位置测试", notes="自动化垛位清理位置测试")
 	 @PostMapping(value = "/stackingClearLocation")
 	 public Result<?> stackingClearLocation(@RequestBody JSONObject jsonObject){

+ 0 - 2
zgzt-sys-java/jeecg-module-conn/src/main/java/org/jeecg/modules/stackingAndLoadingVehicles/service/IStackingAndLoadingVehiclesService.java

@@ -20,7 +20,5 @@ public interface IStackingAndLoadingVehiclesService extends IService<StackingAnd
 
     void autoSaveStackLoading(JSONObject jsonObject);
 
-    void autoDepartStackLoading(JSONObject jsonObject);
-
     void stackingClearLocation(JSONObject jsonObject);
 }

+ 0 - 224
zgzt-sys-java/jeecg-module-conn/src/main/java/org/jeecg/modules/stackingAndLoadingVehicles/service/impl/StackingAndLoadingVehiclesServiceImpl.java

@@ -559,230 +559,6 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
         log.info("{}{}", "C端自动化堆垛装车保存操作成功!", allBilletNos);
     }
 
-    /**
-     * 自动化堆垛装车发车
-     * @param jsonObject
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public void autoDepartStackLoading(JSONObject jsonObject) {
-
-        String ccmNo = jsonObject.getString("ccmNo");
-        String billetHotsendTypeConfigId = jsonObject.getString("billetHotsendTypeConfigId");
-        String billetNoLists = jsonObject.getString("billetNos");
-        String layer = jsonObject.getString("layer");
-        String address = jsonObject.getString("address");
-        String licensePlate = jsonObject.getString("licensePlate");
-        String destinationId = jsonObject.getString("destinationId");
-
-        String classShiftGroup = String.format("class:shift:group:%s", ccmNo); // 班组
-        String classShift = String.format("class:shift:%s", ccmNo); // 班别
-        String classShiftStr = !oConvertUtils.getString(redisTemplate.opsForValue().get(classShift)).isEmpty() ? oConvertUtils.getString(redisTemplate.opsForValue().get(classShift)) : "";
-        String classShiftGroupStr = !oConvertUtils.getString(redisTemplate.opsForValue().get(classShiftGroup)).isEmpty() ? oConvertUtils.getString(redisTemplate.opsForValue().get(classShiftGroup)) : "";
-
-        LoadingParams loadingParams = new LoadingParams();
-
-        loadingParams.setBelongTable("stacking_and_loading_vehicles");
-        loadingParams.setBilletHotsendTypeConfigId(billetHotsendTypeConfigId);
-
-        BilletHotsend billetHotsend = new BilletHotsend();
-        billetHotsend.setCcmNo(ccmNo);
-        billetHotsend.setShiftGroup(classShiftGroupStr);
-        billetHotsend.setShift(classShiftStr);
-        loadingParams.setBilletHotsend(billetHotsend);
-
-        // 根据billetHotsendTypeConfigId 查询基础垛位信息
-        BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(loadingParams.getBilletHotsendTypeConfigId());
-        // 根据destinationId 查询目的地配置信息
-        BilletHotsendTypeConfig destinationInfo = billetHotsendTypeConfigService.getById(destinationId);
-        loadingParams.setDestination(destinationInfo.getTypeName());
-        loadingParams.setDestinationId(destinationId);
-        loadingParams.setDestinationTable(destinationInfo.getBelongTable());
-
-        // 通过铸机号、billetHotsendTypeConfigId、层数、位置查询公共容器
-        StackingAndLoadingVehicles stackingAndLoadingVehiclesInfo = baseMapper.selectOne(new LambdaQueryWrapper<StackingAndLoadingVehicles>()
-                .eq(StackingAndLoadingVehicles::getTypeConfigId, billetHotsendTypeConfigId)
-                .eq(StackingAndLoadingVehicles::getCcmNo, ccmNo)
-                .eq(StackingAndLoadingVehicles::getLayer, layer)
-                .eq(StackingAndLoadingVehicles::getAddress, address));
-        if (stackingAndLoadingVehiclesInfo == null){
-            log.info("{}{}", "堆垛容器信息查询失败,自动化堆垛装车发车操作失败!", jsonObject);
-            BilletAutoException billetAutoException = createBilletAutoException(ccmNo, billetNoLists, classShiftGroupStr, classShiftStr, billetHotsendTypeConfig.getTypeName(), address, layer, destinationInfo.getBelongTable(), destinationId);
-            billetAutoException.setMassage("堆垛容器信息查询为空,自动化堆垛<发车>操作失败!");
-            billetAutoException.setRemark(licensePlate);
-            billetAutoExceptionService.save(billetAutoException);
-            return;
-        }
-        List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesLists = new ArrayList<>();
-        StackingAndLoadingVehicles stackingAndLoadingVehicles = new StackingAndLoadingVehicles();
-        stackingAndLoadingVehicles.setId(stackingAndLoadingVehiclesInfo.getId());
-        stackingAndLoadingVehicles.setCcmNo(ccmNo);
-        stackingAndLoadingVehicles.setBilletNos(billetNoLists);
-        stackingAndLoadingVehicles.setAddress(address);
-        stackingAndLoadingVehicles.setLayer(layer);
-        stackingAndLoadingVehicles.setStackAddr(billetHotsendTypeConfig.getTypeName());
-        stackingAndLoadingVehicles.setTypeConfigId(billetHotsendTypeConfig.getId());
-        stackingAndLoadingVehicles.setCreateDate(new Date());
-        stackingAndLoadingVehiclesLists.add(stackingAndLoadingVehicles);
-        loadingParams.setStackingAndLoadingVehiclesList(stackingAndLoadingVehiclesLists);
-
-        List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesList = loadingParams.getStackingAndLoadingVehiclesList();
-
-        log.info("{}{}", "自动化下垛结果集合:", JSON.toJSON(stackingAndLoadingVehiclesList));
-        // 获取所有的坯号集合
-        List<String> billetNosList = stackingAndLoadingVehiclesList.stream().map(StackingAndLoadingVehicles::getBilletNos)
-                .flatMap(billetNos -> {
-                    if (billetNos!= null) {
-                        return java.util.stream.Stream.of(billetNos.split(","));
-                    } else {
-                        return java.util.stream.Stream.empty();
-                    }
-                }).collect(Collectors.toList());
-
-        LambdaQueryWrapper<BilletBasicInfo> queryWrapperBB = new LambdaQueryWrapper<BilletBasicInfo>()
-                .eq(BilletBasicInfo::getCcmNo, Integer.valueOf(billetHotsend.getCcmNo()))
-                .in(BilletBasicInfo::getBilletNo, billetNosList);
-        List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperBB);
-        List<RollClubCommon> rollClubCommonList= new ArrayList<>();
-        billetBasicInfoList.forEach(x ->{
-            RollClubCommon rollClubCommon = new RollClubCommon();
-            BeanUtils.copyProperties(x, rollClubCommon);
-            rollClubCommon.setCcmNo(x.getCcmNo().toString());
-            rollClubCommon.setStartNum(Integer.valueOf(address));
-            rollClubCommon.setStackStorey(layer);
-            rollClubCommonList.add(rollClubCommon);
-        });
-
-        LambdaQueryWrapper<StorageBill> queryWrapper2 = new LambdaQueryWrapper<>();
-        queryWrapper2.eq(StorageBill::getCcmNo, ccmNo)
-                .eq(StorageBill::getLicensePlate, licensePlate)
-                .eq(StorageBill::getShiftGroup, classShiftGroupStr)
-                .eq(StorageBill::getShift, classShiftStr)
-                .isNull(StorageBill::getOutTime);
-        StorageBill isStorageBill = storageBillService.getOne(queryWrapper2);
-        if (oConvertUtils.isNotEmpty(isStorageBill)) {
-            log.info("未查询到未发车车辆,车牌号为:{},自动化堆垛发车失败:", licensePlate);
-            return;
-        }
-        loadingParams.setStorageBill(isStorageBill);
-
-        StorageBill storageBill = loadingParams.getStorageBill();
-
-        handleStackDepartCommon(billetHotsend, stackingAndLoadingVehiclesList, loadingParams, billetHotsendTypeConfig, storageBill, rollClubCommonList);
-        Map<String, List<RollClubCommon>> rollClubCommonInfoList = groupByShiftAttributes(rollClubCommonList);
-        for (Map.Entry<String, List<RollClubCommon>> entry : rollClubCommonInfoList.entrySet()) {
-            String[] parts = entry.getKey().split(",");
-            billetHotsend.setHeatNo(parts[0]);// 炉号
-            billetHotsend.setShiftGroup(parts[1]);// 班组
-            billetHotsend.setShift(parts[2]);// 班别
-            List<RollClubCommon> groupRollClubCommonList = entry.getValue();
-            LambdaQueryWrapper<BilletHotsend> queryWrapper = new LambdaQueryWrapper<>();
-            queryWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
-                    .eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
-                    .eq(BilletHotsend::getShift,  billetHotsend.getShift())
-                    .eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());
-            BilletHotsend idExistBh = billetHotsendBaseService.getOne(queryWrapper);
-            if (oConvertUtils.isEmpty(idExistBh)){
-                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                log.info("{}{}", "钢坯热送单为空,自动化垛位发车失败", storageBill.getLicensePlate());
-                return;
-            }
-            billetHotsend.setId(idExistBh.getId());
-            billetHotsend.setStackNum(Math.max(0, idExistBh.getStackNum() - groupRollClubCommonList.size()));
-            // 钢坯热送基础信息存在,但是钢坯信息不存在 直接返回
-            if ("roll_club_two".equals(loadingParams.getDestinationTable())){
-                billetHotsend.setRollclubtwoNum(oConvertUtils.isNotEmpty(idExistBh.getRollclubtwoNum()) ? idExistBh.getRollclubtwoNum() + groupRollClubCommonList.size() : groupRollClubCommonList.size());
-            }else if ("roll_club_three".equals(loadingParams.getDestinationTable())){
-                billetHotsend.setRollclubthreeNum(oConvertUtils.isNotEmpty(idExistBh.getRollclubthreeNum()) ? idExistBh.getRollclubthreeNum() + groupRollClubCommonList.size() : groupRollClubCommonList.size());
-            }else if ("roll_out_shipp".equals(loadingParams.getDestinationTable())){
-                billetHotsend.setRolloutshippNum(oConvertUtils.isNotEmpty(idExistBh.getRolloutshippNum()) ? idExistBh.getRolloutshippNum() + groupRollClubCommonList.size() : groupRollClubCommonList.size());
-            }
-            billetHotsend.setUpdateTime(new Date());
-            billetHotsendBaseService.updateById(billetHotsend);
-        }
-        //5 获取所有的坯号集合 查询并批量更新钢坯基础信息 belongTable
-        billetBasicInfoList.forEach(x ->{
-            x.setBelongTable(loadingParams.getDestinationTable());
-            x.setBhtcId(loadingParams.getDestinationId());
-        });
-        billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
-
-        //根据铸机号、钢坯转运单ID查询定尺信息
-        List<String> sizeList = new ArrayList<>();
-        List<String> heatNoList = new ArrayList<>();
-        long count = 0L;
-        if ("roll_club_two".equals(loadingParams.getDestinationTable())){
-            LambdaQueryWrapper<RollClubTwoDetails> queryWrapperRC = new LambdaQueryWrapper();
-            queryWrapperRC.eq(RollClubTwoDetails::getCcmNo, storageBill.getCcmNo()).eq(RollClubTwoDetails::getStorageBillId, storageBill.getId());
-            List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(queryWrapperRC);
-            sizeList = rollClubTwoDetailsList.stream().map(RollClubTwoDetails::getSize).distinct()
-                    .collect(Collectors.toList());
-            heatNoList = rollClubTwoDetailsList.stream().map(RollClubTwoDetails::getHeatNo).distinct()
-                    .collect(Collectors.toList());
-            if (oConvertUtils.listIsNotEmpty(rollClubTwoDetailsList)){
-                count = rollClubTwoDetailsList.stream().count();
-            }
-        }
-        if ("roll_club_three".equals(loadingParams.getDestinationTable())){
-            LambdaQueryWrapper<RollClubThreeDetails> queryWrapperCT = new LambdaQueryWrapper();
-            queryWrapperCT.eq(RollClubThreeDetails::getCcmNo, storageBill.getCcmNo()).eq(RollClubThreeDetails::getStorageBillId, storageBill.getId());
-            List<RollClubThreeDetails> rollClubThreeDetailsList = rollClubThreeDetailsService.list(queryWrapperCT);
-            sizeList = rollClubThreeDetailsList.stream().map(RollClubThreeDetails::getSize).distinct()
-                    .collect(Collectors.toList());
-            heatNoList = rollClubThreeDetailsList.stream().map(RollClubThreeDetails::getHeatNo).distinct()
-                    .collect(Collectors.toList());
-            if (oConvertUtils.listIsNotEmpty(rollClubThreeDetailsList)){
-                count = rollClubThreeDetailsList.stream().count();
-            }
-        }
-        if ("roll_out_shipp".equals(loadingParams.getDestinationTable())){
-            LambdaQueryWrapper<RollOutShippDetails> queryWrapperROS = new LambdaQueryWrapper();
-            queryWrapperROS.eq(RollOutShippDetails::getCcmNo, storageBill.getCcmNo()).eq(RollOutShippDetails::getStorageBillId, storageBill.getId());
-            List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippDetailsService.list(queryWrapperROS);
-            sizeList = rollOutShippDetailsList.stream().map(RollOutShippDetails::getSize).distinct()
-                    .collect(Collectors.toList());
-            heatNoList = rollOutShippDetailsList.stream().map(RollOutShippDetails::getHeatNo).distinct()
-                    .collect(Collectors.toList());
-            if (oConvertUtils.listIsNotEmpty(rollOutShippDetailsList)){
-                count = rollOutShippDetailsList.stream().count();
-            }
-        }
-        if ("roll_height".equals(loadingParams.getDestinationTable())){
-            log.info("{}{}", "堆垛去高线发车操作成功!", JSON.toJSON(billetNosList));
-            return;
-
-        }
-        // 6 更新装运单 storage_bill  取最新的第一条钢坯信息更新钢种和规格
-        RollClubCommon rollClubCommon = rollClubCommonList.stream().findFirst().orElse(null);
-        storageBill.setSteel(rollClubCommon.getGrade());//钢种
-        storageBill.setSpec(rollClubCommon.getSpec());//规格
-        storageBill.setSize(String.join(",", sizeList));
-        storageBill.setTypeConfigId(loadingParams.getDestinationId()); // 钢坯配置类型ID
-        storageBill.setDestination(loadingParams.getDestination());// 目的地
-        storageBill.setAmountTotal(storageBill.getAmountTotal() + stackingAndLoadingVehiclesList.size() * 4);
-        storageBill.setOutTime(new Date());
-        storageBillService.updateById(storageBill);
-        // 7 发车后,新增钢坯堆垛储运信息,生成储运单 storage_car_log
-        StorageCarLog storageCarLog = new StorageCarLog();
-        BeanUtils.copyProperties(storageBill, storageCarLog);
-
-        LambdaQueryWrapper<StackingDownLog> queryWrappersd = new LambdaQueryWrapper();
-        queryWrappersd.eq(StackingDownLog::getCcmNo, storageBill.getCcmNo()).eq(StackingDownLog::getStorageBillId, storageBill.getId());
-        List<StackingDownLog> stackingDownLogs = stackingDownLogService.list(queryWrappersd);
-
-        Integer bx =Integer.valueOf((int) count);
-        Integer dd = stackingDownLogs.size() * 4 + bx;
-        storageCarLog.setDestination(loadingParams.getDestination());// 目的地
-        storageCarLog.setCarNm(storageBill.getLicensePlate());// 车牌号
-        storageCarLog.setTypeConfigId(billetHotsendTypeConfig.getId()); // 钢坯配置类型ID
-        storageCarLog.setHeatNo(String.join(",", heatNoList));
-        storageCarLog.setSize(String.join(",", sizeList));// 定尺
-        storageCarLog.setAmount(dd);// 支数
-        storageCarLog.setDataTime(new Date());
-        storageCarLogService.save(storageCarLog);
-        log.info("{}{}", "自动化堆垛发车操作成功", billetNoLists);
-    }
-
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void stackingClearLocation(JSONObject jsonObject) {