修改bug

This commit is contained in:
md 2021-07-16 17:55:50 +08:00
parent cbd0a10313
commit 15a09d0934
18 changed files with 111 additions and 55 deletions

View File

@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
//ndkVersion '23.0.7123448'
ndkVersion '23.0.7123448'
defaultConfig {
applicationId "com.navinfo.outdoor"

View File

@ -143,7 +143,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
if (isChecked) { // 开始采集设置按钮文字内容为结束采集
captureVideo.setText("暂停采集");
stopVideo.setEnabled(false);// 开始采集视频后禁用停止采集的按钮必须暂停采集后才可点击停止采集
stopVideo.setBackgroundColor(R.drawable.main_shape_outlogin);
startTakenVideo(); // 开始采集视频
/**
@ -159,7 +158,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
if (timerTask!=null){
timerTask.cancel();
stopVideo.setEnabled(true);
stopVideo.setBackgroundColor(R.drawable.btn_end_shape);
captureVideo.setText("开始采集");
stopTakenVideo();
}else {
@ -404,8 +402,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
public void btnSwich() {
// DisplayMetrics dm = new DisplayMetrics();
// getWindowManager().getDefaultDisplay().getMetrics(dm);
// System.out.println("width-display :" + dm.widthPixels);

View File

@ -100,6 +100,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
private String takePhotoPath9;
private String takePhotoPath10;
private int taskId;
private Integer chargingPileBody;
public static ChargingPileFragment newInstance(Bundle bundle) {
ChargingPileFragment fragment = new ChargingPileFragment();
@ -790,6 +791,8 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
@Override
public void onSuccess(ChargingPileSaveBean chargingPileSaveBean, int id) {
dismissLoadingDialog();
chargingPileBody = chargingPileSaveBean.getBody();
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
Log.d("TAG", "onSuccess: " + chargingPileSaveBean.getBody());
getActivity().onBackPressed();

View File

@ -38,7 +38,9 @@ import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
import com.kongzue.dialog.util.BaseDialog;
import com.kongzue.dialog.util.DialogSettings;
import com.kongzue.dialog.v3.MessageDialog;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.HttpParams;
import com.lzy.okgo.model.Response;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.adapter.ChargingPileAdapter;
import com.navinfo.outdoor.api.Constant;
@ -46,7 +48,9 @@ import com.navinfo.outdoor.base.BaseDrawerFragment;
import com.navinfo.outdoor.bean.ChargingStationBean;
import com.navinfo.outdoor.bean.Info;
import com.navinfo.outdoor.bean.PhoneBean;
import com.navinfo.outdoor.bean.PoiUploadBean;
import com.navinfo.outdoor.http.Callback;
import com.navinfo.outdoor.http.DialogCallback;
import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder;
import com.navinfo.outdoor.room.ChargingPileDao;
@ -343,6 +347,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
if (address != null && !address.equals("")) {
editSiteContent.setText(address);
}
body=showPoiEntity.getBodyId();
String x = showPoiEntity.getX();
String y = showPoiEntity.getY();
if (x != null && y != null) {
@ -706,7 +711,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// poiUploadByNetWork(poiDaoPoiEntity.getBodyId(), poiPicList);
stationUploadByNetWork(poiDaoPoiEntity.getBodyId(), chargingStationList);
}
});
}
@ -746,15 +751,48 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
}
}
private void stationUploadByNetWork(Integer body, ArrayList<File> chargingStationList) {
private void stationUploadByNetWork(int body, ArrayList<File> chargingStationList) {
if (body == 0) {
Toast.makeText(getActivity(), "没有保存本地", Toast.LENGTH_SHORT).show();
Log.e("TAG", "poiUploadByNetWork: " + body + chargingStationList);
return;
}
OkGo
// 请求方式和请求url
.<PoiUploadBean>post(HttpInterface.C_TASK_UP_LOAD_PIC)
// 请求的 tag, 主要用于取消对应的请求
.params("auditId", body)
.addFileParams("file", chargingStationList)
.tag(this)
.execute(new DialogCallback<PoiUploadBean>(PoiUploadBean.class) {
@Override
public void onSuccess(Response<PoiUploadBean> poiUploadBeanResponse) {
dismissLoadingDialog();
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
Log.d("TAG", "onSuccess: " + poiUploadBeanResponse.toString() + "sssssssssssss");
new Thread(new Runnable() {
@Override
public void run() {
poiDao.deletePoiEntity(showPoiEntity);
}
}).start();
}
@Override
public void onError(Response<PoiUploadBean> poiUploadBeanResponse) {
super.onError(poiUploadBeanResponse);
dismissLoadingDialog();
Toast.makeText(getActivity(), poiUploadBeanResponse.code() + "", Toast.LENGTH_SHORT).show();
Log.d("TAG", "onError: " + poiUploadBeanResponse.code() + "");
}
});
}
private void chargingStationSaveByWork(PoiEntity poiEntity) {
showLoadingDialog();
HttpParams httpParams = new HttpParams();
httpParams.put("id", poiEntity.getTaskId());
httpParams.put("taskId", poiEntity.getTaskId());
httpParams.put("sptype", poiEntity.getStation_type());
httpParams.put("name", poiEntity.getName());
httpParams.put("address", poiEntity.getAddress());

View File

@ -399,7 +399,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
private void otherUploadByNet(int body, List<File> otherUploadList) {
if (body == 0) {
Toast.makeText(getActivity(), "没有保存本地", Toast.LENGTH_SHORT).show();
Toast.makeText(getActivity(), "没有保存本地,请先保存本地", Toast.LENGTH_SHORT).show();
Log.e("TAG", "poiUploadByNetWork: " + body + otherUploadList);
return;
}
@ -416,6 +416,13 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
dismissLoadingDialog();
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
Log.d("TAG", "onSuccess: " + poiUploadBeanResponse.toString() + "sssssssssssss");
new Thread(new Runnable() {
@Override
public void run() {
poiDao.deletePoiEntity(showPoiEntity);
}
}).start();
}
@Override

View File

@ -606,6 +606,12 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
dismissLoadingDialog();
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
Log.d("TAG", "onSuccess: " + otherUploadPicBeanResponse.toString() + "sssssssssssss");
new Thread(new Runnable() {
@Override
public void run() {
poiDao.deletePoiEntity(showPoiEntity);
}
}).start();
}
@Override
@ -782,7 +788,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
}
});
} else {
// int angle2 = PictureUtil.readPictureDegree(takePhotoPath2);
takePhotoPath2 = PhotoPathUtil.getTakePhotoPath(data, "b",Geohash.getInstance().encode(latLng.latitude,latLng.longitude));
ivName.setTag(takePhotoPath2);
ivName.setImageBitmap(bitmap);//显示图像

View File

@ -203,8 +203,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
if (showPoiEntity != null) {
String name = showPoiEntity.getName();//名称
if (name != null && !name.equals("")) {
etRoadName.setText(name + "");
etRoadName.setText( name+"");
}
String extend = showPoiEntity.getExtend();
if (extend != null && !extend.equals("")) {
@ -278,10 +279,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
if (all) {
PoiEntity poiEntity = showPoiEntity;
String roadName = etRoadName.getText().toString().trim();
if (roadName == null || roadName.equals("")) {
Toast.makeText(getContext(), "请输入poi录像 名称", Toast.LENGTH_SHORT).show();
return;
} else {
if (roadName != null || !roadName.equals("")) {
poiEntity.setName(roadName+"");
}
RoadExtend roadExtend = new RoadExtend();
@ -335,7 +333,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
new Thread(new Runnable() {
@Override
public void run() {
//
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
getActivity().runOnUiThread(new Runnable() {
@Override
@ -425,7 +422,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
dismissLoadingDialog();
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
Log.d("TAG", "onSuccess: " + otherUploadPicBeanResponse.toString() + "sssssssssssss");
new Thread(new Runnable() {
@Override
public void run() {
poiDao.deletePoiEntity(showPoiEntity);
}
}).start();
}
@Override

View File

@ -290,10 +290,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
PoiEntity poiEntity = showPoiEntity;
String roadName = etRoadName.getText().toString().trim();
if (roadName == null || roadName.equals("")) {
Toast.makeText(getContext(), "请输入道路 名称", Toast.LENGTH_SHORT).show();
return;
} else {
poiEntity.setName(roadName);
poiEntity.setName(roadName+"");
}
RoadExtend roadExtend = new RoadExtend();
int type = getPictureType();
@ -434,7 +432,12 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
dismissLoadingDialog();
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
Log.d("TAG", "onSuccess: " + otherUploadPicBeanResponse.toString() + "sssssssssssss");
new Thread(new Runnable() {
@Override
public void run() {
poiDao.deletePoiEntity(showPoiEntity);
}
}).start();
}
@Override

View File

@ -122,6 +122,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
private List<Removable> removables;
private List<PoiEntity> showAllPoi;
private List<Removable> removablesLocality;
private boolean ischank = true;
public static TreasureFragment newInstance(Bundle bundle) {
TreasureFragment fragment = new TreasureFragment();
@ -154,6 +155,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
ivSubmit.setOnClickListener(this::onClick);
ivMessage = findViewById(R.id.iv_message);
ivMessage.setOnClickListener(this::onClick);
ivMessage.setVisibility(View.VISIBLE);
treasureMap = (MapView) findViewById(R.id.treasure_map);
tencentMap = treasureMap.getMap();
cbMapType = (CheckBox) findViewById(R.id.cb_map_type);
@ -273,6 +275,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
}
private void initList(TencentLocation tencentLocation) {
showLoadingDialog();
int task_type = Constant.TASK_TYPE;
int limit_type = Constant.LIMIT_TTPE;
int taskStatus = Constant.TASK_STASTUS;
@ -306,6 +309,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
.execute(new DialogCallback<JobSearchBean>(JobSearchBean.class) {
@Override
public void onSuccess(Response<JobSearchBean> response) {
dismissLoadingDialog();
Log.d("TAG", "onSuccess: " + response.body().toString() + "sssssssssssss");
for (int i = 0; i < removables.size(); i++) {
removables.get(i).remove();
@ -425,6 +429,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
@Override
public void onError(Response<JobSearchBean> response) {
super.onError(response);
dismissLoadingDialog();
Log.d("TAG", "onError: " + response.message() + "");
}
});
@ -781,7 +786,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
}
} else if (data.what == Constant.MAIN_CHARGING_PILE) {//充电桩采集-移动位置
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_pile_have_bg);
initPileMarker((LatLng) data.obj,pileDescriptor);
initPileMarker((LatLng) data.obj, pileDescriptor);
} else if (data.what == Constant.MAIN_CHARGING_CHECKED_PILE) {//充电桩采集-确定位置
if ((boolean) data.obj) {
initCheckedMarker(Constant.CHARGING_PILE_WORD);
@ -905,7 +910,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
}
private void initPileMarker(LatLng latLng,BitmapDescriptor bitmapDescriptor) {
private void initPileMarker(LatLng latLng, BitmapDescriptor bitmapDescriptor) {
CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition(new CameraPosition(
latLng, //中心点坐标地图目标经纬度
tencentMap.getCameraPosition().zoom, //目标缩放级别
@ -1060,6 +1065,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
}
break;
case R.id.iv_submit://弹窗
ivMessage.setVisibility(View.GONE);
//分享
CharSequence title = "请选择上报类型";
DialogSettings.style = DialogSettings.STYLE.STYLE_MIUI;
@ -1087,7 +1093,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
break;
case 1:
bundle.putSerializable("poiEntity", poiEntity);
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_have_bg);
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_have_bag);
markerPoi = tencentMap.addMarker(new MarkerOptions(mapCenterPoint).icon(poiVideoDescriptor));
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
showSlidingFragment(poiVideoFragment);

View File

@ -49,43 +49,39 @@ public class HttpInterface {
//172.23.139.4:8003/othertask/1/submitOhtertask?taskId=5001&name=测试修改名称&address=测试修改地址&existence=1&geo=1rn7exd5uhxy&memo=测试备注
public static final String SUBMIT_OTHER_TASK = IPm6 + "othertask/1/submitOthertask";//其他-保存本地
//172.23.139.4:8003/othertask/1/uploadpic
public static final String OTHER_TASK_UPLOAD_PIC=IPm6+"othertask/1/uploadpic";//其他-上传
public static final String OTHER_TASK_UPLOAD_PIC = IPm6 + "othertask/1/uploadpic";//其他-上传
//172.23.139.4:8003/ctask/1/receivedCtask/8608
public static final String RECEIVED_CTASK=IPm6+"ctask/1/receivedCtask";//充电站-领取任务
public static final String RECEIVED_CTASK = IPm6 + "ctask/1/receivedCtask";//充电站-领取任务
//172.23.139.4:8003/ctask/1/submitCtask?id=8608&name=充电站&address=地址&telephone=18812345678|14712345678&geo=1rn7exd5uhxy&memo=测试备注&sptype=1
public static final String SUBMIT_CTASK=IPm6+"ctask/1/submitCtask";//充电站-保存本地
public static final String SUBMIT_CTASK = IPm6 + "ctask/1/submitCtask";//充电站-保存本地
//172.23.139.4:8003/cstask/1/submitCstask?taskId=0&name=充电站&geo=1rn7exd5uhxy&memo=测试备注&sptype=1&ffid=104&existence=1&detail={"cp_openType":"1,2","cp_floor":1,"cp_availableState":0,"sign_exist":0}
public static final String SUBMIT_CSTASK =IPm6+"cstask/1/submitCstask";//充电桩保存
public static final String SUBMIT_CSTASK = IPm6 + "cstask/1/submitCstask";//充电桩保存
//172.23.139.4:8003/poitask/1/uploadpic
public static final String POI_TASK_UPLOAD_PIC=IPm6+"poitask/1/uploadpic";//poi-上传
public static final String POI_TASK_UPLOAD_PIC = IPm6 + "poitask/1/uploadpic";//poi-上传
//172.23.139.4:8003/roadtask/1/receivedRoadtask/8569
public static final String RECEIVED_ROAD_TASK = IPm6+"roadtask/1/receivedRoadtask";//道路任务获取
public static final String RECEIVED_ROAD_TASK = IPm6 + "roadtask/1/receivedRoadtask";//道路任务获取
//172.23.139.4:8003/poivideotask/1/receivedPoivideotask/8569
public static final String RECEIVED_POI_VIDEO_TASK = IPm6+"poivideotask/1/receivedPoivideotask";//poi录像任务获取
public static final String RECEIVED_POI_VIDEO_TASK = IPm6 + "poivideotask/1/receivedPoivideotask";//poi录像任务获取
// 172.23.139.4:8003/poivideotask/1/submitPoivideotask
public static final String INSIDE_API_LIST = IPm6+"poivideotask/1/submitPoivideotask";//poi录像 保存
public static final String INSIDE_API_LIST = IPm6 + "poivideotask/1/submitPoivideotask";//poi录像 保存
//172.23.139.4:8003/poivideotask/1/uploadpic
public static final String POI_VIDEO_UPLOAD_PIC = IPm6+"poivideotask/1/uploadpic";//poi录像-上传
public static final String POI_VIDEO_UPLOAD_PIC = IPm6 + "poivideotask/1/uploadpic";//poi录像-上传
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
public static final String GET_PHONE = IPm6 + "m4/task/1/getPhone"; //任务搜索
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
public static final String GET_PHONES = IPm6+"m4/task/1/getPhone";//电话区号和电话位数
public static final String GET_PHONES = IPm6 + "m4/task/1/getPhone";//电话区号和电话位数
//172.23.139.4:8003/cstask/1/uploadpic
public static final String CS_TASK_UP_LOAD_PIC = IPm6 + "cstask/1/uploadpic";//充电桩-上传
//172.23.139.4:8003/ctask/1/uploadpic
public static final String C_TASK_UP_LOAD_PIC= IPm6+"ctask/1/uploadpic";//充电站-上传
/**
* 面状任务
*/
public static final String RECEIVED_POLYGON_TASK=IPm6+"polygonTask/1/receivedPolygontask"; //任务领取
public static final String UNRECEIVED_POLYGON_TASK=IPm6+"polygonTask/1/unReceivedPolygontask";//结束领取
public static final String COMPLETE=IPm6+"polygonTask/1/complete";//任务采集
public static final String SUBMIT_POLYGON_TASK=IPm6+"polygonTask/1/submitPolygontask";//结束采集
public static final String RECEIVED_POLYGON_TASK = IPm6 + "polygonTask/1/receivedPolygontask"; //任务领取
public static final String UNRECEIVED_POLYGON_TASK = IPm6 + "polygonTask/1/unReceivedPolygontask";//结束领取
public static final String COMPLETE = IPm6 + "polygonTask/1/complete";//任务采集
public static final String SUBMIT_POLYGON_TASK = IPm6 + "polygonTask/1/submitPolygontask";//结束采集
}

View File

@ -45,15 +45,15 @@ public class PoiEntity implements Serializable {
private int isLocalData;//是否是本地数据 0,服务 1,本地
private int isExclusive;//任务类型 0.普通任务1.专属任务
private int bodyId;//保存本地的bodyId
//private int work_type;//0."车行" 1."自行车" 2."步行" 3."手动"
private int work_type;//0."车行" 1."自行车" 2."步行" 3."手动"
// public int getWork_type() {
// return work_type;
// }
//
// public void setWork_type(int work_type) {
// this.work_type = work_type;
// }
public int getWork_type() {
return work_type;
}
public void setWork_type(int work_type) {
this.work_type = work_type;
}
public String getGeoWkt() {
return geoWkt;

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB