From b2cb85bcfd7750e5d802dcfab3ebf5bbc5430778 Mon Sep 17 00:00:00 2001 From: liup <1454939542@qq.com> Date: Tue, 9 Jul 2024 13:32:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bnframework/HttpModel/APIService.java | 6 +- .../bnframework/HttpModel/DeviceInfoBean.java | 153 ++++++++++++++++++ .../bnframework/HttpModel/GoodsData.java | 29 ++++ .../common/utils/UpdateAppUtils.java | 1 + build.gradle | 4 +- 5 files changed, 189 insertions(+), 4 deletions(-) create mode 100644 app/src/main/java/com/bonait/bnframework/HttpModel/DeviceInfoBean.java create mode 100644 app/src/main/java/com/bonait/bnframework/HttpModel/GoodsData.java diff --git a/app/src/main/java/com/bonait/bnframework/HttpModel/APIService.java b/app/src/main/java/com/bonait/bnframework/HttpModel/APIService.java index 357de6de..bc5e6b25 100644 --- a/app/src/main/java/com/bonait/bnframework/HttpModel/APIService.java +++ b/app/src/main/java/com/bonait/bnframework/HttpModel/APIService.java @@ -47,11 +47,13 @@ public class APIService { long curTime = System.currentTimeMillis(); LogUtils.d(" GetGoodsInfo1 usetime="+(curTime-lastTime)); lastTime = curTime; - APIHelper.PostT(url,null,null,new TypeReference>>(){}).OnSource(s->{ + APIHelper.PostT(url,null,null,new TypeReference>(){}).OnSource(s->{ long curTime2 = System.currentTimeMillis(); LogUtils.d(" GetGoodsInfo11 usetime="+(curTime2-lastTime)); lastTime = curTime2; - deviceGoodInfo=s.Content; + if(s.Content!=null){ + deviceGoodInfo=s.Content.getGoodsInfoList(); + } UpdateLocalGoodsInfo(); }); curTime = System.currentTimeMillis(); diff --git a/app/src/main/java/com/bonait/bnframework/HttpModel/DeviceInfoBean.java b/app/src/main/java/com/bonait/bnframework/HttpModel/DeviceInfoBean.java new file mode 100644 index 00000000..0bea16d8 --- /dev/null +++ b/app/src/main/java/com/bonait/bnframework/HttpModel/DeviceInfoBean.java @@ -0,0 +1,153 @@ +package com.bonait.bnframework.HttpModel; + +/** + * @author: liup + * @description: + * @date: 2024/7/9 11:21. + */ +public class DeviceInfoBean { + private String id; + private String deviceName; + private String deviceTypeId; + private String orgId; + private String productId; + private String productName; + private String productCode; + private int autoKey; + private String productVersionId; + private String orgKey; + private String productVersionName; + private int technologyOrBom; + private String groupId; + private String stopId; + private String stopName; + private String address; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDeviceName() { + return deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeId() { + return deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public String getOrgId() { + return orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public int getAutoKey() { + return autoKey; + } + + public void setAutoKey(int autoKey) { + this.autoKey = autoKey; + } + + public String getProductVersionId() { + return productVersionId; + } + + public void setProductVersionId(String productVersionId) { + this.productVersionId = productVersionId; + } + + public String getOrgKey() { + return orgKey; + } + + public void setOrgKey(String orgKey) { + this.orgKey = orgKey; + } + + public String getProductVersionName() { + return productVersionName; + } + + public void setProductVersionName(String productVersionName) { + this.productVersionName = productVersionName; + } + + public int getTechnologyOrBom() { + return technologyOrBom; + } + + public void setTechnologyOrBom(int technologyOrBom) { + this.technologyOrBom = technologyOrBom; + } + + public String getGroupId() { + return groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getStopId() { + return stopId; + } + + public void setStopId(String stopId) { + this.stopId = stopId; + } + + public String getStopName() { + return stopName; + } + + public void setStopName(String stopName) { + this.stopName = stopName; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } +} diff --git a/app/src/main/java/com/bonait/bnframework/HttpModel/GoodsData.java b/app/src/main/java/com/bonait/bnframework/HttpModel/GoodsData.java new file mode 100644 index 00000000..36556728 --- /dev/null +++ b/app/src/main/java/com/bonait/bnframework/HttpModel/GoodsData.java @@ -0,0 +1,29 @@ +package com.bonait.bnframework.HttpModel; + +import java.util.List; + +/** + * @author: liup + * @description: + * @date: 2024/7/9 11:19. + */ +public class GoodsData { + private List goodsInfoList; + private List deviceInfo; + + public List getGoodsInfoList() { + return goodsInfoList; + } + + public void setGoodsInfoList(List goodsInfoList) { + this.goodsInfoList = goodsInfoList; + } + + public List getDeviceInfo() { + return deviceInfo; + } + + public void setDeviceInfo(List deviceInfo) { + this.deviceInfo = deviceInfo; + } +} diff --git a/app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java b/app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java index 87b432e1..7aba865d 100644 --- a/app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java +++ b/app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java @@ -217,6 +217,7 @@ public class UpdateAppUtils { * @return ture :需要更新 false : 不需要更新 */ public static boolean compareVersions(String v1, String v2) { + LogUtils.d("compareVersions v1="+v1+";v2="+v2); //判断是否为空数据 if (v1.isEmpty() || v2.isEmpty()) { return false; diff --git a/build.gradle b/build.gradle index 0b27735e..b9a03d60 100644 --- a/build.gradle +++ b/build.gradle @@ -35,8 +35,8 @@ task clean(type: Delete) { ext { // 统一版本入口 //App版本号 - versionCode = 16 - versionName = "1.56" + versionCode = 17 + versionName = "1.7" // 支持Android版本 buildToolsVersion = "33.0.0"