|
|
|
@ -63,6 +63,7 @@ import com.project.survey.dialog.CustomInputListDialog; |
|
|
|
|
import com.project.survey.dialog.CustomLineChartDialog; |
|
|
|
|
import com.project.survey.logic.viewmodel.ProjectViewModel; |
|
|
|
|
import com.project.survey.model.ControlRecord; |
|
|
|
|
import com.project.survey.model.LoftingBean; |
|
|
|
|
import com.project.survey.model.LoftingPointBean; |
|
|
|
|
import com.project.survey.model.LoftingPointListBean; |
|
|
|
|
import com.project.survey.model.LoftingPointRecordEntry; |
|
|
|
@ -80,6 +81,7 @@ import java.util.ArrayList; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import blankj.utilcode.util.AppUtils; |
|
|
|
|
import blankj.utilcode.util.ToastUtils; |
|
|
|
|
import blankj.utilcode.util.Utils; |
|
|
|
|
import cn.liuyanbing.surveyor.model.base.BasePoint; |
|
|
|
@ -129,6 +131,7 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
private boolean isFirstUpdateChartView; |
|
|
|
|
private boolean mStakingPointIsInMemory = false; |
|
|
|
|
|
|
|
|
|
private LoftingBean loftingBean; |
|
|
|
|
private String workId = ""; //作业ID
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -140,7 +143,13 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
@Override |
|
|
|
|
protected void initView() { |
|
|
|
|
mContext = this; |
|
|
|
|
workId = IntentUtil.stringExtra(this, KEY_WORK_ID); |
|
|
|
|
loftingBean = (LoftingBean) getIntent().getParcelableExtra(KEY_LOFTING_BEAN); |
|
|
|
|
workId = loftingBean.getBD_ZYLB_ID(); |
|
|
|
|
// 修改放样水平限差和放样高程限差
|
|
|
|
|
PreferencesUtil.putPreference(ConstUtils.preferConst.pointStakingLimit, String.valueOf((Double.parseDouble(loftingBean.getZYLB_FYSPJD())/1000))); |
|
|
|
|
PreferencesUtil.putPreference(ConstUtils.preferConst.shsxPointStakingElevationLimit, String.valueOf((Double.parseDouble(loftingBean.getZYLB_FYGCJD())/1000))); |
|
|
|
|
|
|
|
|
|
// workId = IntentUtil.stringExtra(this, KEY_WORK_ID);
|
|
|
|
|
viewModel = new ViewModelProvider(this).get(ProjectViewModel.class); |
|
|
|
|
preferences = PreferenceManager.getDefaultSharedPreferences(this); |
|
|
|
|
// 指南针角度
|
|
|
|
@ -153,7 +162,7 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
//比例尺
|
|
|
|
|
SurveyToolBarClickListenerUtils.setScaleViewOnClickListener(binding.lineChartView, binding.tvScale, binding.ivScale); |
|
|
|
|
//工具栏功能(左上角)
|
|
|
|
|
SurveyToolBarClickListenerUtils.setOnClickListener(this, true, true, |
|
|
|
|
SurveyToolBarClickListenerUtils.setOnClickListener(this, !AppUtils.isAppDebug(), true, |
|
|
|
|
baseSurveyActivityUtils.activityBaseSurveyBinding, |
|
|
|
|
binding.baseSurveyStakingSetting, new SurveyToolBarClickListenerUtils.IToolBarClickListener() { |
|
|
|
|
@Override |
|
|
|
@ -486,7 +495,7 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
ToastUtils.showShort(R.string.add_points_staking_point_first); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
SurveyLimitCheckUtils.checkStakingLimit(this, currentCoordinate, new Coordinate(targetStakePointRecord.x, targetStakePointRecord.y), (currentCoordinate, targetCoordinate) -> recordPoint()); |
|
|
|
|
SurveyLimitCheckUtils.shsxCheckStakingLimit(this, currentCoordinate, new Coordinate(targetStakePointRecord.x, targetStakePointRecord.y), (currentCoordinate, targetCoordinate) -> recordPoint()); |
|
|
|
|
} else { |
|
|
|
|
tsMeasCoordinateManager.measureCoordinate(); |
|
|
|
|
} |
|
|
|
@ -501,14 +510,14 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
lineChartViewBuilder = new CustomLineChartDialog.Builder(this).setTitle(getString(R.string.staking_points_being_collected)); |
|
|
|
|
lineChartViewBuilder.setButtonConfirmTextColor(R.color.color_E2E1DD); |
|
|
|
|
lineChartViewBuilder.setButtonConfirm(v -> { |
|
|
|
|
SurveyLimitCheckUtils.checkStakingLimit(this, currentSmoothCoordinate, new Coordinate(targetStakePointRecord.x, targetStakePointRecord.y), (currentCoordinate, targetCoordinate) -> recordPoint()); |
|
|
|
|
SurveyLimitCheckUtils.shsxCheckStakingLimit(this, currentSmoothCoordinate, new Coordinate(targetStakePointRecord.x, targetStakePointRecord.y), (currentCoordinate, targetCoordinate) -> recordPoint()); |
|
|
|
|
}); |
|
|
|
|
// lineChartViewBuilder.setButtonConfirm(v -> checkRtkStringLimit());
|
|
|
|
|
customDialog = lineChartViewBuilder.create(); |
|
|
|
|
customDialog.show(); |
|
|
|
|
isControlSurvey = true; |
|
|
|
|
} else { |
|
|
|
|
SurveyLimitCheckUtils.checkStakingLimit(this, currentCoordinate, new Coordinate(targetStakePointRecord.x, targetStakePointRecord.y), (currentCoordinate, targetCoordinate) -> recordPoint()); |
|
|
|
|
SurveyLimitCheckUtils.shsxCheckStakingLimit(this, currentCoordinate, new Coordinate(targetStakePointRecord.x, targetStakePointRecord.y), (currentCoordinate, targetCoordinate) -> recordPoint()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -751,7 +760,7 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
//
|
|
|
|
|
// lineChartViewBuilder.setButtonConfirmTextColor(R.color.color_575757);
|
|
|
|
|
// }
|
|
|
|
|
SurveyLimitCheckUtils.checkStakingLimit(this, currentCoordinate, new Coordinate(targetStakePointRecord.x, targetStakePointRecord.y), (currentCoordinate, targetCoordinate) -> recordPoint()); |
|
|
|
|
SurveyLimitCheckUtils.shsxCheckStakingLimit(this, currentCoordinate, new Coordinate(targetStakePointRecord.x, targetStakePointRecord.y), (currentCoordinate, targetCoordinate) -> recordPoint()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1157,6 +1166,13 @@ public class PointStakingActivity extends BaseSurveyNewActivity { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static final String KEY_WORK_ID = "keyWorkId"; |
|
|
|
|
private static final String KEY_LOFTING_BEAN = "loftingBean"; |
|
|
|
|
|
|
|
|
|
public static void start(Context context, LoftingBean loftingBean) { |
|
|
|
|
Intent intent = new Intent(context, PointStakingActivity.class); |
|
|
|
|
intent.putExtra(KEY_LOFTING_BEAN, loftingBean); |
|
|
|
|
context.startActivity(intent); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void start(Context context, String workId) { |
|
|
|
|
Intent intent = new Intent(context, PointStakingActivity.class); |
|
|
|
|