Commit beed5e0a authored by hywang's avatar hywang

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

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