放样水平限差、放样高程限差的设置及提示

main
chenglifeng 6 months ago
parent 81883a1b96
commit fe2e1cc9a3
  1. BIN
      app/libs/surveyorBase-release.aar
  2. 7
      app/src/main/java/com/project/survey/model/LoftingBean.kt
  3. 40
      app/src/main/java/com/project/survey/ui/base/BaseBindingActivity.kt
  4. 3
      app/src/main/java/com/project/survey/ui/lofting/LoftingListActivity.kt
  5. 28
      app/src/main/java/com/project/survey/ui/lofting/pointlofting/PointStakingActivity.java
  6. 12
      app/src/main/java/com/project/survey/ui/lofting/pointlofting/PointStakingActivity1.java
  7. 27
      app/src/main/java/com/project/survey/ui/lofting/pointlofting/PointStakingSettingActivity.java
  8. 2
      app/src/main/java/com/project/survey/util/BaseSurveyActivityUtils.java
  9. 2
      app/src/main/java/com/project/survey/util/DeviceConnectUtil.java
  10. 4
      app/src/main/java/com/project/survey/util/SurveyDevicePoleHrHeightUtils.java
  11. 2
      app/src/main/res/layout/activity_point_staking.xml
  12. 48
      app/src/main/res/layout/activity_point_staking_setting.xml
  13. 2
      app/src/main/res/layout/layout_pole_hr_height.xml

Binary file not shown.

@ -1,6 +1,8 @@
package com.project.survey.model
import android.os.Parcelable
import androidx.annotation.Keep
import kotlinx.parcelize.Parcelize
/**
* {
@ -23,10 +25,13 @@ import androidx.annotation.Keep
* }
*/
@Keep
@Parcelize
data class LoftingBean(
val ZYLB_ZY_NAME: String, //作业名称
val SY_CREATETIME: String, //创建时间
val BD_ZYLB_ID: String, //作业ID
val ZYLB_CLY: String, //测量员姓名
val ZYLB_ZYMS: String,
)
val ZYLB_FYSPJD: String, //放样水平精度
val ZYLB_FYGCJD: String, //放样高程精度
): Parcelable

@ -53,36 +53,36 @@ abstract class BaseBindingActivity<VB : ViewBinding> : AppCompatActivity() {
protected val deviceRequestManager: DeviceRequestManager = DeviceRequestManager(this, object: IDeviceRequestListener{
override fun onDeviceRequestConnect() {
LogUtils.d("onDeviceRequestConnect")
// LogUtils.d("onDeviceRequestConnect")
mainActivityUtils.onRequestConnect()
}
override fun onDeviceRequestDisconnect() {
LogUtils.d("onDeviceRequestDisconnect")
// LogUtils.d("onDeviceRequestDisconnect")
}
override fun onDeviceRequestSetupChat() {
LogUtils.d("onDeviceRequestSetupChat")
// LogUtils.d("onDeviceRequestSetupChat")
}
})
protected val deviceConnectManager: DeviceConnectManager = DeviceConnectManager(this, object : Device.IDeviceConnectListener{
override fun onDeviceConnectSucceed() {
LogUtils.d("onDeviceConnectSucceed")
// LogUtils.d("onDeviceConnectSucceed")
mainActivityUtils.onDeviceConnectSuccess()
}
override fun onDeviceConnectLost() {
LogUtils.d("onDeviceConnectLost")
// LogUtils.d("onDeviceConnectLost")
mainActivityUtils.onDeviceConnectLost()
}
override fun onDeviceConnectFailed() {
LogUtils.d("onDeviceConnectFailed")
// LogUtils.d("onDeviceConnectFailed")
mainActivityUtils.onDeviceConnectFailed()
}
override fun onDeviceConnectNeedOpenBT() {
LogUtils.d("onDeviceConnectNeedOpenBT")
// LogUtils.d("onDeviceConnectNeedOpenBT")
if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.BLUETOOTH_CONNECT ) == PackageManager.PERMISSION_GRANTED) {
val intent = Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)
startActivityForResult(intent, MainActivity.RC_OPEN_BT)
@ -100,39 +100,39 @@ abstract class BaseBindingActivity<VB : ViewBinding> : AppCompatActivity() {
p5: Double,
p6: Double
) {
LogUtils.d("onRtkPositionReceived:${p0};${p1};${p2};${p3};${p4};${p5};${p6};")
// LogUtils.d("onRtkPositionReceived:${p0};${p1};${p2};${p3};${p4};${p5};${p6};")
mainActivityUtils.checkRtkLocation()
}
override fun onRtkStatusChanged() {
LogUtils.d("onRtkStatusChanged")
// LogUtils.d("onRtkStatusChanged")
}
override fun onRtkError(p0: String?) {
LogUtils.d("onRtkError:${p0}")
// LogUtils.d("onRtkError:${p0}")
}
override fun onRtkPoleHeightChanged() {
LogUtils.d("onRtkPoleHeightChanged")
// LogUtils.d("onRtkPoleHeightChanged")
}
override fun onRtkTiltSwitched(p0: Boolean) {
LogUtils.d("onRtkTiltSwitched:${p0}")
// LogUtils.d("onRtkTiltSwitched:${p0}")
}
override fun onSatelliteSkyViewRefresh() {
LogUtils.d("onSatelliteSkyViewRefresh")
// LogUtils.d("onSatelliteSkyViewRefresh")
}
})
protected val tsMeasCoordinateManager: TsMeasCoordinateManager =
TsMeasCoordinateManager(this, object : TsListener.MeasCoordinateListener{
override fun onMeasCoordinateSuccess(p0: Coordinate?) {
LogUtils.d("onMeasCoordinateSuccess:${p0}")
// LogUtils.d("onMeasCoordinateSuccess:${p0}")
}
override fun onMeasCoordinateFailed(p0: String?, p1: String?) {
LogUtils.d("onMeasCoordinateFailed:${p0};${p1}")
// LogUtils.d("onMeasCoordinateFailed:${p0};${p1}")
}
})
protected val tsMeasSdAnglesManager: TsMeasSdAnglesManager = TsMeasSdAnglesManager(this, object : TsListener.MeasSdAnglesListener{
@ -145,28 +145,28 @@ abstract class BaseBindingActivity<VB : ViewBinding> : AppCompatActivity() {
p5: Double,
p6: Double
) {
LogUtils.d("onMeasSdAnglesSuccess:${p0};${p1};${p2};${p3};${p4};${p5};${p6}")
// LogUtils.d("onMeasSdAnglesSuccess:${p0};${p1};${p2};${p3};${p4};${p5};${p6}")
}
override fun onMeasSdAnglesFailed(p0: String?, p1: String?) {
LogUtils.d("onMeasSdAnglesFailed:${p0};${p1}")
// LogUtils.d("onMeasSdAnglesFailed:${p0};${p1}")
}
})
protected val tsAnglesRefreshManager: TsAnglesRefreshManager =
TsAnglesRefreshManager(this, object : TsListener.AnglesRefreshListener{
override fun onAnglesRefresh(p0: Double, p1: Double) {
LogUtils.d("onAnglesRefresh:${p0};${p1}")
// LogUtils.d("onAnglesRefresh:${p0};${p1}")
}
})
protected val tsBatteryRefreshManager: TsBatteryRefreshManager =
TsBatteryRefreshManager(this) { }
protected val tsChangeHrManager: TsChangeHrManager = TsChangeHrManager(this, object : TsListener.ChangeHrListener{
override fun onChangeHrSuccess(p0: Double) {
LogUtils.d("onChangeHrSuccess:${p0}")
// LogUtils.d("onChangeHrSuccess:${p0}")
}
override fun onChangeHrFailed(p0: String?) {
LogUtils.d("onChangeHrSuccess:${p0}")
// LogUtils.d("onChangeHrSuccess:${p0}")
}
})

@ -56,7 +56,8 @@ class LoftingListActivity : BaseBindingActivity<ActivityLoftingListBinding>() {
// 放样
adapter.addOnItemChildClickListener(R.id.tvLofting) { _, _, position ->
adapter.getItem(position)?.let { bean ->
PointStakingActivity.start(this, bean.BD_ZYLB_ID)
// PointStakingActivity.start(this, bean.BD_ZYLB_ID)
PointStakingActivity.start(this, bean)
// viewModel.fetchLoftingPointList(bean.BD_ZYLB_ID)
}
}

@ -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);

@ -916,12 +916,12 @@ public class PointStakingActivity1 extends BaseSurveyNewActivity {
double foreBackMoveValue = moveDistance.getX();
moveBeforeAfter = foreBackMoveValue >= 0
? TextFactory.distanceFormatDouble2String(getString(R.string.to_before), Math.abs(foreBackMoveValue), 6)
: TextFactory.distanceFormatDouble2String(getString(R.string.to_after), Math.abs(foreBackMoveValue), 6);
? TextFactory.distanceFormatDouble2String("向前", Math.abs(foreBackMoveValue), 6)
: TextFactory.distanceFormatDouble2String("向后", Math.abs(foreBackMoveValue), 6);
binding.tvTopThree.setText(foreBackMoveValue >= 0
? TextFactory.distanceFormatDouble2String(getString(R.string.to_before) + getString(R.string.colon), Math.abs(foreBackMoveValue), 6)
: TextFactory.distanceFormatDouble2String(getString(R.string.to_after) + getString(R.string.colon), Math.abs(foreBackMoveValue), 6));
? TextFactory.distanceFormatDouble2String("向前" + getString(R.string.colon), Math.abs(foreBackMoveValue), 6)
: TextFactory.distanceFormatDouble2String("向后" + getString(R.string.colon), Math.abs(foreBackMoveValue), 6));
double leftRightValue = moveDistance.getY();
moveLeftRight = leftRightValue >= 0
@ -1117,7 +1117,7 @@ public class PointStakingActivity1 extends BaseSurveyNewActivity {
*/
private void showTopMoveMethod() {
binding.tvDistance.setText(getString(R.string.distance));
binding.tvDigFill.setText(getString(R.string.dig_fill));
binding.tvDigFill.setText("下挖");
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) {
switch (PreferencesUtil.getMoveMethodTypeTS()) {
// case 0:
@ -1125,7 +1125,7 @@ public class PointStakingActivity1 extends BaseSurveyNewActivity {
// binding.tvTopFour.setText(getString(R.string.d));
// break;
case 0:
binding.tvTopThree.setText(getString(R.string.to_before));
binding.tvTopThree.setText("向前");
binding.tvTopFour.setText(getString(R.string.to_left));
break;
case 1:

@ -290,19 +290,20 @@ public class PointStakingSettingActivity extends BaseSurveyNewActivity {
}
}
binding.tvStakingLimit.setText(PreferencesUtil.getPointStakingLimit() + getString(R.string.meter));
binding.rlStakingLimit.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointStakingSettingActivity.this, R.string.stakout_difference, limitStakingList, limitStakingIndex, CustomRecycleDialog.Builder.INPUT_TYPE_DECIMAL, true, PreferencesUtil.getPointStakingLimit(), new CustomRecycleDialog.IClickCallback() {
@Override
public void onItemSelected(int index, String itemString) {
limitStakingIndex = index;
if (index != -1) {
binding.tvStakingLimit.setText(limitStakingList.get(index) + getString(R.string.meter));
} else {
binding.tvStakingLimit.setText(itemString + getString(R.string.meter));
}
PreferencesUtil.putPreference(ConstUtils.preferConst.pointStakingLimit, itemString);
}
}));
binding.tvStakingLimit.setText(Double.parseDouble(PreferencesUtil.getPointStakingLimit())/1000 + getString(R.string.meter));
binding.tvStakingElevationLimit.setText(Double.parseDouble(PreferencesUtil.getShsxPointStakingElevationLimit())/1000 + getString(R.string.meter));
// binding.rlStakingLimit.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointStakingSettingActivity.this, R.string.stakout_difference, limitStakingList, limitStakingIndex, CustomRecycleDialog.Builder.INPUT_TYPE_DECIMAL, true, PreferencesUtil.getPointStakingLimit(), new CustomRecycleDialog.IClickCallback() {
// @Override
// public void onItemSelected(int index, String itemString) {
// limitStakingIndex = index;
// if (index != -1) {
// binding.tvStakingLimit.setText(limitStakingList.get(index) + getString(R.string.meter));
// } else {
// binding.tvStakingLimit.setText(itemString + getString(R.string.meter));
// }
// PreferencesUtil.putPreference(ConstUtils.preferConst.pointStakingLimit, itemString);
// }
// }));
}
private void cadUcsWcsStatus() {

@ -92,7 +92,7 @@ public class BaseSurveyActivityUtils {
activityBaseSurveyBinding.tvRtkStatusVrms.setText(String.format("Sd %s", Util.formatDouble2String(0, 3)));
}
activityBaseSurveyBinding.tvPoleHighHr.setText("0.000m");
activityBaseSurveyBinding.ivPoleHighHr.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.icon_hr_high_white));
activityBaseSurveyBinding.ivPoleHighHr.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.icon_hr_white));
activityBaseSurveyBinding.ivRtkStatusSatellite.setImageDrawable(ContextCompat.getDrawable(activity, R.mipmap.icon_edm_np));
activityBaseSurveyBinding.tvRtkStatusSatellite.setText(R.string.laser);
} else {

@ -62,7 +62,7 @@ public class DeviceConnectUtil {
activityBaseSurveyBinding.tvRtkStatusVrms.setText(String.format("Sd %s", Util.formatDouble2String(0, 3)));
}
activityBaseSurveyBinding.tvPoleHighHr.setText("0.000m");
activityBaseSurveyBinding.ivPoleHighHr.setImageDrawable(Utils.getApp().getResources().getDrawable(R.drawable.icon_hr_high_white));
activityBaseSurveyBinding.ivPoleHighHr.setImageDrawable(Utils.getApp().getResources().getDrawable(R.drawable.icon_hr_white));
activityBaseSurveyBinding.ivRtkStatusSatellite.setImageDrawable(Utils.getApp().getResources().getDrawable(R.mipmap.icon_edm_np));
activityBaseSurveyBinding.tvRtkStatusSatellite.setText(R.string.laser);
break;

@ -69,10 +69,10 @@ public class SurveyDevicePoleHrHeightUtils {
boolean isTitleBar) {
int notNumber = 3;
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) {
ivPoleHrHeight.setImageDrawable(Utils.getApp().getDrawable(isTitleBar ? R.drawable.icon_hr_high_white : (((BaseApp) Utils.getApp()).isThemeDark() ? R.drawable.icon_hr_high_white : R.drawable.icon_hr_high)));
ivPoleHrHeight.setImageDrawable(Utils.getApp().getDrawable(isTitleBar ? R.drawable.icon_hr_white : (((BaseApp) Utils.getApp()).isThemeDark() ? R.drawable.icon_hr_white : R.drawable.icon_hr_white)));
tvPoleHrHeight.setText(Util.formatDouble2String(TsConfig.getInstance().getHr(), notNumber) + "m");
} else {
ivPoleHrHeight.setImageDrawable(Utils.getApp().getDrawable(isTitleBar ? R.drawable.icon_pole_high_white : (((BaseApp) Utils.getApp()).isThemeDark() ? R.drawable.icon_pole_high_white : R.drawable.icon_pole_high)));
ivPoleHrHeight.setImageDrawable(Utils.getApp().getDrawable(isTitleBar ? R.drawable.icon_pole_high_white : (((BaseApp) Utils.getApp()).isThemeDark() ? R.drawable.icon_pole_high_white : R.drawable.icon_pole_high_white)));
tvPoleHrHeight.setText(Util.formatDouble2String(Gnss.getInstance().getDevice().getPoleHeight(), notNumber) + "m");
}

@ -142,7 +142,7 @@
android:layout_weight="1"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/dig_fill"
android:text="下挖"
android:textColor="@color/color_575757"
android:textSize="@dimen/NormalTextSize"
android:textStyle="bold"

@ -291,7 +291,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:text="@string/stakout_difference"
android:text="放样水平限差"
android:textColor="@color/black"
android:textSize="15sp"
android:textStyle="bold" />
@ -315,7 +315,51 @@
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more" />
android:src="@drawable/icon_black_line_more"
android:visibility="invisible" />
</LinearLayout>
</RelativeLayout>
<include layout="@layout/layout_dividing_line_theme_gray" />
<RelativeLayout
android:id="@+id/rl_staking_elevation_limit"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:text="放样高程限差"
android:textColor="@color/black"
android:textSize="15sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_staking_elevation_limit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:text="0m"
android:textColor="@color/color_8a8a8a"
android:textSize="13.5sp" />
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"
android:visibility="invisible" />
</LinearLayout>

@ -11,7 +11,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_pole_high" />
android:src="@drawable/icon_pole_high_white" />
<com.bingce.device.ui.widget.BingCeTextView
android:id="@+id/tv_pole_hr_height"

Loading…
Cancel
Save