@@ -11,9 +11,12 @@ import com.bonait.bnframework.business.ConfigData; | |||
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.file.DBHelper; | |||
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
import com.bonait.bnframework.common.db.mode.BPA_LOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; | |||
import com.bonait.bnframework.common.db.mode.BPA_PROCESS; | |||
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel; | |||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||
@@ -111,7 +114,6 @@ public class MainApplication extends Application { | |||
//初始化DB数据 | |||
InitDBdata(); | |||
DataBus.getInstance().GetLc();//获取料仓数据 | |||
} | |||
//========================================================================// | |||
@@ -162,6 +164,20 @@ public class MainApplication extends Application { | |||
InitProcessData(); | |||
} | |||
if(QueryDB.GetPlcaddressALL().size()<=0) | |||
{ | |||
ConfigData.getInstance().RevertPLC(); | |||
} | |||
} | |||
/** | |||
* 删除表-重新生成新表 | |||
*/ | |||
public void DBdelete() | |||
{ | |||
DBHelper.getInstance(this).DeleteCreateTables(BPA_CLOUDDATA.class,null); | |||
DBHelper.getInstance(this).DeleteCreateTables(BPA_PLCADDRESS.class,null); | |||
} | |||
/** | |||
@@ -3,22 +3,37 @@ package com.bonait.bnframework.business; | |||
import android.content.Context; | |||
import android.graphics.Bitmap; | |||
import android.graphics.BitmapFactory; | |||
import android.util.Log; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.constant.MessageName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA; | |||
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; | |||
import com.bonait.bnframework.common.db.mode.BPA_SYSTEMSET; | |||
import com.bonait.bnframework.common.helper.ConfigUtil; | |||
import com.bonait.bnframework.common.helper.HttpUtils; | |||
import com.bonait.bnframework.common.helper.Json; | |||
import com.bonait.bnframework.common.helper.mode.OrderStatusChange; | |||
import com.bonait.bnframework.common.helper.mode.VersionMode; | |||
import com.bonait.bnframework.common.http.callback.json.JsonDialogCallback; | |||
import com.bonait.bnframework.common.image.utils.LocalCacheUtils; | |||
import com.bonait.bnframework.common.model.ResAPI; | |||
import com.bonait.bnframework.common.model.ResListAPI; | |||
import com.bonait.bnframework.common.model.mode.CloudGood; | |||
import com.bonait.bnframework.common.model.mode.DeviceInformation; | |||
import com.bonait.bnframework.common.model.mode.DicModel; | |||
import com.bonait.bnframework.common.model.mode.InPage; | |||
import com.bonait.bnframework.common.model.mode.InputDev; | |||
import com.bonait.bnframework.common.model.mode.OrganizeMode; | |||
import com.bonait.bnframework.common.model.mode.ResALLData; | |||
import com.bonait.bnframework.common.utils.NetworkUtils; | |||
import com.google.gson.Gson; | |||
import com.lzy.okgo.OkGo; | |||
import com.lzy.okgo.model.HttpHeaders; | |||
import com.lzy.okgo.model.Response; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.Map; | |||
import okhttp3.MediaType; | |||
import okhttp3.RequestBody; | |||
/** | |||
@@ -51,7 +66,6 @@ public class ConfigData { | |||
LoadSystem(); | |||
ToggleEnvironment(); | |||
//2.加载配置 | |||
LoadingDPPZ(); | |||
LoadingPZ(); | |||
//3.初始化业务 | |||
//4.初始化日志上报adad | |||
@@ -60,70 +74,63 @@ public class ConfigData { | |||
/** | |||
* 加载系统配置 | |||
*/ | |||
public void LoadSystem() | |||
{ | |||
ArrayList<BPA_SYSTEMSET> bpa_systemsets= QueryDB.GetSystemsetALL(); | |||
public void LoadSystem() { | |||
ArrayList<BPA_SYSTEMSET> bpa_systemsets = QueryDB.GetSystemsetALL(); | |||
// for(BPA_SYSTEMSET item:bpa_systemsets) | |||
// { | |||
// QueryDB.DeleteSystemset(item.id); | |||
// } | |||
for (int i = 0; i <5;i++){ | |||
int ty=i; | |||
BPA_SYSTEMSET set=new BPA_SYSTEMSET(); | |||
set.type=ty; | |||
switch (ty) | |||
{ | |||
for (int i = 0; i < 5; i++) { | |||
int ty = i; | |||
BPA_SYSTEMSET set = new BPA_SYSTEMSET(); | |||
set.type = ty; | |||
switch (ty) { | |||
case 0: | |||
set.value=ConfigName.getInstance().Environment; | |||
set.value = ConfigName.getInstance().Environment; | |||
break; | |||
case 1: | |||
set.value=ConfigName.getInstance().Address; | |||
set.value = ConfigName.getInstance().Address; | |||
break; | |||
case 2: | |||
set.value=String.valueOf(ConfigName.getInstance().Post); | |||
set.value = String.valueOf(ConfigName.getInstance().Post); | |||
break; | |||
case 3: | |||
set.value=ConfigName.getInstance().ClientId; | |||
set.value = ConfigName.getInstance().ClientAutoKey; | |||
break; | |||
case 4: | |||
set.value=ConfigName.getInstance().DeviceId; | |||
set.value = ConfigName.getInstance().DeviceAutoKey; | |||
break; | |||
} | |||
set.deviceID = ConfigName.getInstance().DeviceId; | |||
set.userID = ConfigName.getInstance().user.userID; | |||
BPA_SYSTEMSET find=null; | |||
for (BPA_SYSTEMSET item:bpa_systemsets) | |||
{ | |||
if(item.type==ty) | |||
{ | |||
find=item; | |||
BPA_SYSTEMSET find = null; | |||
for (BPA_SYSTEMSET item : bpa_systemsets) { | |||
if (item.type == ty) { | |||
find = item; | |||
break; | |||
} | |||
} | |||
if(find==null) | |||
{ | |||
if (find == null) { | |||
QueryDB.AddSystemset(set); | |||
} | |||
} | |||
bpa_systemsets= QueryDB.GetSystemsetALL(); | |||
for (BPA_SYSTEMSET item:bpa_systemsets) | |||
{ | |||
switch (item.type) | |||
{ | |||
bpa_systemsets = QueryDB.GetSystemsetALL(); | |||
for (BPA_SYSTEMSET item : bpa_systemsets) { | |||
switch (item.type) { | |||
case 0: | |||
ConfigName.getInstance().Environment=item.value; | |||
ConfigName.getInstance().Environment = item.value; | |||
break; | |||
case 1: | |||
ConfigName.getInstance().Address=item.value; | |||
ConfigName.getInstance().Address = item.value; | |||
break; | |||
case 2: | |||
ConfigName.getInstance().Post=Integer.parseInt(item.value); | |||
ConfigName.getInstance().Post = Integer.parseInt(item.value); | |||
break; | |||
case 3: | |||
ConfigName.getInstance().ClientId=item.value; | |||
ConfigName.getInstance().ClientAutoKey = item.value; | |||
break; | |||
case 4: | |||
ConfigName.getInstance().DeviceId=item.value; | |||
ConfigName.getInstance().DeviceAutoKey = item.value; | |||
break; | |||
} | |||
@@ -133,38 +140,28 @@ public class ConfigData { | |||
/** | |||
* 切换环境 | |||
*/ | |||
public void ToggleEnvironment() | |||
{ | |||
if(ConfigName.getInstance().Environment.equals("开发环境")) | |||
{ | |||
ConfigName.getInstance().SaasAddress="https://bpa.black-pa.com:21527/"; | |||
ConfigName.getInstance().mqtt_userName="emqx_u_block"; | |||
ConfigName.getInstance().mqtt_passWord="emqx_p_admin8765490789"; | |||
ConfigName.getInstance().mqtt_ip="10.2.1.21"; | |||
ConfigName.getInstance().mqtt_post=1883; | |||
}else if(ConfigName.getInstance().Environment.equals("测试环境")) | |||
{ | |||
ConfigName.getInstance().SaasAddress="https://bpa.black-pa.com:21528/"; | |||
ConfigName.getInstance().mqtt_userName="emqx_u_block"; | |||
ConfigName.getInstance().mqtt_passWord="emqx_p_admin8456765490789"; | |||
ConfigName.getInstance().mqtt_ip="111.9.47.105"; | |||
ConfigName.getInstance().mqtt_post=18889; | |||
}else if(ConfigName.getInstance().Environment.equals("正式环境")) | |||
{ | |||
ConfigName.getInstance().SaasAddress="https://witt.black-pa.com/"; | |||
ConfigName.getInstance().mqtt_userName="emqx_u_block"; | |||
ConfigName.getInstance().mqtt_passWord="emqx_p_admin3658765490789"; | |||
ConfigName.getInstance().mqtt_ip="47.108.65.220"; | |||
ConfigName.getInstance().mqtt_post=1883; | |||
public void ToggleEnvironment() { | |||
if (ConfigName.getInstance().Environment.equals("开发环境")) { | |||
ConfigName.getInstance().SaasAddress = "https://bpa.black-pa.com:21527/"; | |||
ConfigName.getInstance().mqtt_userName = "emqx_u_block"; | |||
ConfigName.getInstance().mqtt_passWord = "emqx_p_admin8765490789"; | |||
ConfigName.getInstance().mqtt_ip = "10.2.1.21"; | |||
ConfigName.getInstance().mqtt_post = 1883; | |||
} else if (ConfigName.getInstance().Environment.equals("测试环境")) { | |||
ConfigName.getInstance().SaasAddress = "https://bpa.black-pa.com:21528/"; | |||
ConfigName.getInstance().mqtt_userName = "emqx_u_block"; | |||
ConfigName.getInstance().mqtt_passWord = "emqx_p_admin8456765490789"; | |||
ConfigName.getInstance().mqtt_ip = "111.9.47.105"; | |||
ConfigName.getInstance().mqtt_post = 18889; | |||
} else if (ConfigName.getInstance().Environment.equals("正式环境")) { | |||
ConfigName.getInstance().SaasAddress = "https://witt.black-pa.com/"; | |||
ConfigName.getInstance().mqtt_userName = "emqx_u_block"; | |||
ConfigName.getInstance().mqtt_passWord = "emqx_p_admin3658765490789"; | |||
ConfigName.getInstance().mqtt_ip = "47.108.65.220"; | |||
ConfigName.getInstance().mqtt_post = 1883; | |||
} | |||
} | |||
/** | |||
* 加载店铺配置 | |||
*/ | |||
public void LoadingDPPZ() { | |||
ConfigName.getInstance().Shop_Name="黑菠萝奶茶机"; | |||
ConfigName.getInstance().DeviceId="20020415-test"; | |||
} | |||
/** | |||
* 加载配置 | |||
*/ | |||
@@ -182,35 +179,220 @@ public class ConfigData { | |||
/** | |||
* 保存配置 | |||
*/ | |||
public void SavePZ() | |||
{ | |||
public void SavePZ() { | |||
//1.店铺配置 | |||
// ConfigUtil.write(ConfigName.getInstance().dishesCon,"Shop_Name", ConfigName.getInstance().Shop_Name); | |||
// ConfigUtil.write(ConfigName.getInstance().dishesCon,"AutKey", ConfigName.getInstance().AutKey); | |||
//2.用户信息 | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon,"username", ConfigName.getInstance().user.account); | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon,"password", ConfigName.getInstance().user.pass); | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon,"IsUserDownOrder", ConfigName.getInstance().IsUserDownOrder); | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon,"IsUserDownOrder", ConfigName.getInstance().IsUserDownOrder); | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon,"Version", ConfigName.getInstance().Version); | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon, "username", ConfigName.getInstance().user.account); | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon, "password", ConfigName.getInstance().user.pass); | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon, "IsUserDownOrder", ConfigName.getInstance().IsUserDownOrder); | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon, "IsUserDownOrder", ConfigName.getInstance().IsUserDownOrder); | |||
ConfigUtil.write(ConfigName.getInstance().dishesCon, "Version", ConfigName.getInstance().Version); | |||
} | |||
/** | |||
* 增加本地图片 | |||
* 获取组织信息 | |||
* | |||
* @param context | |||
*/ | |||
public void AddImage(Context context) | |||
public void GetOrganize(Context context) { | |||
if (NetworkUtils.isNetworkConnected(context)) { | |||
//获取店铺信息 | |||
OkGo.<ResAPI<OrganizeMode>>get(ConfigName.getInstance().SaasAddress + ConfigName.getInstance().GetStore + ConfigName.getInstance().ClientAutoKey) | |||
.tag(context) | |||
.execute(new JsonDialogCallback<ResAPI<OrganizeMode>>(context) { | |||
@Override | |||
public void onSuccess(Response<ResAPI<OrganizeMode>> response) { | |||
ResAPI<OrganizeMode> organize = response.body(); | |||
if (organize.isSuccess) { | |||
ConfigName.getInstance().organizeMode = organize.data; | |||
OkGo.<ResAPI<DeviceInformation>>get( | |||
String.format(ConfigName.getInstance().SaasAddress + ConfigName.getInstance().GetDeviceInformation, | |||
ConfigName.getInstance().organizeMode.id, ConfigName.getInstance().DeviceAutoKey)) | |||
.tag(context) | |||
.execute(new JsonDialogCallback<ResAPI<DeviceInformation>>(context) { | |||
@Override | |||
public void onSuccess(Response<ResAPI<DeviceInformation>> response) { | |||
ResAPI<DeviceInformation> deviceInformation = response.body(); | |||
if (deviceInformation.succeeded) { | |||
ConfigName.getInstance().deviceInformation = deviceInformation.data; | |||
if (ConfigName.getInstance().deviceInformation!=null) | |||
{ | |||
ConfigName.getInstance().DeviceId=ConfigName.getInstance().deviceInformation.id; | |||
} | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
/** | |||
* 同步云端数据 | |||
*/ | |||
public void SyncDataInTheCloud(Context context) | |||
{ | |||
//region 拉取物料数据 | |||
OkGo.<ResAPI<ResALLData>>get(String.format(ConfigName.getInstance().SaasAddress + ConfigName.getInstance().GetBaseDataModel, | |||
ConfigName.getInstance().organizeMode.id, ConfigName.getInstance().DeviceAutoKey)) | |||
.tag(context) | |||
.headers(new HttpHeaders("TenantId",ConfigName.getInstance().organizeMode.companyId)) | |||
.execute(new JsonDialogCallback<ResAPI<ResALLData>>(context) { | |||
@Override | |||
public void onSuccess(Response<ResAPI<ResALLData>> response) { | |||
ResAPI<ResALLData> allDataResAPI = response.body(); | |||
if (allDataResAPI.succeeded && allDataResAPI.data!=null) { | |||
BPA_CLOUDDATA data=new BPA_CLOUDDATA(); | |||
ArrayList<BPA_CLOUDDATA> arrayList= QueryDB.GetClouddataALL(); | |||
for (BPA_CLOUDDATA item:arrayList) | |||
{ | |||
QueryDB.DeleteClouddata(item); | |||
} | |||
if(allDataResAPI.data.batchingInfo!=null) | |||
{ | |||
data=new BPA_CLOUDDATA(); | |||
data.id=java.util.UUID.randomUUID().toString(); | |||
data.name="物料集合"; | |||
data.text=new Gson().toJson(allDataResAPI.data.batchingInfo); | |||
QueryDB.AddClouddata(data); | |||
} | |||
if(allDataResAPI.data.goodsTechnology!=null) | |||
{ | |||
data=new BPA_CLOUDDATA(); | |||
data.id=java.util.UUID.randomUUID().toString(); | |||
data.name="工艺模型"; | |||
data.text=new Gson().toJson(allDataResAPI.data.goodsTechnology); | |||
QueryDB.AddClouddata(data); | |||
} | |||
if(allDataResAPI.data.technologyAction!=null) | |||
{ | |||
data=new BPA_CLOUDDATA(); | |||
data.id=java.util.UUID.randomUUID().toString(); | |||
data.name="工艺模型详细信息"; | |||
data.text=new Gson().toJson(allDataResAPI.data.technologyAction); | |||
QueryDB.AddClouddata(data); | |||
} | |||
if(allDataResAPI.data.foodMenuInfo!=null) | |||
{ | |||
data=new BPA_CLOUDDATA(); | |||
data.id=java.util.UUID.randomUUID().toString(); | |||
data.name="菜谱信息"; | |||
data.text=new Gson().toJson(allDataResAPI.data.foodMenuInfo); | |||
QueryDB.AddClouddata(data); | |||
} | |||
if(allDataResAPI.data.goodsTypeInfo!=null) | |||
{ | |||
data=new BPA_CLOUDDATA(); | |||
data.id=java.util.UUID.randomUUID().toString(); | |||
data.name="商品小类"; | |||
data.text=new Gson().toJson(allDataResAPI.data.goodsTypeInfo); | |||
QueryDB.AddClouddata(data); | |||
} | |||
if(allDataResAPI.data.goodsParentTypeInfo!=null) | |||
{ | |||
data=new BPA_CLOUDDATA(); | |||
data.id=java.util.UUID.randomUUID().toString(); | |||
data.name="商品大类"; | |||
data.text=new Gson().toJson(allDataResAPI.data.goodsParentTypeInfo); | |||
QueryDB.AddClouddata(data); | |||
} | |||
if(allDataResAPI.data.goodsUintInfo!=null) | |||
{ | |||
data=new BPA_CLOUDDATA(); | |||
data.id=java.util.UUID.randomUUID().toString(); | |||
data.name="商品单位"; | |||
data.text=new Gson().toJson(allDataResAPI.data.goodsUintInfo); | |||
QueryDB.AddClouddata(data); | |||
} | |||
} | |||
} | |||
}); | |||
//endregion | |||
} | |||
/** | |||
* 获取所有商品信息 | |||
* @param context | |||
*/ | |||
public void GetGevGood(Context context) | |||
{ | |||
OkGo.<ResAPI<List<CloudGood>>>get(String.format(ConfigName.getInstance().SaasAddress + ConfigName.getInstance().GetGoods, | |||
ConfigName.getInstance().organizeMode.id, ConfigName.getInstance().DeviceId)) | |||
.tag(context) | |||
.headers(new HttpHeaders("TenantId",ConfigName.getInstance().organizeMode.companyId)) | |||
.execute(new JsonDialogCallback<ResAPI<List<CloudGood>>>(context) { | |||
@Override | |||
public void onSuccess(Response<ResAPI<List<CloudGood>>> response) { | |||
ResAPI<List<CloudGood>> allDataResAPI = response.body(); | |||
if (allDataResAPI.succeeded && allDataResAPI.data!=null) { | |||
} | |||
} | |||
}); | |||
} | |||
/** | |||
* 增加本地图片 | |||
*/ | |||
public void AddImage(Context context) { | |||
BitmapFactory.Options options = new BitmapFactory.Options(); | |||
options.inSampleSize=2;//宽高压缩为原来的1/2 | |||
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 localCacheUtils=new LocalCacheUtils(); | |||
localCacheUtils.setBitmapToLocal("image1.png",bitmap1); | |||
localCacheUtils.setBitmapToLocal("image2.png",bitmap2); | |||
localCacheUtils.setBitmapToLocal("image3.png",bitmap3); | |||
localCacheUtils.setBitmapToLocal("image4.png",bitmap4); | |||
options.inSampleSize = 2;//宽高压缩为原来的1/2 | |||
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 localCacheUtils = new LocalCacheUtils(); | |||
localCacheUtils.setBitmapToLocal("image1.png", bitmap1); | |||
localCacheUtils.setBitmapToLocal("image2.png", bitmap2); | |||
localCacheUtils.setBitmapToLocal("image3.png", bitmap3); | |||
localCacheUtils.setBitmapToLocal("image4.png", bitmap4); | |||
} | |||
/** | |||
* 还原PLC | |||
*/ | |||
public void RevertPLC() | |||
{ | |||
try | |||
{ | |||
ArrayList<BPA_PLCADDRESS> arrayList= QueryDB.GetPlcaddressALL(); | |||
for (BPA_PLCADDRESS item:arrayList) | |||
{ | |||
QueryDB.DeletePlcaddress(item); | |||
} | |||
int k=1; | |||
for (Map.Entry<String, String> entry : ConfigName.getInstance().PlcAddress_ys.entrySet()) { | |||
String key = entry.getKey(); | |||
String value = entry.getValue(); | |||
BPA_PLCADDRESS plc=new BPA_PLCADDRESS(); | |||
plc.name=key; | |||
plc.address=value; | |||
plc.sort=k; | |||
k++; | |||
QueryDB.AddPlcaddress(plc); | |||
} | |||
}catch (Exception ex) | |||
{ | |||
} | |||
} | |||
//endregion | |||
} | |||
@@ -54,7 +54,7 @@ public class ExecuteTheRecipe { | |||
if(!text.isEmpty()) | |||
{ | |||
//仓号 值 | |||
Map<Integer,Integer> formulation=new IdentityHashMap<>(); | |||
HashMap<Integer,Integer> formulation=new HashMap<>(); | |||
//region 获取仓号和值 | |||
List<String> data=new ArrayList<>(); | |||
if(text.contains("|")) | |||
@@ -3,6 +3,10 @@ package com.bonait.bnframework.common.constant; | |||
import android.content.Context; | |||
import com.bonait.bnframework.common.db.mode.BPA_USER; | |||
import com.bonait.bnframework.common.model.mode.DeviceInformation; | |||
import com.bonait.bnframework.common.model.mode.OrganizeMode; | |||
import java.util.HashMap; | |||
/** | |||
@@ -51,11 +55,15 @@ public class ConfigName { | |||
/** | |||
* 门店Id | |||
*/ | |||
public String ClientId="152"; | |||
public String ClientAutoKey="152"; | |||
/** | |||
* 店铺设备号 | |||
*/ | |||
public String DeviceId="146"; | |||
public String DeviceAutoKey="146"; | |||
/** | |||
* 设备id | |||
*/ | |||
public String DeviceId="29318217-838a-4572-982d-51773bef6249"; | |||
//endregion | |||
//region MQTT配置中心 | |||
@@ -96,6 +104,17 @@ public class ConfigName { | |||
public BPA_USER user=new BPA_USER(); | |||
//endregion | |||
//region 组织信息 | |||
/** | |||
* 组织信息 | |||
*/ | |||
public OrganizeMode organizeMode=null; | |||
/** | |||
* 设备信息 | |||
*/ | |||
public DeviceInformation deviceInformation=null; | |||
//endregion | |||
//region 版本信息 | |||
/** | |||
* 版本更新,当前版本 | |||
@@ -156,25 +175,241 @@ public class ConfigName { | |||
public int Post=502; | |||
//endregion | |||
/** | |||
* 是否单杯制作 | |||
*/ | |||
public boolean IsSingleCupMake=true; | |||
/** | |||
* 是否测试 | |||
*/ | |||
public boolean IsTest=true; | |||
//region URL | |||
//Sass地址 | |||
public String SaasAddress="http://order.test1.com"; | |||
//public String SaasAddress="https://bpa.black-pa.com:21527"; | |||
//public String SaasAddress="https://witt.black-pa.com"; | |||
//获取订单详情接口 Get | |||
public String GetOrder="order/order/fullorderbynumber/"; | |||
//POST | |||
public String OrderChange="order/order/robotstatuschange"; | |||
//获取店铺详细信息 Get | |||
public String GetStore="kitchen/api/StoreHelper/GetStoreInfoById?storeId="; | |||
//获取设备信息分页 Get | |||
public String GetDeviceInformation="kitchen/api/Device/GetDeviceInfo?storeId=%s&autoKey=%s"; | |||
//获取 获取基础信息(所有物料信息、设备工序模型、菜谱列表、商品小类、商品大类、单位数据 | |||
public String GetBaseDataModel="kitchen/api/CommInteface/GetBaseDataModel?storeId=%s&autoKey=%s"; | |||
//获取 商品 | |||
public String GetGoods="kitchen/api/CommInteface/GetDeviceGood?storeId=%s&deviceId=%s"; | |||
//获取商品配方信息 | |||
public String GetGoodsBom="kitchen/api/CommInteface/GetDeviceGoodBomTechnology?goodsId=%s"; | |||
//上传商品 | |||
public String UpdateGoods="kitchen/api/CommInteface/SendGoodsInfo"; | |||
//版本更新 | |||
public String UpdateVersion="http://111.9.47.105:18097/api/Version/GetLatest"; | |||
//endregion | |||
//region PLC地址配置 | |||
/** | |||
* PLC地址配置 | |||
*/ | |||
public HashMap<String,String> PlcAddress=new HashMap<String,String>(); | |||
public HashMap<String,String> PlcAddress_ys=new HashMap<String,String>(){ | |||
{ | |||
//搅拌模型 | |||
put("搅拌", "M1.0"); | |||
put("搅拌动作", "M1.0"); | |||
put("正转速度", "M1.0"); | |||
put("反转速度", "M1.0"); | |||
put("正转(秒)", "M1.0"); | |||
put("反转(秒)", "M1.0"); | |||
put("停止(秒)", "M1.0"); | |||
put("延迟(秒)", "M1.0"); | |||
//热油模型 | |||
put("热油", "M1.0"); | |||
put("加热功率", "M1.0"); | |||
put("热油(克)", "M1.0"); | |||
//主料模型 | |||
put("主料", "M1.0"); | |||
put("主料名称", "M1.0"); | |||
put("主料重量", "M1.0"); | |||
put("烹饪(秒)", "M1.0"); | |||
put("投料动作", "M1.0"); | |||
//加热模型 | |||
put("加热", "M1.0"); | |||
put("加热功率", "M1.0"); | |||
put("延迟(秒)", "M1.0"); | |||
//勾芡模型 | |||
put("勾芡", "M1.0"); | |||
put("勾芡(克)", "M1.0"); | |||
//出菜模型 | |||
put("出菜", "M1.0"); | |||
put("时间(秒)", "M1.0"); | |||
//热锅模型 | |||
put("热锅", "M1.0"); | |||
put("热锅功率", "M1.0"); | |||
//液体料模型 | |||
put("校准时间", "M1.0"); | |||
put("料仓1", "M1.0"); | |||
put("料仓2", "M1.0"); | |||
put("料仓3", "M1.0"); | |||
put("料仓4", "M1.0"); | |||
put("料仓5", "M1.0"); | |||
put("料仓6", "M1.0"); | |||
put("料仓7", "M1.0"); | |||
put("料仓8", "M1.0"); | |||
put("料仓9", "M1.0"); | |||
put("料仓10", "M1.0"); | |||
put("料仓1校准值", "M1.0"); | |||
put("料仓2校准值", "M1.0"); | |||
put("料仓3校准值", "M1.0"); | |||
put("料仓4校准值", "M1.0"); | |||
put("料仓5校准值", "M1.0"); | |||
put("料仓6校准值", "M1.0"); | |||
put("料仓7校准值", "M1.0"); | |||
put("料仓8校准值", "M1.0"); | |||
put("料仓9校准值", "M1.0"); | |||
put("料仓10校准值", "M1.0"); | |||
put("料仓1出料值", "M1.0"); | |||
put("料仓2出料值", "M1.0"); | |||
put("料仓3出料值", "M1.0"); | |||
put("料仓4出料值", "M1.0"); | |||
put("料仓5出料值", "M1.0"); | |||
put("料仓6出料值", "M1.0"); | |||
put("料仓7出料值", "M1.0"); | |||
put("料仓8出料值", "M1.0"); | |||
put("料仓9出料值", "M1.0"); | |||
put("料仓10出料值", "M1.0"); | |||
//火力选择 | |||
put("火力", "M1.0"); | |||
//清洗 | |||
put("清洗", "M1.0"); | |||
//锅位 | |||
put("锅位", "M1.0"); | |||
//摇芡 | |||
put("摇芡", "M1.0"); | |||
} | |||
}; | |||
//endregion | |||
} | |||
//配方信息 | |||
//{ | |||
// "statusCode": 200, | |||
// "data": { | |||
// "bomInfo": [ | |||
// { | |||
// "name": "爆炒肥肠", | |||
// "code": "10005", | |||
// "isMain": true, | |||
// "autoKey": 1099, | |||
// "bomInfo": null, | |||
// "sort": 2, | |||
// "groupId": "4cc8935c-9519-4a3c-a2fd-b49ca54f6f0d", | |||
// "status": 0, | |||
// "isDeleted": 0, | |||
// "deleteAt": null, | |||
// "deleteBy": null, | |||
// "updateAt": null, | |||
// "updateBy": null, | |||
// "createAt": "2023-07-10 16:11:41", | |||
// "createBy": "af27ebbd-5c1a-441f-8e26-cf6cc1352349", | |||
// "id": "5c4f80d9-13f3-4dcf-9cca-db4d37ffc9d0" | |||
// } | |||
// ], | |||
// "bomTechnologyActionInfo": [ | |||
// { | |||
// "stepName": "热油", | |||
// "actionJson": "[{\"TechnologyactionId\":\"a82d2621-7016-4240-b5d5-7d5e41fb4d22\",\"ActionName\":\"加热功率\",\"ActionValue\":\"三档\",\"BatchingId\":\"\"},{\"TechnologyactionId\":\"df17c307-8f15-4d20-b497-61caf5668270\",\"ActionName\":\"热油(克)\",\"ActionValue\":333,\"BatchingId\":\"\"}]", | |||
// "bomId": "5c4f80d9-13f3-4dcf-9cca-db4d37ffc9d0", | |||
// "isBatch": false, | |||
// "chnologyId": "f9ca0cff-ba94-4036-88f4-a5d05f8165e6", | |||
// "createAt": "2023-07-11 17:47:28", | |||
// "groupId": "4cc8935c-9519-4a3c-a2fd-b49ca54f6f0d", | |||
// "isDeleted": 0, | |||
// "sort": 6, | |||
// "id": "7c3a5fe9-f1c6-4578-b6a8-a09006740d69" | |||
// }, | |||
// { | |||
// "stepName": "液体料", | |||
// "actionJson": "[{\"TechnologyactionId\":\"10915b41-268e-4d04-b259-8e4c5f65bbda\",\"ActionName\":\"酱油\",\"ActionValue\":\"10\",\"BatchingId\":\"210f346d-8b79-4059-a991-b22391e5193f\"},{\"TechnologyactionId\":\"897bc239-ba70-4cde-bd99-c4bb14219b04\",\"ActionName\":\"盐水\",\"ActionValue\":\"20\",\"BatchingId\":\"33a529a3-de63-49c0-aed0-ea83e852050b\"}]", | |||
// "bomId": "5c4f80d9-13f3-4dcf-9cca-db4d37ffc9d0", | |||
// "isBatch": true, | |||
// "chnologyId": "315b149d-53bd-4fa0-9694-bf1d47ef9ba3", | |||
// "createAt": "2023-07-11 17:36:46", | |||
// "groupId": "4cc8935c-9519-4a3c-a2fd-b49ca54f6f0d", | |||
// "isDeleted": 0, | |||
// "sort": 5, | |||
// "id": "a9e95580-89ba-400c-a91f-53fefbabb627" | |||
// } | |||
// ] | |||
// }, | |||
// "succeeded": true, | |||
// "errors": null, | |||
// "extras": null, | |||
// "timestamp": 1689070602181 | |||
// } | |||
// | |||
//{ | |||
// "goodsInfo": { | |||
// "id": "string", | |||
// "isDeleted": 0, | |||
// "deleteAt": "2023-07-11T10:17:20.548Z", | |||
// "deleteBy": "string", | |||
// "updateAt": "2023-07-11T10:17:20.548Z", | |||
// "updateBy": "string", | |||
// "createAt": "2023-07-11T10:17:20.548Z", | |||
// "createBy": "string", | |||
// "status": 0, | |||
// "groupId": "string", | |||
// "goods_Name": "string", | |||
// "goods_TypeID": "string", | |||
// "goods_Descritption": "string", | |||
// "goods_ImgUrl": "string", | |||
// "goods_ImgMode": 0, | |||
// "goods_Sort": 0, | |||
// "goods_Enable": 0, | |||
// "deleteUpdateTime": "2023-07-11T10:17:20.548Z", | |||
// "key": "string", | |||
// "code": "string", | |||
// "price": 0, | |||
// "tasteID": "string", | |||
// "parentTypeID": "string", | |||
// "vipPrice": 0, | |||
// "goodsAttribute": 0, | |||
// "goodsUintId": "string", | |||
// "isWeigh": true, | |||
// "autoKey": 0 | |||
// }, | |||
// "bomInfo": { | |||
// "bomType": "string", | |||
// "name": "string", | |||
// "code": "string", | |||
// "isMain": true, | |||
// "autoKey": 0, | |||
// "bomInfo": "string", | |||
// "sort": 0 | |||
// }, | |||
// "bomTechnologyActionInfo": [ | |||
// { | |||
// "id": "string", | |||
// "stepName": "string", | |||
// "actionJson": "string", | |||
// "bomId": "string", | |||
// "isBatch": true, | |||
// "chnologyId": "string", | |||
// "createAt": "2023-07-11T10:17:20.548Z", | |||
// "groupId": "string", | |||
// "isDeleted": 0, | |||
// "sort": 0 | |||
// } | |||
// ], | |||
// "foodMenuId": "string", | |||
// "storeId": "string" | |||
// } |
@@ -7,6 +7,7 @@ import android.util.Log; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.file.DBHelper; | |||
import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA; | |||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||
import com.bonait.bnframework.common.db.file.DBHelper; | |||
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; | |||
@@ -21,6 +22,7 @@ import com.bonait.bnframework.common.db.mode.BPA_MENUANDUSER; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDERLOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDERLOGDESC; | |||
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; | |||
import com.bonait.bnframework.common.db.mode.BPA_PROCESS; | |||
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel; | |||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||
@@ -2274,6 +2276,145 @@ public class QueryDB { | |||
} | |||
//endregion | |||
//region BPA_CLOUDDATA 云端数据表 | |||
/** | |||
* 新增工序模型表 | |||
* add fengyoufu 20230413 | |||
* | |||
* @param data 工序数据 | |||
* @return 是否成功 | |||
*/ | |||
public static boolean AddClouddata(BPA_CLOUDDATA data) { | |||
return Add(BPA_CLOUDDATA.class, data); | |||
} | |||
/** | |||
* 修改工序模型表 | |||
* add fengyoufu 20230413 | |||
* | |||
* @param data | |||
*/ | |||
public static void UpdateClouddata(BPA_CLOUDDATA data) { | |||
Update(BPA_CLOUDDATA.class, data); | |||
} | |||
/** | |||
* 删除工序模型表 | |||
* add fengyoufu 20230413 | |||
* | |||
* @param data 工序数据 | |||
* @return 是否成功 | |||
*/ | |||
public static boolean DeleteClouddata(BPA_CLOUDDATA data) { | |||
return Delete(BPA_CLOUDDATA.class, data.id); | |||
} | |||
/** | |||
* 获取所有工序模型表 | |||
* | |||
* @return | |||
*/ | |||
public static ArrayList<BPA_CLOUDDATA> GetClouddataALL() { | |||
String orderby = Desc_Time_Up;//出料顺序 | |||
String where = "isDelete=?"; | |||
String[] args = new String[]{"0"}; | |||
ArrayList<BPA_CLOUDDATA> data = new ArrayList<>(); | |||
ArrayList<Object> obj = Get(BPA_CLOUDDATA.class, where, args, orderby); | |||
for (Object k : obj) { | |||
data.add((BPA_CLOUDDATA) k); | |||
} | |||
return data; | |||
} | |||
//endregion | |||
//region BPA_PLCADDRESS PLC地址管理表 | |||
/** | |||
* 新增工序模型表 | |||
* add fengyoufu 20230413 | |||
* | |||
* @param data 工序数据 | |||
* @return 是否成功 | |||
*/ | |||
public static boolean AddPlcaddress(BPA_PLCADDRESS data) { | |||
return Add(BPA_PLCADDRESS.class, data); | |||
} | |||
/** | |||
* 修改工序模型表 | |||
* add fengyoufu 20230413 | |||
* | |||
* @param data | |||
*/ | |||
public static void UpdatePlcaddress(BPA_PLCADDRESS data) { | |||
Update(BPA_PLCADDRESS.class, data); | |||
} | |||
/** | |||
* 删除工序模型表 | |||
* add fengyoufu 20230413 | |||
* | |||
* @param data 工序数据 | |||
* @return 是否成功 | |||
*/ | |||
public static boolean DeletePlcaddress(BPA_PLCADDRESS data) { | |||
return Delete(BPA_PLCADDRESS.class, data.id); | |||
} | |||
/** | |||
* 获取所有工序模型表 | |||
* | |||
* @return | |||
*/ | |||
public static ArrayList<BPA_PLCADDRESS> GetPlcaddressALL() { | |||
String orderby = Desc_Sort_Up + ',' +Desc_Time_Up;//出料顺序 | |||
String where = "isDelete=?"; | |||
String[] args = new String[]{"0"}; | |||
ArrayList<BPA_PLCADDRESS> data = new ArrayList<>(); | |||
ArrayList<Object> obj = Get(BPA_PLCADDRESS.class, where, args, orderby); | |||
for (Object k : obj) { | |||
data.add((BPA_PLCADDRESS) k); | |||
} | |||
return data; | |||
} | |||
/** | |||
* ID查询工序模型表 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
public static BPA_PLCADDRESS GetPlcaddressID(String id) { | |||
try { | |||
BPA_PLCADDRESS bpa_material = null; | |||
boolean isSucess = false; | |||
String orderby = Desc_Time_Up;//出料顺序 | |||
String where = "isDelete=? and id=?"; | |||
String[] args = new String[]{"0", id}; | |||
ArrayList<BPA_PLCADDRESS> data = new ArrayList<>(); | |||
ArrayList<Object> obj = Get(BPA_PLCADDRESS.class, where, args, orderby); | |||
for (Object k : obj) { | |||
bpa_material = (BPA_PLCADDRESS) k; | |||
} | |||
return bpa_material; | |||
} catch (Exception e) { | |||
return null; | |||
} | |||
} | |||
/** | |||
* 修改地址 | |||
*/ | |||
public static void UpdatePlcaddressText(String id, String address) { | |||
BPA_PLCADDRESS material = GetPlcaddressID(id); | |||
if (material != null) { | |||
material.address = address; | |||
Update(BPA_PLCADDRESS.class, material); | |||
} | |||
} | |||
//endregion | |||
//region 私有 | |||
/** | |||
@@ -2631,6 +2772,19 @@ public class QueryDB { | |||
((BPA_PROCESSModel) data).data = cursor.getString((int) cursor.getColumnIndex("data")); | |||
((BPA_PROCESSModel) data).sort = cursor.getInt((int) cursor.getColumnIndex("sort")); | |||
break; | |||
case "BPA_CLOUDDATA": | |||
data = new BPA_CLOUDDATA(); | |||
//私有 | |||
((BPA_CLOUDDATA) data).name = cursor.getString((int) cursor.getColumnIndex("name")); | |||
((BPA_CLOUDDATA) data).text = cursor.getString((int) cursor.getColumnIndex("text")); | |||
break; | |||
case "BPA_PLCADDRESS": | |||
data = new BPA_PLCADDRESS(); | |||
//私有 | |||
((BPA_PLCADDRESS) data).name = cursor.getString((int) cursor.getColumnIndex("name")); | |||
((BPA_PLCADDRESS) data).address = cursor.getString((int) cursor.getColumnIndex("address")); | |||
((BPA_PLCADDRESS) data).sort = cursor.getInt((int) cursor.getColumnIndex("sort")); | |||
break; | |||
} | |||
((ModeBase) data).id = cursor.getString((int) cursor.getColumnIndex("id")); | |||
((ModeBase) data).createTime = cursor.getString((int) cursor.getColumnIndex("createTime")); | |||
@@ -5,6 +5,7 @@ import android.database.sqlite.SQLiteDatabase; | |||
import android.database.sqlite.SQLiteOpenHelper; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA; | |||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_CRAFT; | |||
@@ -18,6 +19,7 @@ import com.bonait.bnframework.common.db.mode.BPA_MENUANDUSER; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDERLOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDERLOGDESC; | |||
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; | |||
import com.bonait.bnframework.common.db.mode.BPA_PROCESS; | |||
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel; | |||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||
@@ -119,6 +121,10 @@ public class DBHelper extends SQLiteOpenHelper { | |||
CreateTablesAll(BPA_PROCESS.class,null);//工序表 | |||
CreateTablesAll(BPA_PROCESSModel.class,null);//工序模型表 | |||
CreateTablesAll(BPA_CLOUDDATA.class,null);//云端表 | |||
CreateTablesAll(BPA_PLCADDRESS.class,null);//工序模型表 | |||
ForeignKeys(); | |||
} | |||
/** | |||
@@ -217,7 +223,13 @@ public class DBHelper extends SQLiteOpenHelper { | |||
} | |||
tables.add(t); | |||
for (Table table : tables) { | |||
db.execSQL(table.deleteSql()); | |||
try | |||
{ | |||
db.execSQL(table.deleteSql()); | |||
}catch (Exception ex) | |||
{ | |||
} | |||
db.execSQL(table.createSQL(premarykey)); | |||
} | |||
db.setTransactionSuccessful(); | |||
@@ -0,0 +1,9 @@ | |||
package com.bonait.bnframework.common.db.mode; | |||
/** | |||
* 云端数据表 | |||
*/ | |||
public class BPA_CLOUDDATA extends ModeBase{ | |||
public String name;//名称 | |||
public String text;//数据 | |||
} |
@@ -0,0 +1,11 @@ | |||
package com.bonait.bnframework.common.db.mode; | |||
/** | |||
* PLC地址管理 | |||
*/ | |||
public class BPA_PLCADDRESS extends ModeBase{ | |||
public String name; | |||
public String address; | |||
public int sort; | |||
} |
@@ -4,10 +4,10 @@ import android.text.TextUtils; | |||
import com.bonait.bnframework.common.http.GsonConvert; | |||
import com.bonait.bnframework.common.http.exception.TokenException; | |||
import com.bonait.bnframework.common.model.BaseCodeJson; | |||
import com.bonait.bnframework.common.model.BaseJson; | |||
import com.bonait.bnframework.common.model.SimpleBaseJson; | |||
import com.bonait.bnframework.common.model.SimpleCodeJson; | |||
import com.bonait.bnframework.common.model.mode.BaseCodeJson; | |||
import com.bonait.bnframework.common.model.mode.BaseJson; | |||
import com.bonait.bnframework.common.model.mode.SimpleBaseJson; | |||
import com.bonait.bnframework.common.model.mode.SimpleCodeJson; | |||
import com.google.gson.stream.JsonReader; | |||
import com.lzy.okgo.convert.Converter; | |||
@@ -0,0 +1,7 @@ | |||
package com.bonait.bnframework.common.model; | |||
public class PageAPI<T> { | |||
public int total; | |||
public T data; | |||
} |
@@ -0,0 +1,9 @@ | |||
package com.bonait.bnframework.common.model; | |||
import java.util.List; | |||
public class PageListAPI<T> { | |||
public int total; | |||
public List<T> data; | |||
} |
@@ -0,0 +1,7 @@ | |||
package com.bonait.bnframework.common.model; | |||
public class ResAPI<T> { | |||
public boolean succeeded; | |||
public boolean isSuccess; | |||
public T data; | |||
} |
@@ -0,0 +1,10 @@ | |||
package com.bonait.bnframework.common.model; | |||
import java.util.List; | |||
public class ResListAPI<T> { | |||
public boolean isSuccess; | |||
public boolean succeeded; | |||
public List<T> data; | |||
} |
@@ -0,0 +1,12 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 枚举 | |||
*/ | |||
public enum ActionTypeEnum { | |||
text, | |||
select, | |||
textarea, | |||
digit, | |||
_switch, | |||
} |
@@ -1,4 +1,4 @@ | |||
package com.bonait.bnframework.common.model; | |||
package com.bonait.bnframework.common.model.mode; | |||
import com.google.gson.annotations.SerializedName; | |||
@@ -1,4 +1,4 @@ | |||
package com.bonait.bnframework.common.model; | |||
package com.bonait.bnframework.common.model.mode; | |||
import com.google.gson.annotations.SerializedName; | |||
@@ -0,0 +1,24 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 物料数据 | |||
*/ | |||
public class BatchingInfo { | |||
public String code; | |||
public int aittribute; | |||
public String batching_Name; | |||
public String batching_Type; | |||
public String typeID; | |||
public String stockUint; | |||
public String specs; | |||
public int price; | |||
public int netrecovery; | |||
public String outstockUint; | |||
public int proportion; | |||
public int autoKey; | |||
public String groupId; | |||
public int status; | |||
public int isDeleted; | |||
public String createAt; | |||
public String id; | |||
} |
@@ -0,0 +1,25 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 云端商品 | |||
*/ | |||
public class CloudGood { | |||
public String goods_Name; | |||
public String goods_TypeID; | |||
public String goods_ImgUrl; | |||
public int goods_Sort; | |||
public String code; | |||
public double price; | |||
public String tasteID; | |||
public String parentTypeID; | |||
public double vipPrice; | |||
public String goodsUintId; | |||
public boolean isWeigh; | |||
public int autoKey; | |||
public String groupId; | |||
public int status; | |||
public int isDeleted; | |||
public String createAt; | |||
public String id; | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
public class DeviceInformation { | |||
public String id; | |||
public String deviceName;//设备名称 | |||
public String deviceAddr;//设备地址 | |||
public String deviceLoc;//设备位置 | |||
public String deviceTypeId; | |||
public String orgId;//门店id | |||
public String deviceTypeKey;//MORKT | |||
public int autoKey;//设备KEY | |||
public int orgKey;//组织key | |||
} |
@@ -0,0 +1,6 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
public class DicModel { | |||
public String id; | |||
public String name; | |||
} |
@@ -0,0 +1,15 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 菜谱信息 | |||
*/ | |||
public class FoodMenuInfo { | |||
public String code; | |||
public String name; | |||
public int sort; | |||
public String groupId; | |||
public int status; | |||
public int isDeleted; | |||
public String createAt; | |||
public String id; | |||
} |
@@ -0,0 +1,14 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 商品大类 | |||
*/ | |||
public class GoodsParentTypeInfo { | |||
public String name; | |||
public int sort; | |||
public String groupId; | |||
public int status; | |||
public int isDeleted; | |||
public String createAt; | |||
public String id; | |||
} |
@@ -0,0 +1,13 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 工艺模型信息 | |||
*/ | |||
public class GoodsTechnology { | |||
public String name; | |||
public int status; | |||
public String createAt; | |||
public String groupId; | |||
public int isDeleted; | |||
public String id; | |||
} |
@@ -0,0 +1,14 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 商品小类 | |||
*/ | |||
public class GoodsTypeInfo { | |||
public String goodsType_Name; | |||
public int goodsType_Sort; | |||
public String groupId; | |||
public int status; | |||
public int isDeleted; | |||
public String createAt; | |||
public String id; | |||
} |
@@ -0,0 +1,11 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
public class GoodsUintInfo { | |||
public String goodsType_Name; | |||
public String remark; | |||
public String groupId; | |||
public int status; | |||
public int isDeleted; | |||
public String createAt; | |||
public String id; | |||
} |
@@ -0,0 +1,14 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 分页请求 | |||
*/ | |||
public class InPage { | |||
public int current; | |||
public int pageSize; | |||
public InPage() | |||
{ | |||
current=1; | |||
pageSize=9999; | |||
} | |||
} |
@@ -0,0 +1,10 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
public class InputDev { | |||
public String deviceId; | |||
public InputDev(String _devid) | |||
{ | |||
this.deviceId=_devid; | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 组织Mode | |||
*/ | |||
public class OrganizeMode { | |||
public String id;// 门店编号 | |||
public String store_Name;// 名称 | |||
public String store_Addr;// 地址 | |||
public String logo;// logo | |||
public String store_Loc;//位置 | |||
public int sort;//排序 | |||
public int autoKey;//排序 | |||
public String companyId;//组织id | |||
public String tel;//电话 | |||
public String wechatAppId;//微信id | |||
} |
@@ -0,0 +1,37 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
import java.util.List; | |||
/** | |||
* 所有物料信息 获取基础信息(所有物料信息、设备工序模型、菜谱列表、商品小类、商品大类、单位数据) | |||
*/ | |||
public class ResALLData { | |||
/** | |||
* 物料集合 | |||
*/ | |||
public List<BatchingInfo> batchingInfo; | |||
/** | |||
* 工艺模型 | |||
*/ | |||
public List<GoodsTechnology> goodsTechnology; | |||
/** | |||
* 工艺模型详细信息 | |||
*/ | |||
public List<TechnologyAction> technologyAction; | |||
/** | |||
* 菜谱信息 | |||
*/ | |||
public List<FoodMenuInfo> foodMenuInfo; | |||
/** | |||
* 商品小类 | |||
*/ | |||
public List<GoodsTypeInfo> goodsTypeInfo; | |||
/** | |||
* 商品大类 | |||
*/ | |||
public List<GoodsParentTypeInfo> goodsParentTypeInfo; | |||
/** | |||
* 商品单位 | |||
*/ | |||
public List<GoodsUintInfo> goodsUintInfo; | |||
} |
@@ -1,4 +1,4 @@ | |||
package com.bonait.bnframework.common.model; | |||
package com.bonait.bnframework.common.model.mode; | |||
import com.google.gson.annotations.SerializedName; | |||
@@ -1,4 +1,4 @@ | |||
package com.bonait.bnframework.common.model; | |||
package com.bonait.bnframework.common.model.mode; | |||
import com.google.gson.annotations.SerializedName; | |||
@@ -0,0 +1,16 @@ | |||
package com.bonait.bnframework.common.model.mode; | |||
/** | |||
* 工艺模型详细信息 | |||
*/ | |||
public class TechnologyAction { | |||
public String goodstechnologyId;//模型id | |||
public String actionName;//搅拌动作 | |||
public String actionType;//动作类型 | |||
public String actionValue;//"[{\"actionValueName\":\"正转反转\"},{\"actionValueName\":\"一直正转\"},{\"actionValueName\":\"一直反转\"}] | |||
public int sort; | |||
public int isDeleted; | |||
public String groupId; | |||
public String createAt; | |||
public String id; | |||
} |
@@ -4,19 +4,42 @@ import android.content.Context; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
import androidx.recyclerview.widget.RecyclerView; | |||
import android.net.Uri; | |||
import android.os.Bundle; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.widget.EditText; | |||
import android.widget.ImageView; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.image.MyBitmapUtils; | |||
import com.orhanobut.logger.Logger; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
public class SystemDeviceinFragment extends BaseFragment { | |||
@BindView(R.id.edittext1) | |||
EditText edittext1; | |||
@BindView(R.id.edittext2) | |||
EditText edittext2; | |||
@BindView(R.id.edittext3) | |||
EditText edittext3; | |||
@BindView(R.id.edittext4) | |||
EditText edittext4; | |||
@BindView(R.id.edittext5) | |||
EditText edittext5; | |||
@BindView(R.id.edittext6) | |||
EditText edittext6; | |||
@BindView(R.id.edittext7) | |||
EditText edittext7; | |||
@BindView(R.id.image) | |||
ImageView image; | |||
private Context context; | |||
@Override | |||
protected View onCreateView() { | |||
@@ -30,8 +53,30 @@ public class SystemDeviceinFragment extends BaseFragment { | |||
super.onViewCreated(view, savedInstanceState); | |||
Logger.d("我的fragment创建"); | |||
context = getContext(); | |||
initdata(); | |||
} | |||
/** | |||
* 初始化数据 | |||
*/ | |||
public void initdata() | |||
{ | |||
if(ConfigName.getInstance().organizeMode !=null && ConfigName.getInstance().deviceInformation!=null) | |||
{ | |||
edittext1.setText(ConfigName.getInstance().deviceInformation.id); | |||
edittext2.setText(ConfigName.getInstance().deviceInformation.deviceName); | |||
edittext3.setText(ConfigName.getInstance().deviceInformation.deviceLoc); | |||
edittext4.setText(ConfigName.getInstance().organizeMode.tel); | |||
edittext5.setText(ConfigName.getInstance().deviceInformation.deviceAddr); | |||
edittext6.setText(ConfigName.getInstance().organizeMode.id); | |||
edittext7.setText(ConfigName.getInstance().organizeMode.store_Name); | |||
if(ConfigName.getInstance().organizeMode.logo!=null) | |||
{ | |||
new MyBitmapUtils().disPlay(image,ConfigName.getInstance().organizeMode.logo); | |||
} | |||
} | |||
} | |||
@Override | |||
public void onDestroy() { | |||
super.onDestroy(); | |||
@@ -3,48 +3,35 @@ package com.bonait.bnframework.modules.home.fragment.from.fragment; | |||
import android.content.Context; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
import android.content.DialogInterface; | |||
import android.os.Bundle; | |||
import android.text.InputType; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.widget.AdapterView; | |||
import android.widget.ArrayAdapter; | |||
import android.widget.Button; | |||
import android.widget.EditText; | |||
import android.widget.ListView; | |||
import android.widget.Spinner; | |||
import android.widget.TextView; | |||
import com.bin.david.form.core.SmartTable; | |||
import com.bin.david.form.data.column.ColumnInfo; | |||
import com.bin.david.form.listener.OnColumnClickListener; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.business.ConfigData; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.constant.DataBus; | |||
import com.bonait.bnframework.common.constant.MessageName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||
import com.bonait.bnframework.common.db.mode.BPA_PROCESS; | |||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||
import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL; | |||
import com.bonait.bnframework.common.db.res.lcMode; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
import com.bonait.bnframework.common.message.MessageManager; | |||
import com.bonait.bnframework.common.utils.NetworkUtils; | |||
import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.modules.home.adapter.lc_adapter; | |||
import com.bonait.bnframework.modules.home.adapter.lcsz_adapter; | |||
import com.bonait.bnframework.modules.home.adapter.process_adapter; | |||
import com.bonait.bnframework.modules.home.adapter.wl_adapter; | |||
import com.bonait.bnframework.modules.home.fragment.from.CpActivity; | |||
import com.bonait.bnframework.modules.home.fragment.from.DiyActivity; | |||
import com.bonait.bnframework.modules.home.fragment.from.SzActivity; | |||
import com.bonait.bnframework.modules.home.fragment.from.WhActivity; | |||
import com.orhanobut.logger.Logger; | |||
import com.qmuiteam.qmui.widget.QMUITopBar; | |||
import com.qmuiteam.qmui.widget.dialog.QMUIDialog; | |||
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; | |||
@@ -110,7 +97,7 @@ public class SystemSeasoningsetFragment extends BaseFragment implements MyClickL | |||
Initdata_gx(); | |||
} | |||
@OnClick({R.id.add_wl}) | |||
@OnClick({R.id.add_wl,R.id.synchronous}) | |||
public void onViewClicked(View view) { | |||
switch (view.getId()) { | |||
case R.id.add_wl://增加物料 | |||
@@ -138,6 +125,44 @@ public class SystemSeasoningsetFragment extends BaseFragment implements MyClickL | |||
ToastUtils.info("新增成功"); | |||
Initdata_wl(); | |||
break; | |||
case R.id.synchronous://同步云端 | |||
if(NetworkUtils.isNetworkConnected(context)) | |||
{ | |||
final QMUIDialog.EditTextDialogBuilder builder = new QMUIDialog.EditTextDialogBuilder(context); | |||
builder.setTitle("密码确认") | |||
.setPlaceholder("在此输入权限密码") | |||
.setInputType(InputType.TYPE_CLASS_TEXT) | |||
.addAction("取消", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
dialog.dismiss(); | |||
} | |||
}) | |||
.addAction("确定", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
CharSequence text = builder.getEditText().getText(); | |||
if (text != null && text.length() > 0) { | |||
if(text.toString().equals(ConfigName.getInstance().user.pass)) | |||
{ | |||
ConfigData.getInstance().SyncDataInTheCloud(context); | |||
dialog.dismiss(); | |||
}else | |||
{ | |||
ToastUtils.info("权限密码不正确!"); | |||
} | |||
} else { | |||
ToastUtils.info("权限密码不正确!"); | |||
} | |||
} | |||
}) | |||
.show(); | |||
}else | |||
{ | |||
ToastUtils.warning("无网络,请先连接网络!!!"); | |||
} | |||
break; | |||
} | |||
} | |||
@@ -113,11 +113,11 @@ public class SystemSystemsetFragment extends BaseFragment { | |||
edittext2.setText(item.value); | |||
break; | |||
case 3: | |||
ConfigName.getInstance().ClientId=item.value; | |||
ConfigName.getInstance().ClientAutoKey=item.value; | |||
edittext3.setText(item.value); | |||
break; | |||
case 4: | |||
ConfigName.getInstance().DeviceId=item.value; | |||
ConfigName.getInstance().DeviceAutoKey=item.value; | |||
edittext4.setText(item.value); | |||
break; | |||
} | |||
@@ -130,8 +130,8 @@ public class SystemSystemsetFragment extends BaseFragment { | |||
case R.id.StartButton://保存按钮 | |||
ConfigName.getInstance().Address=edittext1.getText().toString(); | |||
ConfigName.getInstance().Post=Integer.parseInt(edittext2.getText().toString()); | |||
ConfigName.getInstance().ClientId=edittext3.getText().toString(); | |||
ConfigName.getInstance().DeviceId=edittext4.getText().toString(); | |||
ConfigName.getInstance().ClientAutoKey=edittext3.getText().toString(); | |||
ConfigName.getInstance().DeviceAutoKey=edittext4.getText().toString(); | |||
ConfigName.getInstance().Environment=environment.getSelectedItem().toString(); | |||
for (BPA_SYSTEMSET item:bpa_systemsets) | |||
@@ -108,6 +108,15 @@ public class LoginActivity extends BaseActivity implements Validator.ValidationL | |||
initUser(); | |||
initEvent(); | |||
initData(); | |||
} | |||
/** | |||
* 设置 | |||
*/ | |||
public void initData() | |||
{ | |||
ConfigData.getInstance().GetOrganize(this); | |||
} | |||
@OnClick({R.id.iv_clean_account, R.id.clean_password, R.id.iv_show_pwd,R.id.forget_password, R.id.btn_login}) | |||
@@ -13,7 +13,7 @@ import com.bonait.bnframework.common.constant.Constants; | |||
import com.bonait.bnframework.common.http.callback.files.FileProgressDialogCallBack; | |||
import com.bonait.bnframework.common.http.callback.files2.FileProgressDialogCallBack2; | |||
import com.bonait.bnframework.common.http.callback.json.JsonDialogCallback; | |||
import com.bonait.bnframework.common.model.BaseCodeJson; | |||
import com.bonait.bnframework.common.model.mode.BaseCodeJson; | |||
import com.bonait.bnframework.common.utils.AppUtils; | |||
import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.modules.welcome.model.AppLoginPo; | |||
@@ -5,15 +5,236 @@ | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
tools:context=".modules.home.fragment.from.fragment.SystemDeviceinFragment"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical" | |||
android:background="@color/main_background"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:background="@color/main_background" | |||
android:orientation="vertical"> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:text="这里是系统设置的设备信息"/> | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:layout_marginRight="@dimen/dp_10"> | |||
<TableLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_centerHorizontal="true"> | |||
<!-- Table1--> | |||
<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="设备编号:" /> | |||
<EditText | |||
android:id="@+id/edittext1" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="5dp" | |||
android:layout_weight="1" | |||
android:background="@drawable/input_bj" | |||
android:hint="" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
</TableRow> | |||
<!-- Table1--> | |||
<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:layout_marginLeft="@dimen/dp_10" | |||
android:gravity="right" | |||
android:text="设备名称:" /> | |||
<EditText | |||
android:id="@+id/edittext2" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="5dp" | |||
android:layout_weight="1" | |||
android:background="@drawable/input_bj" | |||
android:hint="" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
</TableRow> | |||
<!-- Table1--> | |||
<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="设备位置:" /> | |||
<EditText | |||
android:id="@+id/edittext3" | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="5dp" | |||
android:layout_weight="1" | |||
android:background="@drawable/input_bj" | |||
android:hint="" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
</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:layout_marginLeft="@dimen/dp_10" | |||
android:gravity="right" | |||
android:text="联系电话:" /> | |||
<EditText | |||
android:id="@+id/edittext4" | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="5dp" | |||
android:layout_weight="1" | |||
android:background="@drawable/input_bj" | |||
android:hint="" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
</TableRow> | |||
<!-- Table1--> | |||
<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="设备详细地址:" /> | |||
<EditText | |||
android:id="@+id/edittext5" | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="5dp" | |||
android:layout_weight="1" | |||
android:background="@drawable/input_bj" | |||
android:hint="" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
</TableRow> | |||
<!-- Table1--> | |||
<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="门店编号:" /> | |||
<EditText | |||
android:id="@+id/edittext6" | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="5dp" | |||
android:layout_weight="1" | |||
android:background="@drawable/input_bj" | |||
android:hint="" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
</TableRow> | |||
<!-- Table1--> | |||
<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="门店名称:" /> | |||
<EditText | |||
android:id="@+id/edittext7" | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="5dp" | |||
android:layout_weight="1" | |||
android:background="@drawable/input_bj" | |||
android:hint="" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
</TableRow> | |||
<!-- Table1--> | |||
<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="门店LOGO:" /> | |||
<ImageView | |||
android:id="@+id/image" | |||
android:layout_width="120dp" | |||
android:layout_height="120dp" | |||
android:layout_marginLeft="5dp" | |||
android:src="@mipmap/loading3" /> | |||
</TableRow> | |||
</TableLayout> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -81,21 +81,37 @@ | |||
android:layout_centerVertical="true" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<Button | |||
android:id="@+id/add_wl" | |||
android:layout_width="80dp" | |||
android:layout_height="26dp" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginRight="100dp" | |||
android:layout_centerInParent="true" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:background="@drawable/button1" | |||
android:text="增加" | |||
android:textSize="14dp" /> | |||
<Button | |||
android:id="@+id/synchronous" | |||
android:layout_width="80dp" | |||
android:layout_height="26dp" | |||
android:layout_alignParentRight="true" | |||
android:layout_centerInParent="true" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:background="@drawable/button1" | |||
android:text="同步云端" | |||
android:textSize="14dp" /> | |||
</RelativeLayout> | |||
<Button | |||
android:id="@+id/add_wl" | |||
android:layout_width="60dp" | |||
android:layout_height="26dp" | |||
android:layout_alignParentRight="true" | |||
android:layout_centerInParent="true" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:background="@drawable/button1" | |||
android:text="增加" | |||
android:textSize="14dp" /> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||