Commit beed5e0a authored by hywang's avatar hywang

1.性能测定带实时重量;

2.输入框点其他位置不取消
parent 15b33a45
......@@ -69,7 +69,7 @@ public class BtService extends Service implements EventObserver {
public void onRead(@NonNull BluetoothDevice device, @NonNull byte[] value) {
String data = new String(value);
Log.e(TAG, "onRead: " + data);
// Log.e(TAG, "onRead: " + data);
// ToastUtils.showShort("onRead: " + data);
String weightData = data.substring(data.indexOf("wn") + 3, data.indexOf("kg"));
......
......@@ -37,7 +37,7 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
private String matingStyle;
/**
* 种畜耳标
* 本交公牛种畜主键
*/
private Long cattleresumeId;
......
......@@ -50,15 +50,15 @@ public class RetrofitClient {
private static final int CACHE_TIMEOUT = 10 * 1024 * 1024;
//服务端根路径
public static String baseUrl =
// "serve.xlglmnmyzspt.org.cn"//正式
"serve.xlglmnmyzspt.org.cn"//正式
// "39.101.170.186"//阿里云测试
"192.168.8.135"//董
// "192.168.8.135"//董
// "192.168.43.154"//张敏
;
public static String port =
// ""//正式
""//正式
// "9000"//阿里云测试
"9000"//董
// "9000"//董
;
private static Context mContext = Utils.getContext();
......
......@@ -126,6 +126,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
viewModel.initDataForUnid(Configs.tempUnid);
Configs.currentEvent = EventTag.EVENT_WEIGHT_DATA_BASICS;
} else {
Configs.currentEvent = EventTag.EVENT_WEIGHT_DATA_BASICS;
viewModel.removeInventoryListener();
Configs.currentEvent = "";
App.getInstance().getLinkage().stopInventory();
......@@ -355,6 +356,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
new MaterialDialog.Builder(getActivity())
.title(uiParamEntity.getColumnComment())
// .iconRes(R.drawable.ic_logo)
.canceledOnTouchOutside(false)
.content("请输入")
// .widgetColor(Color.BLUE)//输入框光标的颜色
.inputType(inputType)//可以输入的类型
......
......@@ -205,7 +205,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
private void showCheckboxDialog(GenTableColumn uiParamEntity) {
new MaterialDialog.Builder(getActivity()).title("系统信息").content("请选择!!!")
.cancelable(false).canceledOnTouchOutside(false)
// .cancelable(false).canceledOnTouchOutside(false)
.positiveText("确定")
.items(DictUtils.getDistNameList(uiParamEntity.getDictType()))
.itemsCallbackMultiChoice(null, new MaterialDialog.ListCallbackMultiChoice() {
......@@ -270,6 +270,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
new MaterialDialog.Builder(getActivity())
.title(uiParamEntity.getColumnComment())
// .iconRes(R.drawable.ic_logo)
.canceledOnTouchOutside(false)
.content("请输入")
// .widgetColor(Color.BLUE)//输入框光标的颜色
.inputType(inputType)//可以输入的类型
......
......@@ -255,6 +255,7 @@ public class ImmunRecordFragment extends BaseFragment<FragmentImmunRecordBinding
new MaterialDialog.Builder(getActivity())
.title(uiParamEntity.getColumnComment())
// .iconRes(R.drawable.ic_logo)
.canceledOnTouchOutside(false)
.content("请输入")
// .widgetColor(Color.BLUE)//输入框光标的颜色
.inputType(inputType)//可以输入的类型
......
......@@ -253,6 +253,7 @@ public class MedicalRecordFragment extends BaseFragment<FragmentMedicalRecordBin
new MaterialDialog.Builder(getActivity())
.title(uiParamEntity.getColumnComment())
// .iconRes(R.drawable.ic_logo)
.canceledOnTouchOutside(false)
.content("请输入")
// .widgetColor(Color.BLUE)//输入框光标的颜色
.inputType(inputType)//可以输入的类型
......
......@@ -256,6 +256,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
new MaterialDialog.Builder(getActivity())
.title(uiParamEntity.getColumnComment())
// .iconRes(R.drawable.ic_logo)
.canceledOnTouchOutside(false)
.content("请输入")
// .widgetColor(Color.BLUE)//输入框光标的颜色
.inputType(inputType)//可以输入的类型
......
......@@ -393,6 +393,7 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
new MaterialDialog.Builder(getActivity())
.title(uiParamEntity.getColumnComment())
// .iconRes(R.drawable.ic_logo)
.canceledOnTouchOutside(false)
.content("请输入")
// .widgetColor(Color.BLUE)//输入框光标的颜色
.inputType(inputType)//可以输入的类型
......
......@@ -575,7 +575,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
Double weightNum = Double.parseDouble(eventType.getObj().toString().trim());
if (weightNum > 25) {
scanRfid();
if (isWeightScan)
// if (isWeightScan)
Configs.tempWeight = weightNum;
isWeightScan = false;
} else {
......@@ -608,7 +608,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
Configs.tempUnid = null;
Configs.tempRfid = "";
Configs.tempCattleResume = null;
Configs.tempWeight = 0.0;
// Configs.tempWeight = 0.0;
tag.set("");
rfid.set("");
rfidTag = "";
......
......@@ -657,7 +657,7 @@ public class WeightManVM extends BaseViewModel<Repository> implements OnInventor
Double weightNum = Double.parseDouble(eventType.getObj().toString().trim());
if (weightNum > 25) {
scanRfid();
if (isWeightScan)
// if (isWeightScan)
Configs.tempWeight = weightNum;
isWeightScan = false;
} else {
......@@ -700,7 +700,7 @@ public class WeightManVM extends BaseViewModel<Repository> implements OnInventor
Configs.tempUnid = null;
Configs.tempRfid = "";
Configs.tempCattleResume = null;
Configs.tempWeight = 0.0;
// Configs.tempWeight = 0.0;
tag.set("");
rfid.set("");
rfidTag = "";
......
......@@ -303,7 +303,7 @@ public class CattleActivity extends BaseActivity<AvtivityCattleBinding, CattleVM
//初始化表头
List<String> headerStr = new ArrayList<>();
List<String> fieldNameStr = new ArrayList<>();
for (GenTableColumn gtc : Configs.cattlematingMaster) {
for (GenTableColumn gtc : Configs.cattlematingDetaillList) {
if ("1".equals(gtc.getIsList())) {
headerStr.add(gtc.getColumnComment());
fieldNameStr.add(gtc.getJavaField());
......@@ -336,30 +336,33 @@ public class CattleActivity extends BaseActivity<AvtivityCattleBinding, CattleVM
// 初始化表格
mDataGridView.initDataGridView();
// mDataGridView.setOnItemCellClickListener(new RecyclerviewAdapter.OnItemCellClickListener() {
// @Override
// public void onClick(View v, int row, int column) {
//// ToastUtils.showShort("row:" + row + " column:" + column);
// BreedingRecordEntity rowData = (BreedingRecordEntity) (mDataGridView.getRowData(row));
//
// new MaterialDialog
// .Builder(CattleActivity.this)
// .title("替换提示")
// .content("要跳转配种数据详情吗?")
// .positiveText("确定")
// .negativeText("取消")
// .onPositive(new MaterialDialog.SingleButtonCallback() {
// @Override
// public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
// if (which == DialogAction.POSITIVE) {
//
// }
// }
// }).show();
// }
// });
viewModel.queryBreedingRecordList();
mDataGridView.setOnItemCellClickListener(new RecyclerviewAdapter.OnItemCellClickListener() {
@Override
public void onClick(View v, int row, int column) {
// ToastUtils.showShort("row:" + row + " column:" + column);
BreedingRecordDetailEntity rowData = (BreedingRecordDetailEntity) (mDataGridView.getRowData(row));
new MaterialDialog
.Builder(CattleActivity.this)
.title("替换提示")
.content("要跳转配种数据详情吗?")
.positiveText("确定")
.negativeText("取消")
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
if (which == DialogAction.POSITIVE) {
Configs.mainPosition = 5;
Configs.resumeId = rowData.getFUnid();
startActivity(MainActivity.class);
finish();
}
}
}).show();
}
});
viewModel.queryBreedingRecordDetailList();
}
......
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher" />
<foreground android:drawable="@mipmap/ic_launcher" />
</adaptive-icon>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment