修改 - 质检

master
wangh 10 months ago
parent a15ee5add7
commit f12b4c9cd8

@ -10,7 +10,7 @@ android {
applicationId "com.example.aucma_mes"
minSdk 24
targetSdk 33
versionCode 2
versionCode 5
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

@ -11,7 +11,7 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 2,
"versionCode": 5,
"versionName": "1.0",
"outputFile": "app-release.apk"
}

@ -3,6 +3,7 @@ package com.example.aucma_mes;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
@ -57,13 +58,16 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_check);
checkViewModel = new CheckViewModel();
getSupportActionBar().hide();
binding.setVm(checkViewModel);
checkAdapter = new CheckAdapter(this, this);
submitList = new ArrayList<>();
checkAdapter.setList(submitList);
binding.recyclerView.setAdapter(checkAdapter);
String stationCode = getIntent().getStringExtra("stationCode");
Intent intent = getIntent();
String stationCode = intent.getStringExtra("stationCode");
checkViewModel.setStationCode(stationCode);
binding.setTitle("质量检测 - "+ intent.getStringExtra("stationName"));
// 三联
initOptionpb(stationCode);
tipDialog = new RepairSubmintInfoDialog(this, this);
@ -113,7 +117,7 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
// 测试
public void checkSubmint1(View view) {
sanInfo("B24010181060283110001");
sanInfo("B24010181060282920007");
}
// 提交
public void checkSubmint(View view) {

@ -49,6 +49,7 @@ public class HomePageActivity extends AppCompatActivity {
}
intent = new Intent(this, CheckActivity.class);
intent.putExtra("stationCode", user.getStationCode());
intent.putExtra("stationName",user.getStationName());
startActivity(intent);
});
binding.homeButton2.setOnClickListener(v -> {

@ -53,7 +53,6 @@ public class MainActivity extends BaseActivity {
binding.setUser(user);
OkGo.<Result>get(url + "/base/teamMembers/getTeamMemberList").tag(this)
// .headers("Authorization", SharedPreferencesUtils.getstring("token", ""))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<Result> response) {
@ -131,10 +130,10 @@ public class MainActivity extends BaseActivity {
// 登录
public void login(View view) {
// if (!loginState) {
// Toast.makeText(this, "设备未注册,不允许登录", Toast.LENGTH_SHORT).show();
// return;
// }
if (!loginState) {
Toast.makeText(this, "设备未注册,不允许登录", Toast.LENGTH_SHORT).show();
return;
}
String teamCode = user.getTeamCode();
if (teamCode==null||teamCode.isEmpty()) return;
dialog.show();

@ -1,5 +1,7 @@
package com.example.aucma_mes.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
@ -49,6 +51,14 @@ public class RepaitSubmintInfoAdapter extends RecyclerView.Adapter<RepaitSubmint
defectBeen.setIndex(position + 1);
ItemRepairInfoBinding databing = holder.getInflate1();
databing.setVariable(BR.item, defectBeen);
String processResult = defectBeen.getProcessResult();
if (processResult.equals("放行")){
databing.itemLinear.setBackgroundColor(context.getResources().getColor(R.color.yellow));
}else if (processResult.equals("KA")){
databing.itemLinear.setBackgroundColor(context.getResources().getColor(R.color.red));
}else {
databing.itemLinear.setBackgroundColor(context.getResources().getColor(R.color.item1));
}
databing.itemButtom.setOnClickListener(t -> {
checkItemClickCall.submintRepair(position);
});

@ -26,8 +26,8 @@ import okhttp3.MediaType;
public abstract class BaseActivity extends AppCompatActivity {
private MyBroad receiver;
public static String url="http://192.168.0.102:8080";
// public static String url="http://10.100.72.10:8080";
// public static String url="http://192.168.0.102:8080";
public static String url="http://10.100.72.10:8080";
public ProgressDialog dialog;
public Gson gson;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8");

@ -21,6 +21,7 @@ public class DefectBeen extends BaseObservable {
private String stationCode;
private String qualityDefectCode;
private String qualityDefectName;
private String processResult;//返修结果
private String productLineName;//pda 工位名称
public String getProductLineName() {
@ -43,6 +44,14 @@ public class DefectBeen extends BaseObservable {
this.stationCode = stationCode;
}
public String getProcessResult() {
return processResult;
}
public void setProcessResult(String processResult) {
this.processResult = processResult;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;

@ -4,10 +4,14 @@
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="vm"
type="com.example.aucma_mes.vm.CheckViewModel" />
<import type="android.view.View" />
</data>
<LinearLayout
@ -16,7 +20,15 @@
android:background="@color/grey"
android:orientation="vertical"
tools:context=".CheckActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@color/blue"
android:gravity="center|left"
android:paddingStart="12dp"
android:text="@{title}"
android:textColor="@color/white"
android:textSize="20sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="43dp"
@ -129,8 +141,9 @@
android:layout_height="45dp"
android:layout_margin="10dp"
android:onClick="checkSubmint1"
android:visibility="gone"
android:text="测试" />
<!-- -->
</LinearLayout>
</layout>

@ -144,24 +144,24 @@
android:layout_height="match_parent"
android:text="@{user.teamName}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="45dp"-->
<!-- android:layout_marginTop="8dp"-->
<!-- android:layout_marginEnd="4dp">-->
<TextView
style="@style/text_style1"
android:layout_width="100dp"
android:layout_height="match_parent"
android:text="用户编号:" />
<!-- <TextView-->
<!-- style="@style/text_style1"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:text="用户编号:" />-->
<TextView
style="@style/text_style1_1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@{user.username}" />
</LinearLayout>
<!-- <TextView-->
<!-- style="@style/text_style1_1"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:text="@{user.username}" />-->
<!-- </LinearLayout>-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"

@ -9,6 +9,7 @@
</data>
<LinearLayout
android:id="@+id/item_linear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"

@ -11,4 +11,7 @@
<color name="grey">#F2F3F5</color>
<color name="blue">#377CF9</color>
<color name="item1">#DEE3E6</color>
<color name="red">#6AFF5722</color>
<color name="yellow">#FFEB3B</color>
</resources>
Loading…
Cancel
Save