批量上传之前未上传的测点记录

main
chenglifeng 8 months ago
parent 94bf0da2f1
commit e86b0ff0d3
  1. BIN
      app/libs/repository-release.aar
  2. 37
      app/src/main/java/com/project/survey/logic/viewmodel/ControlNetViewModel.kt
  3. 108
      app/src/main/java/com/project/survey/logic/viewmodel/ProjectViewModel.kt
  4. 4
      app/src/main/java/com/project/survey/model/PointEntry.kt
  5. 16
      app/src/main/java/com/project/survey/network/Api.kt
  6. 13
      app/src/main/java/com/project/survey/ui/MainActivity.kt
  7. 3
      app/src/main/java/com/project/survey/ui/instrument/basestationtranslation/RtkBaseCorrectActivity.java
  8. 3
      app/src/main/java/com/project/survey/ui/lofting/pointlofting/PointStakingActivity.java
  9. 7
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/PointSurveyNewActivity.java

Binary file not shown.

@ -4,8 +4,8 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import com.project.survey.constants.SPConstants import com.project.survey.constants.SPConstants
import com.project.survey.logic.bean.ListResult import com.project.survey.logic.bean.ListResult
import com.project.survey.model.ControlNetworkBean
import com.project.survey.model.ControlNetCGBean import com.project.survey.model.ControlNetCGBean
import com.project.survey.model.ControlNetworkBean
import com.project.survey.model.ControlNetworkInfoBean import com.project.survey.model.ControlNetworkInfoBean
import com.project.survey.model.ProjectBean import com.project.survey.model.ProjectBean
import com.project.survey.network.RetrofitClient import com.project.survey.network.RetrofitClient
@ -25,9 +25,7 @@ class ControlNetViewModel : BaseViewModel() {
*/ */
fun fetchSpecialControlNetworkList(pageNum: Int = 1) { fun fetchSpecialControlNetworkList(pageNum: Int = 1) {
launch { launch {
val currentProject = val res = api.fetchSpecialControlNetworkList(pageNum = pageNum)
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)
val res = api.fetchSpecialControlNetworkList(currentProject?.XMXX_ID ?: "", pageNum)
if (res.success) { if (res.success) {
_controlNetworkListResponse.postValue(res.data) _controlNetworkListResponse.postValue(res.data)
} }
@ -48,13 +46,10 @@ class ControlNetViewModel : BaseViewModel() {
pageNum: Int = 1 pageNum: Int = 1
) { ) {
launch { launch {
val currentProject =
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)
val res = api.fetchSpecialControlNetworkInfo( val res = api.fetchSpecialControlNetworkInfo(
currentProject?.XMXX_ID ?: "", controlNetWorkName = controlNetworkName,
controlNetworkName, pointName = pointName,
pointName, pageNum = pageNum
pageNum
) )
if (res.success) { if (res.success) {
_controlNetworkInfoResponse.postValue(res.data) _controlNetworkInfoResponse.postValue(res.data)
@ -71,14 +66,11 @@ class ControlNetViewModel : BaseViewModel() {
*/ */
fun fetchSpecialControlNetCGList(j_query: String, page: Int = 1, start: Int = 0) { fun fetchSpecialControlNetCGList(j_query: String, page: Int = 1, start: Int = 0) {
launch { launch {
val currentProject =
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)
val res = api.fetchSpecialControlNetCGList( val res = api.fetchSpecialControlNetCGList(
currentProject?.XMXX_ID ?: "", tableCode = "BD_KZWZBCG",
"BD_KZWZBCG", funcCode = "BD_KZWZBCG_ZY",
"BD_KZWZBCG_ZY", j_query = j_query,
j_query, page = page,
page,
start = start start = start
) )
if (res.success) { if (res.success) {
@ -92,14 +84,11 @@ class ControlNetViewModel : BaseViewModel() {
*/ */
fun fetchFirstControlNetList(j_query: String, page: Int = 1, start: Int = 0) { fun fetchFirstControlNetList(j_query: String, page: Int = 1, start: Int = 0) {
launch { launch {
val currentProject =
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)
val res = api.fetchSpecialControlNetCGList( val res = api.fetchSpecialControlNetCGList(
currentProject?.XMXX_ID ?: "", tableCode = "BD_KZWZBCG",
"BD_KZWZBCG", funcCode = "BD_KZWZBCG",
"BD_KZWZBCG", j_query = j_query,
j_query, page = page,
page,
start = start start = start
) )
if (res.success) { if (res.success) {

@ -2,6 +2,12 @@ package com.project.survey.logic.viewmodel
import androidx.lifecycle.LiveData import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.sqlite.db.SimpleSQLiteQuery
import blankj.utilcode.util.LogUtils
import com.bingce.data.database.PointDb
import com.bingce.data.database.PointStakeDb
import com.bingce.data.surveyor.surveydata.pointstake.PointStakeRecord
import com.bingce.data.surveyor.surveydata.pointsurvey.PointRecord
import com.project.survey.constants.Constants import com.project.survey.constants.Constants
import com.project.survey.constants.SPConstants import com.project.survey.constants.SPConstants
import com.project.survey.logic.bean.ListResult import com.project.survey.logic.bean.ListResult
@ -9,7 +15,6 @@ import com.project.survey.model.ApprovalBean
import com.project.survey.model.InspectionReportBean import com.project.survey.model.InspectionReportBean
import com.project.survey.model.LoftingBean import com.project.survey.model.LoftingBean
import com.project.survey.model.LoftingPointBean import com.project.survey.model.LoftingPointBean
import com.project.survey.model.LoftingPointListBean
import com.project.survey.model.LoftingPointRecordEntry import com.project.survey.model.LoftingPointRecordEntry
import com.project.survey.model.MeasureBean import com.project.survey.model.MeasureBean
import com.project.survey.model.MeasureWorkStatusResult import com.project.survey.model.MeasureWorkStatusResult
@ -49,9 +54,7 @@ class ProjectViewModel : BaseViewModel() {
*/ */
fun fetchWorkTask(type: String, page: Int = 1) { fun fetchWorkTask(type: String, page: Int = 1) {
launch { launch {
val currentProject = val res = api.fetchWorkTask(type = type, page = page)
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)
val res = api.fetchWorkTask(currentProject?.XMXX_ID ?: "", type, page)
if (res.success) { if (res.success) {
_workTaskListResponse.postValue(res.data.data.rows) _workTaskListResponse.postValue(res.data.data.rows)
} }
@ -77,11 +80,10 @@ class ProjectViewModel : BaseViewModel() {
} }
val res = api.fetchMeasureDataList( val res = api.fetchMeasureDataList(
SPUtils.getString(SPConstants.PROJECT_ID), tableCode = type,
type, funcCode = if (type == Constants.TYPE_BD_CLJH) Constants.TYPE_BD_CLJH else "${Constants.TYPE_BD_CLGZ_GCJL}_ZB",
if (type == Constants.TYPE_BD_CLJH) Constants.TYPE_BD_CLJH else "${Constants.TYPE_BD_CLGZ_GCJL}_ZB", j_qurey = query,
query, page = page
page
) )
if (res.success) { if (res.success) {
_measureBeanListResponse.postValue(res.data) _measureBeanListResponse.postValue(res.data)
@ -100,12 +102,8 @@ class ProjectViewModel : BaseViewModel() {
*/ */
fun updateMeasureWorkStatus(workId: String, workType: String, status: String) { fun updateMeasureWorkStatus(workId: String, workType: String, status: String) {
launch { launch {
val res = api.updateMeasureWorkStatus( val res =
SPUtils.getString(SPConstants.PROJECT_ID), api.updateMeasureWorkStatus(workId = workId, workType = workType, status = status)
workId,
workType,
status
)
if (res.success) { if (res.success) {
_updateMeasureWorkStatusResponse.postValue( _updateMeasureWorkStatusResponse.postValue(
MeasureWorkStatusResult( MeasureWorkStatusResult(
@ -127,14 +125,14 @@ class ProjectViewModel : BaseViewModel() {
/** /**
* 测点记录录入 * 测点记录录入
*/ */
fun uploadPointEntry(pointEntry: PointEntry) { fun uploadPointEntry(pointRecord: PointRecord) {
launch { launch {
val res = val res = api.uploadPointEntry(requestBody = arrayListOf(PointEntry(pointRecord)))
api.uploadPointEntry(
SPUtils.getString(SPConstants.PROJECT_ID),
arrayListOf(pointEntry)
)
if (res.success) { if (res.success) {
// 上传成功,更新数据库里状态
PointDb.getInstance().save(pointRecord.apply {
uploaded = true
})
_uploadPointEntryResponse.postValue(res.data) _uploadPointEntryResponse.postValue(res.data)
} else { } else {
errorResponse.postValue(res.message) errorResponse.postValue(res.message)
@ -142,14 +140,28 @@ class ProjectViewModel : BaseViewModel() {
} }
} }
fun uploadPointEntry(pointEntryList: List<PointEntry>) { /**
* 批量上传 之前未上传或上传失败的点测量记录
*/
fun uploadPointEntry() {
launch { launch {
val res = // 找出当前项目未上传的点
api.uploadPointEntry(SPUtils.getString(SPConstants.PROJECT_ID), pointEntryList) val sqlString =
"SELECT * FROM Point WHERE project_id=='${SPUtils.getString(SPConstants.PROJECT_ID)}' AND uploaded!=1 AND BC_DELETE != 1"
val pointRecords = PointDb.getInstance().rawQueryListData(SimpleSQLiteQuery(sqlString))
if (pointRecords.isNullOrEmpty()) {
LogUtils.d("测点上传------没有找到未上传的点测量记录")
return@launch
}
LogUtils.d("测点上传------有未上传的点测量记录")
val res = api.uploadPointEntry(requestBody = pointRecords.map { PointEntry(it) })
if (res.success) { if (res.success) {
// 上传成功,更新数据库里状态
pointRecords.forEach { item -> item.uploaded = true }
PointDb.getInstance().save(pointRecords)
LogUtils.d("测点上传------上传点测量记录--成功")
} else { } else {
errorResponse.postValue(res.message) LogUtils.d("测点上传------上传点测量记录--失败:${res.message}")
} }
} }
} }
@ -163,7 +175,7 @@ class ProjectViewModel : BaseViewModel() {
*/ */
fun createInspectionReport(workId: String) { fun createInspectionReport(workId: String) {
launch { launch {
val res = api.createInspectionReport(SPUtils.getString(SPConstants.PROJECT_ID), workId) val res = api.createInspectionReport(workId = workId)
if (res.success) { if (res.success) {
_createInspectionReportResponse.postValue(res.data) _createInspectionReportResponse.postValue(res.data)
} else { } else {
@ -220,14 +232,52 @@ class ProjectViewModel : BaseViewModel() {
/** /**
* 上传放样测点记录 * 上传放样测点记录
*/ */
fun uploadLoftingPointRecord(record: LoftingPointRecordEntry) { fun uploadLoftingPointRecord(record: PointStakeRecord) {
launch { launch {
val res = api.uploadLoftingPointRecord(requestBody = arrayListOf(record)) val res = api.uploadLoftingPointRecord(
requestBody = arrayListOf(
LoftingPointRecordEntry(record)
)
)
if (res.success) { if (res.success) {
// 上传成功
PointStakeDb.getInstance().save(record.apply {
uploaded = true
})
_uploadLoftingPointRecordResponse.postValue(res.data) _uploadLoftingPointRecordResponse.postValue(res.data)
} else { } else {
errorResponse.postValue(res.message) errorResponse.postValue(res.message)
} }
} }
} }
/**
* 批量上传 之前未上传或上传失败的放样点记录
*/
fun uploadLoftingPointRecord() {
launch {
// 找到未上传的列表
val sqlStringLofting =
"SELECT * FROM Point_Stake WHERE project_id=='${SPUtils.getString(SPConstants.PROJECT_ID)}' AND uploaded!=1 AND BC_DELETE != 1"
val pointStakeRecords =
PointStakeDb.getInstance().rawQueryListData(SimpleSQLiteQuery(sqlStringLofting))
if (pointStakeRecords.isNullOrEmpty()) {
LogUtils.d("测点上传------没有找到未上传的放样点记录")
return@launch
}
LogUtils.d("测点上传------有未上传的放样点记录")
val res = api.uploadLoftingPointRecord(requestBody = pointStakeRecords.map {
LoftingPointRecordEntry(it)
})
if (res.success) {
// 上传成功
pointStakeRecords.forEach { item -> item.uploaded = true }
PointStakeDb.getInstance().save(pointStakeRecords)
LogUtils.d("测点上传------上传放样点记录--成功")
} else {
LogUtils.d("测点上传------上传放样点记录--失败:${res.message}")
}
}
}
} }

@ -22,10 +22,10 @@ data class PointEntry(
val jzt: String, //解状态 "xx" val jzt: String, //解状态 "xx"
val satellite: String, //结算卫星 "xx" val satellite: String, //结算卫星 "xx"
) { ) {
constructor(workType: String, record: PointRecord) : this( constructor(record: PointRecord) : this(
record.name, record.name,
record.jobId, record.jobId,
workType, record.workType,
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_RTK) "${record.deviceInfoData.rtkStatusData?.poleHeight}" else "${record.deviceInfoData.tsStatusData?.hr}", if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_RTK) "${record.deviceInfoData.rtkStatusData?.poleHeight}" else "${record.deviceInfoData.tsStatusData?.hr}",
record.remarks?:"", record.remarks?:"",
"${record.x}", "${record.x}",

@ -82,7 +82,7 @@ interface Api {
@FormUrlEncoded @FormUrlEncoded
@POST("je/workflow/currentUserTask/getTask") @POST("je/workflow/currentUserTask/getTask")
suspend fun fetchWorkTask( suspend fun fetchWorkTask(
@Header("Projectid") projectId: String, @Header("Projectid") projectId: String = SPUtils.getString(SPConstants.PROJECT_ID),
@Field("type") type: String, @Field("type") type: String,
// @Field("userName") userName: String = "", // @Field("userName") userName: String = "",
@Field("page") page: Int, @Field("page") page: Int,
@ -94,7 +94,7 @@ interface Api {
*/ */
@GET("je/controlnetwork/queryControlNetwork") @GET("je/controlnetwork/queryControlNetwork")
suspend fun fetchSpecialControlNetworkList( suspend fun fetchSpecialControlNetworkList(
@Header("projectId") projectId: String, @Header("projectId") projectId: String = SPUtils.getString(SPConstants.PROJECT_ID),
@Query("pageNum") pageNum: Int, @Query("pageNum") pageNum: Int,
@Query("pageSize") pageSize: Int = 30 @Query("pageSize") pageSize: Int = 30
): HttpResult<ListResult<ControlNetworkBean>> ): HttpResult<ListResult<ControlNetworkBean>>
@ -115,7 +115,7 @@ interface Api {
*/ */
@GET("je/controlnetwork/queryControlNetworkInfoByName") @GET("je/controlnetwork/queryControlNetworkInfoByName")
suspend fun fetchSpecialControlNetworkInfo( suspend fun fetchSpecialControlNetworkInfo(
@Header("projectId") projectId: String, @Header("projectId") projectId: String = SPUtils.getString(SPConstants.PROJECT_ID),
@Query("controlNetWorkName") controlNetWorkName: String, //当前控制网name @Query("controlNetWorkName") controlNetWorkName: String, //当前控制网name
@Query("pointName") pointName: String? = null, //关键词,搜索用 @Query("pointName") pointName: String? = null, //关键词,搜索用
@Query("pageNum") pageNum: Int, @Query("pageNum") pageNum: Int,
@ -128,7 +128,7 @@ interface Api {
@FormUrlEncoded @FormUrlEncoded
@POST("je/common/load") @POST("je/common/load")
suspend fun fetchSpecialControlNetCGList( suspend fun fetchSpecialControlNetCGList(
@Header("projectId") projectId: String, @Header("projectId") projectId: String = SPUtils.getString(SPConstants.PROJECT_ID),
@Field("tableCode") tableCode: String, @Field("tableCode") tableCode: String,
@Field("funcCode") funcCode: String, @Field("funcCode") funcCode: String,
@Field("j_query") j_query: String = "", @Field("j_query") j_query: String = "",
@ -147,7 +147,7 @@ interface Api {
@FormUrlEncoded @FormUrlEncoded
@POST("je/cloud/beiDou/load") @POST("je/cloud/beiDou/load")
suspend fun fetchMeasureDataList( suspend fun fetchMeasureDataList(
@Header("projectId") projectId: String, @Header("projectId") projectId: String = SPUtils.getString(SPConstants.PROJECT_ID),
@Field("tableCode") tableCode: String, @Field("tableCode") tableCode: String,
@Field("funcCode") funcCode: String, @Field("funcCode") funcCode: String,
@Field("j_qurey") j_qurey: String = "", @Field("j_qurey") j_qurey: String = "",
@ -164,7 +164,7 @@ interface Api {
*/ */
@GET("je/measureWork/modifyWorkStatus") @GET("je/measureWork/modifyWorkStatus")
suspend fun updateMeasureWorkStatus( suspend fun updateMeasureWorkStatus(
@Header("projectId") projectId: String, @Header("projectId") projectId: String = SPUtils.getString(SPConstants.PROJECT_ID),
@Query("workId") workId: String, @Query("workId") workId: String,
@Query("workType") workType: String, @Query("workType") workType: String,
@Query("status") status: String @Query("status") status: String
@ -175,7 +175,7 @@ interface Api {
*/ */
@POST("je/measureWork/pointsEntry") @POST("je/measureWork/pointsEntry")
suspend fun uploadPointEntry( suspend fun uploadPointEntry(
@Header("projectId") projectId: String, @Header("projectId") projectId: String = SPUtils.getString(SPConstants.PROJECT_ID),
@Body requestBody: List<PointEntry> @Body requestBody: List<PointEntry>
): HttpResult<String> ): HttpResult<String>
@ -184,7 +184,7 @@ interface Api {
*/ */
@GET("je/measureWork/createInspectionReport") @GET("je/measureWork/createInspectionReport")
suspend fun createInspectionReport( suspend fun createInspectionReport(
@Header("projectId") projectId: String, @Header("projectId") projectId: String = SPUtils.getString(SPConstants.PROJECT_ID),
@Query("workId") workId: String @Query("workId") workId: String
): HttpResult<InspectionReportBean> ): HttpResult<InspectionReportBean>

@ -7,6 +7,7 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentPagerAdapter import androidx.fragment.app.FragmentPagerAdapter
import androidx.viewpager.widget.ViewPager import androidx.viewpager.widget.ViewPager
import blankj.utilcode.util.LogUtils import blankj.utilcode.util.LogUtils
import blankj.utilcode.util.NetworkUtils
import com.bingce.device.Device import com.bingce.device.Device
import com.bingce.ui.TabEntity import com.bingce.ui.TabEntity
import com.bingce.utils.SdkUtils import com.bingce.utils.SdkUtils
@ -16,6 +17,7 @@ import com.project.survey.R
import com.project.survey.databinding.ActivityMainBinding import com.project.survey.databinding.ActivityMainBinding
import com.project.survey.extend.toast import com.project.survey.extend.toast
import com.project.survey.logic.viewmodel.MainViewModel import com.project.survey.logic.viewmodel.MainViewModel
import com.project.survey.logic.viewmodel.ProjectViewModel
import com.project.survey.ui.base.BaseBindingActivity import com.project.survey.ui.base.BaseBindingActivity
import com.project.survey.ui.home.HomeFragment import com.project.survey.ui.home.HomeFragment
import com.project.survey.ui.home.InstrumentFragment import com.project.survey.ui.home.InstrumentFragment
@ -38,6 +40,7 @@ class MainActivity : BaseBindingActivity<ActivityMainBinding>() {
override fun getBinding(): ActivityMainBinding = ActivityMainBinding.inflate(layoutInflater) override fun getBinding(): ActivityMainBinding = ActivityMainBinding.inflate(layoutInflater)
private val viewModel: MainViewModel by viewModels() private val viewModel: MainViewModel by viewModels()
private val projectViewModel: ProjectViewModel by viewModels()
override fun initView() { override fun initView() {
viewModel.verifySdk() viewModel.verifySdk()
@ -47,14 +50,18 @@ class MainActivity : BaseBindingActivity<ActivityMainBinding>() {
",i=" + SdkUtils.isIntlCodeValidate() + ",i=" + SdkUtils.isIntlCodeValidate() +
",a=" + SdkUtils.availableTime() + ",a=" + SdkUtils.availableTime() +
",trialTimes=" + SdkUtils.remainingTrialTimes() ",trialTimes=" + SdkUtils.remainingTrialTimes()
// toastLong(text) // toastLong(text) LogUtils.d(text)
LogUtils.d(text)
} }
initTabFragment() initTabFragment()
} }
override fun initData() { override fun initData() {
// 检查网络连接,获取之前未上传的测点数据,进行上传
if (NetworkUtils.isConnected()) {
projectViewModel.uploadPointEntry()
projectViewModel.uploadLoftingPointRecord()
}
} }
override fun initListener() { override fun initListener() {
@ -135,7 +142,7 @@ class MainActivity : BaseBindingActivity<ActivityMainBinding>() {
private var exitTime: Long = 0 private var exitTime: Long = 0
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean { override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK){ if (keyCode == KeyEvent.KEYCODE_BACK) {
if ((System.currentTimeMillis() - exitTime) > 2000) { if ((System.currentTimeMillis() - exitTime) > 2000) {
toast("再按一次退出程序") toast("再按一次退出程序")
exitTime = System.currentTimeMillis() exitTime = System.currentTimeMillis()

@ -16,6 +16,7 @@ import com.bingce.coordlib.model.Coordinate;
import com.bingce.coordlib.model.CoordinateSystem; import com.bingce.coordlib.model.CoordinateSystem;
import com.bingce.data.cache.AbstractCachedObserver; import com.bingce.data.cache.AbstractCachedObserver;
import com.bingce.data.cache.CachedCurrentCoordinateSystem; import com.bingce.data.cache.CachedCurrentCoordinateSystem;
import com.bingce.data.cache.CachedCurrentCoordinateSystemKt;
import com.bingce.data.database.ProjectDb; import com.bingce.data.database.ProjectDb;
import com.bingce.device.Device; import com.bingce.device.Device;
import com.bingce.device.enums.ConnectTypeEnum; import com.bingce.device.enums.ConnectTypeEnum;
@ -46,7 +47,7 @@ public class RtkBaseCorrectActivity extends BaseSurveyNewActivity {
private int mTimes = -1; private int mTimes = -1;
double latSum = 0, lngSum = 0, altSum = 0; double latSum = 0, lngSum = 0, altSum = 0;
private double originalLatitude, originalLongitude, originalAltitude; private double originalLatitude, originalLongitude, originalAltitude;
protected final CachedCurrentCoordinateSystem cachedCoordinateSystem = new CachedCurrentCoordinateSystem(this); protected final CachedCurrentCoordinateSystemKt cachedCoordinateSystem = new CachedCurrentCoordinateSystemKt(this);
private ActivityRtkCorrectBinding binding; private ActivityRtkCorrectBinding binding;

@ -1102,8 +1102,7 @@ public class PointStakingActivity extends BaseSurveyNewActivity {
PointStakeDb.getInstance().save(pointStakeRecord); PointStakeDb.getInstance().save(pointStakeRecord);
// 上传测点 // 上传测点
LoftingPointRecordEntry entry = new LoftingPointRecordEntry(pointStakeRecord); viewModel.uploadLoftingPointRecord(pointStakeRecord);
viewModel.uploadLoftingPointRecord(entry);
runOnUiThread(() -> { runOnUiThread(() -> {
recordPointLine.getValues().add(new PointValue(pointStakeRecord.measuredY, pointStakeRecord.measuredX).setLabel("")); recordPointLine.getValues().add(new PointValue(pointStakeRecord.measuredY, pointStakeRecord.measuredX).setLabel(""));

@ -625,6 +625,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
, x, y, z , x, y, z
, latitude, longitude, altitude , latitude, longitude, altitude
, PointConstants.POINT_FORMAT_LATITUDE, deviceInfoData); , PointConstants.POINT_FORMAT_LATITUDE, deviceInfoData);
record.workType = workType;
ThreadPoolUtil.execute(() -> { ThreadPoolUtil.execute(() -> {
if (!Device.getInstance().rtkAllowRepeatName) { if (!Device.getInstance().rtkAllowRepeatName) {
@ -643,10 +644,8 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
binding.etPointName.setText(Util.lastOfStringPlusStep(pointName, Device.getInstance().rtkPointNameAddStep)); binding.etPointName.setText(Util.lastOfStringPlusStep(pointName, Device.getInstance().rtkPointNameAddStep));
}); });
PointDb.getInstance().save(record); PointDb.getInstance().save(record);
// 上传测点信息到服务器
viewModel.uploadPointEntry(record);
PointEntry pointEntry = new PointEntry(workType, record);
viewModel.uploadPointEntry(pointEntry);
}); });
} }

Loading…
Cancel
Save