feat: 增加九天平台对接

This commit is contained in:
2022-05-09 17:09:43 +08:00
parent 496527e8e0
commit c4ce6e4e1d
7 changed files with 110 additions and 9 deletions
@@ -582,7 +582,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
if (!hasFocus&&showPoiEntity!=null&&showPoiEntity.getTaskId()==0) { // 只有自采集任务才需要自动查重
findingDuplicateByWork();
}
}
@@ -583,7 +583,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
if (!hasFocus&&showPoiEntity!=null&&showPoiEntity.getTaskId()==0) { // 只有新增上报数据才需要自动查重
findingDuplicateByWork();
}
}
@@ -13,6 +13,8 @@ import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
@@ -95,6 +97,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
private LatLng latLng, rearLatLng;
private StringBuilder roadBuilder;
private boolean booleanExtra = true;
private RadioButton rbtnRoadOpen/*道路已开通*/, rbtnRoadPartOpen/*道路部分开通*/, rbtnRoadHasntOpen/*道路未开通*/, rbtnRoadHasntFind/*道路未找到*/, rbtnRoadOther/*其他*/;
private RadioGroup rgRoadStatus; // 道路状态的radioGroup
private EditText edtCheckedOther;
public static RoadFragment newInstance(Bundle bundle) {
RoadFragment fragment = new RoadFragment();
@@ -210,6 +215,30 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
@Override
protected void 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.setOnClickListener(this);
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
@@ -595,6 +624,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
httpParams.put("address", poiEntity.getAddress());
httpParams.put("workType", 0);
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()
.time(30)
.Builder(getActivity())
@@ -1,7 +1,8 @@
package com.navinfo.outdoor.http;
public class HttpInterface {
public static final String IP1 = "http://172.23.139.129:9999/m4";//测试接口
public static final String IP2 = "http://172.23.139.129:9999/m4";//测试接口
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//测试接口-外网
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
public static final String USER_PATH = "/user/";//我的
public static final String MSG_LIST_PATH = "/msgList/";//发现