啊鑫
2025-05-26 b8b017c64b4b05a596b95406fed7b1af9f4c6ba8
src/main/java/com/gs/xky/service/XkyService.java
@@ -44,7 +44,7 @@
        long currentTimeMillis = System.currentTimeMillis();
        long startDate = currentTimeMillis - (20 * 60 * 1000); // 计算 20 分钟前的时间戳
        XkyCommonParam param = XkyCommonParam.GetInit();
        XkyCommonParam<BodyParam> param = XkyCommonParam.GetInit();
        BodyParam bodyParam = new BodyParam();
        bodyParam.setStartDate(startDate);
        bodyParam.setEndDate(currentTimeMillis);
@@ -71,13 +71,15 @@
                if ("6".equals(deliveryNo.getStatus()) || "0".equals(deliveryNo.getLogisticsStatus())) {
                    log.info("【GetSaveDetail】移除送货单: {}", deliveryNo.getDeliveryNo());
                    remove(deliveryNo);
                } else if ("1".equals(deliveryNo.getStatus()) && "2".equals(deliveryNo.getLogisticsStatus())) {
                    log.info("【GetSaveDetail】处理送货单: {}", deliveryNo.getDeliveryNo());
                } else if ("1".equals(deliveryNo.getStatus()) && ("2".equals(deliveryNo.getLogisticsStatus()) || "1".equals(deliveryNo.getLogisticsStatus()))) {
                    XkyDetail detail = getDetail(deliveryNo.getDeliveryNo());
                    deliveryNoticeService.saveDeliveryNotice(detail);
                    List<BarcodeDeliveryNo> barcodeDeliveryNos = GetBarcodeInformation(deliveryNo.getDeliveryNo());
                    barcodeInformationService.SaveBarcodeInformation(barcodeDeliveryNos, deliveryNo.getDeliveryNo());
                    deliveryNoticeService.callPdaReceiptBtn("送货单签收[BTNOK[PL017[" + deliveryNo.getDeliveryNo(), "");
                    //已送达的才自动转换为MES到货单
                    if ("2".equals(deliveryNo.getLogisticsStatus())) {
                        deliveryNoticeService.callPdaReceiptBtn("送货单签收[BTNOK[PL017[" + deliveryNo.getDeliveryNo(), "");
                    }
                }
            } catch (IOException e) {
                log.error("【GetSaveDetail 处理异常】送货单: {}, 异常: {}", deliveryNo.getDeliveryNo(), e.getMessage(), e);
@@ -131,7 +133,7 @@
    }
    private XkyDetail getDetail(String deliveryNo) throws IOException {
        XkyCommonParam param = XkyCommonParam.GetInit();
        XkyCommonParam<BodyParam> param = XkyCommonParam.GetInit();
        // 创建 BodyParam 对象并赋值
        BodyParam bodyParam = new BodyParam();
@@ -148,7 +150,7 @@
    }
    private List<BarcodeDeliveryNo> GetBarcodeInformation(String deliveryNo) throws IOException {
        XkyCommonParam param = XkyCommonParam.GetInit();
        XkyCommonParam<BodyParam> param = XkyCommonParam.GetInit();
        // 创建 BodyParam 对象并赋值
        BodyParam bodyParam = new BodyParam();