merge code

This commit is contained in:
qiji4215 2023-04-25 17:58:19 +08:00
parent 51ffecd35a
commit 77ac36515b
2 changed files with 8 additions and 14 deletions

View File

@ -10,22 +10,17 @@ import com.blankj.utilcode.util.UriUtils
import com.blankj.utilcode.util.ZipUtils
import com.google.gson.Gson
import com.navinfo.collect.library.data.entity.*
import com.navinfo.collect.library.map.NIMapController
import com.navinfo.collect.library.utils.GeometryTools
import com.navinfo.omqs.bean.ScProblemTypeBean
import com.navinfo.omqs.bean.ScRootCauseAnalysisBean
import com.navinfo.omqs.db.ImportOMDBHelper
import com.navinfo.omqs.db.RealmOperateHelper
import com.navinfo.omqs.db.RoomAppDatabase
import dagger.hilt.android.lifecycle.HiltViewModel
import dagger.hilt.android.scopes.ViewModelScoped
import io.realm.Realm
import io.realm.RealmDictionary
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.apache.poi.ss.usermodel.Row
import org.apache.poi.ss.usermodel.WorkbookFactory
import org.locationtech.jts.geom.Point
import org.apache.poi.xssf.usermodel.XSSFWorkbook
import java.io.File
import java.io.FileInputStream
import java.io.IOException
@ -151,9 +146,8 @@ class PersonalCenterViewModel @Inject constructor(
viewModelScope.launch(Dispatchers.IO) {
try {
val file = UriUtils.uri2File(uri)
val inputStream: InputStream =
FileInputStream(file) //getAssets().open("sample.xlsx")
val workbook = WorkbookFactory.create(inputStream)
val inputStream: InputStream = FileInputStream(file) //getAssets().open("sample.xlsx")
val workbook = XSSFWorkbook(inputStream)
//获取所有sheet
val sheet1 = workbook.getSheet("SC_PROBLEM_TYPE")
sheet1?.let {

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:tns="http://opensciencemap.org/rendertheme"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://opensciencemap.org/rendertheme" xml:lang="en">
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://opensciencemap.org/rendertheme" xml:lang="en">
<!-- attribute types -->
<xs:simpleType name="cap">
@ -81,7 +81,7 @@
<xs:simpleType name="strokeDasharray">
<xs:restriction base="xs:string">
<xs:pattern
value="([0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)? *, *)*[0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)?"/>
value="([0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)? *, *)*[0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)?"/>
</xs:restriction>
</xs:simpleType>
@ -357,9 +357,9 @@
<xs:attribute name="version" type="xs:positiveInteger" use="required"/>
<xs:attribute name="map-background" default="#ffffff" type="tns:color" use="optional"/>
<xs:attribute name="base-stroke-width" default="1" type="tns:nonNegativeFloat"
use="optional"/>
use="optional"/>
<xs:attribute name="base-text-scale" default="1" type="tns:nonNegativeFloat"
use="optional"/>
use="optional"/>
</xs:complexType>
<!-- root element -->