修改立即采集的bug
This commit is contained in:
parent
8db838ad54
commit
c45355ceac
@ -26,6 +26,7 @@ import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseActivity;
|
||||
import com.navinfo.outdoor.bean.BankPhoneBean;
|
||||
import com.navinfo.outdoor.bean.CityBean;
|
||||
@ -118,6 +119,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
Intent gatheringIntent = new Intent(this, FragmentManagement.class);
|
||||
gatheringIntent.putExtra("tag", 24);
|
||||
startActivity(gatheringIntent);
|
||||
|
||||
break;
|
||||
case R.id.btn_attestation:
|
||||
Intent attestationIntent = new Intent(this, FragmentManagement.class);
|
||||
|
@ -249,7 +249,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
initCompleteTask(HttpInterface.COMPLETE, poiEntity.getTaskId(), true, taskIdPoiEntity);
|
||||
initCompleteTask(HttpInterface.SUBMIT_POLYGON_TASK, poiEntity.getTaskId(), true, taskIdPoiEntity);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -273,7 +273,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
if (poiEntity != null) {
|
||||
int type = poiEntity.getType();
|
||||
if (type == 6) {
|
||||
initSubmitPolygonTask(HttpInterface.SUBMIT_POLYGON_TASK, poiEntity.getTaskId());
|
||||
initSubmitPolygonTask(HttpInterface.COMPLETE, poiEntity.getTaskId());
|
||||
} else {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
@ -465,7 +465,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
public void run() {
|
||||
initViewByTaskStatus(1);
|
||||
if (aBoolean) {
|
||||
initCompleteTask(HttpInterface.COMPLETE, GatherGetFragment.this.poiEntity.getTaskId(), true, polygonEntity);
|
||||
initCompleteTask(HttpInterface.SUBMIT_POLYGON_TASK, GatherGetFragment.this.poiEntity.getTaskId(), true, polygonEntity);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -549,12 +549,14 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
return;
|
||||
}
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("id",taskId);
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(url + "/" + taskId)
|
||||
.url(url)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.params(httpParams)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
|
@ -209,6 +209,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "绑定成功", "确定", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
|
||||
getActivity().finish();
|
||||
return false;
|
||||
}
|
||||
|
@ -383,10 +383,10 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
|
||||
|
||||
private void poiVideoUpload(int poiVideoBody, File fileZip) {
|
||||
// if (poiVideoBody == 0) {
|
||||
// Toast.makeText(getActivity(), "请先保存本地在上传", Toast.LENGTH_SHORT).show();
|
||||
// return;
|
||||
// }
|
||||
if (poiVideoBody == 0) {
|
||||
Toast.makeText(getActivity(), "请先保存本地在上传", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (fileZip == null) {
|
||||
Toast.makeText(getActivity(), "未压缩完成", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
|
@ -387,7 +387,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
|
||||
private void poiVideoUpload(int body, File fileZip) {
|
||||
if (body == 0) {
|
||||
Toast.makeText(getContext(), "请先保存本地在上传", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getContext(), "请先保存本地上传", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (fileZip == null) {
|
||||
|
@ -490,6 +490,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
||||
// 构造 PolylineOpitons
|
||||
PolylineOptions polylineOptions = new PolylineOptions()
|
||||
|
||||
.addAll(latLineString)
|
||||
// 折线设置圆形线头
|
||||
.lineCap(true)
|
||||
@ -847,9 +848,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
if (poiEntity.getTaskStatus() == 1) {
|
||||
poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_bg1);
|
||||
} else {
|
||||
poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_have_bg);
|
||||
poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_have_bg1);
|
||||
}
|
||||
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.9f)
|
||||
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.5f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
poiVideoMarker.setClickable(true);
|
||||
|
@ -63,7 +63,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
private TextView tvCard2;
|
||||
private ImageView ivHera3;
|
||||
private TextView tvCard3;
|
||||
private SharedPreferences.Editor navInfoEditor;
|
||||
private File file;
|
||||
|
||||
|
||||
@ -90,7 +89,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
navInfoEditor = getActivity().getSharedPreferences("navInfo", Context.MODE_PRIVATE).edit();
|
||||
ivAttestation = findViewById(R.id.iv_attestation);
|
||||
ivAttestation.setOnClickListener(this);
|
||||
ivAttestation1 = findViewById(R.id.iv_attestation1);
|
||||
@ -228,16 +226,17 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode()==200){
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "提交成功", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Toast.makeText(getContext(), "", Toast.LENGTH_SHORT).show();
|
||||
getActivity().finish();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}else {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "不通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "提交失败", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
|
||||
@ -253,49 +252,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
Log.d("TAG", "onSuccess: sss********sssssssssssss 失败" + e.getMessage() + "");
|
||||
}
|
||||
});
|
||||
/* OkGo
|
||||
// 请求方式和请求url
|
||||
.<NameAuthenticationBean>post(HttpInterface.USER_AUTH_ADD)
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
|
||||
|
||||
.addFileParams("file", takePhoneList)
|
||||
.tag(this)
|
||||
.execute(new DialogCallback<NameAuthenticationBean>(NameAuthenticationBean.class) {
|
||||
@Override
|
||||
public void onSuccess(Response<NameAuthenticationBean> response) {
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
||||
if (response.code()==200) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
navInfoEditor.putString("attestationName",attestationName);
|
||||
navInfoEditor.commit();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "不通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<NameAuthenticationBean> response) {
|
||||
super.onError(response);
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), response.message(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + response.message());
|
||||
}
|
||||
});*/
|
||||
dismissDialog();
|
||||
}
|
||||
|
||||
|
@ -114,8 +114,8 @@ public class HttpInterface {
|
||||
public static final String RECEIVED_POLYGON_TASK = IP+TASK_PATH + "polygonTask/"+USERID+"/receivedPolygontask"; //面状任务任务领取
|
||||
//172.23.139.4:8003/m4/task/1/unReceivedTask?taskIds=&auditIds=214,278 取消领取的接口
|
||||
public static final String UNRECEIVED_POLYGON_TASK = IP+TASK_PATH + "m4/task/"+USERID+"/unReceivedTask";//所有類型结束领取
|
||||
public static final String COMPLETE = IP+TASK_PATH + "polygonTask/"+USERID+"/complete";//面状任务任务采集
|
||||
public static final String SUBMIT_POLYGON_TASK = IP+TASK_PATH + "polygonTask/"+USERID+"/submitPolygontask";//面状任务结束采集
|
||||
public static final String COMPLETE = IP+TASK_PATH + "polygonTask/"+USERID+"/complete";//面状任务结束领取
|
||||
public static final String SUBMIT_POLYGON_TASK = IP+TASK_PATH + "polygonTask/"+USERID+"/submitPolygontask";//面状任务开始采集
|
||||
|
||||
/**
|
||||
* public static final String IPm8 = "http://172.23.139.4:8003/m4/";
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-hdpi/poi_video_have_bg1.png
Normal file
BIN
app/src/main/res/drawable-hdpi/poi_video_have_bg1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 878 B |
Loading…
x
Reference in New Issue
Block a user