修改 巡检

master
wanghao 1 month ago
parent 3979c248b2
commit 3cc3ea1443

@ -10,8 +10,8 @@ android {
applicationId "com.example.beijing_daxing"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {

@ -105,6 +105,7 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall, InP
Toast.makeText(CheckActivity.this, "没有维护巡检区域", Toast.LENGTH_SHORT).show();
return;
}*/
binding.setListNumber(list.size()+"");
list1 = new ArrayList<>();
adapter.setList(list1);
// adapter.notifyDataSetChanged();
@ -118,7 +119,7 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall, InP
private List<String> tagList;
private int subIndex = -1;
// 扫描到返回数据
// 扫描
@SuppressLint("NotifyDataSetChanged")
@Override
public void sanRfid(List<Reader.TAGINFO> epcs) {
@ -149,6 +150,7 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall, InP
// }
});
adapter.notifyDataSetChanged();
binding.setSanNumber(list1.size()+"");
}
@ -156,6 +158,7 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall, InP
public void check_submit(View view) {
// var type = list.stream().anyMatch(t -> t.getState().equals("未检"));
// if (type) {
// 数量必须相同
if (list.size()>list1.size()) {
Toast.makeText(this, "未检完全部轮挡,不允许提交", Toast.LENGTH_SHORT).show();
return;

@ -68,10 +68,15 @@ public class InActivity extends BaseActivity implements AdapterClickCall {
epcs.stream().forEach(t -> {
var epc = Tools.Bytes2HexString(t.EpcId,t.EpcId.length);
Log.e("TAG", "sanRfid:" + epc);
if (!epc.substring(0,8).equals("53574C44")) return;
if (tagList.contains(epc)) return;
tagList.add(epc);
epcList.add(HexAscii.hex2Str(epc));
try {
if (!epc.substring(0,8).equals("53574C44")) return;
if (tagList.contains(epc)) return;
tagList.add(epc);
epcList.add(HexAscii.hex2Str(epc));
}catch (Exception e){
}
});
vm.setSanLength(epcList.size());
adapter.notifyDataSetChanged();

@ -20,12 +20,12 @@ public class SetingPowerActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
ActivitySetingPowerBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_seting_power);
powerData = new PowerData();
powerData.setPowerIn( SharedPreferencesUtils.getInt("powerIn",0));
powerData.setPowerOut( SharedPreferencesUtils.getInt("powerOut",0));
powerData.setPowerIn( SharedPreferencesUtils.getInt("powerIn",33));
powerData.setPowerOut( SharedPreferencesUtils.getInt("powerOut",17));
powerData.setPowerStockCheck( SharedPreferencesUtils.getInt("powerStoreCheck",0));
powerData.setPowerCheck( SharedPreferencesUtils.getInt("powerCheck",0));
powerData.setPowerScrap( SharedPreferencesUtils.getInt("powerScrap",0));
powerData.setPowerScrapIn( SharedPreferencesUtils.getInt("powerScrapIn",0));
powerData.setPowerCheck( SharedPreferencesUtils.getInt("powerCheck",33));
powerData.setPowerScrap( SharedPreferencesUtils.getInt("powerScrap",17));
powerData.setPowerScrapIn( SharedPreferencesUtils.getInt("powerScrapIn",17));
powerData.setPowerScrapOut( SharedPreferencesUtils.getInt("powerScrapOut",0));
binding.setVm(powerData);

@ -46,8 +46,8 @@ import java.util.List;
import okhttp3.MediaType;
public class BaseActivity extends AppCompatActivity {
public static String url = "http://192.168.137.1:8090/api";
// public static String url = "http://119.45.202.115:8090/api";
// public static String url = "http://192.168.137.1:8090/api";
public static String url = "http://119.45.202.115:8090/api";
public ProgressDialog dialog;
public Gson gson;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8");

@ -17,6 +17,13 @@
name="checkState"
type="androidx.databinding.ObservableBoolean" />
<variable
name="listNumber"
type="String" />
<variable
name="sanNumber"
type="String" />
<import type="android.view.View" />
</data>
@ -36,9 +43,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="42dp"
android:layout_marginTop="2dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_marginTop="2dp">
android:paddingRight="5dp">
<TextView
style="@style/item_text_style"
@ -46,6 +53,7 @@
android:layout_height="match_parent"
android:text="轮挡RFID" />
<View
android:layout_width="1dp"
android:layout_height="28dp"
@ -74,8 +82,7 @@
android:layout_height="match_parent"
android:letterSpacing="0.1"
android:text="操作"
android:textColor="@color/blue"
/>
android:textColor="@color/blue" />
</LinearLayout>
<!-- <LinearLayout
@ -158,22 +165,44 @@
android:background="@color/white"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp">
<TextView
android:layout_width="50dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="总数:" />
<TextView
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text='@{listNumber??"0"}'
android:textColor="@color/blue" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<TextView
android:layout_width="50dp"
android:layout_height="match_parent"
android:text="总数:"
android:gravity="center"/>
android:gravity="center"
android:text="已扫描:" />
<TextView
android:layout_width="100dp"
android:layout_height="match_parent"
android:text=""
android:textColor="@color/blue"
android:gravity="center"/>
android:gravity="center"
android:text='@{sanNumber??"0"}'
android:textColor="@color/blue" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
@ -190,27 +219,29 @@
android:onClick="offCheckRead"
android:text='@{checkState?"停止读取":"开始扫描"}'
android:textSize="20sp" />
<ImageButton
android:layout_width="100dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginEnd="5dp"
android:src="@mipmap/icon_cromer"
android:onClick="check_tackPhoto"/>
android:onClick="check_tackPhoto"
android:src="@mipmap/icon_cromer" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginLeft="10dp"
android:layout_weight="1">
android:layout_marginLeft="10dp">
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:onClick="check_showPhoto"
android:text="查看照片"/>
android:text="查看照片" />
<TextView
android:id="@+id/confirm_picture_number2"
@ -221,8 +252,7 @@
android:gravity="center"
android:text="0"
android:textColor="@color/white"
android:textSize="18sp"
/>
android:textSize="18sp" />
</FrameLayout>
</LinearLayout>

@ -64,26 +64,26 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
style="@style/info_text"
android:layout_width="110dp"
android:layout_height="45dp"
android:layout_gravity="center"
android:text="盘点功率:" />
<EditText
style="@style/san_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:text='@={vm.powerStockCheck+""}' />
</LinearLayout>
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="45dp"-->
<!-- android:layout_marginTop="10dp"-->
<!-- android:orientation="horizontal">-->
<!-- <TextView-->
<!-- style="@style/info_text"-->
<!-- android:layout_width="110dp"-->
<!-- android:layout_height="45dp"-->
<!-- android:layout_gravity="center"-->
<!-- android:text="盘点功率:" />-->
<!-- <EditText-->
<!-- style="@style/san_text"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_gravity="center"-->
<!-- android:text='@={vm.powerStockCheck+""}' />-->
<!-- </LinearLayout>-->
<LinearLayout
android:layout_width="match_parent"
@ -147,25 +147,25 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="10dp">
<TextView
style="@style/info_text"
android:layout_width="110dp"
android:layout_height="45dp"
android:layout_gravity="center"
android:text="废品出库:" />
<EditText
style="@style/san_text"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_gravity="center"
android:text='@={vm.powerScrapOut+""}' />
</LinearLayout>
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="45dp"-->
<!-- android:layout_marginTop="10dp">-->
<!-- <TextView-->
<!-- style="@style/info_text"-->
<!-- android:layout_width="110dp"-->
<!-- android:layout_height="45dp"-->
<!-- android:layout_gravity="center"-->
<!-- android:text="废品出库:" />-->
<!-- <EditText-->
<!-- style="@style/san_text"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="45dp"-->
<!-- android:layout_gravity="center"-->
<!-- android:text='@={vm.powerScrapOut+""}' />-->
<!-- </LinearLayout>-->
<Button

Loading…
Cancel
Save