fix: 充电站充电桩数据挂接错误的问题,修改金融机构表,修改其他bug
This commit is contained in:
@@ -19,6 +19,7 @@ import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.github.lazylibrary.util.FileUtils;
|
||||
import com.google.common.reflect.TypeToken;
|
||||
import com.google.gson.Gson;
|
||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||
import com.kongzue.dialog.util.BaseDialog;
|
||||
@@ -66,6 +67,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
private File logFile;
|
||||
private StringBuilder userBuilder;
|
||||
private String region_text;
|
||||
private SharedPreferences spNavinfo;
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
@@ -156,6 +158,13 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
finish();
|
||||
break;
|
||||
case R.id.btn_gathering:
|
||||
if (spNavinfo == null) {
|
||||
spNavinfo = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
}
|
||||
if (spNavinfo.getInt("auditstatus", 0)<=0) {
|
||||
Toast.makeText(this, "您的账号未审核通过,请等待审核通过后再绑定银行卡!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("点击了去绑定的返回 ,");
|
||||
Intent gatheringIntent = new Intent(this, FragmentManagement.class);
|
||||
gatheringIntent.putExtra("tag", 24);
|
||||
@@ -389,19 +398,19 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
}
|
||||
|
||||
public List<JsonBean> parseData(String result) {
|
||||
Gson gson = new Gson();
|
||||
//GOON 解析
|
||||
List<JsonBean> detail = new ArrayList<>();
|
||||
try {
|
||||
JSONArray data = new JSONArray(result);
|
||||
Gson gson = new Gson();
|
||||
for (int i = 0; i < data.length(); i++) {
|
||||
JsonBean entity = gson.fromJson(data.optJSONObject(i).toString(), JsonBean.class);
|
||||
detail.add(entity);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return detail;
|
||||
List<JsonBean> detailList = gson.fromJson(result, new TypeToken<ArrayList<JsonBean>>(){}.getType());
|
||||
// try {
|
||||
// JSONArray data = new JSONArray(result);
|
||||
// for (int i = 0; i < data.length(); i++) {
|
||||
// JsonBean entity = gson.fromJson(data.optJSONObject(i).toString(), JsonBean.class);
|
||||
// detail.add(entity);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
return detailList;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -106,7 +106,7 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NotNull ViewHolder holder, int position) {
|
||||
public void onBindViewHolder(@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
||||
PoiEntity poiEntity = allRoad.get(position);
|
||||
holder.tvName.setText(poiEntity.getName());
|
||||
holder.tvDay.setText(poiEntity.getCreateTime());
|
||||
|
||||
@@ -146,6 +146,7 @@ public class Constant {
|
||||
public static final int HAS_SUBMIT_ITEM = 53;//已提交
|
||||
public static final int EVENT_MESSAGE = 55;//提示消息
|
||||
public static final int CAPACITY_EVALUATION=59;//能力测试的返回
|
||||
public static final int CHARGING_STATION_DISABLE=60;//能力测试的返回
|
||||
public static final String INTENT_POI_VIDEO_TYPE = "poi_video_type";
|
||||
public static int NUMBER = 200; //任务个数
|
||||
public static int LIMIT_TYPE = -1; //权限类型,普通任务-0,专属任务-1
|
||||
|
||||
@@ -184,7 +184,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 确定 按钮,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 返回 按钮,");
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();
|
||||
return false;
|
||||
@@ -195,7 +195,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 确定 按钮,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 返回 按钮,");
|
||||
initList();
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
@@ -896,6 +896,8 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
if ((boolean) data.obj) {
|
||||
initStationSharePre();
|
||||
}
|
||||
} else if (data.what == Constant.CHARGING_STATION_DISABLE) {
|
||||
disables();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -928,6 +930,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
break;
|
||||
case R.id.btn_uploading:
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("点击了上传的按钮 ,");
|
||||
if (showPoiEntity == null) {
|
||||
showPoiEntity = new PoiEntity();
|
||||
ToastUtils.Message(getActivity(), "无法获取数据,请退出当前界面重新打开");
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.TREASURE_FRAGMENT;
|
||||
obtain.obj = false;
|
||||
@@ -985,11 +991,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (showPoiEntity == null) {
|
||||
showPoiEntity = new PoiEntity();
|
||||
}
|
||||
PoiEntity poiEntity = PoiDatabase.getInstance(getContext()).getPoiDao().getPoiEntity(showPoiEntity.getId());
|
||||
if (poiEntity == null) {
|
||||
// 显示数据未在数据库中查询到,重新从界面获取数据并保存
|
||||
if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 5) {
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
@@ -1306,6 +1310,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||
// 实时禁用当前的保存按钮,防止用户再次点击保存,重新生成新的POI数据
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.CHARGING_STATION_DISABLE;
|
||||
EventBus.getDefault().post(obtain1);
|
||||
|
||||
// 充电站数据已经保存在服务上,批量保存充电桩数据
|
||||
saveChargingPileByChargingStation(poiEntity);
|
||||
if (getActivity() != null) {
|
||||
|
||||
@@ -199,6 +199,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
return df.format(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据当前数据状态重新构建领取对话框按钮的显隐
|
||||
* */
|
||||
private void initViewByTaskStatus(int taskStatus) {
|
||||
switch (taskStatus) {
|
||||
case 0://未领取
|
||||
|
||||
@@ -73,6 +73,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
private SharedPreferences.Editor navInfoEditor;
|
||||
private File logFile;
|
||||
private StringBuilder gatheringBuilder;
|
||||
private SharedPreferences spNavinfo;
|
||||
|
||||
public static GatheringFragment newInstance(Bundle bundle) {
|
||||
GatheringFragment fragment = new GatheringFragment();
|
||||
@@ -228,6 +229,18 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
Log.e("TAG", "onClick: " + etBankNum);
|
||||
return;
|
||||
}
|
||||
if ("".equals(tvBank.getText().toString())) {
|
||||
ToastUtils.Message(getActivity(), "所属银行不能为空");
|
||||
Log.e("TAG", "onClick: " + tvBank.getText().toString());
|
||||
return;
|
||||
}
|
||||
if (spNavinfo == null) {
|
||||
spNavinfo = getActivity().getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
}
|
||||
if (spNavinfo.getInt("auditstatus", 0)<=0) {
|
||||
Toast.makeText(getContext(), "您的账号未审核通过,请等待审核通过后再绑定银行卡!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
gatheringNetWork();
|
||||
break;
|
||||
case R.id.gathering_camera:
|
||||
|
||||
@@ -438,7 +438,11 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
startActivity(roadIntent);
|
||||
break;
|
||||
case R.id.cl_charging:
|
||||
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了charging item跳转到charging列表 ,");
|
||||
Intent chargingIntent = new Intent(getContext(), FragmentManagement.class);
|
||||
chargingIntent.putExtra("tag", 31);
|
||||
chargingIntent.putExtra("type", 2);
|
||||
startActivity(chargingIntent);
|
||||
break;
|
||||
case R.id.cl_other:
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了other item跳转到other列表 ,");
|
||||
|
||||
@@ -52,6 +52,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
private TextView tvMoney;
|
||||
private File logFile;
|
||||
private StringBuilder mainBuilder;
|
||||
private SharedPreferences spNavinfo; // 读取缓存的sp数据
|
||||
|
||||
public static MineFragment newInstance(Bundle bundle) {
|
||||
MineFragment fragment = new MineFragment();
|
||||
@@ -65,6 +66,9 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
if (spNavinfo == null) {
|
||||
spNavinfo = getActivity().getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -228,6 +232,13 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
ToastUtils.Message(getActivity(), "该功能以后上新,敬请期待");
|
||||
break;
|
||||
case R.id.btn_withdraw: //提现页面
|
||||
if (spNavinfo == null) {
|
||||
spNavinfo = getActivity().getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
}
|
||||
if (spNavinfo.getInt("auditstatus", 0)<=0) {
|
||||
Toast.makeText(getContext(), "您的账号未审核通过,请先完成审核才可以提现!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了去提现的按钮 ,");
|
||||
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentWithdraw.putExtra("tag", 15);
|
||||
|
||||
@@ -368,6 +368,10 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();//禁用所有可操作的控件
|
||||
}
|
||||
// 如果是推送的POI录像,不允许修改名称
|
||||
if (showPoiEntity.getTaskId()>0) {
|
||||
etRoadName.setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -363,6 +363,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
}
|
||||
// 如果是推送的POI录像,不允许修改名称
|
||||
if (showPoiEntity.getTaskId()>0) {
|
||||
etRoadName.setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
private CheckBox checkBox;
|
||||
private File logFile;
|
||||
private double canExchangePrice;
|
||||
private SharedPreferences spNavinfo;
|
||||
|
||||
public static WithdrawFragment newInstance(Bundle bundle) {
|
||||
WithdrawFragment fragment = new WithdrawFragment();
|
||||
@@ -217,6 +218,13 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
break;
|
||||
case R.id.button:
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("点击了立即提现 ,");
|
||||
if (spNavinfo == null) {
|
||||
spNavinfo = getActivity().getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
}
|
||||
if (spNavinfo.getInt("auditstatus", 0)<=0) {
|
||||
Toast.makeText(getContext(), "您的账号未审核通过,请先完成审核才可以提现!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
String price = etAllPrice.getText().toString().trim();
|
||||
if (!price.equals("")) {
|
||||
double aDouble = Double.parseDouble(price);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.navinfo.outdoor.http;
|
||||
|
||||
public class HttpInterface {
|
||||
public static final String IP = "http://172.23.139.129:9999/m4";//测试接口
|
||||
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||
public static final String IP1 = "http://172.23.139.129:9999/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/";//发现
|
||||
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
||||
|
||||
@@ -21,6 +21,9 @@ public class PoiEntityDeleteUtil {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除关联的文件内容
|
||||
* */
|
||||
public void deleteUtil(Context context, PoiEntity poiEntity) {
|
||||
switch (poiEntity.getType()) {
|
||||
case 1:
|
||||
|
||||
@@ -70,22 +70,24 @@ public class PoiSaveUtils {
|
||||
PoiEntity poiEntity = poiEntityList.get(i);
|
||||
Log.d("PoiSaveUtils", "poiEntity.getType():"+poiEntity.getType());
|
||||
if (poiEntity.getType() == 2) { // 如果是充电站数据,首先检查子充电桩的状态
|
||||
if (saveChargingPileByChargingStation(poiEntity)) {
|
||||
if (savePoiNet(poiEntity) == 200) { // 网络保存成功
|
||||
// 开始上传流程
|
||||
if (saveChargingPileUploadChargingStation(poiEntity)) {
|
||||
uploadPoiNet(poiEntity);
|
||||
if (savePoiNet(poiEntity) == 200) { // 网络保存成功
|
||||
if (saveChargingPileByChargingStation(poiEntity)) {
|
||||
if (savePoiNet(poiEntity) == 200) { // 网络保存-冗余操作
|
||||
// 开始上传流程
|
||||
if (saveChargingPileUploadChargingStation(poiEntity)) {
|
||||
uploadPoiNet(poiEntity);
|
||||
}else {
|
||||
poiEntity.setChecked(false);
|
||||
poiEntity.setWork_type(0);
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
|
||||
}
|
||||
}else {
|
||||
poiEntity.setChecked(false);
|
||||
poiEntity.setWork_type(0);
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
|
||||
}
|
||||
}else {
|
||||
poiEntity.setChecked(false);
|
||||
poiEntity.setWork_type(0);
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
poiEntity.setChecked(false);
|
||||
poiEntity.setWork_type(0);
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
|
||||
|
||||
@@ -276,6 +276,11 @@ public class PreserveUtils {
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(mContext, poiEntity);
|
||||
// 实时禁用当前的保存按钮,防止用户再次点击保存,重新生成新的POI数据
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.CHARGING_STATION_DISABLE;
|
||||
EventBus.getDefault().post(obtain1);
|
||||
|
||||
// 充电站数据已经保存在服务上,批量保存充电桩数据
|
||||
saveChargingPileByChargingStation(mContext, poiEntity);
|
||||
mContext.runOnUiThread(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user