Browse Source

接口数据修改

调味吧台
liup 4 months ago
parent
commit
b2cb85bcfd
5 changed files with 189 additions and 4 deletions
  1. +4
    -2
      app/src/main/java/com/bonait/bnframework/HttpModel/APIService.java
  2. +153
    -0
      app/src/main/java/com/bonait/bnframework/HttpModel/DeviceInfoBean.java
  3. +29
    -0
      app/src/main/java/com/bonait/bnframework/HttpModel/GoodsData.java
  4. +1
    -0
      app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java
  5. +2
    -2
      build.gradle

+ 4
- 2
app/src/main/java/com/bonait/bnframework/HttpModel/APIService.java View File

@@ -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<APIResultT<List<DeviceGoodInfo>>>(){}).OnSource(s->{
APIHelper.PostT(url,null,null,new TypeReference<APIResultT<GoodsData>>(){}).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();


+ 153
- 0
app/src/main/java/com/bonait/bnframework/HttpModel/DeviceInfoBean.java View File

@@ -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;
}
}

+ 29
- 0
app/src/main/java/com/bonait/bnframework/HttpModel/GoodsData.java View File

@@ -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<DeviceGoodInfo> goodsInfoList;
private List<DeviceInfoBean> deviceInfo;

public List<DeviceGoodInfo> getGoodsInfoList() {
return goodsInfoList;
}

public void setGoodsInfoList(List<DeviceGoodInfo> goodsInfoList) {
this.goodsInfoList = goodsInfoList;
}

public List<DeviceInfoBean> getDeviceInfo() {
return deviceInfo;
}

public void setDeviceInfo(List<DeviceInfoBean> deviceInfo) {
this.deviceInfo = deviceInfo;
}
}

+ 1
- 0
app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java View File

@@ -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;


+ 2
- 2
build.gradle View File

@@ -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"


Loading…
Cancel
Save