# Conflicts: # build.gradle上海闵中
@@ -52,10 +52,8 @@ import com.bonait.bnframework.common.model.mode.UpdateBomInfo; | |||||
import com.bonait.bnframework.common.model.mode.UpdateCloudGood; | import com.bonait.bnframework.common.model.mode.UpdateCloudGood; | ||||
import com.bonait.bnframework.common.oss.OssHelper; | import com.bonait.bnframework.common.oss.OssHelper; | ||||
import com.bonait.bnframework.common.utils.NetworkUtils; | import com.bonait.bnframework.common.utils.NetworkUtils; | ||||
import com.bonait.bnframework.common.utils.PreferenceUtils; | |||||
import com.bonait.bnframework.common.utils.ToastUtils; | import com.bonait.bnframework.common.utils.ToastUtils; | ||||
import com.bonait.bnframework.common.view.GoodEditDialog; | import com.bonait.bnframework.common.view.GoodEditDialog; | ||||
import com.bonait.bnframework.newui.http.UpdateAllDataService; | |||||
import com.bonait.bnframework.newui.http.UpdateDataService; | import com.bonait.bnframework.newui.http.UpdateDataService; | ||||
import com.google.gson.Gson; | import com.google.gson.Gson; | ||||
import com.lzy.okgo.OkGo; | import com.lzy.okgo.OkGo; | ||||
@@ -123,6 +121,10 @@ public class ConfigData { | |||||
if(systemset.type==-203){ | if(systemset.type==-203){ | ||||
ConfigName.getInstance().Key = systemset.value; | ConfigName.getInstance().Key = systemset.value; | ||||
UpdateDataService.key = systemset.value; | UpdateDataService.key = systemset.value; | ||||
}else if(systemset.type==-100){ | |||||
ConfigName.getInstance().versionSelectionEnum = systemset.value; | |||||
}else if(systemset.type==-101){ | |||||
ConfigName.getInstance().DeviceAutoKey = systemset.value; | |||||
} | } | ||||
} | } | ||||
// for(BPA_SYSTEMSET item:bpa_systemsets) | // for(BPA_SYSTEMSET item:bpa_systemsets) | ||||
@@ -16,7 +16,6 @@ import com.bonait.bnframework.HBL.Interface.IRunT; | |||||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | import com.bonait.bnframework.HBL.Thread.ThreadManager; | ||||
import com.bonait.bnframework.Model.CheckPositionBean; | import com.bonait.bnframework.Model.CheckPositionBean; | ||||
import com.bonait.bnframework.Model.MyStatus; | import com.bonait.bnframework.Model.MyStatus; | ||||
import com.bonait.bnframework.Service.ModbusTcpServer; | |||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
import com.bonait.bnframework.common.db.QueryDB; | import com.bonait.bnframework.common.db.QueryDB; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | ||||
@@ -2213,7 +2212,7 @@ public class ExecuteTheRecipe { | |||||
long a = System.currentTimeMillis(); | long a = System.currentTimeMillis(); | ||||
RecordManager.getInstance().addLogRecord("订单处理日志",name + ",等待中"); | RecordManager.getInstance().addLogRecord("订单处理日志",name + ",等待中"); | ||||
while (IsComplete[0] && !IsForcedEnd2 && WokModbusTcpServer.get().plcIsConnect&&RobotModbusTcpServer.get().plcIsConnect&& OvenModbusTcpServer.get().plcIsConnect && !ConfigName.TEST) { | |||||
while (IsComplete[0] && !IsForcedEnd2 && WokModbusTcpServer.get().plcIsConnect&&RobotModbusTcpServer.get().plcIsConnect&& !ConfigName.TEST) { | |||||
if ((System.currentTimeMillis() - a) > 1000 * whileTime) { | if ((System.currentTimeMillis() - a) > 1000 * whileTime) { | ||||
ExecuteTheRecipe.showlog(name + ",异常超时退出!"); | ExecuteTheRecipe.showlog(name + ",异常超时退出!"); | ||||
break; | break; | ||||
@@ -91,7 +91,11 @@ public class OrderDetailUtil { | |||||
ArrayList<BPA_ORDER_DETAIL> data = new ArrayList<>(); | ArrayList<BPA_ORDER_DETAIL> data = new ArrayList<>(); | ||||
ArrayList<Object> obj = QueryDB.Get(BPA_ORDER_DETAIL.class, where, args, orderby); | ArrayList<Object> obj = QueryDB.Get(BPA_ORDER_DETAIL.class, where, args, orderby); | ||||
for (Object k : obj) { | for (Object k : obj) { | ||||
data.add((BPA_ORDER_DETAIL) k); | |||||
if(((BPA_ORDER_DETAIL) k).status!=0){ | |||||
data.add(0,(BPA_ORDER_DETAIL) k); | |||||
}else { | |||||
data.add((BPA_ORDER_DETAIL) k); | |||||
} | |||||
} | } | ||||
LogUtils.d("OrderDetailUtil getAll data=" + data.toString()); | LogUtils.d("OrderDetailUtil getAll data=" + data.toString()); | ||||
return data; | return data; | ||||
@@ -27,6 +27,7 @@ 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_ALERTLOG; | ||||
import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD; | import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD; | ||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | ||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_LIST; | |||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_RECORD; | import com.bonait.bnframework.common.db.mode.BPA_ORDER_RECORD; | ||||
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER_RECORD; | import com.bonait.bnframework.common.db.mode.BPA_SUBORDER_RECORD; | ||||
import com.bonait.bnframework.common.db.util.OrderDetailUtil; | import com.bonait.bnframework.common.db.util.OrderDetailUtil; | ||||
@@ -137,6 +138,7 @@ public class MainHActivity extends BaseActivity { | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_RECORD.class,null); | DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_RECORD.class,null); | ||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SUBORDER_RECORD.class,null); | DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SUBORDER_RECORD.class,null); | ||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ALERTLOG.class,null); | DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ALERTLOG.class,null); | ||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_LIST.class,null); | |||||
PreferenceUtils.setInt("loginNum",0); | PreferenceUtils.setInt("loginNum",0); | ||||
}else { | }else { | ||||
PreferenceUtils.setInt("loginNum",loginNum+1); | PreferenceUtils.setInt("loginNum",loginNum+1); | ||||
@@ -396,11 +396,15 @@ public class HomeOrderFragment extends BaseFragment { | |||||
OrderDetailUtil.deleteById(orderChaoDetails.get(position).id); | OrderDetailUtil.deleteById(orderChaoDetails.get(position).id); | ||||
orderChaoDetails.remove(position); | orderChaoDetails.remove(position); | ||||
orderAdapter1.setCurrentPosition(-1); | orderAdapter1.setCurrentPosition(-1); | ||||
foodInfoList.clear(); | |||||
foodInfoAdapter.notifyDataSetChanged(); | |||||
orderAdapter1.notifyDataSetChanged(); | orderAdapter1.notifyDataSetChanged(); | ||||
}else { | }else { | ||||
OrderDetailUtil.deleteById(orderKaoDetails.get(position).id); | OrderDetailUtil.deleteById(orderKaoDetails.get(position).id); | ||||
orderKaoDetails.remove(position); | orderKaoDetails.remove(position); | ||||
orderAdapter2.setCurrentPosition(-1); | orderAdapter2.setCurrentPosition(-1); | ||||
foodInfoList.clear(); | |||||
foodInfoAdapter.notifyDataSetChanged(); | |||||
orderAdapter2.notifyDataSetChanged(); | orderAdapter2.notifyDataSetChanged(); | ||||
} | } | ||||
@@ -478,15 +482,23 @@ public class HomeOrderFragment extends BaseFragment { | |||||
if(type==0){ | if(type==0){ | ||||
orderChaoDetails.get(position).status = 1; | orderChaoDetails.get(position).status = 1; | ||||
BPA_ORDER_DETAIL bean = orderChaoDetails.get(position); | BPA_ORDER_DETAIL bean = orderChaoDetails.get(position); | ||||
bean.createTime = "0"; | |||||
OrderDetailUtil.update(bean); | OrderDetailUtil.update(bean); | ||||
orderAdapter1.notifyItemChanged(position); | |||||
orderAdapter1.setCurrentPosition(-1); | |||||
foodInfoList.clear(); | |||||
foodInfoAdapter.notifyDataSetChanged(); | |||||
orderAdapter1.notifyDataSetChanged(); | |||||
startMakingThread(bean); | startMakingThread(bean); | ||||
jumpToCook(orderChaoDetails.get(position)); | jumpToCook(orderChaoDetails.get(position)); | ||||
}else { | }else { | ||||
orderKaoDetails.get(position).status = 1; | orderKaoDetails.get(position).status = 1; | ||||
BPA_ORDER_DETAIL bean = orderKaoDetails.get(position); | BPA_ORDER_DETAIL bean = orderKaoDetails.get(position); | ||||
bean.createTime = "0"; | |||||
OrderDetailUtil.update(bean); | OrderDetailUtil.update(bean); | ||||
orderAdapter2.notifyItemChanged(position); | |||||
orderAdapter1.setCurrentPosition(-1); | |||||
foodInfoList.clear(); | |||||
foodInfoAdapter.notifyDataSetChanged(); | |||||
orderAdapter1.notifyDataSetChanged(); | |||||
startMakingThread2(bean); | startMakingThread2(bean); | ||||
jumpToCook(orderKaoDetails.get(position)); | jumpToCook(orderKaoDetails.get(position)); | ||||
} | } | ||||
@@ -529,19 +541,27 @@ public class HomeOrderFragment extends BaseFragment { | |||||
if(type==0){ | if(type==0){ | ||||
orderChaoDetails.get(position).status = 1; | orderChaoDetails.get(position).status = 1; | ||||
BPA_ORDER_DETAIL bean = orderChaoDetails.get(position); | BPA_ORDER_DETAIL bean = orderChaoDetails.get(position); | ||||
bean.createTime = "0"; | |||||
OrderDetailUtil.update(bean); | OrderDetailUtil.update(bean); | ||||
orderChaoDetails.clear(); | orderChaoDetails.clear(); | ||||
orderChaoDetails.addAll(OrderDetailUtil.getAllByType(type)); | orderChaoDetails.addAll(OrderDetailUtil.getAllByType(type)); | ||||
orderAdapter1.setCurrentPosition(-1); | |||||
foodInfoList.clear(); | |||||
foodInfoAdapter.notifyDataSetChanged(); | |||||
orderAdapter1.notifyDataSetChanged(); | orderAdapter1.notifyDataSetChanged(); | ||||
startMakingThread(bean); | startMakingThread(bean); | ||||
}else { | }else { | ||||
orderKaoDetails.get(position).status = 1; | orderKaoDetails.get(position).status = 1; | ||||
BPA_ORDER_DETAIL bean = orderKaoDetails.get(position); | BPA_ORDER_DETAIL bean = orderKaoDetails.get(position); | ||||
bean.createTime = "0"; | |||||
OrderDetailUtil.update(bean); | OrderDetailUtil.update(bean); | ||||
orderKaoDetails.clear(); | orderKaoDetails.clear(); | ||||
orderKaoDetails.addAll(OrderDetailUtil.getAllByType(type)); | orderKaoDetails.addAll(OrderDetailUtil.getAllByType(type)); | ||||
orderAdapter2.notifyDataSetChanged(); | |||||
orderAdapter1.setCurrentPosition(-1); | |||||
foodInfoList.clear(); | |||||
foodInfoAdapter.notifyDataSetChanged(); | |||||
orderAdapter1.notifyDataSetChanged(); | |||||
startMakingThread2(bean); | startMakingThread2(bean); | ||||
} | } | ||||
} | } | ||||
@@ -11,17 +11,26 @@ import androidx.annotation.NonNull; | |||||
import androidx.annotation.Nullable; | import androidx.annotation.Nullable; | ||||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | import com.bonait.bnframework.HBL.Thread.ThreadManager; | ||||
import com.bonait.bnframework.MainApplication; | |||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.base.BaseFragment; | import com.bonait.bnframework.common.base.BaseFragment; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
import com.bonait.bnframework.common.db.QueryDB; | 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_LOG_RECORD; | |||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_LIST; | |||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_RECORD; | |||||
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER_RECORD; | |||||
import com.bonait.bnframework.common.db.mode.BPA_SYSTEMSET; | import com.bonait.bnframework.common.db.mode.BPA_SYSTEMSET; | ||||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import com.bonait.bnframework.common.utils.PreferenceUtils; | import com.bonait.bnframework.common.utils.PreferenceUtils; | ||||
import com.bonait.bnframework.databinding.DialogTipBinding; | |||||
import com.bonait.bnframework.databinding.FragmentSceneSetBinding; | import com.bonait.bnframework.databinding.FragmentSceneSetBinding; | ||||
import com.bonait.bnframework.newui.http.UpdateDataService; | import com.bonait.bnframework.newui.http.UpdateDataService; | ||||
import com.bonait.bnframework.newui.widget.NewToastUtil; | |||||
import com.bonait.bnframework.newui.viewmodel.HomeGoodsViewModel; | import com.bonait.bnframework.newui.viewmodel.HomeGoodsViewModel; | ||||
import com.bonait.bnframework.newui.widget.NewToastUtil; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -34,6 +43,7 @@ import java.util.List; | |||||
public class SceneSetFragment extends BaseFragment { | public class SceneSetFragment extends BaseFragment { | ||||
private FragmentSceneSetBinding viewBinding; | private FragmentSceneSetBinding viewBinding; | ||||
private List<String> environmentList = new ArrayList<>(); | private List<String> environmentList = new ArrayList<>(); | ||||
private List<String> versionList = new ArrayList<>(); | |||||
@Override | @Override | ||||
protected View onCreateView() { | protected View onCreateView() { | ||||
@@ -59,6 +69,14 @@ public class SceneSetFragment extends BaseFragment { | |||||
viewBinding.spinnerEnvironment.setSelection(i); | viewBinding.spinnerEnvironment.setSelection(i); | ||||
} | } | ||||
} | } | ||||
ArrayAdapter<String> spinnerAdapter2 = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item, versionList); | |||||
spinnerAdapter2.setDropDownViewResource(R.layout.spinner_dropdown_item); | |||||
viewBinding.spinnerVersion.setAdapter(spinnerAdapter2); | |||||
for(int i=0;i<versionList.size();i++){ | |||||
if(versionList.get(i).equals(ConfigName.getInstance().versionSelectionEnum)){ | |||||
viewBinding.spinnerVersion.setSelection(i); | |||||
} | |||||
} | |||||
viewBinding.editDeviceNumber.setText(PreferenceUtils.getString(ConfigName.deviceNumber,"")); | viewBinding.editDeviceNumber.setText(PreferenceUtils.getString(ConfigName.deviceNumber,"")); | ||||
viewBinding.zijianSwitch.setChecked(PreferenceUtils.getBoolean(ConfigName.rootTip,true)); | viewBinding.zijianSwitch.setChecked(PreferenceUtils.getBoolean(ConfigName.rootTip,true)); | ||||
viewBinding.btnUpdateKey.setOnClickListener(v->{ | viewBinding.btnUpdateKey.setOnClickListener(v->{ | ||||
@@ -89,6 +107,14 @@ public class SceneSetFragment extends BaseFragment { | |||||
PreferenceUtils.setBoolean(ConfigName.rootTip,viewBinding.zijianSwitch.isChecked()); | PreferenceUtils.setBoolean(ConfigName.rootTip,viewBinding.zijianSwitch.isChecked()); | ||||
NewToastUtil.getInstance().showToast("保存成功"); | NewToastUtil.getInstance().showToast("保存成功"); | ||||
ConfigName.getInstance().DeviceAutoKey = viewBinding.editDeviceNumber.getText().toString(); | |||||
BPA_SYSTEMSET set_main2 = new BPA_SYSTEMSET(); | |||||
set_main2.type = -101; | |||||
set_main2.value = ConfigName.getInstance().DeviceAutoKey; | |||||
set_main2.deviceID = ConfigName.getInstance().DeviceId; | |||||
set_main2.userID = ConfigName.getInstance().user.userID; | |||||
QueryDB.AddSystemset(set_main2); | |||||
ConfigName.getInstance().Key = viewBinding.editKey.getText().toString(); | ConfigName.getInstance().Key = viewBinding.editKey.getText().toString(); | ||||
UpdateDataService.key = ConfigName.getInstance().Key; | UpdateDataService.key = ConfigName.getInstance().Key; | ||||
BPA_SYSTEMSET set_main4 = new BPA_SYSTEMSET(); | BPA_SYSTEMSET set_main4 = new BPA_SYSTEMSET(); | ||||
@@ -97,6 +123,53 @@ public class SceneSetFragment extends BaseFragment { | |||||
set_main4.deviceID = ConfigName.getInstance().DeviceId; | set_main4.deviceID = ConfigName.getInstance().DeviceId; | ||||
set_main4.userID = ConfigName.getInstance().user.userID; | set_main4.userID = ConfigName.getInstance().user.userID; | ||||
QueryDB.AddSystemset(set_main4); | QueryDB.AddSystemset(set_main4); | ||||
ConfigName.getInstance().versionSelectionEnum = viewBinding.spinnerVersion.getSelectedItem().toString(); | |||||
BPA_SYSTEMSET set_main1 = new BPA_SYSTEMSET(); | |||||
set_main4.type = -100; | |||||
set_main4.value = ConfigName.getInstance().versionSelectionEnum; | |||||
set_main4.deviceID = ConfigName.getInstance().DeviceId; | |||||
set_main4.userID = ConfigName.getInstance().user.userID; | |||||
QueryDB.AddSystemset(set_main1); | |||||
}); | |||||
viewBinding.btnClearLog.setOnClickListener(v->{ | |||||
AlertDialogUtils.showCancelAndConfirmDialog(getActivity(), R.layout.dialog_tip, (layoutView, xCom) -> { | |||||
DialogTipBinding binding = DialogTipBinding.bind(layoutView); | |||||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||||
binding.title.setText("请确认"); | |||||
binding.message.setText("是否清除本地日志记录"); | |||||
binding.close.setOnClickListener(view1->{ | |||||
xCom.dismissX(); | |||||
}); | |||||
binding.submit.setOnClickListener(view1 -> { | |||||
xCom.dismissX(); | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_LOG_RECORD.class,null); | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ALERTLOG.class,null); | |||||
PreferenceUtils.setInt("loginNum",0); | |||||
NewToastUtil.getInstance().showToast("清除成功"); | |||||
}); | |||||
}); | |||||
}); | |||||
viewBinding.btnClearOrder.setOnClickListener(v->{ | |||||
AlertDialogUtils.showCancelAndConfirmDialog(getActivity(), R.layout.dialog_tip, (layoutView, xCom) -> { | |||||
DialogTipBinding binding = DialogTipBinding.bind(layoutView); | |||||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||||
binding.title.setText("请确认"); | |||||
binding.message.setText("是否清除本地订单记录"); | |||||
binding.close.setOnClickListener(view1->{ | |||||
xCom.dismissX(); | |||||
}); | |||||
binding.submit.setOnClickListener(view1 -> { | |||||
xCom.dismissX(); | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_RECORD.class,null); | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SUBORDER_RECORD.class,null); | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_LIST.class,null); | |||||
PreferenceUtils.setInt("loginNum",0); | |||||
NewToastUtil.getInstance().showToast("清除成功"); | |||||
}); | |||||
}); | |||||
}); | }); | ||||
} | } | ||||
@@ -105,5 +178,9 @@ public class SceneSetFragment extends BaseFragment { | |||||
environmentList.add("开发环境"); | environmentList.add("开发环境"); | ||||
environmentList.add("测试环境"); | environmentList.add("测试环境"); | ||||
environmentList.add("正式环境"); | environmentList.add("正式环境"); | ||||
versionList.clear(); | |||||
versionList.add("一拖二"); | |||||
versionList.add("一拖二不带输送线"); | |||||
} | } | ||||
} | } |
@@ -5,8 +5,6 @@ import android.os.Environment; | |||||
import com.apkfuns.logutils.LogUtils; | import com.apkfuns.logutils.LogUtils; | ||||
import com.bonait.bnframework.HBL.Result.OperateResult; | import com.bonait.bnframework.HBL.Result.OperateResult; | ||||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | |||||
import com.bonait.bnframework.MainApplication; | |||||
import com.bonait.bnframework.Model.upload.GoodsDataInfo; | import com.bonait.bnframework.Model.upload.GoodsDataInfo; | ||||
import com.bonait.bnframework.Model.upload.GoodsProcessDetail; | import com.bonait.bnframework.Model.upload.GoodsProcessDetail; | ||||
import com.bonait.bnframework.Model.upload.MaterialDataInfo; | import com.bonait.bnframework.Model.upload.MaterialDataInfo; | ||||
@@ -18,7 +16,6 @@ import com.bonait.bnframework.Model.upload.UpResData; | |||||
import com.bonait.bnframework.Model.upload.UploadRes; | import com.bonait.bnframework.Model.upload.UploadRes; | ||||
import com.bonait.bnframework.business.RecordManager; | import com.bonait.bnframework.business.RecordManager; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
import com.bonait.bnframework.common.db.file.DBHelper; | |||||
import com.bonait.bnframework.common.db.mode.BPA_ATTRIBUTE; | import com.bonait.bnframework.common.db.mode.BPA_ATTRIBUTE; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | import com.bonait.bnframework.common.db.mode.BPA_GOODS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_CLASSIFY; | import com.bonait.bnframework.common.db.mode.BPA_GOODS_CLASSIFY; | ||||
@@ -109,7 +106,7 @@ public class UpdateAllDataService { | |||||
HttpHeaders headers = new HttpHeaders(); | HttpHeaders headers = new HttpHeaders(); | ||||
headers.put("key", UpdateDataService.key); | headers.put("key", UpdateDataService.key); | ||||
OkGo.<ProcessModelBean>post(url) | OkGo.<ProcessModelBean>post(url) | ||||
.tag(context) | |||||
.tag(url) | |||||
.upRequestBody( RequestBody.create(MediaType.parse("application/json; charset=utf-8"),body)) | .upRequestBody( RequestBody.create(MediaType.parse("application/json; charset=utf-8"),body)) | ||||
.headers(headers) | .headers(headers) | ||||
.execute(new JsonDialogCallback<ProcessModelBean>(context) { | .execute(new JsonDialogCallback<ProcessModelBean>(context) { | ||||
@@ -203,7 +200,7 @@ public class UpdateAllDataService { | |||||
HttpHeaders headers = new HttpHeaders(); | HttpHeaders headers = new HttpHeaders(); | ||||
headers.put("key", UpdateDataService.key); | headers.put("key", UpdateDataService.key); | ||||
OkGo.<ProcessModelBean>post(url) | OkGo.<ProcessModelBean>post(url) | ||||
.tag(context) | |||||
.tag(url) | |||||
.upRequestBody( RequestBody.create(MediaType.parse("application/json; charset=utf-8"),body)) | .upRequestBody( RequestBody.create(MediaType.parse("application/json; charset=utf-8"),body)) | ||||
.headers(headers) | .headers(headers) | ||||
.execute(new JsonDialogCallback<ProcessModelBean>(context) { | .execute(new JsonDialogCallback<ProcessModelBean>(context) { | ||||
@@ -324,7 +321,7 @@ public class UpdateAllDataService { | |||||
HttpHeaders headers = new HttpHeaders(); | HttpHeaders headers = new HttpHeaders(); | ||||
headers.put("key", UpdateDataService.key); | headers.put("key", UpdateDataService.key); | ||||
OkGo.<UploadRes<UpResData>>post(url) | OkGo.<UploadRes<UpResData>>post(url) | ||||
.tag(context) | |||||
.tag(url) | |||||
.upRequestBody(RequestBody.create(MediaType.parse("application/json; charset=utf-8"),new Gson().toJson(data))) | .upRequestBody(RequestBody.create(MediaType.parse("application/json; charset=utf-8"),new Gson().toJson(data))) | ||||
.headers(headers) | .headers(headers) | ||||
.execute(new JsonDialogCallback<UploadRes<UpResData>>(context) { | .execute(new JsonDialogCallback<UploadRes<UpResData>>(context) { | ||||
@@ -504,7 +501,7 @@ public class UpdateAllDataService { | |||||
goodsProcessDetail.goodsId = goods.id; | goodsProcessDetail.goodsId = goods.id; | ||||
goodsProcessDetail.deviceId = goodClassify.type==0?ConfigName.getInstance().DeviceAutoKey2:ConfigName.getInstance().DeviceAutoKey; | goodsProcessDetail.deviceId = goodClassify.type==0?ConfigName.getInstance().DeviceAutoKey2:ConfigName.getInstance().DeviceAutoKey; | ||||
goodsProcessDetail.goodsName = goods.name; | goodsProcessDetail.goodsName = goods.name; | ||||
goodsProcessDetail.deviceName = "中大型炒锅500"; | |||||
goodsProcessDetail.deviceName = "上海闵中"; | |||||
goodsProcessDetail.warehousrTemplateId = ""; | goodsProcessDetail.warehousrTemplateId = ""; | ||||
goodsProcessDetail.warehousrTemplateName = ""; | goodsProcessDetail.warehousrTemplateName = ""; | ||||
List<GoodsProcessDetail.TechnologyActionList> technologyActionLists = new ArrayList<>(); | List<GoodsProcessDetail.TechnologyActionList> technologyActionLists = new ArrayList<>(); | ||||
@@ -5,8 +5,6 @@ import android.os.Environment; | |||||
import com.apkfuns.logutils.LogUtils; | import com.apkfuns.logutils.LogUtils; | ||||
import com.bonait.bnframework.HBL.Result.OperateResult; | import com.bonait.bnframework.HBL.Result.OperateResult; | ||||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | |||||
import com.bonait.bnframework.MainApplication; | |||||
import com.bonait.bnframework.Model.upload.GoodsDataInfo; | import com.bonait.bnframework.Model.upload.GoodsDataInfo; | ||||
import com.bonait.bnframework.Model.upload.GoodsProcessDetail; | import com.bonait.bnframework.Model.upload.GoodsProcessDetail; | ||||
import com.bonait.bnframework.Model.upload.MaterialDataInfo; | import com.bonait.bnframework.Model.upload.MaterialDataInfo; | ||||
@@ -18,7 +16,6 @@ import com.bonait.bnframework.Model.upload.UpResData; | |||||
import com.bonait.bnframework.Model.upload.UploadRes; | import com.bonait.bnframework.Model.upload.UploadRes; | ||||
import com.bonait.bnframework.business.RecordManager; | import com.bonait.bnframework.business.RecordManager; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
import com.bonait.bnframework.common.db.file.DBHelper; | |||||
import com.bonait.bnframework.common.db.mode.BPA_ATTRIBUTE; | import com.bonait.bnframework.common.db.mode.BPA_ATTRIBUTE; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | import com.bonait.bnframework.common.db.mode.BPA_GOODS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_CLASSIFY; | import com.bonait.bnframework.common.db.mode.BPA_GOODS_CLASSIFY; | ||||
@@ -49,7 +46,6 @@ import com.lzy.okgo.OkGo; | |||||
import com.lzy.okgo.model.HttpHeaders; | import com.lzy.okgo.model.HttpHeaders; | ||||
import com.lzy.okgo.model.Response; | import com.lzy.okgo.model.Response; | ||||
import org.greenrobot.eventbus.EventBus; | |||||
import org.json.JSONArray; | import org.json.JSONArray; | ||||
import org.json.JSONException; | import org.json.JSONException; | ||||
import org.json.JSONObject; | import org.json.JSONObject; | ||||
@@ -115,7 +111,7 @@ public class UpdateDataService { | |||||
headers.put("key", key); | headers.put("key", key); | ||||
LogUtils.d("downLoadProcessModel url="+url+" headers="+headers.toString()+" params="+params.toString()); | LogUtils.d("downLoadProcessModel url="+url+" headers="+headers.toString()+" params="+params.toString()); | ||||
OkGo.<ProcessModelBean>post(url) | OkGo.<ProcessModelBean>post(url) | ||||
.tag(context) | |||||
.tag(url) | |||||
.upRequestBody( | .upRequestBody( | ||||
RequestBody.create(MediaType.parse("application/json; charset=utf-8"), | RequestBody.create(MediaType.parse("application/json; charset=utf-8"), | ||||
body)) | body)) | ||||
@@ -355,7 +351,7 @@ public class UpdateDataService { | |||||
HttpHeaders headers = new HttpHeaders(); | HttpHeaders headers = new HttpHeaders(); | ||||
headers.put("key", key); | headers.put("key", key); | ||||
OkGo.<UploadRes<UpResData>>post(url) | OkGo.<UploadRes<UpResData>>post(url) | ||||
.tag(context) | |||||
.tag(url) | |||||
.upRequestBody(RequestBody.create(MediaType.parse("application/json; charset=utf-8"),new Gson().toJson(data))) | .upRequestBody(RequestBody.create(MediaType.parse("application/json; charset=utf-8"),new Gson().toJson(data))) | ||||
.headers(headers) | .headers(headers) | ||||
.execute(new JsonDialogCallback<UploadRes<UpResData>>(context) { | .execute(new JsonDialogCallback<UploadRes<UpResData>>(context) { | ||||
@@ -579,7 +575,7 @@ public class UpdateDataService { | |||||
goodsProcessDetail.goodsId = goodsId; | goodsProcessDetail.goodsId = goodsId; | ||||
goodsProcessDetail.deviceId = goodClassify.type==0?ConfigName.getInstance().DeviceAutoKey2:ConfigName.getInstance().DeviceAutoKey; | goodsProcessDetail.deviceId = goodClassify.type==0?ConfigName.getInstance().DeviceAutoKey2:ConfigName.getInstance().DeviceAutoKey; | ||||
goodsProcessDetail.goodsName = goods.name; | goodsProcessDetail.goodsName = goods.name; | ||||
goodsProcessDetail.deviceName = "中大型炒锅500"; | |||||
goodsProcessDetail.deviceName = "上海闵中"; | |||||
goodsProcessDetail.warehousrTemplateId = ""; | goodsProcessDetail.warehousrTemplateId = ""; | ||||
goodsProcessDetail.warehousrTemplateName = ""; | goodsProcessDetail.warehousrTemplateName = ""; | ||||
List<GoodsProcessDetail.TechnologyActionList> technologyActionLists = new ArrayList<>(); | List<GoodsProcessDetail.TechnologyActionList> technologyActionLists = new ArrayList<>(); | ||||
@@ -76,10 +76,11 @@ public class HomeGoodsViewModel extends ViewModel { | |||||
GetGoodsInfo(); | GetGoodsInfo(); | ||||
GetMaterialInfo(); | GetMaterialInfo(); | ||||
GetMaterialType(); | GetMaterialType(); | ||||
if(!UpdateDataService.isDownProcessModel){ | |||||
UpdateDataService.downLoadProcessModel(null,null); | |||||
} | |||||
})); | })); | ||||
if(!UpdateDataService.isDownProcessModel){ | |||||
UpdateDataService.downLoadProcessModel(null,null); | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -11,12 +11,12 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:orientation="vertical" | android:orientation="vertical" | ||||
android:padding="40dp" | android:padding="40dp" | ||||
android:layout_marginTop="40dp" | |||||
android:layout_marginTop="20dp" | |||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
<LinearLayout | <LinearLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:orientation="horizontal" | android:orientation="horizontal" | ||||
android:layout_marginBottom="40dp" | |||||
android:layout_marginBottom="20dp" | |||||
android:layout_height="wrap_content"> | android:layout_height="wrap_content"> | ||||
<TextView | <TextView | ||||
android:layout_width="250dp" | android:layout_width="250dp" | ||||
@@ -55,7 +55,7 @@ | |||||
<LinearLayout | <LinearLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:orientation="horizontal" | android:orientation="horizontal" | ||||
android:layout_marginBottom="40dp" | |||||
android:layout_marginBottom="20dp" | |||||
android:layout_height="wrap_content"> | android:layout_height="wrap_content"> | ||||
<TextView | <TextView | ||||
android:layout_width="250dp" | android:layout_width="250dp" | ||||
@@ -84,7 +84,8 @@ | |||||
<LinearLayout | <LinearLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:orientation="horizontal" | android:orientation="horizontal" | ||||
android:layout_marginBottom="40dp" | |||||
android:layout_marginBottom="20dp" | |||||
android:visibility="gone" | |||||
android:layout_height="wrap_content"> | android:layout_height="wrap_content"> | ||||
<TextView | <TextView | ||||
android:layout_width="250dp" | android:layout_width="250dp" | ||||
@@ -108,7 +109,31 @@ | |||||
<LinearLayout | <LinearLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:orientation="horizontal" | android:orientation="horizontal" | ||||
android:layout_marginBottom="40dp" | |||||
android:layout_marginBottom="20dp" | |||||
android:layout_height="wrap_content"> | |||||
<TextView | |||||
android:layout_width="250dp" | |||||
android:layout_height="70dp" | |||||
android:textColor="@color/black" | |||||
android:textSize="32sp" | |||||
android:text="选择版本:" | |||||
android:layout_gravity="center_vertical" | |||||
android:gravity="center_vertical" | |||||
/> | |||||
<Spinner | |||||
android:id="@+id/spinner_version" | |||||
style="@style/commonSpinnerStyle" | |||||
android:layout_width="800dp" | |||||
android:layout_height="@dimen/dp_70" | |||||
android:layout_centerVertical="true" /> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:orientation="horizontal" | |||||
android:layout_marginBottom="20dp" | |||||
android:layout_height="wrap_content"> | android:layout_height="wrap_content"> | ||||
<TextView | <TextView | ||||
android:layout_width="250dp" | android:layout_width="250dp" | ||||
@@ -128,10 +153,65 @@ | |||||
</LinearLayout> | </LinearLayout> | ||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:orientation="horizontal" | |||||
android:layout_marginBottom="20dp" | |||||
android:layout_height="wrap_content"> | |||||
<TextView | |||||
android:layout_width="250dp" | |||||
android:layout_height="70dp" | |||||
android:textColor="@color/black" | |||||
android:textSize="32sp" | |||||
android:text="清除日志记录:" | |||||
android:layout_gravity="center_vertical" | |||||
android:gravity="center_vertical" | |||||
/> | |||||
<Button | |||||
android:id="@+id/btn_clear_log" | |||||
android:layout_width="300dp" | |||||
android:layout_height="70dp" | |||||
android:background="@drawable/bg_btn_login_selected" | |||||
android:text="清除日志记录" | |||||
android:textColor="@color/white" | |||||
android:layout_marginLeft="50dp" | |||||
android:textSize="32sp"/> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:orientation="horizontal" | |||||
android:layout_marginBottom="20dp" | |||||
android:layout_height="wrap_content"> | |||||
<TextView | |||||
android:layout_width="250dp" | |||||
android:layout_height="70dp" | |||||
android:textColor="@color/black" | |||||
android:textSize="32sp" | |||||
android:text="清除订单记录:" | |||||
android:layout_gravity="center_vertical" | |||||
android:gravity="center_vertical" | |||||
/> | |||||
<Button | |||||
android:id="@+id/btn_clear_order" | |||||
android:layout_width="300dp" | |||||
android:layout_height="70dp" | |||||
android:background="@drawable/bg_btn_login_selected" | |||||
android:text="清除订单记录" | |||||
android:textColor="@color/white" | |||||
android:layout_marginLeft="50dp" | |||||
android:textSize="32sp"/> | |||||
</LinearLayout> | |||||
<Button | <Button | ||||
android:id="@+id/btn_save" | android:id="@+id/btn_save" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="70dp" | android:layout_height="70dp" | ||||
android:layout_marginTop="20dp" | |||||
android:background="@drawable/bg_btn_login_selected" | android:background="@drawable/bg_btn_login_selected" | ||||
android:text="保存参数" | android:text="保存参数" | ||||
android:textColor="@color/white" | android:textColor="@color/white" | ||||