fix: 合并代码

This commit is contained in:
2022-06-13 11:13:48 +08:00
7 changed files with 137 additions and 11 deletions

View File

@@ -9,8 +9,8 @@ android {
applicationId "com.navinfo.outdoor" applicationId "com.navinfo.outdoor"
minSdkVersion 22 minSdkVersion 22
targetSdkVersion 30 targetSdkVersion 30
versionCode 20 versionCode 21
versionName "8.220422" versionName "8.220510"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
lintOptions { lintOptions {
@@ -36,6 +36,7 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
ndkVersion '21.3.6528147'
} }
//efs { //efs {
// //是否对启动过程进程插桩的开关,如果使用自动集成监控则必须开启 // //是否对启动过程进程插桩的开关,如果使用自动集成监控则必须开启

View File

@@ -582,7 +582,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() { editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override @Override
public void onFocusChange(View v, boolean hasFocus) { public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) { if (!hasFocus&&showPoiEntity!=null&&showPoiEntity.getTaskId()==0) { // 只有自采集任务才需要自动查重
findingDuplicateByWork(); findingDuplicateByWork();
} }
} }

View File

@@ -583,7 +583,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() { editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override @Override
public void onFocusChange(View v, boolean hasFocus) { public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) { if (!hasFocus&&showPoiEntity!=null&&showPoiEntity.getTaskId()==0) { // 只有新增上报数据才需要自动查重
findingDuplicateByWork(); findingDuplicateByWork();
} }
} }

View File

@@ -563,6 +563,10 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
public void onGranted(List<String> permissions, boolean all) { public void onGranted(List<String> permissions, boolean all) {
if (all) { if (all) {
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity); PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
if (poiEntity.getPhoto() == null||poiEntity.getPhoto().isEmpty()) {
Toast.makeText(getActivity(), "POI录像任务必须拍照", Toast.LENGTH_LONG).show();
return;
}
PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity); PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity);
if (poiCheckResult.getCode() == 1) { if (poiCheckResult.getCode() == 1) {
ToastUtils.Message(getActivity(), poiCheckResult.getMsg()); ToastUtils.Message(getActivity(), poiCheckResult.getMsg());

View File

@@ -13,6 +13,8 @@ import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@@ -95,6 +97,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
private LatLng latLng, rearLatLng; private LatLng latLng, rearLatLng;
private StringBuilder roadBuilder; private StringBuilder roadBuilder;
private boolean booleanExtra = true; private boolean booleanExtra = true;
private RadioButton rbtnRoadOpen/*道路已开通*/, rbtnRoadPartOpen/*道路部分开通*/, rbtnRoadHasntOpen/*道路未开通*/, rbtnRoadHasntFind/*道路未找到*/, rbtnRoadOther/*其他*/;
private RadioGroup rgRoadStatus; // 道路状态的radioGroup
private EditText edtCheckedOther;
public static RoadFragment newInstance(Bundle bundle) { public static RoadFragment newInstance(Bundle bundle) {
RoadFragment fragment = new RoadFragment(); RoadFragment fragment = new RoadFragment();
@@ -210,6 +215,30 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
@Override @Override
protected void initView() { protected void initView() {
super.initView(); super.initView();
rbtnRoadOpen = findViewById(R.id.rbtn_road_open);
rbtnRoadPartOpen = findViewById(R.id.rbtn_road_part_open);
rbtnRoadHasntOpen = findViewById(R.id.rbtn_road_hasnt_open);
rbtnRoadHasntFind = findViewById(R.id.rbtn_road_hasnt_find);
rbtnRoadOther = findViewById(R.id.rbtn_road_other);
rgRoadStatus = findViewById(R.id.rg_road_status);
edtCheckedOther = findViewById(R.id.edt_checked_other);
rgRoadStatus.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
rgRoadStatus.setTag(findViewById(checkedId).getTag());
switch (checkedId) {
case R.id.rbtn_road_other:
edtCheckedOther.setVisibility(View.VISIBLE);
break;
default:
edtCheckedOther.setVisibility(View.GONE);
break;
}
}
});
tvPictures = findViewById(R.id.tv_pictures); tvPictures = findViewById(R.id.tv_pictures);
tvPictures.setOnClickListener(this); tvPictures.setOnClickListener(this);
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT); setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
@@ -399,6 +428,14 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
tvPictures.setEnabled(false); tvPictures.setEnabled(false);
etDesc.setEnabled(false); etDesc.setEnabled(false);
btnRoadSave.setEnabled(false); btnRoadSave.setEnabled(false);
rgRoadStatus.setEnabled(false);
rbtnRoadOpen.setEnabled(false);
rbtnRoadPartOpen.setEnabled(false);
rbtnRoadHasntOpen.setEnabled(false);
rbtnRoadHasntFind.setEnabled(false);
rbtnRoadOther.setEnabled(false);
edtCheckedOther.setEnabled(false);
} }
@Subscribe @Subscribe
@@ -550,6 +587,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
public void onGranted(List<String> permissions, boolean all) { public void onGranted(List<String> permissions, boolean all) {
if (all) { if (all) {
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity); PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
if (poiEntity.getPhoto() == null||poiEntity.getPhoto().isEmpty()) {
Toast.makeText(getActivity(), "道路任务必须拍照!", Toast.LENGTH_LONG).show();
return;
}
PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity); PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity);
if (poiCheckResult.getCode() == 1) { if (poiCheckResult.getCode() == 1) {
ToastUtils.Message(getActivity(), poiCheckResult.getMsg()); ToastUtils.Message(getActivity(), poiCheckResult.getMsg());
@@ -595,6 +636,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
httpParams.put("address", poiEntity.getAddress()); httpParams.put("address", poiEntity.getAddress());
httpParams.put("workType", 0); httpParams.put("workType", 0);
httpParams.put("memo", poiEntity.getMemo()); httpParams.put("memo", poiEntity.getMemo());
// 增加对应九天平台的参数
httpParams.put("existence", rgRoadStatus.getTag().toString());
httpParams.put("description", edtCheckedOther!=null&&edtCheckedOther.isShown()? edtCheckedOther.getText().toString().trim(): "");
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance() OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
.time(30) .time(30)
.Builder(getActivity()) .Builder(getActivity())
@@ -648,6 +693,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
httpParams.put("address", poiEntity.getAddress()); httpParams.put("address", poiEntity.getAddress());
httpParams.put("workType", 0); httpParams.put("workType", 0);
httpParams.put("memo", poiEntity.getMemo()); httpParams.put("memo", poiEntity.getMemo());
// 增加对应九天平台的参数
httpParams.put("existence", rgRoadStatus.getTag().toString());
httpParams.put("description", edtCheckedOther!=null&&edtCheckedOther.isShown()? edtCheckedOther.getText().toString().trim(): "");
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance() OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
.time(30) .time(30)
.Builder(getActivity()) .Builder(getActivity())

View File

@@ -1,7 +1,8 @@
package com.navinfo.outdoor.http; package com.navinfo.outdoor.http;
public class HttpInterface { public class HttpInterface {
public static final String IP = "http://172.23.139.129:9999/m4";//测试接口 public static final String IP2 = "http://172.23.139.129:9999/m4";//测试接口
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//测试接口-外网
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口 public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
public static final String USER_PATH = "/user/";//我的 public static final String USER_PATH = "/user/";//我的
public static final String MSG_LIST_PATH = "/msgList/";//发现 public static final String MSG_LIST_PATH = "/msgList/";//发现

View File

@@ -120,7 +120,6 @@
android:scaleType="fitXY" /> android:scaleType="fitXY" />
</FrameLayout> </FrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_desc" android:id="@+id/ll_desc"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -129,12 +128,85 @@
app:layout_constraintLeft_toLeftOf="@id/fm_road_picture" app:layout_constraintLeft_toLeftOf="@id/fm_road_picture"
app:layout_constraintTop_toBottomOf="@id/fm_road_picture"> app:layout_constraintTop_toBottomOf="@id/fm_road_picture">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:text="03.任务状态"
android:textColor="@color/black"
android:textSize="16sp" />
<RadioGroup
android:id="@+id/rg_road_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:tag="0"
android:orientation="vertical">
<RadioButton
android:id="@+id/rbtn_road_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tag="0"
android:checked="true"
android:text="道路正常开通"></RadioButton>
<RadioButton
android:id="@+id/rbtn_road_part_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tag="1"
android:text="道路部分开通"></RadioButton>
<RadioButton
android:id="@+id/rbtn_road_hasnt_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tag="2"
android:text="道路未开通"></RadioButton>
<RadioButton
android:id="@+id/rbtn_road_hasnt_find"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tag="3"
android:text="道路未找到"></RadioButton>
<RadioButton
android:id="@+id/rbtn_road_other"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tag="4"
android:text="其他不可采原因"></RadioButton>
</RadioGroup>
<EditText
android:id="@+id/edt_checked_other"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="top"
android:hint="可手动输入"
android:padding="10dp"
android:minLines="2"
android:maxLines="3"
android:background="@drawable/underline"
android:textColor="@color/test_color_selector"
android:textSize="15sp"></EditText>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintLeft_toLeftOf="@id/fm_road_picture"
app:layout_constraintTop_toBottomOf="@id/ll_desc">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:text="03.描述" android:text="04.备注"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -160,9 +232,9 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:gravity="top" android:gravity="top"
android:hint="任务描述" android:hint="任务描述"
android:paddingStart="10dp" android:padding="10dp"
android:paddingTop="10dp" android:minLines="2"
android:paddingBottom="30dp" android:maxLines="3"
android:textColor="@color/test_color_selector" android:textColor="@color/test_color_selector"
android:textSize="15sp" android:textSize="15sp"
@@ -182,7 +254,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_desc"> app:layout_constraintTop_toBottomOf="@id/ll_info">
<Button <Button
android:id="@+id/btn_road_save" android:id="@+id/btn_road_save"