#
Junjie
2025-08-16 85c3af5ee83772eb9ed929e4789e854653889b68
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -233,6 +233,12 @@
                                    .eq("loc_no", dto.getLocNo()));
                            short staNo = dto.getStaNo().shortValue();
                            int sourceStaNo = dto.getSourceStaNo();
                            if (sourceStaNo == 1007) {
                                staNo = 2002;
                            }
                            if (inSta.getStaNo() == 1002) {
                                staNo = 2002;
                            }
@@ -1207,7 +1213,7 @@
//                    continue;
                }
                // 判断堆垛机出库站状态
                if (staProtocol.isAutoing()  && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) {
                if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) {
                    //根据参数判断是否校验可出信号
                    String crnOutVerifyOut = "Y";
@@ -1219,10 +1225,6 @@
                    if (crnOutVerifyOut.equals("Y")) {
                        if (!staProtocol.isOutEnable()) {
                            continue;
                        }
                        if (staProtocol.isLoading()) {
                            continue;
                        }
@@ -1542,7 +1544,7 @@
            if (wrkMastMapper.updateById(wrkMast) == 0) {
                News.error("" + mark + " - 3" + " - 5" + " - 【库位移转】 修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,工作号={}", wrkMast.getWrkNo());
            }
            crnProtocol.setLastIo("O");
            crnProtocol.setLastIo("I");
        }
        News.infoNoLog("" + mark + " - 3" + " - 0" + " - 堆垛机入出库作业下发:库位移转完成");
@@ -2137,22 +2139,55 @@
//                    }catch (Exception e){
//                        log.error("工作档案明细输入电视机失败1:异常信息==》"+e);
//                    }
                    wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(
                            wrkDetl.getMatnr()
                            , wrkDetl.getMaktx()
                            , wrkDetl.getAnfme()
                            , wrkDetl.getWeight()
                            , wrkDetl.getStockNum()
                            , wrkDetl.getStockNum2()
                            , wrkDetl.getSpecs()
                            , wrkDetl.getSku()
                            , wrkDetl.getZpallet()
                            , wrkDetl.getModel()
                            , wrkDetl.getSupp()
                            , wrkDetl.getKpCstmrName()
                            , wrkDetl.getOrderNo()
                            , wrkDetl.getCstateid$()
                    )));
                    if (!wrkDetls.isEmpty()) {
                        WrkDetl wrkDetl = wrkDetls.get(0);
                        for (WrkDetl detl : wrkDetls) {
                            double anfme = wrkDetl.getAnfme() + detl.getAnfme();
                            double weight = wrkDetl.getWeight() + detl.getWeight();
                            double stockNum = wrkDetl.getStockNum() + detl.getStockNum();
                            double stockNum2 = wrkDetl.getStockNum2() + detl.getStockNum2();
                            wrkDetl.setAnfme(anfme);
                            wrkDetl.setWeight(weight);
                            wrkDetl.setStockNum(stockNum);
                            wrkDetl.setStockNum2(stockNum2);
                        }
                        ledCommand.getMatDtos().add(new MatDto(
                                wrkDetl.getMatnr()
                                , wrkDetl.getMaktx()
                                , wrkDetl.getAnfme()
                                , wrkDetl.getWeight()
                                , wrkDetl.getStockNum()
                                , wrkDetl.getStockNum2()
                                , wrkDetl.getSpecs()
                                , wrkDetl.getSku()
                                , wrkDetl.getZpallet()
                                , wrkDetl.getModel()
                                , wrkDetl.getSupp()
                                , wrkDetl.getKpCstmrName()
                                , wrkDetl.getOrderNo()
                                , wrkDetl.getCstateid$()
                        ));
//                        wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(
//                                wrkDetl.getMatnr()
//                                , wrkDetl.getMaktx()
//                                , wrkDetl.getAnfme()
//                                , wrkDetl.getWeight()
//                                , wrkDetl.getStockNum()
//                                , wrkDetl.getStockNum2()
//                                , wrkDetl.getSpecs()
//                                , wrkDetl.getSku()
//                                , wrkDetl.getZpallet()
//                                , wrkDetl.getModel()
//                                , wrkDetl.getSupp()
//                                , wrkDetl.getKpCstmrName()
//                                , wrkDetl.getOrderNo()
//                                , wrkDetl.getCstateid$()
//                        )));
                    }
                }
                commands.add(ledCommand);
            }