Browse Source

添加动态料仓配置

授权码生成工具
liup 3 months ago
parent
commit
ec45a1809f
48 changed files with 667 additions and 183 deletions
  1. +2
    -0
      app/src/main/AndroidManifest.xml
  2. +6
    -0
      app/src/main/java/com/bonait/bnframework/business/ConfigData.java
  3. +6
    -1
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  4. +3
    -0
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  5. +46
    -0
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  6. +4
    -2
      app/src/main/java/com/bonait/bnframework/common/filepicker/FileAllFragment.java
  7. +4
    -1
      app/src/main/java/com/bonait/bnframework/common/helper/CrashHandler.java
  8. +4
    -1
      app/src/main/java/com/bonait/bnframework/common/helper/LogcatHelper.java
  9. +23
    -9
      app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java
  10. +6
    -28
      app/src/main/java/com/bonait/bnframework/common/image/utils/LocalCacheUtils.java
  11. +3
    -0
      app/src/main/java/com/bonait/bnframework/common/modbus/ModbusTcpMainServer.java
  12. +2
    -2
      app/src/main/java/com/bonait/bnframework/common/oss/OssHelper.java
  13. +17
    -14
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigation2Activity.java
  14. +3
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java
  15. +65
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java
  16. +34
    -10
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/BunkerSetupActivity.java
  17. +4
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java
  18. +63
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSystemsetFragment.java
  19. +3
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/systeminternetfragment.java
  20. +12
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/jingdutiao1.java
  21. +2
    -1
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java
  22. +10
    -3
      app/src/main/java/com/bonait/bnframework/ui/activity/DiyProcessActivity.java
  23. +15
    -0
      app/src/main/java/com/bonait/bnframework/ui/activity/GoodEditClassifyFragment.java
  24. +2
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/classify/ClassifySpinnerAdapter.java
  25. +3
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/classify/GoodClassifyAdapter.java
  26. +2
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/classify/SelectAttributeListAdapter.java
  27. +2
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/classify/SelectSubAttributeAdapter.java
  28. +61
    -0
      app/src/main/java/com/bonait/bnframework/ui/adapter/classify/Spinner36Adapter.java
  29. +2
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/goods/CloudGoodsAdapter.java
  30. +6
    -2
      app/src/main/java/com/bonait/bnframework/ui/adapter/goods/LocalGoodsAdapter.java
  31. +2
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/record/LocalLogAdapter.java
  32. +2
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/record/OrderAdapter.java
  33. +1
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/record/SubOrderAdapter.java
  34. +1
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/step/DiyStepAdapter.java
  35. +2
    -1
      app/src/main/java/com/bonait/bnframework/ui/adapter/step/StepAdapter.java
  36. +5
    -1
      app/src/main/java/com/bonait/bnframework/ui/fragment/goods/CloudGoodsFragment.java
  37. +5
    -1
      app/src/main/java/com/bonait/bnframework/ui/fragment/goods/LocalGoodsFragment.java
  38. +1
    -1
      app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateAllDataService.java
  39. +1
    -1
      app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java
  40. +13
    -3
      app/src/main/java/com/bonait/bnframework/ui/widget/ProcessValueView.java
  41. +19
    -2
      app/src/main/res/layout/activity_bunkersetup.xml
  42. +1
    -0
      app/src/main/res/layout/fragment_home4.xml
  43. +112
    -81
      app/src/main/res/layout/fragment_home_sbkz.xml
  44. +32
    -1
      app/src/main/res/layout/fragment_system_systemset.xml
  45. +2
    -2
      app/src/main/res/layout/item/layout/dialog_with_cancel_confirm.xml
  46. +25
    -0
      app/src/main/res/layout/item/layout/item_spinner_text36.xml
  47. +11
    -0
      app/src/main/res/layout/item/layout/spinner_dropdown_item20.xml
  48. +17
    -0
      app/src/main/res/layout/item/layout/spinner_text_item20.xml

+ 2
- 0
app/src/main/AndroidManifest.xml View File

@@ -8,6 +8,7 @@
<uses-permission android:name="android.permission.INTERNET" /> <!-- 网络连接 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 获取网络连接状态 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- 写存储的权限 -->
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" /> <!-- 写存储的权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- 读存储的权限 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <!-- 0未知来源的应用权限,更新App -->
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> <!-- 在SDCard中创建与删除文件权限 -->
@@ -29,6 +30,7 @@
android:label="@string/app_name"
android:largeHeap="true"
android:networkSecurityConfig="@xml/network_security_config"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ico"
android:supportsRtl="true"
android:theme="@style/AppTheme"


+ 6
- 0
app/src/main/java/com/bonait/bnframework/business/ConfigData.java View File

@@ -277,6 +277,12 @@ public class ConfigData {
case -204:
ConfigName.getInstance().IsAutoInit = Boolean.parseBoolean(item.value);
break;
case -205:
ConfigName.getInstance().silosAuto = Boolean.parseBoolean(item.value);
break;
case -206:
ConfigName.getInstance().silosNum = Integer.parseInt(item.value);
break;
case 1:
ConfigName.getInstance().Address = item.value;
break;


+ 6
- 1
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -1585,7 +1585,9 @@ public class ExecuteTheRecipe {
* 自提设备监听
*/
public static void Listening() {

if(ConfigName.getInstance().isPhoneVersion){
return;
}
ConfigName.getInstance().PLC_Address.clear();
ArrayList<BPA_PLCADDRESS> address = QueryDB.GetPlcaddressALL();
for (BPA_PLCADDRESS item : address) {
@@ -1686,6 +1688,9 @@ public class ExecuteTheRecipe {
* 主控设备监听
*/
public static void MainListening() {
if(ConfigName.getInstance().isPhoneVersion){
return;
}
new Thread(new Runnable() {
@Override
public void run() {


+ 3
- 0
app/src/main/java/com/bonait/bnframework/business/MainInit.java View File

@@ -76,6 +76,9 @@ public class MainInit {
*/
public static void Init(Application app)
{
if(ConfigName.getInstance().isPhoneVersion){
ConfigName.getInstance().scale = 1.5;
}
//0.全局异常捕获,保存为SD卡本级目录 crash
CrashHandler.getInstance().init(app);



+ 46
- 0
app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java View File

@@ -2,6 +2,7 @@ package com.bonait.bnframework.common.constant;

import android.app.Application;
import android.content.Context;
import android.os.Environment;
import android.widget.Switch;

import com.bonait.bnframework.R;
@@ -18,6 +19,7 @@ import com.bonait.bnframework.common.model.mode.ResALLData;
import com.bonait.bnframework.common.model.mode.VersionSelectionEnum;
import com.bonait.bnframework.common.utils.ScreenUtils;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Dictionary;
@@ -34,6 +36,8 @@ import java.util.concurrent.ConcurrentHashMap;
public class ConfigName {
public static boolean isTEST = false;
public boolean is800WithFeeding = false;//是否是800带投料版 有5个投料位
public boolean isPhoneVersion = true;//是否适配手机
public double scale = 1;

//region 单例模式
private static ConfigName mInstance; //实例变量设置私有,防止直接通过类名访问
@@ -142,6 +146,12 @@ public class ConfigName {
*/
public boolean IsAutoInit=true;

/**
* 是否动态配置料仓
*/
public boolean silosAuto = false;
public int silosNum = 4;

/**
* 设备id
*/
@@ -406,6 +416,14 @@ public class ConfigName {
add(new Res_PLCADDRESS("料仓3校准值", "VW118", 1, 1));
add(new Res_PLCADDRESS("料仓4校准开关", "M13.5", 0, 1));
add(new Res_PLCADDRESS("料仓4校准值", "VW120", 1, 1));
//todo
add(new Res_PLCADDRESS("料仓5校准开关", "M13.5", 0, 1));
add(new Res_PLCADDRESS("料仓5校准值", "VW120", 1, 1));
add(new Res_PLCADDRESS("料仓6校准开关", "M13.5", 0, 1));
add(new Res_PLCADDRESS("料仓6校准值", "VW120", 1, 1));
add(new Res_PLCADDRESS("料仓7校准开关", "M13.5", 0, 1));
add(new Res_PLCADDRESS("料仓7校准值", "VW120", 1, 1));

add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1));

add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0));
@@ -417,12 +435,24 @@ public class ConfigName {
add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1));
add(new Res_PLCADDRESS("料仓4需求值", "VW122", 1, 1));
add(new Res_PLCADDRESS("料仓4下料", "M13.4", 0, 1));
//todo
add(new Res_PLCADDRESS("料仓5需求值", "VW122", 1, 1));
add(new Res_PLCADDRESS("料仓5下料", "M13.4", 0, 1));
add(new Res_PLCADDRESS("料仓6需求值", "VW122", 1, 1));
add(new Res_PLCADDRESS("料仓6下料", "M13.4", 0, 1));
add(new Res_PLCADDRESS("料仓7需求值", "VW122", 1, 1));
add(new Res_PLCADDRESS("料仓7下料", "M13.4", 0, 1));

add(new Res_PLCADDRESS("料仓手动", "-------------", 0, 0));
add(new Res_PLCADDRESS("料仓1手动开关", "M13.1", 1, 1));
add(new Res_PLCADDRESS("料仓2手动开关", "M13.2", 1, 1));
add(new Res_PLCADDRESS("料仓3手动开关", "M13.3", 1, 1));
add(new Res_PLCADDRESS("料仓4手动开关", "M10.7", 1, 1));
//todo
add(new Res_PLCADDRESS("料仓5手动开关", "M13.3", 1, 1));
add(new Res_PLCADDRESS("料仓6手动开关", "M10.7", 1, 1));
add(new Res_PLCADDRESS("料仓7手动开关", "M13.3", 1, 1));

//上下限
add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0));
add(new Res_PLCADDRESS("原点位置下限", "VD150", 1, 1));
@@ -474,6 +504,11 @@ public class ConfigName {
add(new Res_PLCADDRESS("料仓2下料完成", "M41.3", 1, 0));
add(new Res_PLCADDRESS("料仓3下料完成", "M41.4", 1, 0));
add(new Res_PLCADDRESS("料仓4下料完成", "M42.0", 1, 0));
//todo
add(new Res_PLCADDRESS("料仓5下料完成", "M42.0", 1, 0));
add(new Res_PLCADDRESS("料仓6下料完成", "M42.0", 1, 0));
add(new Res_PLCADDRESS("料仓7下料完成", "M42.0", 1, 0));

add(new Res_PLCADDRESS("炒锅清洗反馈", "M41.5", 1, 0));
add(new Res_PLCADDRESS("出餐启动反馈", "M41.6", 1, 0));
add(new Res_PLCADDRESS("炒锅倒菜减速位", "M41.7", 1, 0));
@@ -2068,4 +2103,15 @@ public class ConfigName {
*/
public int AutoQXTime=10;
//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();
}
}
return context.getFilesDir().getAbsolutePath();
}
}

+ 4
- 2
app/src/main/java/com/bonait/bnframework/common/filepicker/FileAllFragment.java View File

@@ -13,7 +13,9 @@ import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.filepicker.adapter.AllFileAdapter;
import com.bonait.bnframework.common.filepicker.adapter.OnFileItemClickListener;
import com.bonait.bnframework.common.filepicker.model.FileEntity;
@@ -97,8 +99,8 @@ public class FileAllFragment extends Fragment {
Toast.makeText(getContext(), R.string.not_available, Toast.LENGTH_SHORT).show();
return;
}
mPath = Environment.getExternalStorageDirectory().getAbsolutePath();
rootPath = Environment.getExternalStorageDirectory().getAbsolutePath();
mPath = ConfigName.getFileRoot(MainApplication.getContext());
rootPath = ConfigName.getFileRoot(MainApplication.getContext());
mFilter = new FileSelectFilter(mFileTypes);
mListFiles = getFileList(mPath);
mAllFileAdapter = new AllFileAdapter(getContext(),mListFiles,mFilter);


+ 4
- 1
app/src/main/java/com/bonait/bnframework/common/helper/CrashHandler.java View File

@@ -13,6 +13,9 @@ import android.os.SystemClock;
import android.util.Log;
import android.widget.Toast;

import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.common.constant.ConfigName;

import java.io.File;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
@@ -203,7 +206,7 @@ public class CrashHandler implements UncaughtExceptionHandler {
}

public static String getGlobalpath() {
return Environment.getExternalStorageDirectory().getAbsolutePath()
return ConfigName.getFileRoot(MainApplication.getContext())
+ File.separator + "crash" + File.separator;
}



+ 4
- 1
app/src/main/java/com/bonait/bnframework/common/helper/LogcatHelper.java View File

@@ -4,6 +4,9 @@ import android.content.Context;
import android.os.Environment;
import android.os.StatFs;

import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.common.constant.ConfigName;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
@@ -38,7 +41,7 @@ public class LogcatHelper {
public void init(Context context) {
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
// 优先保存到SD卡中
pathLogcat = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "HBL_Log";
pathLogcat = ConfigName.getFileRoot(MainApplication.getContext()) + File.separator + "HBL_Log";
} else {
// 如果SD卡不存在,就保存到本应用的目录下
pathLogcat = context.getFilesDir().getAbsolutePath() + File.separator + "HBL_Log";


+ 23
- 9
app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java View File

@@ -1,9 +1,11 @@
package com.bonait.bnframework.common.helper;

import android.app.Application;
import android.content.Context;
import android.os.Environment;
import android.util.Log;

import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.file.DBHelper;

@@ -30,25 +32,37 @@ public class SdCart {


//endregion
private static String getFileRoot(Context context) {
if (Environment.getExternalStorageState().equals(
Environment.MEDIA_MOUNTED)) {
File external = context.getExternalFilesDir(null);
if (external != null) {
return external.getAbsolutePath();
}
}
return context.getFilesDir().getAbsolutePath();
}
/**
* 初始化数据库到SD卡
*/
public void initSD() {
File sdDir = null;
boolean sdCardExist = Environment.getExternalStorageState().equals(
Environment.MEDIA_MOUNTED);
if (sdCardExist) {
sdDir = Environment.getExternalStorageDirectory();
ConfigName.getInstance().sdCardPath = sdDir.toString();
}
// File sdDir = null;
// boolean sdCardExist = Environment.getExternalStorageState().equals(
// Environment.MEDIA_MOUNTED);
// if (sdCardExist) {
// sdDir = Environment.getExternalStorageDirectory();
// ConfigName.getInstance().sdCardPath = sdDir.toString();
// }
ConfigName.getInstance().sdCardPath = ConfigName.getFileRoot(MainApplication.getContext());

ConfigName.getInstance().appResRoot = ConfigName.getInstance().sdCardPath +ConfigName.dataPath;
ConfigName.getInstance().dbPath = ConfigName.getInstance().appResRoot + "/hbl.db";

File rootFile = new File(ConfigName.getInstance().appResRoot);
if (!rootFile.exists()) //创建目录
{ Log.i("日志",ConfigName.getInstance().sdCardPath);
rootFile.mkdirs();
{
boolean res = rootFile.mkdirs();
Log.i("日志",ConfigName.getInstance().appResRoot+" 创建目录 "+res);
}
File file = new File(ConfigName.getInstance().dbPath);
if(!file.exists())//文件不存在那么创建数据库


+ 6
- 28
app/src/main/java/com/bonait/bnframework/common/image/utils/LocalCacheUtils.java View File

@@ -24,7 +24,7 @@ import java.io.FileOutputStream;
*/
public class LocalCacheUtils {

private static final String CACHE_PATH= Environment.getExternalStorageDirectory().getAbsolutePath()+ConfigName.dataPath+"/WebImage";
// private static final String CACHE_PATH= Environment.getExternalStorageDirectory().getAbsolutePath()+ConfigName.dataPath+"/WebImage";

//region 私有单例
private static volatile LocalCacheUtils _instance;
@@ -42,10 +42,11 @@ public class LocalCacheUtils {
* @return
*/
public boolean SetBitmapFile(ImageView ivPic, String name, String url) {
String CACHE_PATH = ConfigName.getFileRoot(MainApplication.getContext())+ConfigName.dataPath+"/WebImage";
if(name.contains(CACHE_PATH)){
name = name.replace(CACHE_PATH,"");
}
File file = new File(CACHE_PATH, name);
File file = new File(ConfigName.getFileRoot(MainApplication.getContext())+ConfigName.dataPath+"/WebImage", name);
String imgUrl = null;
if(url!=null && url.startsWith("http")){
if(NetworkUtils.isNetworkConnected(MainApplication.getContext())){
@@ -61,8 +62,8 @@ public class LocalCacheUtils {
// .thumbnail(0.1f) // 加载原始图片的10%作为缩略图
.fitCenter() // 缩放图片以适应ImageView的尺寸
// .override(150, 75) // 设置目标图片的宽度和高度
.placeholder(R.mipmap.loading3)
// .error(R.mipmap.loadingerror)
.placeholder(R.mipmap.loading123)
.error(R.mipmap.loading123)
.skipMemoryCache(true) // 禁用内存缓存
.diskCacheStrategy(DiskCacheStrategy.NONE)
.apply(new RequestOptions().transform(new FitXYRoundRadiusTransform(10)))
@@ -79,29 +80,6 @@ public class LocalCacheUtils {
return false;
}

/**
* 从本地读取图片
* @param url
*/
public Bitmap getBitmapFromLocal(String url){
String fileName = null;//把图片的url当做文件名,并进行MD5加密
try {
fileName = url;//MD5Encoder.encode(url);//AES.Encrypt(url);//MD5Encoder.encode(url);
File file=new File(CACHE_PATH,fileName);
Bitmap bitmap=null;
if(file.exists())//
{
bitmap = BitmapFactory.decodeStream(new FileInputStream(file));
}
return bitmap;
} catch (Exception e) {
e.printStackTrace();
}

return null;
}


/**
* 从网络获取图片后,保存至本地缓存
*
@@ -113,7 +91,7 @@ public class LocalCacheUtils {

String fileName = url.substring(url.lastIndexOf('/') + 1);
;//MD5Encoder.encode(url);;//AES.Encrypt(url);//;MD5Encoder.encode(url);//把图片的url当做文件名,并进行MD5加密
File file = new File(CACHE_PATH, fileName);
File file = new File(ConfigName.getFileRoot(MainApplication.getContext())+ConfigName.dataPath+"/WebImage", fileName);
//通过得到文件的父文件,判断父文件是否存在
File parentFile = file.getParentFile();
if (!parentFile.exists()) {


+ 3
- 0
app/src/main/java/com/bonait/bnframework/common/modbus/ModbusTcpMainServer.java View File

@@ -183,6 +183,9 @@ public class ModbusTcpMainServer {
*/
public static void ConnectPLC()
{
if(ConfigName.getInstance().isPhoneVersion){
return;
}
String host=ConfigName.getInstance().MainAddress;
int port=ConfigName.getInstance().MainPost;
param = TcpParam.create(host, port)


+ 2
- 2
app/src/main/java/com/bonait/bnframework/common/oss/OssHelper.java View File

@@ -17,6 +17,7 @@ import com.alibaba.sdk.android.oss.common.auth.OSSPlainTextAKSKCredentialProvide
import com.alibaba.sdk.android.oss.internal.OSSAsyncTask;
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
import com.alibaba.sdk.android.oss.model.PutObjectResult;
import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.helper.I.IRun;
@@ -66,7 +67,6 @@ public class OssHelper {
* 上传完成通知
*/
public IRunT OnCharge;
private static final String CACHE_PATH = Environment.getExternalStorageDirectory().getAbsolutePath()+ConfigName.dataPath + "/WebImage";

/**
* 上传文件
@@ -84,7 +84,7 @@ public class OssHelper {
OnCharge.Run(res);
return;
} else {
File file = new File(CACHE_PATH, fileurl);
File file = new File(ConfigName.getFileRoot(MainApplication.getContext()), fileurl);
String name = "Franchisee/" + ConfigName.getInstance().organizeMode.store_Name + "/goods/android/";
String filename = "https://hbl-test-1305371387.cos.ap-chengdu.myqcloud.com/" + name + file.getName();
// 第一个参数:在【RAM访问控制】创建用户时分配的accessKeyId


+ 17
- 14
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigation2Activity.java View File

@@ -86,20 +86,20 @@ public class BottomNavigation2Activity extends BaseActivity {
String guid = UUID.randomUUID().toString();

// Date dt = new Date();
LocalDate currentDate=LocalDate.now();
String info2 = info+"@"+currentDate.getYear()+";"+currentDate.getMonthValue()+";"+currentDate.getDayOfMonth();
String s1 = AuthorizeHelper.encrypt(info2,5);
String s2 = AuthorizeHelper.decrypt(s1,5);
if(ConfigName.getInstance().versionSelectionEnum.contains("一拖")){
hs = new HttpServer();
new Thread(()->{
try {
Thread.sleep(3000);
ConfigData.getInstance().GetMainConsoleData();
}catch (Exception e){}
}).start();
}
// LocalDate currentDate=LocalDate.now();
// String info2 = info+"@"+currentDate.getYear()+";"+currentDate.getMonthValue()+";"+currentDate.getDayOfMonth();
// String s1 = AuthorizeHelper.encrypt(info2,5);
// String s2 = AuthorizeHelper.decrypt(s1,5);
//
// if(ConfigName.getInstance().versionSelectionEnum.contains("一拖")){
// hs = new HttpServer();
// new Thread(()->{
// try {
// Thread.sleep(3000);
// ConfigData.getInstance().GetMainConsoleData();
// }catch (Exception e){}
// }).start();
// }


}
@@ -239,6 +239,9 @@ public class BottomNavigation2Activity extends BaseActivity {
*/
public void ReconnectModbus() {
try {
if(ConfigName.getInstance().isPhoneVersion){
return;
}
ConfigName.getInstance().IsShow=true;
ConfigName.getInstance().IsShowNew=false;
ThreadManager.Get().StartLong("PLC断线重连线程", true, new IThread() {


+ 3
- 0
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java View File

@@ -313,6 +313,9 @@ public class BottomNavigationNewActivity extends BaseActivity {
*/
public void ReconnectModbus() {
try {
if(ConfigName.getInstance().isPhoneVersion){
return;
}
ConfigName.getInstance().IsShowNew=true;
ConfigName.getInstance().IsShow=false;
ThreadManager.Get().StartLong("PLC断线重连线程新界面", true, new IThread() {


+ 65
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java View File

@@ -1,9 +1,12 @@
package com.bonait.bnframework.modules.home.fragment;

import static com.bonait.bnframework.MainApplication.getContext;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
@@ -15,10 +18,12 @@ import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;

import com.bonait.bnframework.R;
@@ -30,6 +35,7 @@ import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SILOS;
import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL;
import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.AuthorizeHelper;
import com.bonait.bnframework.common.helper.I.IRun;
@@ -41,6 +47,8 @@ import com.bonait.bnframework.common.model.mode.SpeedEnum;
import com.bonait.bnframework.common.model.mode.SpeedEnum_en;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.databinding.ActivityEditProcessBinding;
import com.bonait.bnframework.databinding.FragmentHomeSbkzBinding;
import com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3;
import com.bonait.bnframework.modules.home.fragment.mode.newhuoli_control;
import com.bonait.bnframework.ui.widget.NewToastUtil;
@@ -98,6 +106,8 @@ public class HomeFragmentSBKZ extends BaseFragment {

@BindView(R.id.guokoucaoxiang_1)
LinearLayout guokoucaoxiang_1;
@BindView(R.id.guokoucaoxiang_2)
LinearLayout guokoucaoxiang_2;

@BindView(R.id.guokoucaoxiang)
imagebuttom3 guokoucaoxiang;
@@ -153,6 +163,8 @@ public class HomeFragmentSBKZ extends BaseFragment {
imagebuttom3 yeliao2;
@BindView(R.id.yeliao3)
imagebuttom3 yeliao3;
@BindView(R.id.btn_silos_open)
Button btn_silos_open;

@BindView(R.id.chuchan)
imagebuttom3 chuchan;
@@ -162,11 +174,14 @@ public class HomeFragmentSBKZ extends BaseFragment {

@BindView(R.id.device_image)
ImageView device_image;
@BindView(R.id.spinner_silos)
Spinner spinner_silos;
//endregion

//region 界面
private Context context;
public Activity activity = null;
private FragmentHomeSbkzBinding binding;

private Handler handler = new Handler(Looper.getMainLooper()){
@Override
@@ -199,6 +214,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_home_sbkz, null);
ButterKnife.bind(this, root);
binding= FragmentHomeSbkzBinding.bind(root);
return root;
}

@@ -284,6 +300,48 @@ public class HomeFragmentSBKZ extends BaseFragment {
touliao4.mListener = myClickListener;
touliao5.mListener = myClickListener;

if(ConfigName.getInstance().silosAuto){
binding.llSilos3.setVisibility(View.GONE);
binding.llSilosAuto.setVisibility(View.VISIBLE);
ArrayList<BPA_SILOS> silosArrayList = QueryDB.GetSilosALL();
List<String> nameList = new ArrayList<>();
if(!silosArrayList.isEmpty()){
for(BPA_SILOS silos : silosArrayList){
List<BPA_MATERIAL> materials = QueryDB.GetMaterialBySilosID(silos.id);
if(!materials.isEmpty()){
nameList.add(silos.num+"料仓:"+materials.get(0).name);
}else {
nameList.add(silos.num+"料仓:未设置");
}
}
ArrayAdapter<String> adapter_kk = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item20, nameList);
adapter_kk.setDropDownViewResource(R.layout.spinner_dropdown_item20);
spinner_silos.setAdapter(adapter_kk);

btn_silos_open.setOnTouchListener(new View.OnTouchListener() {
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Object ob = ExecuteTheRecipe.getListingValue("抽料位反馈");
if (ob != null && (boolean) ob) {
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
SetIDTouch(R.id.btn_silos_open, true);
} else if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
SetIDTouch(R.id.btn_silos_open, false);
}
} else {
ToastUtils.warning(getString(R.string.text_potdirection_1));
SetIDTouch(R.id.yeliao3, false);
}
return false;
}
});
}
}else {
binding.llSilos3.setVisibility(View.VISIBLE);
binding.llSilosAuto.setVisibility(View.GONE);
}

chushui.SetOnTounch(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
@@ -370,6 +428,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
}
});


huoli.mListener = myClickListener;
chuchan.mListener = myClickListener;
DataBus.getInstance().SilosRefresh = new IRun() {
@@ -540,6 +599,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
break;
case R.id.guokoucaoxiang:
guokoucaoxiang_1.setVisibility(isclick ? View.VISIBLE : View.GONE);
guokoucaoxiang_2.setVisibility(isclick ? View.VISIBLE : View.GONE);
break;
case R.id.guokoucaoxiang_cc:
SetMouthFacing(MouthFacingEnum.炒菜位);
@@ -635,6 +695,10 @@ public class HomeFragmentSBKZ extends BaseFragment {
Pumping(3, ismode);
Log.e("液料3号", ismode ? "按下" : "松开");
break;
case R.id.btn_silos_open:
String[] res = spinner_silos.getSelectedItem().toString().split("料");
Pumping(Integer.parseInt(res[0]), ismode);
break;
}
}
//endregion
@@ -767,6 +831,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
break;
}
guokoucaoxiang_1.setVisibility(View.GONE);
guokoucaoxiang_2.setVisibility(View.GONE);
guokoucaoxiang.Init();
switch (getString(R.string.language)){
case "en":


+ 34
- 10
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/BunkerSetupActivity.java View File

@@ -11,6 +11,7 @@ import android.view.View;
import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
@@ -18,6 +19,7 @@ import com.bonait.bnframework.common.db.mode.BPA_SILOS;
import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.databinding.ActivityBunkersetupBinding;
import com.bonait.bnframework.modules.home.fragment.mode.add_silos_message;
import com.bonait.bnframework.modules.home.fragment.mode.imagebuttom;
import com.bonait.bnframework.modules.home.fragment.mode.jingdutiao1;
@@ -55,13 +57,15 @@ public class BunkerSetupActivity extends BaseActivity {
add_silos_message silos_control;
public Context context;
public Activity activity=null;
private ActivityBunkersetupBinding binding;
//endregion

//region 界面实例
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bunkersetup);
binding = ActivityBunkersetupBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
ButterKnife.bind(this);
context = this;
activity=this;
@@ -76,6 +80,16 @@ public class BunkerSetupActivity extends BaseActivity {
* 初始化顶部弹框
*/
private void initTopBar() {
if(ConfigName.getInstance().silosAuto){
binding.llSilos.setVisibility(View.GONE);
binding.llSilos3.setVisibility(View.GONE);
binding.llSilosAuto.setVisibility(View.VISIBLE);
}else {
binding.llSilos.setVisibility(View.VISIBLE);
binding.llSilos3.setVisibility(View.VISIBLE);
binding.llSilosAuto.setVisibility(View.GONE);
}

mTopBar.setBackgroundColor(ContextCompat.getColor(context, R.color.topbj1));
mTopBar.setTitle(getString(R.string.text_home_SZ));
mTopBar.addLeftImageButton(R.mipmap.fanhui, R.id.topbar).setOnClickListener(new View.OnClickListener() {
@@ -126,17 +140,27 @@ public class BunkerSetupActivity extends BaseActivity {
*/
public void InitData() {
DataBus.getInstance().GetLc();
for (lcMode item : DataBus.getInstance().lcModes) {
if (item.num == 1) {
silos1.SetValue(item, myClickListener);
} else if (item.num == 2) {
silos2.SetValue(item, myClickListener);
} else if (item.num == 3) {
silos3.SetValue(item, myClickListener);
}else if (item.num == 4) {
silos4.SetValue(item, myClickListener);
if(ConfigName.getInstance().silosAuto){
binding.llSilosAuto.removeAllViews();
// for (lcMode item : DataBus.getInstance().lcModes) {
// jingdutiao1 view = new jingdutiao1(this);
// view.SetValue(item,myClickListener);
// binding.llSilosAuto.addView(view);
// }
}else {
for (lcMode item : DataBus.getInstance().lcModes) {
if (item.num == 1) {
silos1.SetValue(item, myClickListener);
} else if (item.num == 2) {
silos2.SetValue(item, myClickListener);
} else if (item.num == 3) {
silos3.SetValue(item, myClickListener);
}else if (item.num == 4) {
silos4.SetValue(item, myClickListener);
}
}
}

}

/**


+ 4
- 3
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java View File

@@ -9,6 +9,7 @@ import android.os.Environment;
import android.view.View;

import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.constant.ConfigName;
@@ -42,7 +43,7 @@ public class ImageChooseActivity extends BaseActivity {
QMUITopBarLayout mTopBar;//顶部标题
@BindView(R.id.recycler_view)
RecyclerView recyclerView;//image列表
private static final String CACHE_PATH= Environment.getExternalStorageDirectory().getAbsolutePath()+ ConfigName.dataPath+"/WebImage";
List<image_sp> data =new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -65,7 +66,7 @@ public class ImageChooseActivity extends BaseActivity {

private void initData() {
try{
File path = new File(CACHE_PATH);// 获得路径
File path = new File(ConfigName.getFileRoot(MainApplication.getContext()));// 获得路径
File[] files = path.listFiles();// 读取文件
data.clear();
for (int i = 0; i < files.length; i++) {
@@ -90,7 +91,7 @@ public class ImageChooseActivity extends BaseActivity {
recyclerView.postDelayed(new Runnable() {
@Override
public void run() {
EventBus.getDefault().post(new ImageSelectEvent(CACHE_PATH+"/"+sp.url));
EventBus.getDefault().post(new ImageSelectEvent(ConfigName.getFileRoot(MainApplication.getContext())+"/"+sp.url));
}
},500);
}


+ 63
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSystemsetFragment.java View File

@@ -23,6 +23,8 @@ import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SILOS;
import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SYSTEMSET;
import com.bonait.bnframework.common.model.mode.VersionSelectionEnum;
import com.bonait.bnframework.common.thread.ThreadManager;
@@ -55,6 +57,11 @@ public class SystemSystemsetFragment extends BaseFragment {
@BindView(R.id.cb_autoInit)
CheckBox cb_autoInit;

@BindView(R.id.cb_auto_silos)
CheckBox cb_autoSilos;
@BindView(R.id.edittext_silos)
EditText edittextSilos;

@BindView(R.id.edittext100)
EditText edittext100;
@BindView(R.id.edittext101)
@@ -193,6 +200,14 @@ public class SystemSystemsetFragment extends BaseFragment {
ConfigName.getInstance().IsAutoInit = Boolean.parseBoolean(item.value);
cb_autoInit.setChecked( ConfigName.getInstance().IsAutoInit);
break;
case -205:
ConfigName.getInstance().silosAuto = Boolean.parseBoolean(item.value);
cb_autoSilos.setChecked( ConfigName.getInstance().silosAuto);
break;
case -206:
ConfigName.getInstance().silosNum = Integer.parseInt(item.value);
edittextSilos.setText( ConfigName.getInstance().silosNum+"");
break;
case -100:
ConfigName.getInstance().versionSelectionEnum = item.value;
versionselection.setSelection(material_map_vis.get(item.value)==null?0:material_map_vis.get(item.value));
@@ -289,6 +304,40 @@ public class SystemSystemsetFragment extends BaseFragment {
ConfigName.getInstance().DeviceHao = Integer.parseInt(edittext102.getText().toString());
ConfigName.getInstance().Key = edittext103.getText().toString();
ConfigName.getInstance().IsAutoInit = cb_autoInit.isChecked();

if(cb_autoSilos.isChecked()){
if(ConfigName.getInstance().silosNum!=Integer.parseInt(edittextSilos.getText().toString())){
ArrayList<BPA_SILOS> silosArrayList = QueryDB.GetSilosALL();
ArrayList<BPA_SILOSANDMATERIAL> silosandmaterials = QueryDB.GetSilosAndMaterialALL();
if (!silosArrayList.isEmpty()) {
int size = silosArrayList.size();
int newSize = Integer.parseInt(edittextSilos.getText().toString());

if(size>newSize){
for(int i=size-1;i>=newSize;i--){
QueryDB.DeleteSilos(silosArrayList.get(i));
QueryDB.DeleteSilosAndMaterial(silosandmaterials.get(i));
}
}else if(size<newSize ){
for(int i=size;i<newSize;i++){
BPA_SILOS silo = new BPA_SILOS();
silo.id = java.util.UUID.randomUUID().toString();
silo.num = i + 1;
silo.thrsoleValue=ConfigName.getInstance().SiloAlarmThreshold;
silo.warningValue=ConfigName.getInstance().SiloFeedThreshold;
BPA_SILOSANDMATERIAL sm = new BPA_SILOSANDMATERIAL();
sm.silosID = silo.id;
sm.materialID = "";
QueryDB.AddSilos(silo);
QueryDB.AddSilosAndMaterial(sm);
}
}
}
}
}
ConfigName.getInstance().silosAuto = cb_autoSilos.isChecked();
ConfigName.getInstance().silosNum = Integer.parseInt(edittextSilos.getText().toString());

UpdateDataService.key = edittext103.getText().toString();

ConfigName.getInstance().ClientAutoKey = edittext3.getText().toString();
@@ -365,6 +414,20 @@ public class SystemSystemsetFragment extends BaseFragment {
set_main5.userID = ConfigName.getInstance().user.userID;
QueryDB.AddSystemset(set_main5);

BPA_SYSTEMSET set_main6 = new BPA_SYSTEMSET();
set_main6.type = -205;
set_main6.value =String.valueOf(ConfigName.getInstance().silosAuto);
set_main6.deviceID = ConfigName.getInstance().DeviceId;
set_main6.userID = ConfigName.getInstance().user.userID;
QueryDB.AddSystemset(set_main6);

BPA_SYSTEMSET set_main7 = new BPA_SYSTEMSET();
set_main7.type = -206;
set_main7.value = edittextSilos.getText().toString();
set_main7.deviceID = ConfigName.getInstance().DeviceId;
set_main7.userID = ConfigName.getInstance().user.userID;
QueryDB.AddSystemset(set_main7);

if (isgb) {
ConfigData.getInstance().RevertPLCProcess();
}


+ 3
- 2
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/systeminternetfragment.java View File

@@ -19,6 +19,7 @@ import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName;
@@ -103,10 +104,10 @@ public class systeminternetfragment extends BaseFragment {
}

ArrayList<FileEntity> yx_files = new ArrayList<>();
private static final String CACHE_PATH = Environment.getExternalStorageDirectory().getAbsolutePath()+ConfigName.dataPath + "/WebImage";
// private static final String CACHE_PATH = Environment.getExternalStorageDirectory().getAbsolutePath()+ConfigName.dataPath + "/WebImage";

public void FlushedImage() {
File path = new File(CACHE_PATH);// 获得路径
File path = new File(ConfigName.getFileRoot(MainApplication.getContext()));// 获得路径
File[] files = path.listFiles();// 读取文件
yx_files.clear();
try {


+ 12
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/jingdutiao1.java View File

@@ -42,6 +42,11 @@ public class jingdutiao1 extends LinearLayout {
public int value=0;
private View root;

public jingdutiao1(Context context) {
this(context, null);

}

public jingdutiao1(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
root= LayoutInflater.from(context).inflate(R.layout.item_jingdutiao1, this);
@@ -130,13 +135,19 @@ public class jingdutiao1 extends LinearLayout {
return "③";
}else if(num==4)
{
return ConfigName.getInstance().app.getString(R.string.text_valve);
return "④";
}else if(num==5)
{
return "⑤";
}else if(num==6)
{
return "⑥";
}else if(num==7)
{
return "⑦";
}else if(num==8)
{
return "⑧";
}else
{
return "①";


+ 2
- 1
app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java View File

@@ -113,7 +113,8 @@ public class WelcomeActivity extends BaseActivity {
*/
public void PermissionCheck() {

String[] params = {Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.RECORD_AUDIO, Manifest.permission.CAMERA};
String[] params = {Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.RECORD_AUDIO, Manifest.permission.CAMERA
};
//String[] params = {Manifest.permission.WRITE_EXTERNAL_STORAGE};
//判断是否获取权限
if (EasyPermissions.hasPermissions(this, params)) {


+ 10
- 3
app/src/main/java/com/bonait/bnframework/ui/activity/DiyProcessActivity.java View File

@@ -38,6 +38,8 @@ import com.bonait.bnframework.databinding.DialogWithCancelConfirmBinding;
import com.bonait.bnframework.modules.home.fragment.from.CookingActivity;
import com.bonait.bnframework.modules.home.fragment.from.CookingSimulatedActivity;
import com.bonait.bnframework.modules.home.fragment.mode.item_gx;
import com.bonait.bnframework.ui.adapter.classify.ClassifySpinnerAdapter;
import com.bonait.bnframework.ui.adapter.classify.Spinner36Adapter;
import com.bonait.bnframework.ui.adapter.step.DiyStepAdapter;
import com.bonait.bnframework.ui.dialog.AttributeSelectDialog;
import com.bonait.bnframework.ui.dialog.WaiteProgressDialog;
@@ -369,9 +371,14 @@ public class DiyProcessActivity extends BaseActivity {
}
i++;
}
ArrayAdapter<String> adapter_kk = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item32, new ArrayList<>(processMap.keySet()));
adapter_kk.setDropDownViewResource(R.layout.spinner_dropdown_item32);
viewBinding.spinnerProcess.setAdapter(adapter_kk);
if(ConfigName.getInstance().isPhoneVersion){
Spinner36Adapter spinnerAdapter = new Spinner36Adapter(getContext(), new ArrayList<>(processMap.keySet()));
viewBinding.spinnerProcess.setAdapter(spinnerAdapter);
}else {
ArrayAdapter<String> adapter_kk = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item32, new ArrayList<>(processMap.keySet()));
adapter_kk.setDropDownViewResource(R.layout.spinner_dropdown_item32);
viewBinding.spinnerProcess.setAdapter(adapter_kk);
}

viewBinding.spinnerProcess.setOnTouchListener(new View.OnTouchListener() {
@Override


+ 15
- 0
app/src/main/java/com/bonait/bnframework/ui/activity/GoodEditClassifyFragment.java View File

@@ -2,6 +2,7 @@ package com.bonait.bnframework.ui.activity;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -12,6 +13,7 @@ import android.widget.ArrayAdapter;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;

import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.R;
@@ -30,6 +32,7 @@ import com.bonait.bnframework.databinding.DialogAddClassifyBinding;
import com.bonait.bnframework.databinding.DialogDeleteClassifyBinding;
import com.bonait.bnframework.databinding.FragmentGoodEditClassifyBinding;
import com.bonait.bnframework.ui.adapter.goods.LocalGoodsAdapter;
import com.bonait.bnframework.ui.util.DimensUtil;
import com.bonait.bnframework.ui.util.DisplayManager;
import com.bonait.bnframework.ui.widget.NewToastUtil;

@@ -230,6 +233,18 @@ public class GoodEditClassifyFragment extends BaseFragment {
protected void addGoods() {
}
};
viewBinding.recyclerGoods.addItemDecoration(new RecyclerView.ItemDecoration() {
@Override
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
outRect.top = DimensUtil.getDimens(0);
if(ConfigName.getInstance().isPhoneVersion){
outRect.bottom = (int) (DisplayManager.getWidthScaleRate()*(-500));
}else {
outRect.bottom = (int) (DisplayManager.getWidthScaleRate()*(-60));
}
}
});
viewBinding.recyclerGoods.setAdapter(goodsAdapter);
goodsList.clear();
goodsList.addAll(GoodsDBUtil.getAll());


+ 2
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/classify/ClassifySpinnerAdapter.java View File

@@ -11,6 +11,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.ui.util.DisplayManager;


@@ -52,7 +53,7 @@ public class ClassifySpinnerAdapter extends BaseAdapter {
}
TextView textView = convertView.findViewById(R.id.textViewCustom);
textView.setText(getItem(position));
if(textView.getTextSize()>34||textView.getTextSize()<30){
if(textView.getTextSize()>34* ConfigName.getInstance().scale||textView.getTextSize()<30*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(convertView.findViewById(R.id.root));
}



+ 3
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/classify/GoodClassifyAdapter.java View File

@@ -7,6 +7,8 @@ import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.mode.BPA_GOODS_CLASSIFY;
import com.bonait.bnframework.databinding.ItemClassifyBinding;
import com.bonait.bnframework.ui.adapter.BaseAdapter;
@@ -28,7 +30,7 @@ public abstract class GoodClassifyAdapter extends BaseAdapter<BPA_GOODS_CLASSIFY
@SuppressLint("SetTextI18n")
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
if(holder.binding.name.getTextSize()> 34 || holder.binding.name.getTextSize()< 30){
if(holder.binding.name.getTextSize()> 34* ConfigName.getInstance().scale || holder.binding.name.getTextSize()< 30*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}
holder.binding.name.setText(mData.get(position).name+"");


+ 2
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/classify/SelectAttributeListAdapter.java View File

@@ -14,6 +14,7 @@ import androidx.recyclerview.widget.RecyclerView;

import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.mode.BPA_ATTRIBUTE;
import com.bonait.bnframework.common.db.mode.BPA_SUBATTRIBUTE;
import com.bonait.bnframework.common.db.util.SubAttributeDBUtil;
@@ -63,7 +64,7 @@ public class SelectAttributeListAdapter extends ArrayAdapter<BPA_ATTRIBUTE> {
//分别获取 image view 和 textview 的实例
TextView name = view.findViewById(R.id.attribute_name);
RecyclerView recyclerView = view.findViewById(R.id.recycle_sub_attribute);
if(name.getTextSize()>34||name.getTextSize()<30){
if(name.getTextSize()>34* ConfigName.getInstance().scale||name.getTextSize()<30*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(view.findViewById(R.id.root));
}
name.setText(bean.name+":");


+ 2
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/classify/SelectSubAttributeAdapter.java View File

@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView;

import com.apkfuns.logutils.LogUtils;

import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.mode.BPA_SUBATTRIBUTE;

import com.bonait.bnframework.databinding.ItemSelectSubattributeBinding;
@@ -44,7 +45,7 @@ public class SelectSubAttributeAdapter extends BaseAdapter<BPA_SUBATTRIBUTE,Sele
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
try {
if(holder.binding.name.getTextSize()>34||holder.binding.name.getTextSize()<30){
if(holder.binding.name.getTextSize()>34* ConfigName.getInstance().scale||holder.binding.name.getTextSize()<30*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}
BPA_SUBATTRIBUTE subattribute = mData.get(position);


+ 61
- 0
app/src/main/java/com/bonait/bnframework/ui/adapter/classify/Spinner36Adapter.java View File

@@ -0,0 +1,61 @@
package com.bonait.bnframework.ui.adapter.classify;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.ui.util.DisplayManager;

import java.util.List;

/**
* @author: liup
* @description:
* @date: 2024/5/15 13:45.
*/
public class Spinner36Adapter extends BaseAdapter {
private Context context;
private List<String> data;
public Spinner36Adapter(@NonNull Context context , List<String> data) {
this.context = context;
this.data = data;
}

@Override
public int getCount() {
return data.size();
}

@Override
public String getItem(int i) {
return data.get(i);
}

@Override
public long getItemId(int i) {
return 0;
}

@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
if(convertView == null){
convertView = LayoutInflater.from(context).inflate(R.layout.item_spinner_text36, null);
}
TextView textView = convertView.findViewById(R.id.textViewCustom);
textView.setText(getItem(position));
if(textView.getTextSize()>38* ConfigName.getInstance().scale||textView.getTextSize()<34*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(convertView.findViewById(R.id.root));
}

return convertView;
}
}

+ 2
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/goods/CloudGoodsAdapter.java View File

@@ -40,9 +40,10 @@ public abstract class CloudGoodsAdapter extends BaseAdapter<BPA_GOODS,CloudGoods
public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) {
try {
LogUtils.d(" holder.binding.name.getTextSize()="+holder.binding.name.getTextSize());
if(holder.binding.name.getTextSize()>32||holder.binding.name.getTextSize()<28){
if(holder.binding.name.getTextSize()>34*ConfigName.getInstance().scale||holder.binding.name.getTextSize()<30*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}
LogUtils.d("DisplayManager holder.binding.name.getTextSize()="+holder.binding.name.getTextSize());
holder.binding.add.setVisibility(View.GONE);

BPA_GOODS goods = mData.get(position);


+ 6
- 2
app/src/main/java/com/bonait/bnframework/ui/adapter/goods/LocalGoodsAdapter.java View File

@@ -9,8 +9,10 @@ import android.widget.CheckBox;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.R;

import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.image.MyBitmapUtils;

@@ -46,10 +48,12 @@ public abstract class LocalGoodsAdapter extends BaseAdapter<BPA_GOODS,LocalGoods
@Override
public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) {
try {
if(holder.binding.name.getTextSize()> 30 || holder.binding.name.getTextSize()< 26){
LogUtils.d(" holder.binding.name.getTextSize()="+holder.binding.name.getTextSize());
if(holder.binding.name.getTextSize()> 30*ConfigName.getInstance().scale || holder.binding.name.getTextSize()< 26*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}
LogUtils.d("DisplayManager holder.binding.name.getTextSize()="+holder.binding.name.getTextSize());

holder.binding.add.setVisibility(View.GONE);
if(isEdit){
holder.binding.edit.setVisibility(View.VISIBLE);


+ 2
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/record/LocalLogAdapter.java View File

@@ -9,6 +9,7 @@ import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;


import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD;

import com.bonait.bnframework.databinding.ItemLogBinding;
@@ -31,7 +32,7 @@ public class LocalLogAdapter extends BaseAdapter<BPA_LOG_RECORD, LocalLogAdapter
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
BPA_LOG_RECORD log = mData.get(position);
if(holder.binding.type.getTextSize()>28||holder.binding.type.getTextSize()<24){
if(holder.binding.type.getTextSize()>28* ConfigName.getInstance().scale||holder.binding.type.getTextSize()<24*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}
holder.binding.type.setText(log.typeName+"");


+ 2
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/record/OrderAdapter.java View File

@@ -8,6 +8,7 @@ import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;


import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.mode.BPA_ORDER_RECORD;

import com.bonait.bnframework.databinding.ItemOrderBinding;
@@ -30,7 +31,7 @@ public abstract class OrderAdapter extends BaseAdapter<BPA_ORDER_RECORD, OrderAd
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
BPA_ORDER_RECORD order = mData.get(position);//得到当前项选中item实例
if(holder.binding.name.getTextSize()>28||holder.binding.name.getTextSize()<24){
if(holder.binding.name.getTextSize()>28* ConfigName.getInstance().scale||holder.binding.name.getTextSize()<24*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}



+ 1
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/record/SubOrderAdapter.java View File

@@ -32,7 +32,7 @@ public abstract class SubOrderAdapter extends BaseAdapter<BPA_SUBORDER_RECORD, S
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
BPA_SUBORDER_RECORD order = mData.get(position);//得到当前项选中item实例
if(holder.binding.name.getTextSize()>28||holder.binding.name.getTextSize()<24){
if(holder.binding.name.getTextSize()>28*ConfigName.getInstance().scale||holder.binding.name.getTextSize()<24*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}
if(order.subNames!=null && !order.subNames.isEmpty()){


+ 1
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/step/DiyStepAdapter.java View File

@@ -30,7 +30,7 @@ public abstract class DiyStepAdapter extends BaseAdapter<BPA_GOODS_PROCESS_DETAI
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
try {
if(holder.binding.name.getTextSize()> 34 || holder.binding.name.getTextSize()< 30){
if(holder.binding.name.getTextSize()> 34 *ConfigName.getInstance().scale|| holder.binding.name.getTextSize()< 30*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}



+ 2
- 1
app/src/main/java/com/bonait/bnframework/ui/adapter/step/StepAdapter.java View File

@@ -9,6 +9,7 @@ import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;


import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL;

import com.bonait.bnframework.databinding.ItemStepDescBinding;
@@ -31,7 +32,7 @@ public class StepAdapter extends BaseAdapter<BPA_GOODS_PROCESS_DETAIL, StepAdapt
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
try {
if(holder.binding.name.getTextSize()> 34 || holder.binding.name.getTextSize()< 30){
if(holder.binding.name.getTextSize()> 34* ConfigName.getInstance().scale || holder.binding.name.getTextSize()< 30*ConfigName.getInstance().scale){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}



+ 5
- 1
app/src/main/java/com/bonait/bnframework/ui/fragment/goods/CloudGoodsFragment.java View File

@@ -173,7 +173,11 @@ public class CloudGoodsFragment extends BaseFragment {
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
outRect.top = DimensUtil.getDimens(0);
outRect.bottom = (int) (DisplayManager.getWidthScaleRate()*(-60));
if(ConfigName.getInstance().isPhoneVersion){
outRect.bottom = (int) (DisplayManager.getWidthScaleRate()*(-500));
}else {
outRect.bottom = (int) (DisplayManager.getWidthScaleRate()*(-60));
}
}
});
viewBinding.recyclerGoods.setAdapter(goodsAdapter);


+ 5
- 1
app/src/main/java/com/bonait/bnframework/ui/fragment/goods/LocalGoodsFragment.java View File

@@ -362,7 +362,11 @@ public class LocalGoodsFragment extends BaseFragment {
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
outRect.top = DimensUtil.getDimens(0);
outRect.bottom = (int) (DisplayManager.getWidthScaleRate()*(-60));
if(ConfigName.getInstance().isPhoneVersion){
outRect.bottom = (int) (DisplayManager.getWidthScaleRate()*(-500));
}else {
outRect.bottom = (int) (DisplayManager.getWidthScaleRate()*(-60));
}
}
});
viewBinding.recyclerGoods.setAdapter(goodsAdapter);


+ 1
- 1
app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateAllDataService.java View File

@@ -387,7 +387,7 @@ public class UpdateAllDataService {
if(classify!=null){
String imgUrl = "";
if(good.url!=null){
String path = Environment.getExternalStorageDirectory().getAbsolutePath()+ ConfigName.dataPath+"/WebImage/";
String path = ConfigName.getFileRoot(MainApplication.getContext())+ ConfigName.dataPath+"/WebImage/";
imgUrl = "https://bpa.oss-cn-chengdu.aliyuncs.com/hkerp/test/goods//"+good.url.replace(path,"");
}
upMaterialBean.add(new GoodsDataInfo(good.id,good.name,"",imgUrl,"0",false,good.propClassifyId,classify.name));


+ 1
- 1
app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java View File

@@ -427,7 +427,7 @@ public class UpdateDataService {

String imgUrl = "";
if(goods.url!=null){
String path = Environment.getExternalStorageDirectory().getAbsolutePath()+ ConfigName.dataPath+"/WebImage/";
String path = ConfigName.getFileRoot(MainApplication.getContext())+ ConfigName.dataPath+"/WebImage/";
imgUrl = "https://bpa.oss-cn-chengdu.aliyuncs.com/hkerp/test/goods//"+goods.url.replace(path,"");
}
upMaterialBean.add(new GoodsDataInfo(goods.id,goods.name,"",imgUrl,"0",false,goods.propClassifyId,


+ 13
- 3
app/src/main/java/com/bonait/bnframework/ui/widget/ProcessValueView.java View File

@@ -1,5 +1,7 @@
package com.bonait.bnframework.ui.widget;

import static com.bonait.bnframework.MainApplication.getContext;

import android.content.Context;
import android.text.InputType;
import android.util.AttributeSet;
@@ -13,6 +15,7 @@ import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.databinding.ViewProcessValueBinding;
import com.bonait.bnframework.modules.home.fragment.mode.item_gx;
import com.bonait.bnframework.ui.adapter.classify.Spinner36Adapter;
import com.bonait.bnframework.ui.util.DisplayManager;

import java.util.ArrayList;
@@ -99,9 +102,16 @@ public class ProcessValueView extends RelativeLayout {
{
editsp_map.put(model.data,1);
}
ArrayAdapter<String> adapter2 = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item32, new ArrayList<>(editsp_map.keySet()));
adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item32);
viewBinding.spinner.setAdapter(adapter2);

if(ConfigName.getInstance().isPhoneVersion){
Spinner36Adapter spinnerAdapter = new Spinner36Adapter(getContext(), new ArrayList<>(editsp_map.keySet()));
viewBinding.spinner.setAdapter(spinnerAdapter);
}else {
ArrayAdapter<String> adapter2 = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item32, new ArrayList<>(editsp_map.keySet()));
adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item32);
viewBinding.spinner.setAdapter(adapter2);
}

viewBinding.spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {


+ 19
- 2
app/src/main/res/layout/activity_bunkersetup.xml View File

@@ -80,6 +80,7 @@
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:id="@+id/ll_silos3"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -124,11 +125,12 @@
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_silos"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="40dp"
android:layout_alignParentBottom="true">
android:layout_marginTop="100dp"
>
<com.bonait.bnframework.modules.home.fragment.mode.jingdutiao1
android:id="@+id/silos1"
android:layout_marginTop="0dp"
@@ -158,6 +160,19 @@
android:contentDescription="@string/text_valve"
android:tag="水"/>
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/ll_silos_auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="100dp"
>

</LinearLayout>
</ScrollView>
</RelativeLayout>

</LinearLayout>
@@ -222,6 +237,8 @@
android:visibility="gone">
</com.bonait.bnframework.modules.home.fragment.mode.add_silos_message>
</RelativeLayout>


</RelativeLayout>

<com.qmuiteam.qmui.widget.QMUITopBarLayout


+ 1
- 0
app/src/main/res/layout/fragment_home4.xml View File

@@ -189,6 +189,7 @@
android:layout_marginBottom="50dp"
android:text="授权"
android:textStyle="bold"
android:visibility="gone"
android:textSize="30dp"
android:gravity="center|center"
android:textColor="@color/white"


+ 112
- 81
app/src/main/res/layout/fragment_home_sbkz.xml View File

@@ -146,85 +146,7 @@
<!-- android:textSize="26dp" />-->
<!-- </LinearLayout>-->

<!-- 翻炒速度 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginTop="20dp"
android:orientation="vertical">

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu"
android:layout_width="160dp"
android:layout_height="60dp"
android:contentDescription="true"
android:tag="@string/btn_fry_sp"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />

<LinearLayout
android:id="@+id/fanchaoshudu_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:visibility="visible"
android:orientation="vertical"
android:visibility="gone">

<LinearLayout
android:layout_width="wrap_content"
android:orientation="horizontal"
android:layout_height="wrap_content">
<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_k"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag="@string/btn_fast"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_z"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag="@string/btn_middle"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:orientation="horizontal"
android:layout_height="wrap_content">
<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_m"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag="@string/btn_slow"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_t"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag="@string/btn_stop"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />
</LinearLayout>

</LinearLayout>
</LinearLayout>

<!-- 火力 -->
<LinearLayout
@@ -370,7 +292,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="10dp"
android:layout_marginTop="0dp"
android:layout_marginRight="30dp"
android:orientation="vertical">

@@ -397,12 +319,14 @@

<!-- 调料 -->
<LinearLayout
android:id="@+id/ll_silos3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="45dp"
android:layout_marginBottom="55dp"
tools:visibility="gone"
android:orientation="vertical">

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
@@ -435,14 +359,43 @@
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />
</LinearLayout>
<LinearLayout
tools:visibility="visible"
android:visibility="gone"
android:id="@+id/ll_silos_auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="10dp"
android:layout_marginBottom="120dp"
android:orientation="vertical">

<Spinner
android:id="@+id/spinner_silos"
style="@style/commonSpinnerStyle"
android:layout_width="150dp"
android:layout_height="70dp" />
<Button
android:id="@+id/btn_silos_open"
android:layout_width="100dp"
android:layout_height="70dp"
android:layout_gravity="center_horizontal"
android:contentDescription="true"
android:background="@drawable/bg_round15_yellow_btn"
android:text="料仓出料"
android:textColor="@color/white"
android:textSize="20dp"
/>
</LinearLayout>

<!-- 锅口朝向 -->
<RelativeLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="40dp"
android:layout_marginEnd="150dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="140dp"
android:gravity="end"
android:orientation="vertical">

@@ -568,7 +521,85 @@

</RelativeLayout>

<!-- 翻炒速度 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="0dp"
android:orientation="vertical">

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu"
android:layout_width="160dp"
android:layout_height="60dp"
android:contentDescription="true"
android:tag="@string/btn_fry_sp"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />

<LinearLayout
android:id="@+id/fanchaoshudu_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:visibility="visible"
android:orientation="vertical"
android:visibility="gone">

<LinearLayout
android:layout_width="wrap_content"
android:orientation="horizontal"
android:layout_height="wrap_content">
<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_k"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag="@string/btn_fast"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_z"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag="@string/btn_middle"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:orientation="horizontal"
android:layout_height="wrap_content">
<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_m"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag="@string/btn_slow"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_t"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag="@string/btn_stop"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />
</LinearLayout>

</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>



+ 32
- 1
app/src/main/res/layout/fragment_system_systemset.xml View File

@@ -287,6 +287,37 @@
<!-- android:layout_centerVertical="true" />-->
</TableRow>

<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="5dp">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="料仓数量:" />
<CheckBox
android:id="@+id/cb_auto_silos"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="动态配置"/>

<EditText
android:id="@+id/edittext_silos"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"
android:hint="请输入序号"
android:inputType="number"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp"
tools:text="4"/>
</TableRow>

</TableLayout>


@@ -304,7 +335,7 @@
android:text="平台授权码:" />
<EditText
android:id="@+id/edittext_key"
android:layout_width="280dp"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"


+ 2
- 2
app/src/main/res/layout/item/layout/dialog_with_cancel_confirm.xml View File

@@ -55,7 +55,7 @@
android:textColor="@color/blue_primary"
android:text="@string/btn_cancel"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/dp_50"
android:layout_marginLeft="@dimen/dp_10"
android:gravity="center"
/>
<TextView
@@ -67,7 +67,7 @@
android:text="@string/tip_save_confirm"
android:gravity="center"
android:layout_alignParentRight="true"
android:layout_marginEnd="@dimen/dp_50"
android:layout_marginEnd="@dimen/dp_10"
/>




+ 25
- 0
app/src/main/res/layout/item/layout/item_spinner_text36.xml View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_90"
android:id="@+id/root"
xmlns:tools="http://schemas.android.com/tools">

<CheckedTextView
android:id="@+id/textViewCustom"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_90"
android:ellipsize="marquee"
android:singleLine="true"
android:textAlignment="inherit"
android:gravity="center_vertical"
tools:text="请选择"
android:textSize="@dimen/sp_36"
android:background="@color/activity_background"
android:textColor="@color/black">
</CheckedTextView>
</LinearLayout>





+ 11
- 0
app/src/main/res/layout/item/layout/spinner_dropdown_item20.xml View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/checkedTextViewCustom_1"
style="?android:attr/spinnerDropDownItemStyle"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/activity_background"
android:ellipsize="marquee"
android:text="11111"
android:textAlignment="inherit"
android:textSize="28dp"/>

+ 17
- 0
app/src/main/res/layout/item/layout/spinner_text_item20.xml View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textViewCustom"
style="?android:attr/spinnerItemStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="marquee"
android:textAlignment="inherit"
android:gravity="center_vertical"
android:background="@color/transparent"
android:text="@string/text_noselect"
android:textSize="20dp"
android:textColor="@color/black">
</TextView>




Loading…
Cancel
Save