Browse Source

lyw 上传

授权码生成工具
lyw 5 months ago
parent
commit
fcb1717526
29 changed files with 311 additions and 101 deletions
  1. +1
    -0
      .idea/gradle.xml
  2. +8
    -7
      app/src/main/java/com/bonait/bnframework/business/ConfigData.java
  3. +2
    -1
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  4. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  5. +1
    -0
      app/src/main/java/com/bonait/bnframework/common/model/mode/SpeedEnum.java
  6. +8
    -0
      app/src/main/java/com/bonait/bnframework/common/model/mode/SpeedEnum_en.java
  7. +15
    -6
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java
  8. +22
    -11
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingSimulatedActivity.java
  9. +17
    -12
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/systeminternetfragment.java
  10. +2
    -2
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/LoginActivity.java
  11. +2
    -1
      app/src/main/java/com/bonait/bnframework/ui/activity/DiyProcessActivity.java
  12. +1
    -1
      app/src/main/java/com/bonait/bnframework/ui/dialog/EditGoodsDialog.java
  13. +29
    -13
      app/src/main/java/com/bonait/bnframework/ui/viewmodel/HomeGoodsViewModel.java
  14. +10
    -0
      app/src/main/res/drawable/btn_exit.xml
  15. +5
    -0
      app/src/main/res/drawable/home_bg.xml
  16. +3
    -10
      app/src/main/res/layout/activity_login.xml
  17. +1
    -1
      app/src/main/res/layout/activity_welcome.xml
  18. +1
    -1
      app/src/main/res/layout/fragment_home1.xml
  19. +69
    -21
      app/src/main/res/layout/fragment_home4.xml
  20. +10
    -10
      app/src/main/res/layout/fragment_home_sbkz.xml
  21. +2
    -2
      app/src/main/res/layout/item/layout/bottom_navigation.xml
  22. BIN
     
  23. BIN
     
  24. BIN
     
  25. BIN
     
  26. BIN
     
  27. +72
    -0
      app/src/main/res/values-en/strings.xml
  28. +28
    -0
      app/src/main/res/values/strings.xml
  29. +1
    -1
      build.gradle

+ 1
- 0
.idea/gradle.xml View File

@@ -4,6 +4,7 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="corretto-11" />
<option name="modules">


+ 8
- 7
app/src/main/java/com/bonait/bnframework/business/ConfigData.java View File

@@ -457,7 +457,8 @@ public class ConfigData {
* @param context
*/
public void GetOrganize(Context context) {
if (NetworkUtils.checkNetworkAvailable(context)) {
//新炒锅程序屏蔽不使用
/*if (NetworkUtils.checkNetworkAvailable(context)) {
//获取店铺信息
OkGo.<ResAPI<OrganizeMode>>get(ConfigName.getInstance().SaasAddress + ConfigName.getInstance().GetStore + ConfigName.getInstance().ClientAutoKey)
.tag(context)
@@ -467,7 +468,7 @@ public class ConfigData {
ResAPI<OrganizeMode> organize = response.body();
if (organize.isSuccess) {
ConfigName.getInstance().organizeMode = organize.data;
String saasAdd = ConfigName.getInstance().SaasAddress + ConfigName.getInstance().GetDeviceInformation;
String saasAdd = ConfigName.getInstance().SaasAddress + ConfigName.getInstance().GetGoods;
String id = ConfigName.getInstance().organizeMode.id;
String autoKey =ConfigName.getInstance().DeviceAutoKey;
OkGo.<ResAPI<DeviceInformation>>get(String.format(saasAdd, id, autoKey)).tag(context).headers(new HttpHeaders("TenantId", ConfigName.getInstance().organizeMode.companyId)).execute(new JsonDialogCallback<ResAPI<DeviceInformation>>(context) {
@@ -488,7 +489,7 @@ public class ConfigData {
});
} else {
ToastUtils.warning("无网络,请先连接网络!!!");
}
}*/
}

/**
@@ -1171,22 +1172,22 @@ public class ConfigData {
//options.inSampleSize = 2;//宽高压缩为原来的1/2
options.inPreferredConfig = Bitmap.Config.RGB_565;

Bitmap bitmap1 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image1, options);
/* 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);
Bitmap bitmap6 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.image6, options);
Bitmap bitmap7 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.loading123, options);
Bitmap bitmap7 = BitmapFactory.decodeResource(context.getResources(), R.mipmap.loading123, options);*/

LocalCacheUtils localCacheUtils = new LocalCacheUtils();
localCacheUtils.setBitmapToLocal("image1.png", bitmap1);
/*localCacheUtils.setBitmapToLocal("image1.png", bitmap1);
localCacheUtils.setBitmapToLocal("image2.png", bitmap2);
localCacheUtils.setBitmapToLocal("image3.png", bitmap3);
localCacheUtils.setBitmapToLocal("image4.png", bitmap4);
localCacheUtils.setBitmapToLocal("image5.png", bitmap5);
localCacheUtils.setBitmapToLocal("image6.png", bitmap6);
localCacheUtils.setBitmapToLocal("loading123.png", bitmap7);
localCacheUtils.setBitmapToLocal("loading123.png", bitmap7);*/


}


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

@@ -6,6 +6,7 @@ import android.util.Log;

import com.bonait.bnframework.BuildConfig;
import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.Constants;
import com.bonait.bnframework.common.constant.DataBus;
@@ -124,7 +125,7 @@ public class MainInit {

//日志
LogcatHelper.getInstance(app).start();
ExecuteTheRecipe.showlog("程序启动中...");
ExecuteTheRecipe.showlog(app.getString(R.string.text_Appstart));
}




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

@@ -269,7 +269,7 @@ public class ConfigName {
//public String SaasAddress="https://bpa.black-pa.com:21527";
//public String SaasAddress="https://witt.black-pa.com";

public static String dataPath = "/hblxiaochaoguodb";
public static String dataPath = "/hblxiaochaoguodb_1";
//获取店铺详细信息 Get
public String GetStore = "kitchen/api/StoreHelper/GetStoreInfoById?storeId=";
//获取设备信息分页 Get


+ 1
- 0
app/src/main/java/com/bonait/bnframework/common/model/mode/SpeedEnum.java View File

@@ -9,3 +9,4 @@ public enum SpeedEnum {
慢,
}


+ 8
- 0
app/src/main/java/com/bonait/bnframework/common/model/mode/SpeedEnum_en.java View File

@@ -0,0 +1,8 @@
package com.bonait.bnframework.common.model.mode;

public enum SpeedEnum_en {
Fast,
Middle,
Slow,
Stop;
}

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

@@ -32,6 +32,7 @@ import com.bonait.bnframework.common.helper.I.IWriteCallBack;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.model.mode.MouthFacingEnum;
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.modules.home.fragment.mode.imagebuttom3;
@@ -560,7 +561,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
fanchaoshudu_z.SetStatus(false);
fanchaoshudu_m.SetStatus(false);
fanchaoshudu_t.SetStatus(false);
fanchaoshudu.setTag("翻炒速度 快-按钮");
fanchaoshudu.setTag(getString(R.string.btn_fry_fast));
break;
case 中:
_speed = 40;
@@ -568,7 +569,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
//fanchaoshudu_z.SetStatus(true);
fanchaoshudu_m.SetStatus(false);
fanchaoshudu_t.SetStatus(false);
fanchaoshudu.setTag("翻炒速度 中-按钮");
fanchaoshudu.setTag(getString(R.string.btn_fry_middle));
break;
case 慢:
_speed = 20;
@@ -576,7 +577,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
fanchaoshudu_z.SetStatus(false);
//fanchaoshudu_m.SetStatus(true);
fanchaoshudu_t.SetStatus(false);
fanchaoshudu.setTag("翻炒速度 慢-按钮");
fanchaoshudu.setTag(getString(R.string.btn_fry_slow));
break;
case 停:
_speed = 0;
@@ -584,7 +585,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
fanchaoshudu_z.SetStatus(false);
fanchaoshudu_m.SetStatus(false);
//fanchaoshudu_t.SetStatus(true);
fanchaoshudu.setTag("翻炒速度 停-按钮");
fanchaoshudu.setTag(getString(R.string.btn_fry_stop));
break;
}
} else {
@@ -593,12 +594,20 @@ public class HomeFragmentSBKZ extends BaseFragment {
fanchaoshudu_z.SetStatus(false);
fanchaoshudu_m.SetStatus(false);
fanchaoshudu_t.SetStatus(true);
fanchaoshudu.setTag("翻炒速度 停-按钮");
fanchaoshudu.setTag(getString(R.string.btn_fry_stop));
}
fanchaoshudu_1.setVisibility(View.GONE);
fanchaoshudu.Init();
switch (getString(R.string.language)){
case "en":
int t = speed.ordinal();
ToastUtils.warning("Setting Stir-fry speed:" + SpeedEnum_en.values()[t]);
break;
case "zh":
ToastUtils.warning("设置翻炒速度:" + speed.name());
break;
}

ToastUtils.warning("设置翻炒速度:" + speed.name());

int final_speed = _speed;
ExecuteTheRecipe.WritePLC("搅拌速度", _speed, new IWriteCallBack() {


+ 22
- 11
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CookingSimulatedActivity.java View File

@@ -27,7 +27,11 @@ import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE;
import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL;
import com.bonait.bnframework.common.db.mode.BPA_GOODS_SUBATTRIBUTE_GROUP;
import com.bonait.bnframework.common.db.mode.BPA_SILOS;
import com.bonait.bnframework.common.db.util.GoodsProcessDetailDBUtil;
import com.bonait.bnframework.common.db.util.SubAttributeGroupDBUtil;
import com.bonait.bnframework.common.helper.CountDownTimerExt;
import com.bonait.bnframework.common.helper.I.IRunT;
import com.bonait.bnframework.common.helper.I.IWriteCallBack;
@@ -116,7 +120,8 @@ public class CookingSimulatedActivity extends BaseActivity {
RelativeLayout showbuttomtop;

public BPA_GOODS goods = new BPA_GOODS();
public ArrayList<BPA_GOODSRECIPE> goodsrecipes = new ArrayList<>();
public BPA_GOODS_SUBATTRIBUTE_GROUP goodsGroup = new BPA_GOODS_SUBATTRIBUTE_GROUP();
public ArrayList<BPA_GOODS_PROCESS_DETAIL> goodsrecipes = new ArrayList<>();
//endregion

//region 界面实例
@@ -129,11 +134,17 @@ public class CookingSimulatedActivity extends BaseActivity {
initTopBar();

Intent intent = getIntent();
String id = intent.getStringExtra("id");
if (!id.isEmpty()) {
goods = QueryDB.GetGoodsId(id);
if (goods != null) {
goodsrecipes = QueryDB.GetGoodsSrecipeID(goods.id);
String goodId = intent.getStringExtra("goodId");
String subAttributeGroupId = intent.getStringExtra("subAttributeGroupId");
// intent.putExtra("subAttributeGroupId",subAttributeGroupId);
// intent.putExtra("isTest",true);
// intent.putExtra("subAttributeGroupName",subAttributeGroupName);
// intent.putExtra("goodId",goodId);
if (!subAttributeGroupId.isEmpty()) {
goods = QueryDB.GetGoodsId(goodId);
goodsGroup = SubAttributeGroupDBUtil.getById(subAttributeGroupId);
if (goodsGroup != null) {
goodsrecipes = GoodsProcessDetailDBUtil.getByGroupId(goodsGroup.id);
}
}
initData();
@@ -170,7 +181,7 @@ public class CookingSimulatedActivity extends BaseActivity {
yeliao4.setTag(ConfigName.getInstance().SilosDisplayMaterial.get(4) + "");
yeliao4.Init();

ConcurrentHashMap<Integer, String> resultData = DataBus.getInstance().GetMainDisplayText(goods.id);
ConcurrentHashMap<Integer, String> resultData = DataBus.getInstance().GetMainDisplayText(goodsGroup.id);
touliao1.setTag(resultData.get(1) + "-按钮");
touliao1.Init();

@@ -183,7 +194,7 @@ public class CookingSimulatedActivity extends BaseActivity {
touliao4.setTag(resultData.get(4) + "-按钮");
touliao4.Init();

goodname.setText(goods.name + "");
goodname.setText(goods.name + "-"+goodsGroup.name);
runtime.setText(formatTime(0));//goods.maketime
showbuttomtop.setVisibility(View.VISIBLE);
Stop();
@@ -326,7 +337,7 @@ public class CookingSimulatedActivity extends BaseActivity {
* 启动
*/
public void onRecordStart() {
if (goods != null) {
if (goodsGroup != null) {
int time = 0;//goods.maketime
SetProcess(time, 0);
if (countDownTimer == null) {
@@ -351,7 +362,7 @@ public class CookingSimulatedActivity extends BaseActivity {
* 停止
*/
public void onRecordStop() {
if (goods != null) {
if (goodsGroup != null) {
SetProcess(0, 0);//goods.maketime
SetMiaoShu("等待开始...");
if (countDownTimer != null) {
@@ -371,7 +382,7 @@ public class CookingSimulatedActivity extends BaseActivity {
new Thread(new Runnable() {
@Override
public void run() {
for (BPA_GOODSRECIPE recipe : goodsrecipes) {
for (BPA_GOODS_PROCESS_DETAIL recipe : goodsrecipes) {
runOnUiThread(new Runnable() {
@Override
public void run() {


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

@@ -109,20 +109,25 @@ public class systeminternetfragment extends BaseFragment {
File path = new File(CACHE_PATH);// 获得路径
File[] files = path.listFiles();// 读取文件
yx_files.clear();
for (File f : files) {
String absolutePath = f.getAbsolutePath();
FileEntity e;
if (checkExits(absolutePath)) {
e = new FileEntity(absolutePath, f, true);
} else {
e = new FileEntity(absolutePath, f, false);
}
if (f.isFile()) {
String[] imgs = {"png", "jpg", "jpeg", "gif"};
e.setFileType(new FileType("IMG", imgs, 0));
yx_files.add(e);
try {
for (File f : files) {
String absolutePath = f.getAbsolutePath();
FileEntity e;
if (checkExits(absolutePath)) {
e = new FileEntity(absolutePath, f, true);
} else {
e = new FileEntity(absolutePath, f, false);
}
if (f.isFile()) {
String[] imgs = {"png", "jpg", "jpeg", "gif"};
e.setFileType(new FileType("IMG", imgs, 0));
yx_files.add(e);
}
}
}catch (Exception e){
e.printStackTrace();
}

rl_yx_file.setLayoutManager(new LinearLayoutManager(context));
FilePickerShowAdapter adapter = new FilePickerShowAdapter(context, yx_files);
rl_yx_file.setAdapter(adapter);


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

@@ -219,7 +219,7 @@ public class LoginActivity extends BaseActivity implements Validator.ValidationL
skipToMainActivity();
}else
{
ToastUtils.warning("账号密码不正确!");
ToastUtils.warning(getString(R.string.text_Login_Fass));
}


@@ -359,7 +359,7 @@ public class LoginActivity extends BaseActivity implements Validator.ValidationL
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}
ToastUtils.info("登录成功!");
ToastUtils.info(getString(R.string.text_Login_Suc));
// 结束所有Activity
ActivityLifecycleManager.get().finishAllActivity();
}


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

@@ -35,6 +35,7 @@ import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.databinding.ActivityEditProcessBinding;
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.step.DiyStepAdapter;
import com.bonait.bnframework.ui.dialog.AttributeSelectDialog;
@@ -271,7 +272,7 @@ public class DiyProcessActivity extends BaseActivity {
NewToastUtil.getInstance().showToast("点击过快!");
return;
}
Intent intent = new Intent(DiyProcessActivity.this, CookingActivity.class);
Intent intent = new Intent(DiyProcessActivity.this, CookingSimulatedActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra("subAttributeGroupId",subAttributeGroupId);
intent.putExtra("isTest",true);


+ 1
- 1
app/src/main/java/com/bonait/bnframework/ui/dialog/EditGoodsDialog.java View File

@@ -424,7 +424,7 @@ public class EditGoodsDialog extends DialogFragment {
String value = entry.getValue();
if(key.contains("名称")){
name = value;
}else if(key.contains("位置")){
}else if(key.contains("主料位置")){
position = Integer.parseInt(value.replace("号位",""));
}
}


+ 29
- 13
app/src/main/java/com/bonait/bnframework/ui/viewmodel/HomeGoodsViewModel.java View File

@@ -44,6 +44,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
* @author: liup
@@ -214,35 +215,44 @@ public class HomeGoodsViewModel extends ViewModel {
}

}

List<BPA_GOODS_PROCESS_DETAIL> datas1 = new ArrayList<>();
List<BPA_GOODS_SUBATTRIBUTE_GROUP> datas2 = new ArrayList<>();
for(GoodsClassifyBean.GoodsInfoListBean goodsInfoListBean: bean.getGoodsInfoList() ){
if(goodsInfoListBean.getGoodsName().equals(goods.name)){
List<String> groupList = new ArrayList<>();
HashMap<String,String> groupList = new HashMap<>();
for (GoodsClassifyBean.GoodsInfoListBean.GoodsTechnologyActionListBean goodsTechnologyActionListBean:goodsInfoListBean.getGoodsTechnologyActionList()){
//添加子属性组合
if(!groupList.contains(goodsTechnologyActionListBean.getGoodsAttributeId())){
if(groupList.get(goodsTechnologyActionListBean.getGoodsAttributeId())==null){
BPA_GOODS_SUBATTRIBUTE_GROUP group = new BPA_GOODS_SUBATTRIBUTE_GROUP();
group.id = goodsTechnologyActionListBean.getGoodsAttributeId()==null?"xxxxx123":goodsTechnologyActionListBean.getGoodsAttributeId();
if(goodsTechnologyActionListBean.getGoodsAttributeId()==null || goodsTechnologyActionListBean.getGoodsAttributeId().isEmpty()){
group.id = goods.id;
}
group.name = GetRecipeName(goodsTechnologyActionListBean.getGoodsAttributeId(),bean.getGoodsAttributeList());//
group.subAttributeIdList = goodsTechnologyActionListBean.getGoodsAttributeId()==null?"":goodsTechnologyActionListBean.getGoodsAttributeId();//
group.goodsId = goods.id;
groupList.add(goodsTechnologyActionListBean.getGoodsAttributeId());
SubAttributeGroupDBUtil.add(group);
groupList.put(goodsTechnologyActionListBean.getGoodsAttributeId(),group.id);
datas2.add(group);
}
//添加所有工序
BPA_GOODS_PROCESS_DETAIL processDetail = new BPA_GOODS_PROCESS_DETAIL();
processDetail.goodsSubAttributeGroupId = goodsTechnologyActionListBean.getGoodsAttributeId()==null?"xxxxx123":goodsTechnologyActionListBean.getGoodsAttributeId();
if(goodsTechnologyActionListBean.getGoodsAttributeId()==null || goodsTechnologyActionListBean.getGoodsAttributeId().isEmpty()){
processDetail.goodsSubAttributeGroupId = groupList.get(goods.id);
}else {
processDetail.goodsSubAttributeGroupId = groupList.get(goodsTechnologyActionListBean.getGoodsAttributeId());
}
processDetail.materialType = goodsTechnologyActionListBean.getStepName().contains("液体")?0:1;
String value = ProcessValueUtil.dealProcessJsonToValue(goodsTechnologyActionListBean.getActionJson());
processDetail.processms = goodsTechnologyActionListBean.getStepName()+ProcessValueUtil.dealProcessSms(value);
processDetail.sort = goodsTechnologyActionListBean.getSort();
processDetail.processname = goodsTechnologyActionListBean.getStepName();
processDetail.processvalue = value;
GoodsProcessDetailDBUtil.add(processDetail);
datas1.add(processDetail);
}
break;
}
}
GoodsProcessDetailDBUtil.addList(datas1);
SubAttributeGroupDBUtil.addList(datas2);
break;
}
}
@@ -407,22 +417,28 @@ public class HomeGoodsViewModel extends ViewModel {
if(item.getGoodsInfoList()!=null){
item.getGoodsInfoList().forEach(goodinfo->{
try {
List<String> groupList = new ArrayList<>();
HashMap<String,String> groupList = new HashMap<>();
for (GoodsClassifyBean.GoodsInfoListBean.GoodsTechnologyActionListBean goodsTechnologyActionListBean:
goodinfo.getGoodsTechnologyActionList()){
//添加子属性组合
if(!groupList.contains(goodsTechnologyActionListBean.getGoodsAttributeId())){
if(groupList.get(goodsTechnologyActionListBean.getGoodsAttributeId())==null){
BPA_GOODS_SUBATTRIBUTE_GROUP group = new BPA_GOODS_SUBATTRIBUTE_GROUP();
group.id = goodsTechnologyActionListBean.getGoodsAttributeId()==null?"xxxxx123":goodsTechnologyActionListBean.getGoodsAttributeId();
if(goodsTechnologyActionListBean.getGoodsAttributeId()==null || goodsTechnologyActionListBean.getGoodsAttributeId().isEmpty()){
group.id = goodinfo.getGoodsId();
}
group.name = GetRecipeName(goodsTechnologyActionListBean.getGoodsAttributeId(),item.getGoodsAttributeList());//
group.subAttributeIdList = goodsTechnologyActionListBean.getGoodsAttributeId()==null?"":goodsTechnologyActionListBean.getGoodsAttributeId();//
group.goodsId = goodinfo.getGoodsId();
groupList.add(goodsTechnologyActionListBean.getGoodsAttributeId());
groupList.put(goodsTechnologyActionListBean.getGoodsAttributeId(),group.id);
datas2.add(group);
}
//添加所有工序
BPA_GOODS_PROCESS_DETAIL processDetail = new BPA_GOODS_PROCESS_DETAIL();
processDetail.goodsSubAttributeGroupId = goodsTechnologyActionListBean.getGoodsAttributeId()==null?"xxxxx123":goodsTechnologyActionListBean.getGoodsAttributeId();
if(goodsTechnologyActionListBean.getGoodsAttributeId()==null || goodsTechnologyActionListBean.getGoodsAttributeId().isEmpty()){
processDetail.goodsSubAttributeGroupId = groupList.get(goodinfo.getGoodsId());
}else {
processDetail.goodsSubAttributeGroupId = groupList.get(goodsTechnologyActionListBean.getGoodsAttributeId());
}
processDetail.materialType = goodsTechnologyActionListBean.getStepName().contains("液体")?0:1;
String value = ProcessValueUtil.dealProcessJsonToValue(goodsTechnologyActionListBean.getActionJson());
processDetail.processms = goodsTechnologyActionListBean.getStepName()+ProcessValueUtil.dealProcessSms(value);


+ 10
- 0
app/src/main/res/drawable/btn_exit.xml View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#D6CAA2"/>
<corners android:topLeftRadius="30dp" android:bottomLeftRadius="30dp"/>
</shape>
</item>
<item android:drawable="@mipmap/home_exit" android:gravity="left|center" android:height="40dp" android:width="40dp" android:left="10dp"/>
</layer-list>

+ 5
- 0
app/src/main/res/drawable/home_bg.xml View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#BAA876"/>
<corners android:radius="60dp"></corners>
</shape>

+ 3
- 10
app/src/main/res/layout/activity_login.xml View File

@@ -46,13 +46,6 @@
android:layout_centerInParent="true"
android:src="@mipmap/login_ico" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="60dp"
android:src="@mipmap/login_name" />
</RelativeLayout>

<RelativeLayout
@@ -91,7 +84,7 @@
android:background="@null"
android:focusable="true"
android:focusableInTouchMode="true"
android:hint="@string/user_account"
android:hint="@string/text_User"
android:imeOptions="actionNext"
android:inputType="text"
android:maxLength="20"
@@ -134,7 +127,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:hint="请输入密码"
android:hint="@string/text_Password"
android:inputType="textPassword"
android:maxLength="30"
android:singleLine="true"
@@ -203,7 +196,7 @@
android:layout_height="45dp"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_btn_login_selected"
android:text="登 录"
android:text="@string/btn_sign"
android:textColor="@color/white"
android:textSize="18sp" />



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

@@ -31,7 +31,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="软件初始化,加载中请稍后...."
android:text="@string/text_LoadInfo"
android:textColor="@color/white"
android:textSize="16dp"/>
</LinearLayout>


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

@@ -131,7 +131,7 @@
android:layout_alignParentRight="true"
android:text="预计剩余时间:300s" />

<com.capton.colorfulprogressbar.ColorfulProgressbar xmlns:app="http://schemas.android.com/apk/res-auto"
<com.capton.colorfulprogressbar.ColorfulProgressbar
android:id="@+id/jingdu"
android:layout_width="match_parent"
android:layout_height="match_parent"


+ 69
- 21
app/src/main/res/layout/fragment_home4.xml View File

@@ -46,10 +46,18 @@
android:orientation="vertical">

<ImageView
android:layout_width="match_parent"
android:layout_height="130dp"
android:src="@mipmap/home_kspr" />

android:layout_width="80dp"
android:layout_gravity="center"
android:layout_height="80dp"
android:src="@mipmap/cooking" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_StartCooking"
android:textSize="30dp"
android:layout_gravity="center"
android:textColor="#7DA342"
/>
</LinearLayout>

<LinearLayout
@@ -60,10 +68,18 @@
android:orientation="vertical">

<ImageView

android:layout_width="match_parent"
android:layout_height="130dp"
android:src="@mipmap/home_sbkz" />
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center"
android:src="@mipmap/home_sdcz" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_SDCZ"
android:textSize="30dp"
android:layout_gravity="center"
android:textColor="#F37636"
/>

</LinearLayout>
</LinearLayout>
@@ -82,9 +98,18 @@
android:orientation="vertical">

<ImageView
android:layout_width="match_parent"
android:layout_height="130dp"
android:src="@mipmap/home_lcsz" />
android:layout_width="80dp"
android:layout_gravity="center"
android:layout_height="80dp"
android:src="@mipmap/home_sz" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_home_SZ"
android:textSize="30dp"
android:layout_gravity="center"
android:textColor="#1296DB"
/>
</LinearLayout>

<LinearLayout
@@ -95,9 +120,18 @@
android:orientation="vertical">

<ImageView
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_width="80dp"
android:layout_gravity="center"
android:layout_height="80dp"
android:src="@mipmap/home_cpyf" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_home_CPYF"
android:textSize="30dp"
android:layout_gravity="center"
android:textColor="#586DEC"
/>

</LinearLayout>
</LinearLayout>
@@ -110,19 +144,33 @@
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginLeft="30dp"
android:layout_marginTop="210dp"
android:layout_marginTop="150dp"
android:layout_marginRight="30dp"
android:background="@mipmap/home1"></RelativeLayout>

<RelativeLayout
android:background="@drawable/home_bg">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/title_home"
android:textColor="@color/white"
android:textSize="80dp" />
</RelativeLayout>

<Button
android:id="@+id/zhuxiaodenglu"
android:layout_width="140dp"
android:layout_width="120dp"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="-23dp"
android:layout_marginRight="0dp"
android:layout_marginBottom="50dp"
android:background="@mipmap/home3"
android:elevation="40dp"></RelativeLayout>
android:text="@string/btn_exit"
android:textSize="30dp"
android:gravity="right|center"
android:paddingRight="10dp"
android:textColor="@color/white"
android:background="@drawable/btn_exit"
android:elevation="40dp"></Button>
</RelativeLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

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

@@ -143,10 +143,10 @@

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu"
android:layout_width="140dp"
android:layout_width="160dp"
android:layout_height="60dp"
android:contentDescription="true"
android:tag="翻炒速度-按钮"
android:tag="@string/btn_fry"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />
@@ -165,20 +165,20 @@
android:layout_height="wrap_content">
<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_k"
android:layout_width="60dp"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag=""
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="60dp"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag=""
android:tag="@string/btn_middle"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />
@@ -191,20 +191,20 @@
android:layout_height="wrap_content">
<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/fanchaoshudu_m"
android:layout_width="60dp"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag=""
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="60dp"
android:layout_width="80dp"
android:layout_height="50dp"
android:contentDescription="true"
android:tag=""
android:tag="@string/btn_stop"
app:imagesrc_ks="@mipmap/sb1"
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />


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

@@ -39,7 +39,7 @@
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:text="菜谱"
android:text="@string/btn_recipe"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="25dp"
@@ -72,7 +72,7 @@
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:text="设备"
android:text="@string/btn_device"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="25dp"


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


+ 72
- 0
app/src/main/res/values-en/strings.xml View File

@@ -0,0 +1,72 @@
<resources>
<string name="app_name">菠萝小炒-新</string>
<string name="file_normal">常用文件</string>
<string name="file_all">全部文件</string>
<string name="empty_data">没有数据</string>
<string name="not_available">sd卡不可用</string>
<string name="already_select">已选择:%s</string>
<string name="file_select_res">确定%s</string>
<string name="file_select_max">最多选择%d个文件</string>
<string name="file_select_res1">保存本地%s</string>


<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="title_activity_bottom_navigation2">标题</string>
<string name="title_home">Home</string>
<string name="title_dashboard">烹饪</string>
<string name="user_account">请输入用户名</string>
<string name="mine">我的</string>
<string name="dummy_button">Dummy Button</string>
<string name="dummy_content">DUMMY\nCONTENT</string>
<string name="common_example">示例图片</string>

<!-- TODO: 系统设置 -->
<string name="NetworkManagement">资源管理</string>
<string name="DeviceInformation">设备信息</string>
<string name="SystemSettings">系统设置</string>
<string name="SeasoningSettings">调料设置</string>

<!-- TODO: 物料表格设置 -->
<string name="str_index">顺序</string>
<string name="str_name">名称</string>
<string name="str_age">年龄</string>

<!--TODO: 提示文案-->
<string name="tip_save_menu_title">保存菜谱操作提示!</string>
<string name="tip_create_menu_title">生成菜谱操作提示!</string>
<string name="tip_save_menu_content">请问客官确定要保存[%s]菜谱吗?</string>
<string name="tip_create_menu_content">请问客官确定要生成[%s]菜谱吗?</string>
<string name="tip_save_cancel">CanCel</string>
<string name="tip_save_confirm">OK</string>



<!--TODO: 中英文对照表-->
<string name="language">en</string>
<string name="btn_sign">SIGN</string>
<string name="text_Password">Please enter your password</string>
<string name="text_User">Please enter a username</string>
<string name="text_Login_Fass">The username or password is incorrect!</string>
<string name="text_LoadInfo">The software is being initialized, please wait....</string>
<string name="text_Appstart">Starting...</string>
<string name="text_Login_Suc">Login successful!</string>
<string name="text_StartCooking">Start Cook</string>
<string name="text_SDCZ">Manual Operation</string>
<string name="text_home_SZ">Silo Settings</string>
<string name="text_home_CPYF">Menu Develop</string>
<string name="btn_exit">Exit</string>
<string name="btn_recipe">Recipe</string>
<string name="btn_device">Device</string>
<string name="btn_fry">Stir-fry speed-按钮</string>
<string name="btn_fry_fast">Stir-fry Fast-按钮</string>
<string name="btn_fry_middle">Stir-fry Middle-按钮</string>
<string name="btn_fry_slow">Stir-fry Slow-按钮</string>
<string name="btn_fry_stop">Stir-fry Stop-按钮</string>
<string name="btn_fast">Fast</string>
<string name="btn_middle">Middle</string>
<string name="btn_slow">Slow</string>
<string name="btn_stop">Stop</string>
<string name="btn_pot">Pot Direction-按钮</string>
<string name="btn_origin">Pot Direction-按钮</string>
</resources>

+ 28
- 0
app/src/main/res/values/strings.xml View File

@@ -40,4 +40,32 @@
<string name="tip_create_menu_content">请问客官确定要生成[%s]菜谱吗?</string>
<string name="tip_save_cancel">取消</string>
<string name="tip_save_confirm">确定</string>


<!--TODO: 中英文对照表-->
<string name="language">zh</string>
<string name="btn_sign">登 录</string>
<string name="text_Password">请输入密码!</string>
<string name="text_User">请输入用户名</string>
<string name="text_Login_Fass">账号密码不正确!</string>
<string name="text_LoadInfo">软件初始化,加载中请稍后....</string>
<string name="text_Appstart">程序启动中...</string>
<string name="text_Login_Suc">登录成功!</string>
<string name="text_StartCooking">开始烹饪</string>
<string name="text_SDCZ">手动操作</string>
<string name="text_home_SZ">料仓设置</string>
<string name="text_home_CPYF">菜品研发</string>
<string name="btn_exit">注销</string>
<string name="btn_recipe">菜谱</string>
<string name="btn_device">设备</string>
<string name="btn_fry">翻炒速度-按钮</string>
<string name="btn_fry_fast">翻炒速度 快-按钮</string>
<string name="btn_fry_middle">翻炒速度 中-按钮</string>
<string name="btn_fry_slow">翻炒速度 慢-按钮</string>
<string name="btn_fry_stop">翻炒速度 停-按钮</string>
<string name="btn_fast">快</string>
<string name="btn_middle">中</string>
<string name="btn_slow">慢</string>
<string name="btn_stop">停</string>
<string name="btn_pot">锅口朝向-按钮</string>
</resources>

+ 1
- 1
build.gradle View File

@@ -51,7 +51,7 @@ ext { // 统一版本入口

// 炒锅
// 设置applicationId(这里很重要,两个相同applicationId的apk不同同时安装在同一台Android手机中)
applicationId="com.bonait.bnframework.newchaoguo"
applicationId="com.bonait.bnframework.newchaoguo_1"

// 奶茶机
// 设置applicationId(这里很重要,两个相同applicationId的apk不同同时安装在同一台Android手机中)


Loading…
Cancel
Save