From 943e0a1b72383282fee42bd8cba1428ba839c7b0 Mon Sep 17 00:00:00 2001 From: e Date: Tue, 24 Dec 2019 16:38:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=9E=B6=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zzjee/wmutil/dsc/dscUtil.java | 28 +- .../com/zzjee/wmutil/dsc/orderGoodsRes.java | 515 ++++++++++++++++++ src/main/java/test/HttpUtil.java | 8 +- .../com/zzjee/wm/print/mdGoods-print.jsp | 4 +- 4 files changed, 548 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/zzjee/wmutil/dsc/orderGoodsRes.java diff --git a/src/main/java/com/zzjee/wmutil/dsc/dscUtil.java b/src/main/java/com/zzjee/wmutil/dsc/dscUtil.java index 669926cd..f527ddf4 100644 --- a/src/main/java/com/zzjee/wmutil/dsc/dscUtil.java +++ b/src/main/java/com/zzjee/wmutil/dsc/dscUtil.java @@ -124,11 +124,11 @@ public class dscUtil { String res = HttpUtil.get(baseurl,paramMap); return res; } - public static String getOrderGoods(int orderId){ + public static String getOrderGoods(String orderId){ String baseurl = ResourceUtil.getConfigByName("dsc.url"); Map paramMap = getbasepara(); - paramMap.put("method","dsc.order.goods.info.get"); - paramMap.put("order_id",orderId); + paramMap.put("method","dsc.order.goods.list.get"); + paramMap.put("order_sn",orderId); String res = HttpUtil.get(baseurl,paramMap); return res; } @@ -197,6 +197,7 @@ public class dscUtil { public static void saveOneOrder(orderRes orderhead) { String cusCode = ResourceUtil.getConfigByName("dsc.cuscode"); String imcuscode = orderhead.getInfo().getOrderSn(); + String order_id =orderhead.getInfo().getMainOrderId(); SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class); WmOmNoticeHServiceI wmOmNoticeHService =ApplicationContextUtil.getContext().getBean(WmOmNoticeHServiceI.class); WmOmNoticeHEntity wmimh = systemService.findUniqueByProperty(WmOmNoticeHEntity.class, "imCusCode", imcuscode); @@ -217,6 +218,27 @@ public class dscUtil { wmOmNoticeH.setDelvMember(orderhead.getInfo().getConsignee()); wmOmNoticeH.setDelvMobile(orderhead.getInfo().getMobile()); wmOmNoticeH.setDelvAddr(orderhead.getInfo().getAddress()); + String orderGoodsRes = getOrderGoods(order_id); + orderGoodsRes orderGoods = JSONHelper.fromJsonToObject(orderGoodsRes,orderGoodsRes.class); + for(com.zzjee.wmutil.dsc.orderGoodsRes.InfoBean.ListBean t:orderGoods.getInfo().getList()){ + WmOmNoticeIEntity wmi = new WmOmNoticeIEntity(); + wmi.setGoodsId(t.getGoodsId()); + MvGoodsEntity mvgoods = systemService.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmi.getGoodsId()); + if (mvgoods != null) { + wmi.setGoodsName(mvgoods.getGoodsName()); + wmi.setGoodsUnit(mvgoods.getShlDanWei()); + } +// wmi.setGoodsProData(DateUtils.str2Date(billResult.getData().get(s).getDetail().get(k).getPdProdmadedate(), DateUtils.date_sdf)); + wmi.setGoodsQua(t.getGoodsNumber()); +// wmi.setGoodsPrdData(billResult.getData().get(s).getDetail().get(k).getPdProdmadedate2User()); + wmi.setOtherId(t.getRecId()); + + wmomNoticeIListnew.add(wmi); + + + + } + // for (int k = 0; k list; + + public FilterBean getFilter() { + return filter; + } + + public void setFilter(FilterBean filter) { + this.filter = filter; + } + + public int getPageCount() { + return pageCount; + } + + public void setPageCount(int pageCount) { + this.pageCount = pageCount; + } + + public String getRecordCount() { + return recordCount; + } + + public void setRecordCount(String recordCount) { + this.recordCount = recordCount; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + + public static class FilterBean { + /** + * page : 1 + * page_size : 15 + * record_count : 3 + * page_count : 1 + */ + + @SerializedName("page") + private int page; + @SerializedName("page_size") + private int pageSize; + @SerializedName("record_count") + private String recordCount; + @SerializedName("page_count") + private int pageCount; + + public int getPage() { + return page; + } + + public void setPage(int page) { + this.page = page; + } + + public int getPageSize() { + return pageSize; + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + + public String getRecordCount() { + return recordCount; + } + + public void setRecordCount(String recordCount) { + this.recordCount = recordCount; + } + + public int getPageCount() { + return pageCount; + } + + public void setPageCount(int pageCount) { + this.pageCount = pageCount; + } + } + + public static class ListBean { + /** + * rec_id : 6 + * order_id : 9 + * order_sn : null + * user_id : 0 + * cart_recid : + * goods_id : 923 + * goods_name : YSL/圣罗兰 莹亮纯魅唇膏 + * goods_sn : ECS000923 + * product_id : 0 + * goods_number : 2 + * market_price : 320.00 + * goods_price : 171.00 + * goods_attr : + * send_number : 0 + * is_real : 1 + * extension_code : + * parent_id : 0 + * is_gift : 0 + * model_attr : 0 + * goods_attr_id : + * ru_id : 0 + * shopping_fee : 0.00 + * warehouse_id : 1 + * area_id : 4 + * is_single : 0 + * freight : 0 + * tid : 0 + * shipping_fee : 0.00 + * drp_money : 0.00 + * is_distribution : 0 + * commission_rate : 0 + * stages_qishu : -1 + */ + + @SerializedName("rec_id") + private String recId; + @SerializedName("order_id") + private String orderId; + @SerializedName("order_sn") + private Object orderSn; + @SerializedName("user_id") + private String userId; + @SerializedName("cart_recid") + private String cartRecid; + @SerializedName("goods_id") + private String goodsId; + @SerializedName("goods_name") + private String goodsName; + @SerializedName("goods_sn") + private String goodsSn; + @SerializedName("product_id") + private String productId; + @SerializedName("goods_number") + private String goodsNumber; + @SerializedName("market_price") + private String marketPrice; + @SerializedName("goods_price") + private String goodsPrice; + @SerializedName("goods_attr") + private String goodsAttr; + @SerializedName("send_number") + private String sendNumber; + @SerializedName("is_real") + private String isReal; + @SerializedName("extension_code") + private String extensionCode; + @SerializedName("parent_id") + private String parentId; + @SerializedName("is_gift") + private String isGift; + @SerializedName("model_attr") + private String modelAttr; + @SerializedName("goods_attr_id") + private String goodsAttrId; + @SerializedName("ru_id") + private String ruId; + @SerializedName("shopping_fee") + private String shoppingFee; + @SerializedName("warehouse_id") + private String warehouseId; + @SerializedName("area_id") + private String areaId; + @SerializedName("is_single") + private String isSingle; + @SerializedName("freight") + private String freight; + @SerializedName("tid") + private String tid; + @SerializedName("shipping_fee") + private String shippingFee; + @SerializedName("drp_money") + private String drpMoney; + @SerializedName("is_distribution") + private String isDistribution; + @SerializedName("commission_rate") + private String commissionRate; + @SerializedName("stages_qishu") + private String stagesQishu; + + public String getRecId() { + return recId; + } + + public void setRecId(String recId) { + this.recId = recId; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public Object getOrderSn() { + return orderSn; + } + + public void setOrderSn(Object orderSn) { + this.orderSn = orderSn; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getCartRecid() { + return cartRecid; + } + + public void setCartRecid(String cartRecid) { + this.cartRecid = cartRecid; + } + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public String getGoodsSn() { + return goodsSn; + } + + public void setGoodsSn(String goodsSn) { + this.goodsSn = goodsSn; + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + + public String getGoodsNumber() { + return goodsNumber; + } + + public void setGoodsNumber(String goodsNumber) { + this.goodsNumber = goodsNumber; + } + + public String getMarketPrice() { + return marketPrice; + } + + public void setMarketPrice(String marketPrice) { + this.marketPrice = marketPrice; + } + + public String getGoodsPrice() { + return goodsPrice; + } + + public void setGoodsPrice(String goodsPrice) { + this.goodsPrice = goodsPrice; + } + + public String getGoodsAttr() { + return goodsAttr; + } + + public void setGoodsAttr(String goodsAttr) { + this.goodsAttr = goodsAttr; + } + + public String getSendNumber() { + return sendNumber; + } + + public void setSendNumber(String sendNumber) { + this.sendNumber = sendNumber; + } + + public String getIsReal() { + return isReal; + } + + public void setIsReal(String isReal) { + this.isReal = isReal; + } + + public String getExtensionCode() { + return extensionCode; + } + + public void setExtensionCode(String extensionCode) { + this.extensionCode = extensionCode; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getIsGift() { + return isGift; + } + + public void setIsGift(String isGift) { + this.isGift = isGift; + } + + public String getModelAttr() { + return modelAttr; + } + + public void setModelAttr(String modelAttr) { + this.modelAttr = modelAttr; + } + + public String getGoodsAttrId() { + return goodsAttrId; + } + + public void setGoodsAttrId(String goodsAttrId) { + this.goodsAttrId = goodsAttrId; + } + + public String getRuId() { + return ruId; + } + + public void setRuId(String ruId) { + this.ruId = ruId; + } + + public String getShoppingFee() { + return shoppingFee; + } + + public void setShoppingFee(String shoppingFee) { + this.shoppingFee = shoppingFee; + } + + public String getWarehouseId() { + return warehouseId; + } + + public void setWarehouseId(String warehouseId) { + this.warehouseId = warehouseId; + } + + public String getAreaId() { + return areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getIsSingle() { + return isSingle; + } + + public void setIsSingle(String isSingle) { + this.isSingle = isSingle; + } + + public String getFreight() { + return freight; + } + + public void setFreight(String freight) { + this.freight = freight; + } + + public String getTid() { + return tid; + } + + public void setTid(String tid) { + this.tid = tid; + } + + public String getShippingFee() { + return shippingFee; + } + + public void setShippingFee(String shippingFee) { + this.shippingFee = shippingFee; + } + + public String getDrpMoney() { + return drpMoney; + } + + public void setDrpMoney(String drpMoney) { + this.drpMoney = drpMoney; + } + + public String getIsDistribution() { + return isDistribution; + } + + public void setIsDistribution(String isDistribution) { + this.isDistribution = isDistribution; + } + + public String getCommissionRate() { + return commissionRate; + } + + public void setCommissionRate(String commissionRate) { + this.commissionRate = commissionRate; + } + + public String getStagesQishu() { + return stagesQishu; + } + + public void setStagesQishu(String stagesQishu) { + this.stagesQishu = stagesQishu; + } + } + } +} diff --git a/src/main/java/test/HttpUtil.java b/src/main/java/test/HttpUtil.java index c8adef64..3808a290 100644 --- a/src/main/java/test/HttpUtil.java +++ b/src/main/java/test/HttpUtil.java @@ -109,10 +109,12 @@ public class HttpUtil { public static void main(String args[]){ // dscUtil.updateGoodsFromDsc(); -// String res = dscUtil.getOrderList("1"); - String res = dscUtil.getOrderGoods(4); +// String res = dscUtil.getOrderList("1","",""); +// System.out.println(res); - System.out.println(res); + String res = dscUtil.getOrderGoods("2019122315252182980"); + + System.out.println("order="+res); // String key="26F72780372E84B6CFAED6F7B19139CC47B1912B6CAED753"; diff --git a/src/main/webapp/webpage/com/zzjee/wm/print/mdGoods-print.jsp b/src/main/webapp/webpage/com/zzjee/wm/print/mdGoods-print.jsp index 1e211e41..ba3cdf55 100644 --- a/src/main/webapp/webpage/com/zzjee/wm/print/mdGoods-print.jsp +++ b/src/main/webapp/webpage/com/zzjee/wm/print/mdGoods-print.jsp @@ -98,7 +98,6 @@ function printview(){ -打印