Browse Source

修改buglist

调味吧台
liup 7 months ago
parent
commit
77c4e7c1b9
37 changed files with 321 additions and 124 deletions
  1. +2
    -2
      .idea/deploymentTargetSelector.xml
  2. +1
    -1
      app/build.gradle
  3. +1
    -1
      app/src/main/java/com/bonait/bnframework/HBL/Unity.java
  4. +1
    -1
      app/src/main/java/com/bonait/bnframework/HttpModel/APIService.java
  5. +5
    -0
      app/src/main/java/com/bonait/bnframework/HttpModel/GoodsInfoList.java
  6. +17
    -11
      app/src/main/java/com/bonait/bnframework/business/ConfigData.java
  7. +20
    -11
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  8. +10
    -1
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  9. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  10. +11
    -0
      app/src/main/java/com/bonait/bnframework/common/constant/DataBus.java
  11. +5
    -0
      app/src/main/java/com/bonait/bnframework/common/glide/GlideUtil.java
  12. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/image/MyBitmapUtils.java
  13. +18
    -6
      app/src/main/java/com/bonait/bnframework/common/image/utils/LocalCacheUtils.java
  14. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/image/utils/NetCacheUtils.java
  15. +24
    -2
      app/src/main/java/com/bonait/bnframework/common/utils/ToastUtils.java
  16. +9
    -9
      app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java
  17. +6
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/image_sp_adapter.java
  18. +15
    -12
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/loadinggood_adapter.java
  19. +2
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/newgood_adapter.java
  20. +9
    -6
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/newmakegood_adapter.java
  21. +1
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java
  22. +5
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java
  23. +63
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageSourceActivity.java
  24. +4
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_good_control.java
  25. +4
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_makegood_control.java
  26. +1
    -0
      app/src/main/java/com/bonait/bnframework/modules/mine/fragment/from/UserActivity.java
  27. +2
    -0
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/LoginActivity.java
  28. +6
    -1
      app/src/main/res/layout/activity_deviceinformation.xml
  29. +5
    -1
      app/src/main/res/layout/activity_dzcjy.xml
  30. +12
    -12
      app/src/main/res/layout/activity_image_choose.xml
  31. +22
    -5
      app/src/main/res/layout/activity_imagesource.xml
  32. +5
    -1
      app/src/main/res/layout/activity_systemparameter.xml
  33. +3
    -2
      app/src/main/res/layout/item/layout/item_file_picker_show.xml
  34. +20
    -13
      app/src/main/res/layout/item/layout/newgood_bj.xml
  35. +5
    -2
      app/src/main/res/layout/item/layout/newmakegood.xml
  36. +4
    -0
      app/src/main/res/layout/item/layout/toast_layout.xml
  37. BIN
     

+ 2
- 2
.idea/deploymentTargetSelector.xml View File

@@ -4,10 +4,10 @@
<selectionStates> <selectionStates>
<SelectionState runConfigName="app"> <SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" /> <option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-05-22T07:59:43.045904500Z">
<DropdownSelection timestamp="2024-05-23T08:15:27.830482400Z">
<Target type="DEFAULT_BOOT"> <Target type="DEFAULT_BOOT">
<handle> <handle>
<DeviceId pluginId="Default" identifier="serial=10.24.61.124:5555;connection=6b1ed6f6" />
<DeviceId pluginId="Default" identifier="serial=127.0.0.1:7555;connection=b7a867da" />
</handle> </handle>
</Target> </Target>
</DropdownSelection> </DropdownSelection>


+ 1
- 1
app/build.gradle View File

@@ -63,7 +63,7 @@ android {
} }
applicationVariants.all { variant -> applicationVariants.all { variant ->
variant.outputs.all { variant.outputs.all {
outputFileName = "boluobatai-v${defaultConfig.versionCode}-${releaseTime()}"+"-unsigned-${variant.name}.apk"
outputFileName = "boluo-peiliaobatai-v${defaultConfig.versionCode}-${releaseTime()}"+"-unsigned-${variant.name}.apk"
} }
} }
} }


+ 1
- 1
app/src/main/java/com/bonait/bnframework/HBL/Unity.java View File

@@ -89,7 +89,7 @@ public class Unity {
{ {
MessageLog.ShowInfo("AnalogConvert measureCookTime InputValue="+InputValue+" InputMax="+InputMax+";InputMin="+InputMin+";OutMax="+OutMax+";OutMin="+OutMin); MessageLog.ShowInfo("AnalogConvert measureCookTime InputValue="+InputValue+" InputMax="+InputMax+";InputMin="+InputMin+";OutMax="+OutMax+";OutMin="+OutMin);


if(InputValue<=0|| InputMax<=0||InputMin<=0){
if(InputValue<=0|| InputMax<=0){
return 0; return 0;
} }
if(((InputMax - InputMin) + OutMin)==0){ if(((InputMax - InputMin) + OutMin)==0){


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

@@ -164,7 +164,7 @@ public class APIService {
bpa_goods.status=1; bpa_goods.status=1;
bpa_goods.issc=1; bpa_goods.issc=1;
bpa_goods.maketime=180; bpa_goods.maketime=180;
bpa_goods.url="";
bpa_goods.url=item.goodsInfoList.get(i).imgUrl==null?"":item.goodsInfoList.get(i).imgUrl;
bpa_goods.sort= i+1; bpa_goods.sort= i+1;
bpa_goods.foreignKeyRe=""; bpa_goods.foreignKeyRe="";
QueryDB.AddGoods(bpa_goods); QueryDB.AddGoods(bpa_goods);


+ 5
- 0
app/src/main/java/com/bonait/bnframework/HttpModel/GoodsInfoList.java View File

@@ -14,6 +14,11 @@ public class GoodsInfoList {
*/ */
public String goodsName; public String goodsName;


/**
* 商品图片
*/
public String imgUrl;

/** /**
* 商品工艺列表 * 商品工艺列表
*/ */


+ 17
- 11
app/src/main/java/com/bonait/bnframework/business/ConfigData.java View File

@@ -1,6 +1,7 @@
package com.bonait.bnframework.business; package com.bonait.bnframework.business;


import android.content.Context; import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.os.Handler; import android.os.Handler;
@@ -879,17 +880,22 @@ public class ConfigData {
* 增加本地图片 * 增加本地图片
*/ */
public void AddImage(Context context) { public void AddImage(Context context) {
BitmapFactory.Options options = new BitmapFactory.Options();
//options.inSampleSize = 2;//宽高压缩为原来的1/2
//options.inPreferredConfig=Bitmap.Config.ARGB_4444;
Bitmap bitmap1 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image1, options);
Bitmap bitmap2 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image2, options);
Bitmap bitmap3 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image3, options);
Bitmap bitmap4 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image4, options);
LocalCacheUtils.Get().setBitmapToLocal("image1.png", bitmap1);
LocalCacheUtils.Get().setBitmapToLocal("image2.png", bitmap2);
LocalCacheUtils.Get().setBitmapToLocal("image3.png", bitmap3);
LocalCacheUtils.Get().setBitmapToLocal("image4.png", bitmap4);
if(ConfigUtil.read(context,"fisrtLoadPic",true)){
BitmapFactory.Options options = new BitmapFactory.Options();
//options.inSampleSize = 2;//宽高压缩为原来的1/2
//options.inPreferredConfig=Bitmap.Config.ARGB_4444;
Bitmap bitmap1 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image1, options);
Bitmap bitmap2 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image2, options);
Bitmap bitmap3 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image3, options);
Bitmap bitmap4 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image4, options);
Bitmap bitmap5 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image5, options);
LocalCacheUtils.Get().setBitmapToLocal("image1.png", bitmap1);
LocalCacheUtils.Get().setBitmapToLocal("image2.png", bitmap2);
LocalCacheUtils.Get().setBitmapToLocal("image3.png", bitmap3);
LocalCacheUtils.Get().setBitmapToLocal("image4.png", bitmap4);
LocalCacheUtils.Get().setBitmapToLocal("image5.png", bitmap5);
}
ConfigUtil.write(context,"fisrtLoadPic",false);
} }


/** /**


+ 20
- 11
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -408,6 +408,7 @@ public class ExecuteTheRecipe {
int count = 0; int count = 0;
boolean isError = false; boolean isError = false;


MainInit.initToastString();
for (LinkedHashMap.Entry<Integer, List<ResGoodsRecipe>> entry : rgrs.entrySet()) { for (LinkedHashMap.Entry<Integer, List<ResGoodsRecipe>> entry : rgrs.entrySet()) {
WritePLC("配料完成", false,null); WritePLC("配料完成", false,null);


@@ -424,7 +425,7 @@ public class ExecuteTheRecipe {
DataBus.getInstance().UpdateGoodsMake(GoodMake.subOrder.id, "步骤【" + key + "】准备下发物料:" + RecipesNames, count, key, false); DataBus.getInstance().UpdateGoodsMake(GoodMake.subOrder.id, "步骤【" + key + "】准备下发物料:" + RecipesNames, count, key, false);
//等待配料完成,一直等待 //等待配料完成,一直等待
final boolean[] IsComplete = {false}; final boolean[] IsComplete = {false};
float outValue=0;
float outValue;
for (int m = 0; m < goodsRecipes.size(); m++) { for (int m = 0; m < goodsRecipes.size(); m++) {
ResGoodsRecipe recipe = goodsRecipes.get(m); ResGoodsRecipe recipe = goodsRecipes.get(m);
LogUtils.d("商品制作线程 recipe = "+recipe); LogUtils.d("商品制作线程 recipe = "+recipe);
@@ -440,7 +441,7 @@ public class ExecuteTheRecipe {
} }
//等待配料完成,一直等待 //等待配料完成,一直等待
if (silos == null) { if (silos == null) {
MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, message + "下发失败!物料没有管理料仓!");
MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, message + "下发失败!物料没有绑定料仓!");
Thread.sleep(2000); Thread.sleep(2000);
IsComplete[0] = true; IsComplete[0] = true;
isError = true; isError = true;
@@ -487,17 +488,17 @@ public class ExecuteTheRecipe {
}; };


//启动配料 //启动配料
float finalOutValue = outValue;
// float finalOutValue = outValue;
WritePLC("配料启动",true,new IWriteCallBack() { WritePLC("配料启动",true,new IWriteCallBack() {
@Override @Override
public void onSuccess() { public void onSuccess() {
MessageLog.ShowInfo("[" + GoodMake.good.name + "]步骤【" + key + "】启动配料成功!"); MessageLog.ShowInfo("[" + GoodMake.good.name + "]步骤【" + key + "】启动配料成功!");
try {
Thread.sleep((long) (finalOutValue *1000L));
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
IsComplete[0] = true;
// try {
// Thread.sleep((long) (finalOutValue *1000L));
// } catch (InterruptedException e) {
// throw new RuntimeException(e);
// }
// IsComplete[0] = true;
} }


@Override @Override
@@ -532,6 +533,7 @@ public class ExecuteTheRecipe {


GoodMake=null; GoodMake=null;
IsMakeGood=false; IsMakeGood=false;
MainInit.initToastString();
} }
} catch (Exception ex) { } catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage()); ToastUtils.error("异常信息:" + ex.getMessage());
@@ -997,8 +999,15 @@ public class ExecuteTheRecipe {
// } // }


if(ListeningValue.containsKey(name)){ if(ListeningValue.containsKey(name)){
boolean res = Boolean.parseBoolean(ListeningValue.get(name).toString());
RTrig.get(name).Start(res,()->{if(callback!=null)callback.Run();});
if(name.equals("配料完成")){
boolean res = Boolean.parseBoolean(ListeningValue.get(name).toString());
RTrig.get(name).Start(res,()->{if(callback!=null)callback.Run();});
}else {
boolean res = Boolean.parseBoolean(ListeningValue.get(name).toString());
if(res){
if(callback!=null)callback.Run();
}
}
} }


} }


+ 10
- 1
app/src/main/java/com/bonait/bnframework/business/MainInit.java View File

@@ -3,6 +3,7 @@ package com.bonait.bnframework.business;
import android.app.Activity; import android.app.Activity;
import android.app.Application; import android.app.Application;
import android.util.Log; import android.util.Log;
import android.widget.Toast;


import com.bonait.bnframework.BuildConfig; import com.bonait.bnframework.BuildConfig;
import com.bonait.bnframework.HttpModel.APIService; import com.bonait.bnframework.HttpModel.APIService;
@@ -200,10 +201,17 @@ public class MainInit {
// DBHelper.getInstance(this).DeleteCreateTables(BPA_PLCADDRESS.class,null); // DBHelper.getInstance(this).DeleteCreateTables(BPA_PLCADDRESS.class,null);
} }


public static StringBuffer toastString = new StringBuffer();

public static void initToastString(){
toastString.setLength(0);
}

/** /**
* 初始化消息日志接收打印 * 初始化消息日志接收打印
*/ */
public static void InitMsgLog(){ public static void InitMsgLog(){
initToastString();
MessageLog.MsgNotify = new IMessageLogNotify() { MessageLog.MsgNotify = new IMessageLogNotify() {
@Override @Override
public void ErrorMsg(String msg) { public void ErrorMsg(String msg) {
@@ -232,7 +240,8 @@ public class MainInit {
public void UserMsg(UserLogEnum type, String msg) { public void UserMsg(UserLogEnum type, String msg) {
BPA_LOG log = new BPA_LOG(); BPA_LOG log = new BPA_LOG();
log.userID = ConfigName.getInstance().user.userID; log.userID = ConfigName.getInstance().user.userID;
ToastUtils.info(msg);
toastString.append(msg).append("|");
ToastUtils.info(toastString.subSequence(0,toastString.length()-1).toString(), Toast.LENGTH_LONG);
switch (type.toString()) switch (type.toString())
{ {
case "登录日志":log.type=1; case "登录日志":log.type=1;


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

@@ -47,7 +47,7 @@ import java.util.concurrent.ConcurrentHashMap;
*/ */
public class ConfigName { public class ConfigName {
public static final boolean TEST = true; public static final boolean TEST = true;
public static final boolean TEST2 = false;
public static final boolean TEST2 = true;
//region 单例模式 //region 单例模式
private static ConfigName mInstance; //实例变量设置私有,防止直接通过类名访问 private static ConfigName mInstance; //实例变量设置私有,防止直接通过类名访问




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

@@ -64,6 +64,17 @@ public class DataBus {
//endregion //endregion


//region 数据中心 //region 数据中心
public long lastTimeClick;

public boolean doubleClick(){
long currentTime = System.currentTimeMillis();
if(currentTime - lastTimeClick < 350){
return true;
}
lastTimeClick = currentTime;
return false;
}

/** /**
* 料仓数据 * 料仓数据
*/ */


+ 5
- 0
app/src/main/java/com/bonait/bnframework/common/glide/GlideUtil.java View File

@@ -2,12 +2,14 @@ package com.bonait.bnframework.common.glide;


import android.content.Context; import android.content.Context;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Environment;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;


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


import com.bonait.bnframework.common.glide.transform.FitXYRoundRadiusTransform; import com.bonait.bnframework.common.glide.transform.FitXYRoundRadiusTransform;
import com.bonait.bnframework.modules.home.fragment.from.ImageSourceActivity;
import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException; import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions; import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
@@ -53,6 +55,9 @@ public class GlideUtil {
if (context == null||path==null) { if (context == null||path==null) {
return; return;
} }
if(!path.startsWith("http")){
path = Environment.getExternalStorageDirectory().getAbsolutePath()+"/hblchayingdb/WebImage/" + path;
}
GlideApp.with(context) GlideApp.with(context)
.load(path) .load(path)
.addListener(new RequestListener<Drawable>() { .addListener(new RequestListener<Drawable>() {


+ 1
- 1
app/src/main/java/com/bonait/bnframework/common/image/MyBitmapUtils.java View File

@@ -41,7 +41,7 @@ public class MyBitmapUtils {
//本地缓存 //本地缓存
if(url!=null && !url.isEmpty()) if(url!=null && !url.isEmpty())
{ {
if(LocalCacheUtils.Get().SetBitmapFile(ivPic,name)){
if(LocalCacheUtils.Get().SetBitmapFile(ivPic,name,url)){
return; return;
} }




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

@@ -12,9 +12,13 @@ import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.os.Process; import android.os.Process;


import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.HBL.NetworkUtils;
import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.R; import com.bonait.bnframework.R;
import com.bonait.bnframework.business.OrderServer; import com.bonait.bnframework.business.OrderServer;
import com.bonait.bnframework.common.constant.ConfigName; import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.glide.transform.FitXYRoundRadiusTransform;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
@@ -54,23 +58,31 @@ public class LocalCacheUtils {
* 设置Image图片 * 设置Image图片
* *
* @param ivPic * @param ivPic
* @param name
* @param url * @param url
* @return * @return
*/ */
public boolean SetBitmapFile(ImageView ivPic, String url) {
File file = new File(CACHE_PATH, url);
public boolean SetBitmapFile(ImageView ivPic, String name,String url) {
File file = new File(CACHE_PATH, name);
String imgUrl = null;
if(url!=null && url.startsWith("http")){
if(NetworkUtils.isNetworkConnected(MainApplication.getContext())){
imgUrl = url;
}
}
if (null != file && file.exists()) { if (null != file && file.exists()) {
try { try {

Glide.with(ivPic.getContext()).load(file)
LogUtils.d("加载图片");
Glide.with(ivPic.getContext()).load(imgUrl==null?file:imgUrl)
//.override(width, height) //.override(width, height)
// .thumbnail(0.1f) // 加载原始图片的10%作为缩略图 // .thumbnail(0.1f) // 加载原始图片的10%作为缩略图
//.fitCenter() // 缩放图片以适应ImageView的尺寸
.override(150, 75) // 设置目标图片的宽度和高度
.fitCenter() // 缩放图片以适应ImageView的尺寸
// .override(150, 75) // 设置目标图片的宽度和高度
.placeholder(R.mipmap.loading2) .placeholder(R.mipmap.loading2)
// .error(R.mipmap.loadingerror) // .error(R.mipmap.loadingerror)
.skipMemoryCache(true) // 禁用内存缓存 .skipMemoryCache(true) // 禁用内存缓存
.diskCacheStrategy(DiskCacheStrategy.NONE) .diskCacheStrategy(DiskCacheStrategy.NONE)
.apply(new RequestOptions().transform(new FitXYRoundRadiusTransform(10)))
//.diskCacheStrategy(DiskCacheStrategy.ALL) // 缓存所有版本的图片 //.diskCacheStrategy(DiskCacheStrategy.ALL) // 缓存所有版本的图片
.into(ivPic); .into(ivPic);
System.out.println("从本地获取图片啦....."); System.out.println("从本地获取图片啦.....");


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

@@ -79,7 +79,7 @@ public class NetCacheUtils {
String filename= LocalCacheUtils.Get().setBitmapToLocal(url, result); String filename= LocalCacheUtils.Get().setBitmapToLocal(url, result);


//设置图片显示,用新版的获取更小的资源 //设置图片显示,用新版的获取更小的资源
LocalCacheUtils.Get().SetBitmapFile(ivPic,filename);
LocalCacheUtils.Get().SetBitmapFile(ivPic,filename,null);
} }
} }
} }


+ 24
- 2
app/src/main/java/com/bonait/bnframework/common/utils/ToastUtils.java View File

@@ -225,6 +225,28 @@ public class ToastUtils {


@CheckResult @CheckResult
public static Toast custom(@NonNull Context context, @NonNull String message, Drawable icon, @ColorInt int textColor, @ColorInt int tintColor, int duration, boolean withIcon, boolean shouldTint) { public static Toast custom(@NonNull Context context, @NonNull String message, Drawable icon, @ColorInt int textColor, @ColorInt int tintColor, int duration, boolean withIcon, boolean shouldTint) {
StringBuilder toastMes = new StringBuilder();
if(message.contains("|")){
String[] res = message.split("\\|");
if(res.length>0 && res.length<3){
for (int i = 0;i < res.length;i++){
toastMes.append(res[i]);
if(i!=res.length-1){
toastMes.append("\n");
}
}
}else if(res.length>=3){
for (int i = res.length-3;i < res.length;i++){
toastMes.append(res[i]);
if(i!=res.length-1){
toastMes.append("\n");
}
}
}
}
if(toastMes.length()==0){
toastMes.append(message);
}
if (Looper.myLooper() == Looper.getMainLooper()) { if (Looper.myLooper() == Looper.getMainLooper()) {
if (currentToast == null) { if (currentToast == null) {
currentToast = new Toast(context); currentToast = new Toast(context);
@@ -251,7 +273,7 @@ public class ToastUtils {
} }


toastTextView.setTextColor(textColor); toastTextView.setTextColor(textColor);
toastTextView.setText(message);
toastTextView.setText(toastMes.toString());
toastTextView.setTypeface(Typeface.create(TOAST_TYPEFACE, Typeface.NORMAL)); toastTextView.setTypeface(Typeface.create(TOAST_TYPEFACE, Typeface.NORMAL));


currentToast.setView(toastLayout); currentToast.setView(toastLayout);
@@ -292,7 +314,7 @@ public class ToastUtils {
} }


toastTextView.setTextColor(textColor); toastTextView.setTextColor(textColor);
toastTextView.setText(message);
toastTextView.setText(toastMes.toString());
toastTextView.setTypeface(Typeface.create(TOAST_TYPEFACE, Typeface.NORMAL)); toastTextView.setTypeface(Typeface.create(TOAST_TYPEFACE, Typeface.NORMAL));


currentToastThread.setView(toastLayout); currentToastThread.setView(toastLayout);


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

@@ -8,6 +8,7 @@ import android.os.Message;


import androidx.core.content.FileProvider; import androidx.core.content.FileProvider;


import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.business.ConfigData; import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.common.constant.ConfigName; import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.Constants; import com.bonait.bnframework.common.constant.Constants;
@@ -93,21 +94,19 @@ public class UpdateAppUtils {


if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台"))
{ {
mode.productCode="1679307017135329280";
mode.moduleCode="newncapp";
mode.serverCode="1680767784879656960";//服务器
mode.branchCode="1712279450412756993";
}else
{
// mode.productCode="1679307017135329280"; // mode.productCode="1679307017135329280";
// mode.moduleCode="newtwbt";
// mode.moduleCode="newncapp";
// mode.serverCode="1680767784879656960";//服务器 // mode.serverCode="1680767784879656960";//服务器
// mode.branchCode="1712279534630187009";

// mode.branchCode="1712279450412756993";
mode.productCode="1769564215952125952"; mode.productCode="1769564215952125952";
mode.moduleCode="desktopplbt"; mode.moduleCode="desktopplbt";
mode.serverCode="1769564338190921728";//服务器 mode.serverCode="1769564338190921728";//服务器
mode.branchCode="1789857238682284033"; mode.branchCode="1789857238682284033";
}else {
mode.productCode = "1679307017135329280";
mode.moduleCode = "newtwbt";
mode.serverCode = "1680767784879656960";//服务器
mode.branchCode = "1712279534630187009";
} }


//调味吧台 //调味吧台
@@ -115,6 +114,7 @@ public class UpdateAppUtils {
String getNewVersionUrl =ConfigName.getInstance().UpdateVersion; String getNewVersionUrl =ConfigName.getInstance().UpdateVersion;
MediaType JSON = MediaType.parse("application/json; charset=utf-8"); MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody body = RequestBody.create(JSON, String.valueOf(msg)); RequestBody body = RequestBody.create(JSON, String.valueOf(msg));
LogUtils.d("版本更新 UpdateVersion="+getNewVersionUrl+" ;msg = "+msg);
OkGo.<ResVersion>post(getNewVersionUrl) OkGo.<ResVersion>post(getNewVersionUrl)
.tag(context) .tag(context)
.upRequestBody(body) .upRequestBody(body)


+ 6
- 3
app/src/main/java/com/bonait/bnframework/modules/home/adapter/image_sp_adapter.java View File

@@ -1,5 +1,6 @@
package com.bonait.bnframework.modules.home.adapter; package com.bonait.bnframework.modules.home.adapter;


import android.annotation.SuppressLint;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.ContextWrapper; import android.content.ContextWrapper;
@@ -12,6 +13,7 @@ import android.widget.RelativeLayout;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;


import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.R; import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.DataBus; import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.db.mode.BPA_GOODS; import com.bonait.bnframework.common.db.mode.BPA_GOODS;
@@ -66,13 +68,14 @@ public class image_sp_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold
((MyLCViewHolder1)holder).img.setImageDrawable(null); ((MyLCViewHolder1)holder).img.setImageDrawable(null);
} }
@Override @Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") int position) {
try { try {
if (holder instanceof MyLCViewHolder1) { if (holder instanceof MyLCViewHolder1) {
MyLCViewHolder1 myViewHolder = (MyLCViewHolder1) holder; MyLCViewHolder1 myViewHolder = (MyLCViewHolder1) holder;
//设置图片 //设置图片
// new MyBitmapUtils().disPlay(myViewHolder.img,goods.get(position).url);
GlideUtil.showImage(myViewHolder.img.getContext(),goods.get(position).url,myViewHolder.img,R.mipmap.loading3);
new MyBitmapUtils().disPlay(myViewHolder.img,goods.get(position).url);
// GlideUtil.showImageWithRadius(myViewHolder.img.getContext(),goods.get(position).url,myViewHolder.img,R.mipmap.loading3,10);
LogUtils.d(" 图片地址 goods.get(position).url="+goods.get(position).url);
myViewHolder.img.setOnClickListener(new View.OnClickListener() { myViewHolder.img.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {


+ 15
- 12
app/src/main/java/com/bonait/bnframework/modules/home/adapter/loadinggood_adapter.java View File

@@ -110,24 +110,27 @@ public class loadinggood_adapter extends RecyclerView.Adapter<RecyclerView.ViewH
myViewHolder.loading_main.setOnClickListener(new View.OnClickListener() { myViewHolder.loading_main.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
if(mListener!=null) mListener.clickListener(view,goodsMake);
if(!DataBus.getInstance().doubleClick()){
if(mListener!=null) mListener.clickListener(view,goodsMake);
}
} }
}); });


myViewHolder.quxiaozhizuo.setOnClickListener(new View.OnClickListener() { myViewHolder.quxiaozhizuo.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
String title = "温馨提示!";
String message = "客官确定要取消制作【"+goodsMake.good.name+"】吗?";
AlertDialogUtils.showDialog( myViewHolder.quxiaozhizuo.getContext(), title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
DataBus.getInstance().cancelGoodsMake(goodsMake.subOrder.id);
ToastUtils.info("取消订单制作成功!");
dialog.dismiss();
}
});

if(!DataBus.getInstance().doubleClick()){
String title = "温馨提示!";
String message = "客官确定要取消制作【"+goodsMake.good.name+"】吗?";
AlertDialogUtils.showDialog( myViewHolder.quxiaozhizuo.getContext(), title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
DataBus.getInstance().cancelGoodsMake(goodsMake.subOrder.id);
ToastUtils.info("取消订单制作成功!");
dialog.dismiss();
}
});
}
} }
}); });
} }


+ 2
- 2
app/src/main/java/com/bonait/bnframework/modules/home/adapter/newgood_adapter.java View File

@@ -80,8 +80,8 @@ public class newgood_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
myViewHolder.Tag_text.setText(goods.name); myViewHolder.Tag_text.setText(goods.name);
//设置图片 //设置图片
if (!goods.url.equals("未知") && !goods.url.isEmpty() && !goods.url.equals("")) { if (!goods.url.equals("未知") && !goods.url.isEmpty() && !goods.url.equals("")) {
// myBitmapUtils.disPlay(myViewHolder.ImageUrl, goods.url);
GlideUtil.showImage(myViewHolder.ImageUrl.getContext(),goods.url,myViewHolder.ImageUrl,R.mipmap.loading3);
myBitmapUtils.disPlay(myViewHolder.ImageUrl, goods.url);
// GlideUtil.showImageWithRadius(myViewHolder.ImageUrl.getContext(),goods.url,myViewHolder.ImageUrl,R.mipmap.loading3,10);
} }


/** /**


+ 9
- 6
app/src/main/java/com/bonait/bnframework/modules/home/adapter/newmakegood_adapter.java View File

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


import com.apkfuns.logutils.LogUtils; import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.R; import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.constant.MessageName; import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.db.QueryDB; import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODS; import com.bonait.bnframework.common.db.mode.BPA_GOODS;
@@ -70,9 +71,9 @@ public class newmakegood_adapter extends RecyclerView.Adapter<RecyclerView.View
myViewHolder.Tag_text.setText(goods.name); myViewHolder.Tag_text.setText(goods.name);
//设置图片 //设置图片
if (goods.url!=null && !goods.url.equals("未知") && !goods.url.isEmpty()) { if (goods.url!=null && !goods.url.equals("未知") && !goods.url.isEmpty()) {
// myBitmapUtils.disPlay(myViewHolder.ImageUrl, goods.url);
myBitmapUtils.disPlay(myViewHolder.ImageUrl, goods.url);
LogUtils.d(" ImageUrl == "+goods.url); LogUtils.d(" ImageUrl == "+goods.url);
GlideUtil.showImage(myViewHolder.ImageUrl.getContext(),goods.url,myViewHolder.ImageUrl,R.mipmap.loading3);
// GlideUtil.showImageWithRadius(myViewHolder.ImageUrl.getContext(),goods.url,myViewHolder.ImageUrl,R.mipmap.loading3,10);
} }


/** /**
@@ -81,11 +82,13 @@ public class newmakegood_adapter extends RecyclerView.Adapter<RecyclerView.View
myViewHolder.ImageUrl.setOnClickListener(new View.OnClickListener() { myViewHolder.ImageUrl.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
LogUtils.d(" MessageName.ClickMakeGoodNew sendMessage");
if(goods!=null){
LogUtils.d(" goods="+goods.toString());
if(!DataBus.getInstance().doubleClick()){
LogUtils.d(" MessageName.ClickMakeGoodNew sendMessage");
if(goods!=null){
LogUtils.d(" goods="+goods.toString());
}
MessageManager.getInstance().sendMessage(MessageName.ClickMakeGoodNew,goods);
} }
MessageManager.getInstance().sendMessage(MessageName.ClickMakeGoodNew,goods);
} }
}); });




+ 1
- 2
app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java View File

@@ -465,9 +465,9 @@ public class MakeGoodFragment extends BaseFragment {
ExecuteTheRecipe.WritePLC("手自切换", true, null); ExecuteTheRecipe.WritePLC("手自切换", true, null);
} }
}).start(); }).start();
ToastUtils.warning("商品:" + makegood.good.name + ",开始制作",Toast.LENGTH_SHORT);
ExecuteTheRecipe.Execute(makegood); ExecuteTheRecipe.Execute(makegood);
LogUtils.d(" 商品开始制作 makegood = "+makegood.toString()); LogUtils.d(" 商品开始制作 makegood = "+makegood.toString());
ToastUtils.warning("商品:" + makegood.good.name + ",开始制作");
} }


/** /**
@@ -492,7 +492,6 @@ public class MakeGoodFragment extends BaseFragment {
LogUtils.d(" MessageName.ClickMakeGoodNew onMessage"); LogUtils.d(" MessageName.ClickMakeGoodNew onMessage");
if (msg != null) { if (msg != null) {
BPA_GOODS goods = (BPA_GOODS) msg; BPA_GOODS goods = (BPA_GOODS) msg;

add_makegood.SetData(goods); add_makegood.SetData(goods);
add_makegood.setVisibility(View.VISIBLE); add_makegood.setVisibility(View.VISIBLE);
} }


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

@@ -2,6 +2,7 @@ package com.bonait.bnframework.modules.home.fragment.from;


import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SearchView; import androidx.appcompat.widget.SearchView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;


import android.os.Bundle; import android.os.Bundle;
@@ -39,7 +40,7 @@ public class ImageChooseActivity extends BaseActivity {
QMUITopBarLayout mTopBar;//顶部标题 QMUITopBarLayout mTopBar;//顶部标题
@BindView(R.id.recycler_view) @BindView(R.id.recycler_view)
RecyclerView recyclerView;//image列表 RecyclerView recyclerView;//image列表
private static final String CACHE_PATH= Environment.getExternalStorageDirectory().getAbsolutePath()+"/hblchayingdb/WebImage";
public static final String CACHE_PATH= Environment.getExternalStorageDirectory().getAbsolutePath()+"/hblchayingdb/WebImage";
List<image_sp> data =new ArrayList<>(); List<image_sp> data =new ArrayList<>();
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@@ -71,9 +72,9 @@ public class ImageChooseActivity extends BaseActivity {
s.url=fileName; s.url=fileName;
data.add(s); data.add(s);
} }
MyLayoutManager layout = new MyLayoutManager();
layout.setAutoMeasureEnabled(true);
recyclerView.setLayoutManager(layout);
// GridLayoutManager layout = new GridLayoutManager();
// layout.setAutoMeasureEnabled(true);
// recyclerView.setLayoutManager(layout);
image_sp_adapter spadapter = new image_sp_adapter(this,data); image_sp_adapter spadapter = new image_sp_adapter(this,data);
recyclerView.setAdapter(spadapter); recyclerView.setAdapter(spadapter);
spadapter.mListener=new MyClickListener() { spadapter.mListener=new MyClickListener() {


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

@@ -18,6 +18,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;


import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.R; import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity; import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.base.BaseFragment; import com.bonait.bnframework.common.base.BaseFragment;
@@ -35,6 +36,7 @@ import com.qmuiteam.qmui.widget.QMUITopBarLayout;


import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.text.DecimalFormat;
import java.util.ArrayList; import java.util.ArrayList;


import butterknife.BindView; import butterknife.BindView;
@@ -53,6 +55,8 @@ public class ImageSourceActivity extends BaseActivity {
RecyclerView rl_yx_file; RecyclerView rl_yx_file;
@BindView(R.id.baocunbendi) @BindView(R.id.baocunbendi)
Button baocunbendi; Button baocunbendi;
@BindView(R.id.delete_all)
Button delete_all;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@@ -69,8 +73,13 @@ public class ImageSourceActivity extends BaseActivity {
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
finish(); }
finish();
}
}); });
String cacheSize = getCacheSize();
if(!cacheSize.isEmpty()){
delete_all.setText("已缓存:"+getCacheSize()+"\n删除所有缓存图片");
}
} }
/** /**
* viewPager里添加fragment * viewPager里添加fragment
@@ -79,13 +88,29 @@ public class ImageSourceActivity extends BaseActivity {


} }


@OnClick({R.id.xuanzhewenjian, R.id.baocunbendi})
@OnClick({R.id.xuanzhewenjian, R.id.baocunbendi,R.id.delete_all})
public void onViewClicked(View view) { public void onViewClicked(View view) {
switch (view.getId()) { switch (view.getId()) {
case R.id.xuanzhewenjian://保存按钮 case R.id.xuanzhewenjian://保存按钮
Intent intent = new Intent(context, FileActivity.class); Intent intent = new Intent(context, FileActivity.class);
startActivityForResult(intent, Constants.REQ_CODE); startActivityForResult(intent, Constants.REQ_CODE);
break; break;
case R.id.delete_all:
LogUtils.d(" yx_files="+yx_files.toString());
if(!yx_files.isEmpty()){
for (int i =0;i<yx_files.size();i++){
File file= yx_files.get(i).getFile();
if (file.exists() && file.isFile())
{
file.delete();
}
}
yx_files.clear();
if(rl_yx_file!=null&& rl_yx_file.getAdapter()!=null){
rl_yx_file.getAdapter().notifyDataSetChanged();
}
}
break;
case R.id.baocunbendi://保存按钮 case R.id.baocunbendi://保存按钮
for (FileEntity item : PickerManager.getInstance().files) { for (FileEntity item : PickerManager.getInstance().files) {
File file = item.getFile(); File file = item.getFile();
@@ -102,7 +127,7 @@ public class ImageSourceActivity extends BaseActivity {
} }


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


public void FlushedImage() { public void FlushedImage() {
File path = new File(CACHE_PATH);// 获得路径 File path = new File(CACHE_PATH);// 获得路径
@@ -178,6 +203,41 @@ public class ImageSourceActivity extends BaseActivity {


//-------------------------配置viewPager与fragment关联----------------------------// //-------------------------配置viewPager与fragment关联----------------------------//


private String getCacheSize(){
String sizeString = "";
try {
File folder = new File(CACHE_PATH); // 替换为你的文件夹路径
long folderSize = getFolderSize(folder);
sizeString = formatSize(folderSize); // 将大小转换为可读的格式(可选)
}catch (Exception e){
e.printStackTrace();
}
return sizeString;
}

private long getFolderSize(File dir) {
long size = 0;
if (dir != null && dir.isDirectory()) {
File[] files = dir.listFiles();
for (File file : files) {
if (file.isFile()) {
size += file.length();
} else if (file.isDirectory()) {
size += getFolderSize(file); // 递归调用以获取子文件夹的大小
}
}
}
return size;
}

private String formatSize(long size) {
if (size <= 0) return "0 Bytes";
final String[] units = {"Bytes", "KB", "MB", "GB", "TB"};
int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
return new DecimalFormat("#,##0.#").format(size / Math.pow(1024, digitGroups)) + " " + units[digitGroups];
}


@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();


+ 4
- 4
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_good_control.java View File

@@ -336,8 +336,8 @@ public class add_good_control extends LinearLayout {
{ {
edittext.setText(Data.name); edittext.setText(Data.name);
edittext1.setText(Data.foreignKeyRe); edittext1.setText(Data.foreignKeyRe);
// new MyBitmapUtils().disPlay(cpfm,Data.url);
GlideUtil.showImage(cpfm.getContext(),url,cpfm,R.mipmap.loading3);
new MyBitmapUtils().disPlay(cpfm,Data.url);
// GlideUtil.showImageWithRadius(cpfm.getContext(),url,cpfm,R.mipmap.loading3,10);
url=Data.url; url=Data.url;
int index=0; int index=0;
for (Map.Entry<String, String> entry : map_fl.entrySet()) { for (Map.Entry<String, String> entry : map_fl.entrySet()) {
@@ -353,8 +353,8 @@ public class add_good_control extends LinearLayout {
{ {
edittext.setText(""); edittext.setText("");
edittext1.setText(""); edittext1.setText("");
// new MyBitmapUtils().disPlay(cpfm,"");
GlideUtil.showImage(cpfm.getContext(),"",cpfm,R.mipmap.loading3);
new MyBitmapUtils().disPlay(cpfm,"");
// GlideUtil.showImageWithRadius(cpfm.getContext(),"",cpfm,R.mipmap.loading3,10);
url=""; url="";
} }




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

@@ -148,9 +148,10 @@ public class add_makegood_control extends LinearLayout{
quzhizuo.setOnClickListener(new OnClickListener() { quzhizuo.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
if (mListener != null && SaveData()) {

mListener.clickListenerNew(view, 1, null);
if(!DataBus.getInstance().doubleClick()) {
if (mListener != null && SaveData()) {
mListener.clickListenerNew(view, 1, null);
}
} }
} }
}); });


+ 1
- 0
app/src/main/java/com/bonait/bnframework/modules/mine/fragment/from/UserActivity.java View File

@@ -98,6 +98,7 @@ public class UserActivity extends BaseActivity implements MyClickListener {
bpa_user.name = text.toString(); bpa_user.name = text.toString();
bpa_user.account = text.toString(); bpa_user.account = text.toString();
bpa_user.pass = "123456"; bpa_user.pass = "123456";
bpa_user.exp = "";
bpa_user.deviceID = ConfigName.getInstance().DeviceId; bpa_user.deviceID = ConfigName.getInstance().DeviceId;
bpa_user.userID = ConfigName.getInstance().user.userID;//更改为,用户权限 // 一般用户 研发用户 超级管理员 bpa_user.userID = ConfigName.getInstance().user.userID;//更改为,用户权限 // 一般用户 研发用户 超级管理员
QueryDB.AddUser(bpa_user); QueryDB.AddUser(bpa_user);


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

@@ -24,6 +24,7 @@ import android.widget.RelativeLayout;


import com.bonait.bnframework.R; import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData; import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.business.MainInit;
import com.bonait.bnframework.common.base.BaseActivity; import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.bg.SnowView; import com.bonait.bnframework.common.bg.SnowView;
import com.bonait.bnframework.common.constant.ConfigName; import com.bonait.bnframework.common.constant.ConfigName;
@@ -213,6 +214,7 @@ public class LoginActivity extends BaseActivity implements Validator.ValidationL
BPA_USER user= QueryDB.UserLogin(userAccount,password); BPA_USER user= QueryDB.UserLogin(userAccount,password);
if(user!=null) if(user!=null)
{ {
MainInit.initToastString();
MessageLog.ShowUserMessage(UserLogEnum.登录日志,user.name+"-登录成功"); MessageLog.ShowUserMessage(UserLogEnum.登录日志,user.name+"-登录成功");
ConfigName.getInstance().user=user; ConfigName.getInstance().user=user;
ConfigData.getInstance().SavePZ(); ConfigData.getInstance().SavePZ();


+ 6
- 1
app/src/main/res/layout/activity_deviceinformation.xml View File

@@ -41,7 +41,12 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:text="设备编号:" />
android:text="设备编号:"
android:focusable="true"
android:focusableInTouchMode="true"
>
<requestFocus/>
</com.qmuiteam.qmui.widget.textview.QMUILinkTextView>


<EditText <EditText
android:id="@+id/edittext1" android:id="@+id/edittext1"


+ 5
- 1
app/src/main/res/layout/activity_dzcjy.xml View File

@@ -25,7 +25,11 @@
android:id="@+id/miaoshu" android:id="@+id/miaoshu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/main_background">
android:background="@color/main_background"
android:focusableInTouchMode="true"
android:focusable="true"
>
<requestFocus/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"


+ 12
- 12
app/src/main/res/layout/activity_image_choose.xml View File

@@ -8,21 +8,21 @@
android:orientation="vertical" android:orientation="vertical"
android:background="@color/app_color_blue" android:background="@color/app_color_blue"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">

<ScrollView
<RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/qmui_topbar_height" android:layout_marginTop="?attr/qmui_topbar_height"
android:background="@color/activity_background">
<RelativeLayout
android:background="@color/activity_background"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
</ScrollView>
android:layout_height="wrap_content"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
android:orientation="vertical"
app:spanCount="3"
/>
</RelativeLayout>


<com.qmuiteam.qmui.widget.QMUITopBarLayout <com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/topbar" android:id="@+id/topbar"


+ 22
- 5
app/src/main/res/layout/activity_imagesource.xml View File

@@ -36,15 +36,27 @@


<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="70dp">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView <com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="50dp"
android:text="已有图片列表" android:text="已有图片列表"
android:textSize="@dimen/text_size_16" android:textSize="@dimen/text_size_16"
android:gravity="center_vertical"
/>
<Button
android:id="@+id/delete_all"
android:layout_width="300dp"
android:layout_alignParentRight="true"
android:layout_height="70dp"
android:background="@drawable/bg_btn_login_selected"
android:text="删除所有缓存图片"
android:textColor="@color/white"
android:textSize="22sp"
/> />
</RelativeLayout> </RelativeLayout>



<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -69,14 +81,17 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="@dimen/dp_10" android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10">
android:paddingTop="@dimen/dp_10"
android:paddingRight="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView <com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="50dp"
android:textSize="@dimen/text_size_16" android:textSize="@dimen/text_size_16"
android:gravity="center_vertical"
android:text="选择图片列表"/> android:text="选择图片列表"/>
</RelativeLayout> </RelativeLayout>


@@ -101,7 +116,7 @@
<LinearLayout <LinearLayout
android:layout_margin="@dimen/dp_10" android:layout_margin="@dimen/dp_10"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="34dp"
android:layout_height="50dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<Button <Button
@@ -111,6 +126,7 @@
android:background="@drawable/bg_btn_login_selected" android:background="@drawable/bg_btn_login_selected"
android:text="选择文件" android:text="选择文件"
android:layout_weight="1" android:layout_weight="1"
android:textSize="22sp"
/> />
<Button <Button
android:id="@+id/baocunbendi" android:id="@+id/baocunbendi"
@@ -119,6 +135,7 @@
android:background="@drawable/button1" android:background="@drawable/button1"
android:text="保存本地" android:text="保存本地"
android:layout_weight="1" android:layout_weight="1"
android:textSize="22sp"
/> />
</LinearLayout> </LinearLayout>




+ 5
- 1
app/src/main/res/layout/activity_systemparameter.xml View File

@@ -37,7 +37,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:text="PLC连接地址:" />
android:focusable="true"
android:focusableInTouchMode="true"
android:text="PLC连接地址:" >
<requestFocus/>
</com.qmuiteam.qmui.widget.textview.QMUILinkTextView>
<EditText <EditText
android:id="@+id/edittext1" android:id="@+id/edittext1"
android:layout_width="120dp" android:layout_width="120dp"


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

@@ -20,8 +20,9 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<ImageView <ImageView
android:id="@+id/iv_type" android:id="@+id/iv_type"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_width="70dp"
android:layout_height="70dp"
android:scaleType="fitXY"
android:layout_centerVertical="true"/> android:layout_centerVertical="true"/>
</RelativeLayout> </RelativeLayout>




+ 20
- 13
app/src/main/res/layout/item/layout/newgood_bj.xml View File

@@ -18,52 +18,59 @@
android:id="@+id/ImageUrl" android:id="@+id/ImageUrl"
android:layout_margin="5dp" android:layout_margin="5dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_height="match_parent"
android:src="@mipmap/loading3" android:src="@mipmap/loading3"
android:scaleType="fitXY" android:scaleType="fitXY"
/> />


<TextView <TextView
android:background="#99ffffff"
android:id="@+id/Tag_text" android:id="@+id/Tag_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="5dp" android:paddingLeft="5dp"
android:paddingRight="5dp" android:paddingRight="5dp"
android:text="清炒三月瓜" android:text="清炒三月瓜"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/gray_deep"
android:textColor="@color/black"
tools:ignore="MissingConstraints" tools:ignore="MissingConstraints"
android:layout_above="@id/rl_btn" android:layout_above="@id/rl_btn"
android:maxLines="2" android:maxLines="2"
android:textSize="20dp"/>
android:textSize="22sp"/>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_btn" android:id="@+id/rl_btn"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginTop="5dp">
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginBottom="5dp"
android:background="#ffffff"
>
<TextView <TextView
android:id="@+id/Sc_text" android:id="@+id/Sc_text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:paddingLeft="10dp"
android:paddingRight="30dp" android:paddingRight="30dp"
android:textSize="16dp"
android:textColor="@color/light_blue_primary"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:textSize="22sp"
android:textColor="@color/app_color_blue"
android:paddingBottom="2dp"
android:paddingTop="2dp"
android:text="修改"/> android:text="修改"/>
<TextView <TextView
android:id="@+id/delete_text" android:id="@+id/delete_text"
android:layout_marginRight="20dp"
android:paddingRight="10dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="16dp"
android:textSize="22sp"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:textColor="@color/red_primary_dark" android:textColor="@color/red_primary_dark"
android:paddingLeft="30dp" android:paddingLeft="30dp"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:paddingBottom="2dp"
android:paddingTop="2dp"
android:text="删除"/> android:text="删除"/>


</RelativeLayout> </RelativeLayout>


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

@@ -18,14 +18,17 @@
android:id="@+id/ImageUrl" android:id="@+id/ImageUrl"
android:layout_margin="5dp" android:layout_margin="5dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="115dp"
android:layout_height="match_parent"
android:src="@mipmap/loading3" android:src="@mipmap/loading3"
android:scaleType="fitXY" android:scaleType="fitXY"
tools:src="@mipmap/image1"
/> />
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_margin="5dp"
android:background="#99ffffff"
> >


<TextView <TextView
@@ -39,7 +42,7 @@
android:maxLines="2" android:maxLines="2"
android:ellipsize="end" android:ellipsize="end"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="20sp"
android:textSize="22sp"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
</RelativeLayout> </RelativeLayout>




+ 4
- 0
app/src/main/res/layout/item/layout/toast_layout.xml View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/toast_root" android:id="@+id/toast_root"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -14,6 +15,9 @@


<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toast_text" android:id="@+id/toast_text"
android:textSize="32sp"
tools:text="1信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n5信息信息信息信息信息信息信息信息\n"
android:ellipsize="start"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />



BIN
View File


Loading…
Cancel
Save