diff --git a/.gitignore b/.gitignore
index 2b75303a..2a0d26c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@
/build
/captures
.externalNativeBuild
+*.apk
diff --git a/.idea/easycode/codebase-v2.xml b/.idea/easycode/codebase-v2.xml
new file mode 100644
index 00000000..a55bfca6
--- /dev/null
+++ b/.idea/easycode/codebase-v2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 99320ca6..ca53089b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -20,6 +20,14 @@ android {
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled true
}
+ signingConfigs {
+ release {
+ storeFile file('D:/AndroidStudioGit/500chaoguo/keystore.jks')
+ storePassword "123456"
+ keyAlias "hbl"
+ keyPassword "123456"
+ }
+ }
buildTypes {
release {
minifyEnabled false
diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json
new file mode 100644
index 00000000..23df96c4
--- /dev/null
+++ b/app/release/output-metadata.json
@@ -0,0 +1,20 @@
+{
+ "version": 3,
+ "artifactType": {
+ "type": "APK",
+ "kind": "Directory"
+ },
+ "applicationId": "com.bonait.bnframework.newchaoguo2",
+ "variantName": "release",
+ "elements": [
+ {
+ "type": "SINGLE",
+ "filters": [],
+ "attributes": [],
+ "versionCode": 105,
+ "versionName": "1.0.5",
+ "outputFile": "boluo-xiaochao-v105-202409191128-unsigned-release.apk"
+ }
+ ],
+ "elementType": "File"
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bonait/bnframework/business/MainInit.java b/app/src/main/java/com/bonait/bnframework/business/MainInit.java
index d70309d4..d21c3b6d 100644
--- a/app/src/main/java/com/bonait/bnframework/business/MainInit.java
+++ b/app/src/main/java/com/bonait/bnframework/business/MainInit.java
@@ -284,17 +284,6 @@ public class MainInit {
{
ConfigData.getInstance().RevertPLCProcess();
}
-
- if(PreferenceUtils.getInt("isNewVersion",0)!=3){
- if(!DBHelper.getInstance(MainApplication.getContext()).doesTableExist(BPA_PROPERTY_CLASSIFY.class)){
- DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_PROPERTY_CLASSIFY.class,null);
- }
- if(!DBHelper.getInstance(MainApplication.getContext()).doesTableExist(BPA_MATERIAL_TYPE.class)){
- DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_MATERIAL_TYPE.class,null);
- }
- DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_GOODS.class,null);
- PreferenceUtils.setInt("isNewVersion",3);
- }
}
diff --git a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
index b95fdfb1..b255eee9 100644
--- a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
+++ b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
@@ -2,9 +2,8 @@ package com.bonait.bnframework.common.constant;
import android.app.Application;
import android.content.Context;
-import android.os.Environment;
import android.widget.Switch;
-
+import android.os.Environment;
import com.bonait.bnframework.R;
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS;
import com.bonait.bnframework.common.db.mode.BPA_USER;
@@ -2177,13 +2176,18 @@ public class ConfigName {
//endregion
public static String getFileRoot(Context context) {
- if (android.os.Environment.getExternalStorageState().equals(
- android.os.Environment.MEDIA_MOUNTED)) {
- File external = context.getExternalFilesDir(null);
- if (external != null) {
- return external.getAbsolutePath();
+ if(mInstance.isPhoneVersion){
+ if (android.os.Environment.getExternalStorageState().equals(
+ android.os.Environment.MEDIA_MOUNTED)) {
+ File external = context.getExternalFilesDir(null);
+ if (external != null) {
+ return external.getAbsolutePath();
+ }
}
+ return context.getFilesDir().getAbsolutePath();
+ }else {
+
+ return android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
}
- return context.getFilesDir().getAbsolutePath();
}
}
diff --git a/app/src/main/java/com/bonait/bnframework/common/db/mode/BPA_MATERIAL.java b/app/src/main/java/com/bonait/bnframework/common/db/mode/BPA_MATERIAL.java
index bf3a62fe..4909535f 100644
--- a/app/src/main/java/com/bonait/bnframework/common/db/mode/BPA_MATERIAL.java
+++ b/app/src/main/java/com/bonait/bnframework/common/db/mode/BPA_MATERIAL.java
@@ -19,4 +19,14 @@ public class BPA_MATERIAL extends ModeBase {
// public String uintId;
// public String uintName;
+
+ @Override
+ public String toString() {
+ return "BPA_MATERIAL{" +
+ "type=" + type +
+ ", name='" + name + '\'' +
+ ", imgUrl='" + imgUrl + '\'' +
+ ", id='" + id + '\'' +
+ '}';
+ }
}
diff --git a/app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java b/app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java
index c090ace6..b1f00c0e 100644
--- a/app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java
+++ b/app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java
@@ -50,7 +50,17 @@ public class SdCart {
*/
public void initSD() {
- ConfigName.getInstance().sdCardPath = ConfigName.getFileRoot(MainApplication.getContext());
+ if(ConfigName.getInstance().isPhoneVersion){
+ ConfigName.getInstance().sdCardPath = ConfigName.getFileRoot(MainApplication.getContext());
+ }else {
+ File sdDir = null;
+ boolean sdCardExist = android.os.Environment.getExternalStorageState().equals(
+ android.os.Environment.MEDIA_MOUNTED);
+ if (sdCardExist) {
+ sdDir = android.os.Environment.getExternalStorageDirectory();
+ ConfigName.getInstance().sdCardPath = sdDir.toString();
+ }
+ }
ConfigName.getInstance().appResRoot = ConfigName.getInstance().sdCardPath +ConfigName.dataPath;
ConfigName.getInstance().dbPath = ConfigName.getInstance().appResRoot + "/hbl.db";
diff --git a/app/src/main/java/com/bonait/bnframework/common/model/upload/MaterialDataInfo.java b/app/src/main/java/com/bonait/bnframework/common/model/upload/MaterialDataInfo.java
index 96ab4bfb..6707ede6 100644
--- a/app/src/main/java/com/bonait/bnframework/common/model/upload/MaterialDataInfo.java
+++ b/app/src/main/java/com/bonait/bnframework/common/model/upload/MaterialDataInfo.java
@@ -18,6 +18,13 @@ public class MaterialDataInfo {
this.typeId = typeId;
}
-
-
+ @Override
+ public String toString() {
+ return "MaterialDataInfo{" +
+ "id='" + id + '\'' +
+ ", name='" + name + '\'' +
+ ", typeId='" + typeId + '\'' +
+ ", typeName='" + typeName + '\'' +
+ '}';
+ }
}
diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSystemsetFragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSystemsetFragment.java
index b9305d2b..25b65608 100644
--- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSystemsetFragment.java
+++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSystemsetFragment.java
@@ -147,10 +147,6 @@ public class SystemSystemsetFragment extends BaseFragment {
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
- if(isVisibleToUser){
- cb_autoInit.setChecked(ConfigName.getInstance().IsAutoInit);
- cb_autoSilos.setChecked(ConfigName.getInstance().silosAuto);
- }
}
private void initData() {
@@ -300,7 +296,7 @@ public class SystemSystemsetFragment extends BaseFragment {
switch (view.getId()) {
case R.id.btn_update_key:
ThreadManager.get().execute(new Thread(()->{
- HomeGoodsViewModel.GetServiceKey(new HomeGoodsViewModel.CallBack() {
+ HomeGoodsViewModel.GetServiceKey(edittext4.getText().toString(),new HomeGoodsViewModel.CallBack() {
@Override
public void success() {
if(edittext103!=null){
diff --git a/app/src/main/java/com/bonait/bnframework/ui/viewmodel/HomeGoodsViewModel.java b/app/src/main/java/com/bonait/bnframework/ui/viewmodel/HomeGoodsViewModel.java
index 50113548..ddebbd11 100644
--- a/app/src/main/java/com/bonait/bnframework/ui/viewmodel/HomeGoodsViewModel.java
+++ b/app/src/main/java/com/bonait/bnframework/ui/viewmodel/HomeGoodsViewModel.java
@@ -133,9 +133,11 @@ public class HomeGoodsViewModel extends ViewModel {
/**
* 获取平台授权码
*/
- public static void GetServiceKey(CallBack listener){
+ public static void GetServiceKey(String key,CallBack listener){
String url = UpdateDataService.path+"/api/check/auth-key/"+ConfigName.getInstance().DeviceAutoKey;
-// String url = "http://192.168.1.50:5006/api/check/auth-key/279";
+ if(!key.isEmpty()){
+ url = UpdateDataService.path+"/api/check/auth-key/"+key;
+ }
LogUtils.d("GetServiceKey url="+url);
RecordManager.getInstance().addLogRecord("数据接收", "获取平台授权码-"+url);
APIHelper.get(url,null,new TypeReference>(){}).OnSource(s->{
diff --git a/app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java b/app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java
index 27871286..fae9b393 100644
--- a/app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java
+++ b/app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java
@@ -3,11 +3,15 @@ package com.bonait.bnframework.ui.viewmodel;
import android.content.Context;
import android.os.Environment;
+import com.alibaba.fastjson.TypeReference;
import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.business.RecordManager;
+import com.bonait.bnframework.common.API.APIHelper;
+import com.bonait.bnframework.common.API.APIResultT;
import com.bonait.bnframework.common.Result.OperateResult;
import com.bonait.bnframework.common.constant.ConfigName;
+import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.file.DBHelper;
import com.bonait.bnframework.common.db.mode.BPA_ATTRIBUTE;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
@@ -19,6 +23,7 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODS_SUBATTRIBUTE_GROUP;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_PROCESS;
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel;
+import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SUBATTRIBUTE;
import com.bonait.bnframework.common.db.util.AttributeDBUtil;
import com.bonait.bnframework.common.db.util.GoodsClassifyDBUtil;
@@ -31,6 +36,9 @@ import com.bonait.bnframework.common.db.util.SubAttributeDBUtil;
import com.bonait.bnframework.common.db.util.SubAttributeGroupDBUtil;
import com.bonait.bnframework.common.helper.I.IRunT;
import com.bonait.bnframework.common.http.callback.json.JsonDialogCallback;
+import com.bonait.bnframework.common.model.MaterialData;
+import com.bonait.bnframework.common.model.MaterialRequestPar;
+import com.bonait.bnframework.common.model.MaterialTypeData;
import com.bonait.bnframework.common.model.upload.ProcessModelBean;
import com.bonait.bnframework.common.model.upload.GoodsDataInfo;
import com.bonait.bnframework.common.model.upload.GoodsProcessDetail;
@@ -271,9 +279,41 @@ public class UpdateDataService {
* @param goodsId
* @param context
*/
+// private static void upLoadMaterial(String goodsId,Context context,List upMaterialBean){
+// try{
+//
+// String url = UpdateDataService.path+"/api/ExternalPlatform/Material/GetMaterialPageList";//saasbase
+// LogUtils.d("GetMaterialInfo url="+url+" UpdateDataService.key="+UpdateDataService.key);
+// String key =UpdateDataService.key;
+// RecordManager.getInstance().addLogRecord("数据接收", "接收物料信息-"+url);
+// APIHelper.PostT(url,new MaterialRequestPar(1,100),key,new TypeReference>(){}).OnSource(s->{
+// RecordManager.getInstance().addLogRecord("数据接收", "接收物料信息成功");
+// List datas = new ArrayList<>();
+// List ids = new ArrayList<>();
+// LogUtils.d(" urlGetMaterial s.Content.data="+s.Content.data.toString());
+// for(int i = 0;i upMaterialBean){
try{
WaitProcessUtil.getInstance().Show("正在上传物料信息,请耐心稍等...","Material information is in progress, please be patient and wait for a moment");
+
List materials = MaterialUtil.GetMaterialALL();
if(upMaterialBean==null){
upMaterialBean = new ArrayList<>();
diff --git a/keystore.jks b/keystore.jks
new file mode 100644
index 00000000..226d727f
Binary files /dev/null and b/keystore.jks differ