啊鑫
2025-05-26 a627c05912ab55061c7ee9b670512e3ee3800d44
src/test/java/com/gs/xky/XkyApplicationTests.java
@@ -47,6 +47,11 @@
    }
    @Test
    public void getDeviceRealTimeData() throws IOException {
        // xkyService.GetSaveDetail();
    }
    @Test
    void cs() throws IOException {
        XkyCommonParam param = XkyCommonParam.GetInit();
@@ -54,7 +59,7 @@
        BodyParam bodyParam = new BodyParam();
        bodyParam.setErpCode(DataAcquisitionConfiguration.TEST_ERP_CODE);
        bodyParam.setDeliveryNo("222504279H65");
        bodyParam.setDeliveryNo("22250526H9UR");
        bodyParam.setStatus(new int[]{1, 6});
        param.setBody(bodyParam);
@@ -62,13 +67,24 @@
        ApiResponse<XkyDetail> detail = apiService.sendListRequest(param, XkyDetail.class, "https://openapi.xiekeyun.com/delivery/getDetail.json");
        XkyDetail deliveryNo = detail.getData();
        if ("6".equals(deliveryNo.getStatus()) || "0".equals(deliveryNo.getLogisticsStatus())) {
//            remove(deliveryNo);
        } else if ("1".equals(deliveryNo.getStatus()) && ("2".equals(deliveryNo.getLogisticsStatus()) || "1".equals(deliveryNo.getLogisticsStatus()))) {
            XkyDetail detail1 = deliveryNo;
            deliveryNoticeService.saveDeliveryNotice(detail1);
            List<BarcodeDeliveryNo> barcodeDeliveryNos = GetBarcodeInformation(deliveryNo.getDeliveryNo());
            barcodeInformationService.SaveBarcodeInformation(barcodeDeliveryNos, deliveryNo.getDeliveryNo());
            if ("2".equals(deliveryNo.getLogisticsStatus())) {
                deliveryNoticeService.callPdaReceiptBtn("送货单签收[BTNOK[PL017[" + deliveryNo.getDeliveryNo(), "");
            }
        }
//        List<LineList> collect = deliveryNo.getLineList().stream().filter(s -> "1".equals(s.getStatus())).collect(Collectors.toList());
//        System.out.println(JSON.toJSONString(collect));
        deliveryNoticeService.saveDeliveryNotice(deliveryNo);
        List<BarcodeDeliveryNo> barcodeDeliveryNos = GetBarcodeInformation(deliveryNo.getDeliveryNo());
        barcodeInformationService.SaveBarcodeInformation(barcodeDeliveryNos, deliveryNo.getDeliveryNo());
        deliveryNoticeService.callPdaReceiptBtn("送货单签收[BTNOK[PL017[" + deliveryNo.getDeliveryNo(), "");
//        deliveryNoticeService.saveDeliveryNotice(deliveryNo);
//        List<BarcodeDeliveryNo> barcodeDeliveryNos = GetBarcodeInformation(deliveryNo.getDeliveryNo());
//        barcodeInformationService.SaveBarcodeInformation(barcodeDeliveryNos, deliveryNo.getDeliveryNo());
//
//        deliveryNoticeService.callPdaReceiptBtn("送货单签收[BTNOK[PL017[" + deliveryNo.getDeliveryNo(), "");
    }
    private List<BarcodeDeliveryNo> GetBarcodeInformation(String deliveryNo) throws IOException {