fix: 修改bug
This commit is contained in:
@@ -37,8 +37,8 @@ android {
|
|||||||
applicationId "com.navinfo.outdoor"
|
applicationId "com.navinfo.outdoor"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 118
|
versionCode 119
|
||||||
versionName "8.231110-通用测试版"
|
versionName "8.231201-测试版"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
|
|||||||
@@ -1365,7 +1365,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
|
|||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
UnPolygonTaskBean response = gson.fromJson(bodyString, UnPolygonTaskBean.class);
|
UnPolygonTaskBean response = gson.fromJson(bodyString, UnPolygonTaskBean.class);
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
PoiDatabase.getInstance(AutoTakePicture4PoiActivity.this).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(AutoTakePicture4PoiActivity.this).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
// 不需要删除照片,自动采集时照片是临时保存在tmp目录下
|
// 不需要删除照片,自动采集时照片是临时保存在tmp目录下
|
||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(AutoTakePicture4PoiActivity.this);
|
FlushTokenUtil.flushToken(AutoTakePicture4PoiActivity.this);
|
||||||
|
|||||||
@@ -1224,7 +1224,7 @@ public class AutoTakePicture4PoiVideoActivity extends BaseActivity implements Vi
|
|||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
UnPolygonTaskBean response = gson.fromJson(bodyString, UnPolygonTaskBean.class);
|
UnPolygonTaskBean response = gson.fromJson(bodyString, UnPolygonTaskBean.class);
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
PoiDatabase.getInstance(AutoTakePicture4PoiVideoActivity.this).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(AutoTakePicture4PoiVideoActivity.this).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
// 不需要删除照片,自动采集时照片是临时保存在tmp目录下
|
// 不需要删除照片,自动采集时照片是临时保存在tmp目录下
|
||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(AutoTakePicture4PoiVideoActivity.this);
|
FlushTokenUtil.flushToken(AutoTakePicture4PoiVideoActivity.this);
|
||||||
|
|||||||
@@ -1416,7 +1416,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
|
|||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
UnPolygonTaskBean response = gson.fromJson(bodyString, UnPolygonTaskBean.class);
|
UnPolygonTaskBean response = gson.fromJson(bodyString, UnPolygonTaskBean.class);
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
PoiDatabase.getInstance(AutoTakePictureActivity.this).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(AutoTakePictureActivity.this).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
// 不需要删除照片,自动采集时照片是临时保存在tmp目录下
|
// 不需要删除照片,自动采集时照片是临时保存在tmp目录下
|
||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(AutoTakePictureActivity.this);
|
FlushTokenUtil.flushToken(AutoTakePictureActivity.this);
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class HasReceiveAdapter extends RecyclerView.Adapter<HasReceiveAdapter.Vi
|
|||||||
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
||||||
if (poiEntity.isChecked()) {
|
if (poiEntity.isChecked()) {
|
||||||
PoiEntityDeleteUtil.getInstance().deleteUtil(context, poiEntity);
|
PoiEntityDeleteUtil.getInstance().deleteUtil(context, poiEntity);
|
||||||
PoiDatabase.getInstance(context).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(context).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,16 @@ public class HasReceiveAdapter extends RecyclerView.Adapter<HasReceiveAdapter.Vi
|
|||||||
public void onBindViewHolder(@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
public void onBindViewHolder(@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
||||||
PoiEntity poiEntity = allRoad.get(position);
|
PoiEntity poiEntity = allRoad.get(position);
|
||||||
holder.tvName.setText(poiEntity.getName());
|
holder.tvName.setText(poiEntity.getName());
|
||||||
holder.tvDay.setText(poiEntity.getCreateTime());
|
if (poiEntity.getCreateTime()!=null&&!poiEntity.getCreateTime().trim().isEmpty()) {
|
||||||
|
holder.tvCreateTime.setText("领取时间:"+poiEntity.getCreateTime());
|
||||||
|
} else {
|
||||||
|
holder.tvCreateTime.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
if (poiEntity.getUnReceivedTime()!=null&&!poiEntity.getUnReceivedTime().trim().isEmpty()) {
|
||||||
|
holder.tvExpirationTime.setText("过期时间:"+poiEntity.getUnReceivedTime());
|
||||||
|
} else {
|
||||||
|
holder.tvExpirationTime.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
//获取checkBox点击的记录
|
//获取checkBox点击的记录
|
||||||
holder.cbUnSubmit.setChecked(allRoad.get(position).isChecked());
|
holder.cbUnSubmit.setChecked(allRoad.get(position).isChecked());
|
||||||
holder.cbUnSubmit.setOnClickListener(new View.OnClickListener() {
|
holder.cbUnSubmit.setOnClickListener(new View.OnClickListener() {
|
||||||
@@ -196,7 +205,7 @@ public class HasReceiveAdapter extends RecyclerView.Adapter<HasReceiveAdapter.Vi
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
private TextView tvName, tvText, tvDay;
|
private TextView tvName, tvText, tvCreateTime, tvExpirationTime;
|
||||||
private CheckBox cbUnSubmit;
|
private CheckBox cbUnSubmit;
|
||||||
private ProgressBar pbUpload;
|
private ProgressBar pbUpload;
|
||||||
private TextView tvUploadProgress, tvUploadResult;
|
private TextView tvUploadProgress, tvUploadResult;
|
||||||
@@ -206,7 +215,8 @@ public class HasReceiveAdapter extends RecyclerView.Adapter<HasReceiveAdapter.Vi
|
|||||||
super(itemView);
|
super(itemView);
|
||||||
tvName = itemView.findViewById(R.id.tv_road_name);
|
tvName = itemView.findViewById(R.id.tv_road_name);
|
||||||
tvText = itemView.findViewById(R.id.tv_text);
|
tvText = itemView.findViewById(R.id.tv_text);
|
||||||
tvDay = itemView.findViewById(R.id.tv_road_day);
|
tvCreateTime = itemView.findViewById(R.id.tv_poi_createtime);
|
||||||
|
tvExpirationTime = itemView.findViewById(R.id.tv_poi_expirationtime);
|
||||||
cbUnSubmit = itemView.findViewById(R.id.cb_unSubmit);
|
cbUnSubmit = itemView.findViewById(R.id.cb_unSubmit);
|
||||||
pbUpload = itemView.findViewById(R.id.pb_stay_upload);
|
pbUpload = itemView.findViewById(R.id.pb_stay_upload);
|
||||||
tvUploadProgress = itemView.findViewById(R.id.tv_pb_stay_upload);
|
tvUploadProgress = itemView.findViewById(R.id.tv_pb_stay_upload);
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
|||||||
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
||||||
if (poiEntity.isChecked()) {
|
if (poiEntity.isChecked()) {
|
||||||
PoiEntityDeleteUtil.getInstance().deleteUtil(context, poiEntity);
|
PoiEntityDeleteUtil.getInstance().deleteUtil(context, poiEntity);
|
||||||
PoiDatabase.getInstance(context).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(context).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
|||||||
public void onBindViewHolder(@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
public void onBindViewHolder(@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
||||||
PoiEntity poiEntity = allRoad.get(position);
|
PoiEntity poiEntity = allRoad.get(position);
|
||||||
holder.tvName.setText(poiEntity.getName());
|
holder.tvName.setText(poiEntity.getName());
|
||||||
holder.tvDay.setText(poiEntity.getCreateTime());
|
holder.tvDay.setText("保存时间:"+poiEntity.getCreateTime());
|
||||||
//获取checkBox点击的记录
|
//获取checkBox点击的记录
|
||||||
holder.cbUnSubmit.setChecked(allRoad.get(position).isChecked());
|
holder.cbUnSubmit.setChecked(allRoad.get(position).isChecked());
|
||||||
holder.cbUnSubmit.setOnClickListener(new View.OnClickListener() {
|
holder.cbUnSubmit.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ import com.tencent.map.navi.TencentNavi;
|
|||||||
import com.tencent.navi.surport.utils.DeviceUtils;
|
import com.tencent.navi.surport.utils.DeviceUtils;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.TencentMapInitializer;
|
import com.tencent.tencentmap.mapsdk.maps.TencentMapInitializer;
|
||||||
import com.umeng.commonsdk.UMConfigure;
|
import com.umeng.commonsdk.UMConfigure;
|
||||||
|
import com.umeng.message.IUmengRegisterCallback;
|
||||||
|
import com.umeng.message.PushAgent;
|
||||||
|
import com.umeng.message.UmengMessageHandler;
|
||||||
|
import com.umeng.message.entity.UMessage;
|
||||||
import com.umeng.umcrash.UMCrash;
|
import com.umeng.umcrash.UMCrash;
|
||||||
import com.umeng.umcrash.UMCrashCallback;
|
import com.umeng.umcrash.UMCrashCallback;
|
||||||
|
|
||||||
@@ -44,7 +48,7 @@ import okhttp3.OkHttpClient;
|
|||||||
public class UserApplication extends Application {
|
public class UserApplication extends Application {
|
||||||
public static UserApplication userApplication;
|
public static UserApplication userApplication;
|
||||||
public static ExecutorService fixedThreadPool;
|
public static ExecutorService fixedThreadPool;
|
||||||
// public static PushAgent instance;
|
public static PushAgent instance;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
@@ -102,45 +106,45 @@ public class UserApplication extends Application {
|
|||||||
return "注册友盟异常查看功能";
|
return "注册友盟异常查看功能";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// instance = PushAgent.getInstance(this);
|
instance = PushAgent.getInstance(this);
|
||||||
// instance.register(new IUmengRegisterCallback() {
|
instance.register(new IUmengRegisterCallback() {
|
||||||
// @Override
|
@Override
|
||||||
// public void onSuccess(String s) {
|
public void onSuccess(String s) {
|
||||||
// //注册成功会返回deviceToken deviceToken是推送消息的唯一标志
|
//注册成功会返回deviceToken deviceToken是推送消息的唯一标志
|
||||||
// Constant.DEVICE_TOKEN = s;
|
Constant.DEVICE_TOKEN = s;
|
||||||
// Log.i("TAGEE", "Success 注册成功:deviceToken:--> " + Constant.DEVICE_TOKEN);
|
Log.i("TAGEE", "Success 注册成功:deviceToken:--> " + Constant.DEVICE_TOKEN);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
// Log.e("TAGEE", "Failure 注册失败:--> " + "code:" + s + ", desc:" + s1);
|
Log.e("TAGEE", "Failure 注册失败:--> " + "code:" + s + ", desc:" + s1);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
// instance.onAppStart();
|
instance.onAppStart();
|
||||||
// UmengMessageHandler msgHandler = new UmengMessageHandler() {
|
UmengMessageHandler msgHandler = new UmengMessageHandler() {
|
||||||
// //处理通知栏消息
|
//处理通知栏消息
|
||||||
// @Override
|
@Override
|
||||||
// public void dealWithNotificationMessage(Context context, UMessage msg) {
|
public void dealWithNotificationMessage(Context context, UMessage msg) {
|
||||||
// super.dealWithNotificationMessage(context, msg);
|
super.dealWithNotificationMessage(context, msg);
|
||||||
// Log.i("TAGEE", "dealWithNotificationMessage:" + msg.getRaw().toString());
|
Log.i("TAGEE", "dealWithNotificationMessage:" + msg.getRaw().toString());
|
||||||
// Constant.NOTIFICATION=msg.getRaw().toString();
|
Constant.NOTIFICATION=msg.getRaw().toString();
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// //自定义通知样式,此方法可以修改通知样式等
|
//自定义通知样式,此方法可以修改通知样式等
|
||||||
// @Override
|
@Override
|
||||||
// public Notification getNotification(Context context, UMessage msg) {
|
public Notification getNotification(Context context, UMessage msg) {
|
||||||
// Log.i("TAGEE", "getNotification: "+msg.getRaw().toString());
|
Log.i("TAGEE", "getNotification: "+msg.getRaw().toString());
|
||||||
// return super.getNotification(context, msg);
|
return super.getNotification(context, msg);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// //处理透传消息
|
//处理透传消息
|
||||||
// @Override
|
@Override
|
||||||
// public void dealWithCustomMessage(Context context, UMessage msg) {
|
public void dealWithCustomMessage(Context context, UMessage msg) {
|
||||||
// super.dealWithCustomMessage(context, msg);
|
super.dealWithCustomMessage(context, msg);
|
||||||
// Log.i("TAGEE", "dealWithCustomMessage:" + msg.getRaw().toString());
|
Log.i("TAGEE", "dealWithCustomMessage:" + msg.getRaw().toString());
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
// instance.setMessageHandler(msgHandler);
|
instance.setMessageHandler(msgHandler);
|
||||||
//App处于前台时不显示通知
|
//App处于前台时不显示通知
|
||||||
//instance.setNotificationOnForeground(false);
|
//instance.setNotificationOnForeground(false);
|
||||||
//设置显示通知的数量
|
//设置显示通知的数量
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class JobSearchBean implements Serializable {
|
|||||||
private String memo;
|
private String memo;
|
||||||
private String telephone;
|
private String telephone;
|
||||||
|
|
||||||
private int publish; // 是否已发布,如果是未发布的数据,则用半透明形式展示
|
private int publish; // 是否已发布,如果是未发布的数据,则用半透明形式展示,0-未发布,1-已发布
|
||||||
|
|
||||||
public int getCanReceived() {
|
public int getCanReceived() {
|
||||||
return canReceived;
|
return canReceived;
|
||||||
|
|||||||
@@ -816,7 +816,7 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
if (poiEntity.getId() != null) {
|
if (poiEntity.getId() != null) {
|
||||||
|
|||||||
@@ -917,7 +917,7 @@ public class BuildingInFragment extends BaseDrawerFragment implements View.OnCli
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
if (poiEntity.getId() != null) {
|
if (poiEntity.getId() != null) {
|
||||||
|
|||||||
@@ -1767,7 +1767,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(getActivity()).getChargingPileDao().getChargingPileByStationId(showPoiEntity.getId());
|
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(getActivity()).getChargingPileDao().getChargingPileByStationId(showPoiEntity.getId());
|
||||||
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
private StringBuilder gatherGetBuilder;
|
private StringBuilder gatherGetBuilder;
|
||||||
private TextView tvStartNav;
|
private TextView tvStartNav;
|
||||||
private TextView tvMatchTrack; // 手动匹配轨迹照片
|
private TextView tvMatchTrack; // 手动匹配轨迹照片
|
||||||
|
private DateFormat receiverDateFormate; // 接收任务时间的格式化对象
|
||||||
|
|
||||||
public static GatherGetFragment newInstance(Bundle bundle) {
|
public static GatherGetFragment newInstance(Bundle bundle) {
|
||||||
GatherGetFragment fragment = new GatherGetFragment();
|
GatherGetFragment fragment = new GatherGetFragment();
|
||||||
@@ -89,6 +90,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
@SuppressLint("SimpleDateFormat")
|
@SuppressLint("SimpleDateFormat")
|
||||||
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
receiverDateFormate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
if (pictures_time == null) {
|
if (pictures_time == null) {
|
||||||
@@ -280,32 +282,39 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
* 根据当前数据状态重新构建领取对话框按钮的显隐
|
* 根据当前数据状态重新构建领取对话框按钮的显隐
|
||||||
* */
|
* */
|
||||||
private void initViewByTaskStatus(int taskStatus) {
|
private void initViewByTaskStatus(int taskStatus) {
|
||||||
switch (taskStatus) {
|
if (poiEntity.getPublish() == 1) { // 如果是已发布的数据
|
||||||
case 0://未领取
|
switch (taskStatus) {
|
||||||
btnCancelGet.setVisibility(View.GONE);//取消领取
|
case 0://未领取
|
||||||
btnGetTask.setVisibility(View.VISIBLE);//领取任务
|
btnCancelGet.setVisibility(View.GONE);//取消领取
|
||||||
btnGather.setVisibility(View.VISIBLE);//立即采集
|
btnGetTask.setVisibility(View.VISIBLE);//领取任务
|
||||||
btnFinishGather.setVisibility(View.GONE);//结束采集
|
btnGather.setVisibility(View.VISIBLE);//立即采集
|
||||||
break;
|
btnFinishGather.setVisibility(View.GONE);//结束采集
|
||||||
case 1://已领取
|
break;
|
||||||
btnCancelGet.setVisibility(View.VISIBLE);
|
case 1://已领取
|
||||||
btnGetTask.setVisibility(View.GONE);
|
btnCancelGet.setVisibility(View.VISIBLE);
|
||||||
btnGather.setVisibility(View.VISIBLE);
|
btnGetTask.setVisibility(View.GONE);
|
||||||
btnFinishGather.setVisibility(View.GONE);
|
btnGather.setVisibility(View.VISIBLE);
|
||||||
break;
|
btnFinishGather.setVisibility(View.GONE);
|
||||||
case 2://已保存
|
break;
|
||||||
case 3://已提交
|
case 2://已保存
|
||||||
btnCancelGet.setVisibility(View.VISIBLE);
|
case 3://已提交
|
||||||
btnGetTask.setVisibility(View.GONE);
|
btnCancelGet.setVisibility(View.VISIBLE);
|
||||||
btnGather.setVisibility(View.GONE);
|
btnGetTask.setVisibility(View.GONE);
|
||||||
btnFinishGather.setVisibility(View.VISIBLE);
|
btnGather.setVisibility(View.GONE);
|
||||||
break;
|
btnFinishGather.setVisibility(View.VISIBLE);
|
||||||
case 4://结束采集
|
break;
|
||||||
btnCancelGet.setVisibility(View.GONE);
|
case 4://结束采集
|
||||||
btnGetTask.setVisibility(View.GONE);
|
btnCancelGet.setVisibility(View.GONE);
|
||||||
btnGather.setVisibility(View.GONE);
|
btnGetTask.setVisibility(View.GONE);
|
||||||
btnFinishGather.setVisibility(View.GONE);
|
btnGather.setVisibility(View.GONE);
|
||||||
break;
|
btnFinishGather.setVisibility(View.GONE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else { // 未发布数据,所有按钮都隐藏
|
||||||
|
btnCancelGet.setVisibility(View.GONE);
|
||||||
|
btnGetTask.setVisibility(View.GONE);
|
||||||
|
btnGather.setVisibility(View.GONE);
|
||||||
|
btnFinishGather.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,7 +400,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
requireActivity().runOnUiThread(new Runnable() {
|
requireActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -466,6 +475,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
chargingStationEntity.setUnReceivedTime(stationBean.getUnReceivedTime());
|
chargingStationEntity.setUnReceivedTime(stationBean.getUnReceivedTime());
|
||||||
chargingStationEntity.setPrecision(stationBean.getPrice() + "");
|
chargingStationEntity.setPrecision(stationBean.getPrice() + "");
|
||||||
chargingStationEntity.setAddress(stationBean.getAddress());
|
chargingStationEntity.setAddress(stationBean.getAddress());
|
||||||
|
chargingStationEntity.setCreateTime(receiverDateFormate.format(new Date()));
|
||||||
if (stationBean.getTelephone() == null || stationBean.getTelephone().equals("") || stationBean.getTelephone().equals("null")) {
|
if (stationBean.getTelephone() == null || stationBean.getTelephone().equals("") || stationBean.getTelephone().equals("null")) {
|
||||||
chargingStationEntity.setTelPhone(null);
|
chargingStationEntity.setTelPhone(null);
|
||||||
} else {
|
} else {
|
||||||
@@ -605,6 +615,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
PoiEntity polygonEntity = new PoiEntity();
|
PoiEntity polygonEntity = new PoiEntity();
|
||||||
polygonEntity.setRecord_way(poiEntity.getRecord_way());
|
polygonEntity.setRecord_way(poiEntity.getRecord_way());
|
||||||
polygonEntity.setWork_type(poiEntity.getWork_type());
|
polygonEntity.setWork_type(poiEntity.getWork_type());
|
||||||
|
polygonEntity.setCreateTime(receiverDateFormate.format(new Date()));
|
||||||
if (listBean != null) {
|
if (listBean != null) {
|
||||||
polygonEntity.setTaskId(listBean.getId());
|
polygonEntity.setTaskId(listBean.getId());
|
||||||
polygonEntity.setName(listBean.getName());
|
polygonEntity.setName(listBean.getName());
|
||||||
@@ -694,7 +705,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
if (poiEntity.getType() == 2) {
|
if (poiEntity.getType() == 2) {
|
||||||
PoiDatabase.getInstance(getContext()).getChargingPileDao().deleteChargingFidPileEntity(poiEntity.getId());
|
PoiDatabase.getInstance(getContext()).getChargingPileDao().deleteChargingFidPileEntity(poiEntity.getId());
|
||||||
}
|
}
|
||||||
@@ -846,7 +857,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
|
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -921,6 +932,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
poiListEntity.setIsExclusive(listBean.getIsExclusive());
|
poiListEntity.setIsExclusive(listBean.getIsExclusive());
|
||||||
poiListEntity.setRecord_way(poiEntity.getRecord_way());
|
poiListEntity.setRecord_way(poiEntity.getRecord_way());
|
||||||
poiListEntity.setWork_type(poiEntity.getWork_type());
|
poiListEntity.setWork_type(poiEntity.getWork_type());
|
||||||
|
poiEntity.setCreateTime(receiverDateFormate.format(new Date()));
|
||||||
if (listBean.getType() == 1) {
|
if (listBean.getType() == 1) {
|
||||||
if (listBean.getTelephone() == null || listBean.getTelephone().equals("") || listBean.getTelephone().equals("null")) {
|
if (listBean.getTelephone() == null || listBean.getTelephone().equals("") || listBean.getTelephone().equals("null")) {
|
||||||
poiListEntity.setTelPhone(null);
|
poiListEntity.setTelPhone(null);
|
||||||
@@ -1052,6 +1064,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
poiListEntity.setGeoWkt(listBean.getGeo());
|
poiListEntity.setGeoWkt(listBean.getGeo());
|
||||||
String encodeStr = listBean.getGeo();
|
String encodeStr = listBean.getGeo();
|
||||||
String geo = Geohash.getInstance().decode(encodeStr);
|
String geo = Geohash.getInstance().decode(encodeStr);
|
||||||
|
poiListEntity.setCreateTime(receiverDateFormate.format(new Date()));
|
||||||
// 生成对应的x和y poiEntity.setX
|
// 生成对应的x和y poiEntity.setX
|
||||||
GeometryTools.obitainPoiEntityXY(geo, poiListEntity);
|
GeometryTools.obitainPoiEntityXY(geo, poiListEntity);
|
||||||
if (statusId == 1 || statusId == 5) {
|
if (statusId == 1 || statusId == 5) {
|
||||||
|
|||||||
@@ -474,7 +474,7 @@ public class HasReceiveFragment extends BaseFragment implements View.OnClickList
|
|||||||
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
||||||
if (poiEntity.getUnReceivedTimeStamp()<=new Date().getTime()) {
|
if (poiEntity.getUnReceivedTimeStamp()<=new Date().getTime()) {
|
||||||
// 删除该条数据,并且将此数据移除出当前列表
|
// 删除该条数据,并且将此数据移除出当前列表
|
||||||
roadDao.deletePoiEntity(poiEntity);
|
roadDao.deletePoiEntityById(poiEntity.getId());
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -498,7 +498,7 @@ public class HasReceiveFragment extends BaseFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 数据库中移除该数据
|
// 数据库中移除该数据
|
||||||
roadDao.deletePoiEntity(poiEntity);
|
roadDao.deletePoiEntityById(poiEntity.getId());
|
||||||
iteratorAgain.remove();
|
iteratorAgain.remove();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -901,7 +901,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
initList();
|
initList();
|
||||||
|
|||||||
@@ -1268,7 +1268,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
initList();
|
initList();
|
||||||
|
|||||||
@@ -819,7 +819,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
if (poiEntity.getId() != null) {
|
if (poiEntity.getId() != null) {
|
||||||
|
|||||||
@@ -927,7 +927,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
if (poiEntity.getId() != null) {
|
if (poiEntity.getId() != null) {
|
||||||
|
|||||||
@@ -816,7 +816,7 @@ public class TrafficHubFragment extends BaseDrawerFragment implements View.OnCli
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(getActivity()).getPoiDao().deletePoiEntityById(poiEntity.getId());
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
if (poiEntity.getId() != null) {
|
if (poiEntity.getId() != null) {
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.elvishew.xlog.XLog;
|
import com.elvishew.xlog.XLog;
|
||||||
import com.github.lazylibrary.util.DensityUtil;
|
import com.github.lazylibrary.util.DensityUtil;
|
||||||
import com.github.lazylibrary.util.FileUtils;
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
@@ -1951,6 +1952,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
poiListEntity.setType(listBean.getType());
|
poiListEntity.setType(listBean.getType());
|
||||||
poiListEntity.setRecord_way(listBean.getCanReceived());
|
poiListEntity.setRecord_way(listBean.getCanReceived());
|
||||||
poiListEntity.setIsExclusive(listBean.getIsExclusive());
|
poiListEntity.setIsExclusive(listBean.getIsExclusive());
|
||||||
|
poiListEntity.setPublish(listBean.getPublish());
|
||||||
String beanGeo = listBean.getGeo();
|
String beanGeo = listBean.getGeo();
|
||||||
String geo = Geohash.getInstance().decode(beanGeo);
|
String geo = Geohash.getInstance().decode(beanGeo);
|
||||||
// 生成对应的x和y poiEntity.setX
|
// 生成对应的x和y poiEntity.setX
|
||||||
@@ -2131,7 +2133,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(LatestPushMessageResponse response, int id) {
|
public void onSuccess(LatestPushMessageResponse response, int id) {
|
||||||
tvLatestPush.setVisibility(View.GONE); // 默认先隐藏推荐任务按钮
|
tvLatestPush.setVisibility(View.GONE); // 默认先隐藏推荐任务按钮
|
||||||
if (response != null) {
|
if (response != null&&response.getBody()!=null) {
|
||||||
Map<String, String> responseBody = response.getBody();
|
Map<String, String> responseBody = response.getBody();
|
||||||
// 解析response
|
// 解析response
|
||||||
// 获取当前json的id,如果id大于等于0,则根据Content内容尝试展示提示信息
|
// 获取当前json的id,如果id大于等于0,则根据Content内容尝试展示提示信息
|
||||||
@@ -2160,6 +2162,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
public void onBind(com.kongzue.dialogx.dialogs.CustomDialog dialog, View v) {
|
public void onBind(com.kongzue.dialogx.dialogs.CustomDialog dialog, View v) {
|
||||||
ImageView photo = v.findViewById(R.id.img_photo);
|
ImageView photo = v.findViewById(R.id.img_photo);
|
||||||
TextView tvConfirm = v.findViewById(R.id.tv_confirm);
|
TextView tvConfirm = v.findViewById(R.id.tv_confirm);
|
||||||
|
// // Glide增加加载中图片显示
|
||||||
|
// RequestOptions options = new RequestOptions()
|
||||||
|
// .placeholder(R.mipmap.ic_launcher);
|
||||||
// 显示照片
|
// 显示照片
|
||||||
Glide.with(requireContext()).load(imgUrl).into(photo);
|
Glide.with(requireContext()).load(imgUrl).into(photo);
|
||||||
View.OnClickListener clickListener = new View.OnClickListener() {
|
View.OnClickListener clickListener = new View.OnClickListener() {
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.navinfo.outdoor.http;
|
package com.navinfo.outdoor.http;
|
||||||
|
|
||||||
public class HttpInterface {
|
public class HttpInterface {
|
||||||
// 开发
|
// // 开发
|
||||||
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//开发地址
|
// public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//开发地址
|
||||||
public static final String IP_UPLOAD = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//开发接口-数据上传
|
// public static final String IP_UPLOAD = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//开发接口-数据上传
|
||||||
|
|
||||||
// 测试
|
// 测试
|
||||||
// public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//测试环境接口
|
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//测试环境接口
|
||||||
// public static final String IP_UPLOAD = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//测试环境接口-数据上传
|
public static final String IP_UPLOAD = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//测试环境接口-数据上传
|
||||||
|
|
||||||
// 生产
|
// 生产
|
||||||
// public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//生产地址
|
// public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//生产地址
|
||||||
|
|||||||
@@ -61,8 +61,10 @@ public interface PoiDao {
|
|||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
@Delete
|
// @Delete
|
||||||
void deletePoiEntity(PoiEntity... poiEntities);
|
// void deletePoiEntity(PoiEntity... poiEntities);
|
||||||
|
@Query("DELETE FROM poi where id=:id")
|
||||||
|
void deletePoiEntityById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ public class PoiEntity implements Serializable {
|
|||||||
private String drawLine; // 用户绘制的线型
|
private String drawLine; // 用户绘制的线型
|
||||||
private String uploadResult; //上传结果
|
private String uploadResult; //上传结果
|
||||||
private String unReceivedTime; // 任务领取后自动释放的时间
|
private String unReceivedTime; // 任务领取后自动释放的时间
|
||||||
|
@Ignore
|
||||||
|
private int publish = 1; // 是否已发布,0-未发布,1-已发布(默认)
|
||||||
|
|
||||||
public int getRecord_way() {
|
public int getRecord_way() {
|
||||||
return record_way;
|
return record_way;
|
||||||
@@ -331,6 +333,14 @@ public class PoiEntity implements Serializable {
|
|||||||
this.uploadResult = uploadResult;
|
this.uploadResult = uploadResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getPublish() {
|
||||||
|
return publish;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublish(int publish) {
|
||||||
|
this.publish = publish;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取经过处理后的接受任务失效时间的时间戳
|
* 获取经过处理后的接受任务失效时间的时间戳
|
||||||
* */
|
* */
|
||||||
|
|||||||
@@ -188,7 +188,8 @@ public class TencentMarkerUtils {
|
|||||||
}
|
}
|
||||||
// publish字段标识了当前数据是否已发布,如果未发布,则半透明显示,且不可点击,否则正常显示
|
// publish字段标识了当前数据是否已发布,如果未发布,则半透明显示,且不可点击,否则正常显示
|
||||||
float alpha = listBean.getPublish() == 0? 0.3f: 1.0f;
|
float alpha = listBean.getPublish() == 0? 0.3f: 1.0f;
|
||||||
boolean clickable = listBean.getPublish() == 0? false: true;
|
// boolean clickable = listBean.getPublish() == 0? false: true;
|
||||||
|
boolean clickable = true;
|
||||||
switch (listBean.getType()) {
|
switch (listBean.getType()) {
|
||||||
case 1://poi
|
case 1://poi
|
||||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi);
|
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi);
|
||||||
|
|||||||
@@ -34,10 +34,18 @@
|
|||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_road_day"
|
android:id="@+id/tv_poi_createtime"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="10dp"
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:text="2021-05-08 13:24:36"
|
||||||
|
android:textColor="#333"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_road_name" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_poi_expirationtime"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
android:text="2021-05-08 13:24:36"
|
android:text="2021-05-08 13:24:36"
|
||||||
android:textColor="#333"
|
android:textColor="#333"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_road_name" />
|
app:layout_constraintTop_toBottomOf="@id/tv_road_name" />
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
android:id="@+id/tv_road_day"
|
android:id="@+id/tv_road_day"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="10dp"
|
android:layout_marginHorizontal="10dp"
|
||||||
android:text="2021-05-08 13:24:36"
|
android:text="2021-05-08 13:24:36"
|
||||||
android:textColor="#333"
|
android:textColor="#333"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_road_name" />
|
app:layout_constraintTop_toBottomOf="@id/tv_road_name" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user