组装json报文
作者:互联网
JSONObject jsonObject1 = new JSONObject(); jsonObject1.put("shipmentNo", shipmentNo); jsonObject1.put("customerPoNo", customerPoNo); jsonObject1.put("detailDeliveryAddress", detailDeliveryAddress); jsonObject1.put("totalItemPackageCount", totalItemPackageCount); jsonObject1.put("totalGrossWeight", totalGrossWeight); jsonObject1.put("submitTenderDate", submitTenderDate); jsonObject1.put("estimatedArrivalDate", estimatedArrivalDate); jsonObject1.put("sourceLocation", sourceLocation); JSONObject jsonObject2 = new JSONObject(); for (PLSLineDetailVO plsLineDetailVO : detailVOList) { String itemCode = plsLineDetailVO.getItemCode(); String quantity = plsLineDetailVO.getQuantity(); String engDescription = plsLineDetailVO.getEngDescription(); jsonObject2.put("itemCode", itemCode); jsonObject2.put("quantity", quantity); jsonObject2.put("engDescription", engDescription); } jsonObject1.put("lineInformation", jsonObject2.toString()); String string = jsonObject1.toString(); String beanName = getParameter(vo, "beanName", "AsnSendDataToRPAService"); ResultVO<String> rt = jmsOperationService.sendUmpJms(beanName, shipmentNo, "B2B_UMP_OAM_GRN_Tags", string); // 打印日志 logStep(vo, "response", rt.getStatusMsg());
标签:plsLineDetailVO,String,JSONObject,报文,组装,jsonObject2,json,jsonObject1,put 来源: https://www.cnblogs.com/mingruifeng/p/16146627.html