diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java index 1d82f51..622e9c2 100644 --- a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "SMALL_LABEL_BEAN". */ @@ -61,7 +60,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"SMALL_LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MARKER_ID\" TEXT," + // 1: markerId @@ -86,9 +85,7 @@ "\"MEMO3\" TEXT);"); // 20: memo3 } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_LABEL_BEAN\""; db.execSQL(sql); @@ -97,107 +94,107 @@ @Override protected final void bindValues(DatabaseStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); } - + String memo3 = entity.getMemo3(); if (memo3 != null) { stmt.bindString(21, memo3); @@ -207,102 +204,102 @@ @Override protected final void bindValues(SQLiteStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); @@ -346,7 +343,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -396,5 +393,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java index 1d82f51..622e9c2 100644 --- a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "SMALL_LABEL_BEAN". */ @@ -61,7 +60,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"SMALL_LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MARKER_ID\" TEXT," + // 1: markerId @@ -86,9 +85,7 @@ "\"MEMO3\" TEXT);"); // 20: memo3 } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_LABEL_BEAN\""; db.execSQL(sql); @@ -97,107 +94,107 @@ @Override protected final void bindValues(DatabaseStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); } - + String memo3 = entity.getMemo3(); if (memo3 != null) { stmt.bindString(21, memo3); @@ -207,102 +204,102 @@ @Override protected final void bindValues(SQLiteStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); @@ -346,7 +343,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -396,5 +393,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java index eee01ae..bc7b50a 100644 --- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "TASK_BEAN". */ @@ -50,7 +49,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"SCANNER\" TEXT," + // 1: scanner @@ -64,9 +63,7 @@ "\"STATE\" TEXT);"); // 9: state } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\""; db.execSQL(sql); @@ -75,52 +72,52 @@ @Override protected final void bindValues(DatabaseStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); } - + String state = entity.getState(); if (state != null) { stmt.bindString(10, state); @@ -130,47 +127,47 @@ @Override protected final void bindValues(SQLiteStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); @@ -203,7 +200,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, TaskBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -242,5 +239,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java index 1d82f51..622e9c2 100644 --- a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "SMALL_LABEL_BEAN". */ @@ -61,7 +60,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"SMALL_LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MARKER_ID\" TEXT," + // 1: markerId @@ -86,9 +85,7 @@ "\"MEMO3\" TEXT);"); // 20: memo3 } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_LABEL_BEAN\""; db.execSQL(sql); @@ -97,107 +94,107 @@ @Override protected final void bindValues(DatabaseStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); } - + String memo3 = entity.getMemo3(); if (memo3 != null) { stmt.bindString(21, memo3); @@ -207,102 +204,102 @@ @Override protected final void bindValues(SQLiteStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); @@ -346,7 +343,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -396,5 +393,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java index eee01ae..bc7b50a 100644 --- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "TASK_BEAN". */ @@ -50,7 +49,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"SCANNER\" TEXT," + // 1: scanner @@ -64,9 +63,7 @@ "\"STATE\" TEXT);"); // 9: state } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\""; db.execSQL(sql); @@ -75,52 +72,52 @@ @Override protected final void bindValues(DatabaseStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); } - + String state = entity.getState(); if (state != null) { stmt.bindString(10, state); @@ -130,47 +127,47 @@ @Override protected final void bindValues(SQLiteStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); @@ -203,7 +200,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, TaskBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -242,5 +239,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java new file mode 100644 index 0000000..557ade2 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerFileModel { + + private boolean success; + private String message; + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java index 1d82f51..622e9c2 100644 --- a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "SMALL_LABEL_BEAN". */ @@ -61,7 +60,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"SMALL_LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MARKER_ID\" TEXT," + // 1: markerId @@ -86,9 +85,7 @@ "\"MEMO3\" TEXT);"); // 20: memo3 } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_LABEL_BEAN\""; db.execSQL(sql); @@ -97,107 +94,107 @@ @Override protected final void bindValues(DatabaseStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); } - + String memo3 = entity.getMemo3(); if (memo3 != null) { stmt.bindString(21, memo3); @@ -207,102 +204,102 @@ @Override protected final void bindValues(SQLiteStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); @@ -346,7 +343,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -396,5 +393,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java index eee01ae..bc7b50a 100644 --- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "TASK_BEAN". */ @@ -50,7 +49,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"SCANNER\" TEXT," + // 1: scanner @@ -64,9 +63,7 @@ "\"STATE\" TEXT);"); // 9: state } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\""; db.execSQL(sql); @@ -75,52 +72,52 @@ @Override protected final void bindValues(DatabaseStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); } - + String state = entity.getState(); if (state != null) { stmt.bindString(10, state); @@ -130,47 +127,47 @@ @Override protected final void bindValues(SQLiteStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); @@ -203,7 +200,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, TaskBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -242,5 +239,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java new file mode 100644 index 0000000..557ade2 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerFileModel { + + private boolean success; + private String message; + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java deleted file mode 100644 index f32d10a..0000000 --- a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.casic.detector.model; - -public class MarkerFileResultModel { - - private boolean success; - private String message; - - public boolean isSuccess() { - return success; - } - - public void setSuccess(boolean success) { - this.success = success; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java index 1d82f51..622e9c2 100644 --- a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "SMALL_LABEL_BEAN". */ @@ -61,7 +60,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"SMALL_LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MARKER_ID\" TEXT," + // 1: markerId @@ -86,9 +85,7 @@ "\"MEMO3\" TEXT);"); // 20: memo3 } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_LABEL_BEAN\""; db.execSQL(sql); @@ -97,107 +94,107 @@ @Override protected final void bindValues(DatabaseStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); } - + String memo3 = entity.getMemo3(); if (memo3 != null) { stmt.bindString(21, memo3); @@ -207,102 +204,102 @@ @Override protected final void bindValues(SQLiteStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); @@ -346,7 +343,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -396,5 +393,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java index eee01ae..bc7b50a 100644 --- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "TASK_BEAN". */ @@ -50,7 +49,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"SCANNER\" TEXT," + // 1: scanner @@ -64,9 +63,7 @@ "\"STATE\" TEXT);"); // 9: state } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\""; db.execSQL(sql); @@ -75,52 +72,52 @@ @Override protected final void bindValues(DatabaseStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); } - + String state = entity.getState(); if (state != null) { stmt.bindString(10, state); @@ -130,47 +127,47 @@ @Override protected final void bindValues(SQLiteStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); @@ -203,7 +200,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, TaskBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -242,5 +239,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java new file mode 100644 index 0000000..557ade2 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerFileModel { + + private boolean success; + private String message; + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java deleted file mode 100644 index f32d10a..0000000 --- a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.casic.detector.model; - -public class MarkerFileResultModel { - - private boolean success; - private String message; - - public boolean isSuccess() { - return success; - } - - public void setSuccess(boolean success) { - this.success = success; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/app/src/main/java/com/casic/detector/model/MarkerImageModel.java b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java new file mode 100644 index 0000000..5c770a8 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerImageModel { + + private String success; + private String data; + + public String getSuccess() { + return success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } +} diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java index 1d82f51..622e9c2 100644 --- a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "SMALL_LABEL_BEAN". */ @@ -61,7 +60,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"SMALL_LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MARKER_ID\" TEXT," + // 1: markerId @@ -86,9 +85,7 @@ "\"MEMO3\" TEXT);"); // 20: memo3 } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_LABEL_BEAN\""; db.execSQL(sql); @@ -97,107 +94,107 @@ @Override protected final void bindValues(DatabaseStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); } - + String memo3 = entity.getMemo3(); if (memo3 != null) { stmt.bindString(21, memo3); @@ -207,102 +204,102 @@ @Override protected final void bindValues(SQLiteStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); @@ -346,7 +343,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -396,5 +393,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java index eee01ae..bc7b50a 100644 --- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "TASK_BEAN". */ @@ -50,7 +49,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"SCANNER\" TEXT," + // 1: scanner @@ -64,9 +63,7 @@ "\"STATE\" TEXT);"); // 9: state } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\""; db.execSQL(sql); @@ -75,52 +72,52 @@ @Override protected final void bindValues(DatabaseStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); } - + String state = entity.getState(); if (state != null) { stmt.bindString(10, state); @@ -130,47 +127,47 @@ @Override protected final void bindValues(SQLiteStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); @@ -203,7 +200,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, TaskBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -242,5 +239,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java new file mode 100644 index 0000000..557ade2 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerFileModel { + + private boolean success; + private String message; + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java deleted file mode 100644 index f32d10a..0000000 --- a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.casic.detector.model; - -public class MarkerFileResultModel { - - private boolean success; - private String message; - - public boolean isSuccess() { - return success; - } - - public void setSuccess(boolean success) { - this.success = success; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/app/src/main/java/com/casic/detector/model/MarkerImageModel.java b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java new file mode 100644 index 0000000..5c770a8 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerImageModel { + + private String success; + private String data; + + public String getSuccess() { + return success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } +} diff --git a/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt index b2a2e80..15afed7 100644 --- a/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt @@ -1,6 +1,9 @@ package com.casic.detector.retrofit +import okhttp3.RequestBody +import retrofit2.http.Body import retrofit2.http.GET +import retrofit2.http.POST import retrofit2.http.Query interface RetrofitService { @@ -27,4 +30,10 @@ @Query("userId") userId: String, @Query("companyId") companyId: String ): String + + /** + * 获取标识器图片 + */ + @POST("/ems/marker/get-marker-images.do") + suspend fun getLabelPicture(@Body requestBody: RequestBody): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java index 1d82f51..622e9c2 100644 --- a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "SMALL_LABEL_BEAN". */ @@ -61,7 +60,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"SMALL_LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MARKER_ID\" TEXT," + // 1: markerId @@ -86,9 +85,7 @@ "\"MEMO3\" TEXT);"); // 20: memo3 } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_LABEL_BEAN\""; db.execSQL(sql); @@ -97,107 +94,107 @@ @Override protected final void bindValues(DatabaseStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); } - + String memo3 = entity.getMemo3(); if (memo3 != null) { stmt.bindString(21, memo3); @@ -207,102 +204,102 @@ @Override protected final void bindValues(SQLiteStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); @@ -346,7 +343,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -396,5 +393,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java index eee01ae..bc7b50a 100644 --- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "TASK_BEAN". */ @@ -50,7 +49,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"SCANNER\" TEXT," + // 1: scanner @@ -64,9 +63,7 @@ "\"STATE\" TEXT);"); // 9: state } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\""; db.execSQL(sql); @@ -75,52 +72,52 @@ @Override protected final void bindValues(DatabaseStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); } - + String state = entity.getState(); if (state != null) { stmt.bindString(10, state); @@ -130,47 +127,47 @@ @Override protected final void bindValues(SQLiteStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); @@ -203,7 +200,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, TaskBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -242,5 +239,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java new file mode 100644 index 0000000..557ade2 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerFileModel { + + private boolean success; + private String message; + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java deleted file mode 100644 index f32d10a..0000000 --- a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.casic.detector.model; - -public class MarkerFileResultModel { - - private boolean success; - private String message; - - public boolean isSuccess() { - return success; - } - - public void setSuccess(boolean success) { - this.success = success; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/app/src/main/java/com/casic/detector/model/MarkerImageModel.java b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java new file mode 100644 index 0000000..5c770a8 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerImageModel { + + private String success; + private String data; + + public String getSuccess() { + return success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } +} diff --git a/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt index b2a2e80..15afed7 100644 --- a/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt @@ -1,6 +1,9 @@ package com.casic.detector.retrofit +import okhttp3.RequestBody +import retrofit2.http.Body import retrofit2.http.GET +import retrofit2.http.POST import retrofit2.http.Query interface RetrofitService { @@ -27,4 +30,10 @@ @Query("userId") userId: String, @Query("companyId") companyId: String ): String + + /** + * 获取标识器图片 + */ + @POST("/ems/marker/get-marker-images.do") + suspend fun getLabelPicture(@Body requestBody: RequestBody): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt b/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt index 2b3e68d..a58c09b 100644 --- a/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt +++ b/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt @@ -2,9 +2,12 @@ import com.casic.detector.utils.LocaleConstant import com.google.gson.Gson +import com.google.gson.JsonObject import com.google.gson.reflect.TypeToken import com.pengxh.kt.lite.utils.RetrofitFactory import com.pengxh.kt.lite.utils.SaveKeyValues +import okhttp3.MediaType.Companion.toMediaType +import okhttp3.RequestBody.Companion.toRequestBody object RetrofitServiceManager { private val api by lazy { @@ -36,4 +39,16 @@ suspend fun getMarkerFile(userId: String, companyId: String): String { return api.getMarkerFile(userId, companyId) } + + /** + * 获取标识器图片 + */ + suspend fun getLabelPicture(markerId: String): String { + val param = JsonObject() + param.addProperty("markerId", markerId) + val requestBody = param.toString().toRequestBody( + "application/json;charset=UTF-8".toMediaType() + ) + return api.getLabelPicture(requestBody) + } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java index 1d82f51..622e9c2 100644 --- a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "SMALL_LABEL_BEAN". */ @@ -61,7 +60,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"SMALL_LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MARKER_ID\" TEXT," + // 1: markerId @@ -86,9 +85,7 @@ "\"MEMO3\" TEXT);"); // 20: memo3 } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_LABEL_BEAN\""; db.execSQL(sql); @@ -97,107 +94,107 @@ @Override protected final void bindValues(DatabaseStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); } - + String memo3 = entity.getMemo3(); if (memo3 != null) { stmt.bindString(21, memo3); @@ -207,102 +204,102 @@ @Override protected final void bindValues(SQLiteStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); @@ -346,7 +343,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -396,5 +393,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java index eee01ae..bc7b50a 100644 --- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "TASK_BEAN". */ @@ -50,7 +49,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"SCANNER\" TEXT," + // 1: scanner @@ -64,9 +63,7 @@ "\"STATE\" TEXT);"); // 9: state } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\""; db.execSQL(sql); @@ -75,52 +72,52 @@ @Override protected final void bindValues(DatabaseStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); } - + String state = entity.getState(); if (state != null) { stmt.bindString(10, state); @@ -130,47 +127,47 @@ @Override protected final void bindValues(SQLiteStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); @@ -203,7 +200,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, TaskBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -242,5 +239,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java new file mode 100644 index 0000000..557ade2 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerFileModel { + + private boolean success; + private String message; + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java deleted file mode 100644 index f32d10a..0000000 --- a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.casic.detector.model; - -public class MarkerFileResultModel { - - private boolean success; - private String message; - - public boolean isSuccess() { - return success; - } - - public void setSuccess(boolean success) { - this.success = success; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/app/src/main/java/com/casic/detector/model/MarkerImageModel.java b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java new file mode 100644 index 0000000..5c770a8 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerImageModel { + + private String success; + private String data; + + public String getSuccess() { + return success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } +} diff --git a/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt index b2a2e80..15afed7 100644 --- a/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt @@ -1,6 +1,9 @@ package com.casic.detector.retrofit +import okhttp3.RequestBody +import retrofit2.http.Body import retrofit2.http.GET +import retrofit2.http.POST import retrofit2.http.Query interface RetrofitService { @@ -27,4 +30,10 @@ @Query("userId") userId: String, @Query("companyId") companyId: String ): String + + /** + * 获取标识器图片 + */ + @POST("/ems/marker/get-marker-images.do") + suspend fun getLabelPicture(@Body requestBody: RequestBody): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt b/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt index 2b3e68d..a58c09b 100644 --- a/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt +++ b/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt @@ -2,9 +2,12 @@ import com.casic.detector.utils.LocaleConstant import com.google.gson.Gson +import com.google.gson.JsonObject import com.google.gson.reflect.TypeToken import com.pengxh.kt.lite.utils.RetrofitFactory import com.pengxh.kt.lite.utils.SaveKeyValues +import okhttp3.MediaType.Companion.toMediaType +import okhttp3.RequestBody.Companion.toRequestBody object RetrofitServiceManager { private val api by lazy { @@ -36,4 +39,16 @@ suspend fun getMarkerFile(userId: String, companyId: String): String { return api.getMarkerFile(userId, companyId) } + + /** + * 获取标识器图片 + */ + suspend fun getLabelPicture(markerId: String): String { + val param = JsonObject() + param.addProperty("markerId", markerId) + val requestBody = param.toString().toRequestBody( + "application/json;charset=UTF-8".toMediaType() + ) + return api.getLabelPicture(requestBody) + } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/detector/view/ObjectDetailActivity.kt b/app/src/main/java/com/casic/detector/view/ObjectDetailActivity.kt index b30c14e..20df7bc 100644 --- a/app/src/main/java/com/casic/detector/view/ObjectDetailActivity.kt +++ b/app/src/main/java/com/casic/detector/view/ObjectDetailActivity.kt @@ -5,8 +5,10 @@ import android.os.Bundle import android.view.Gravity import androidx.appcompat.app.AppCompatActivity +import androidx.lifecycle.ViewModelProvider import com.casic.detector.R import com.casic.detector.bean.LabelBean +import com.casic.detector.vm.TaskViewModel import com.google.gson.Gson import com.google.gson.reflect.TypeToken import com.pengxh.kt.lite.extensions.getScreenHeight @@ -17,6 +19,7 @@ class ObjectDetailActivity : AppCompatActivity() { private val gson by lazy { Gson() } + private lateinit var taskViewModel: TaskViewModel override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -55,8 +58,13 @@ closeView.setOnClickListener { finish() } - showImageView.setOnClickListener { + //TODO 图片接口异常 + taskViewModel = ViewModelProvider(this)[TaskViewModel::class.java] + taskViewModel.markerImageResult.observe(this) { } + showImageView.setOnClickListener { + taskViewModel.getLabelPicture(labelBean.id.toString()) + } } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java index 682c3f8..e344021 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -13,7 +13,6 @@ // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * Master of DAO (schema version 1): knows all DAOs. */ @@ -29,9 +28,7 @@ TaskBeanDao.createTable(db, ifNotExists); } - /** - * Drops underlying database table using DAOs. - */ + /** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); SmallLabelBeanDao.dropTable(db, ifExists); @@ -86,9 +83,7 @@ } } - /** - * WARNING: Drops all table on Upgrade! Use only during development. - */ + /** WARNING: Drops all table on Upgrade! Use only during development. */ public static class DevOpenHelper extends OpenHelper { public DevOpenHelper(Context context, String name) { super(context, name); diff --git a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java index 94a73c4..183a99e 100644 --- a/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/LabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "LABEL_BEAN". */ @@ -67,7 +66,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"OBJECT_TYPE\" TEXT," + // 1: objectType @@ -98,9 +97,7 @@ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\""; db.execSQL(sql); @@ -109,137 +106,137 @@ @Override protected final void bindValues(DatabaseStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); } - + String imagePath = entity.getImagePath(); if (imagePath != null) { stmt.bindString(27, imagePath); @@ -249,132 +246,132 @@ @Override protected final void bindValues(SQLiteStatement stmt, LabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String objectType = entity.getObjectType(); if (objectType != null) { stmt.bindString(2, objectType); } - + String pipelineType = entity.getPipelineType(); if (pipelineType != null) { stmt.bindString(3, pipelineType); } - + String pipelineMaterial = entity.getPipelineMaterial(); if (pipelineMaterial != null) { stmt.bindString(4, pipelineMaterial); } - + String pipelineDiameter = entity.getPipelineDiameter(); if (pipelineDiameter != null) { stmt.bindString(5, pipelineDiameter); } - + String buryDeep = entity.getBuryDeep(); if (buryDeep != null) { stmt.bindString(6, buryDeep); } - + String lowerType = entity.getLowerType(); if (lowerType != null) { stmt.bindString(7, lowerType); } - + String lowerMaterial = entity.getLowerMaterial(); if (lowerMaterial != null) { stmt.bindString(8, lowerMaterial); } - + String lowerDiameter = entity.getLowerDiameter(); if (lowerDiameter != null) { stmt.bindString(9, lowerDiameter); } - + String lowerDeep = entity.getLowerDeep(); if (lowerDeep != null) { stmt.bindString(10, lowerDeep); } - + String buryMethod = entity.getBuryMethod(); if (buryMethod != null) { stmt.bindString(11, buryMethod); } - + String area = entity.getArea(); if (area != null) { stmt.bindString(12, area); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(13, line); } - + String road = entity.getRoad(); if (road != null) { stmt.bindString(14, road); } - + String constructTime = entity.getConstructTime(); if (constructTime != null) { stmt.bindString(15, constructTime); } - + String owner = entity.getOwner(); if (owner != null) { stmt.bindString(16, owner); } - + String objectId = entity.getObjectId(); if (objectId != null) { stmt.bindString(17, objectId); } - + String identifierId = entity.getIdentifierId(); if (identifierId != null) { stmt.bindString(18, identifierId); } - + String identifierType = entity.getIdentifierType(); if (identifierType != null) { stmt.bindString(19, identifierType); } - + String identifierDeep = entity.getIdentifierDeep(); if (identifierDeep != null) { stmt.bindString(20, identifierDeep); } - + String person = entity.getPerson(); if (person != null) { stmt.bindString(21, person); } - + String installTime = entity.getInstallTime(); if (installTime != null) { stmt.bindString(22, installTime); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(23, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(24, lat); } - + String color = entity.getColor(); if (color != null) { stmt.bindString(25, color); } - + String remark = entity.getRemark(); if (remark != null) { stmt.bindString(26, remark); @@ -424,7 +421,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, LabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -480,5 +477,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java index 1d82f51..622e9c2 100644 --- a/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/SmallLabelBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "SMALL_LABEL_BEAN". */ @@ -61,7 +60,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"SMALL_LABEL_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MARKER_ID\" TEXT," + // 1: markerId @@ -86,9 +85,7 @@ "\"MEMO3\" TEXT);"); // 20: memo3 } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_LABEL_BEAN\""; db.execSQL(sql); @@ -97,107 +94,107 @@ @Override protected final void bindValues(DatabaseStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); } - + String memo3 = entity.getMemo3(); if (memo3 != null) { stmt.bindString(21, memo3); @@ -207,102 +204,102 @@ @Override protected final void bindValues(SQLiteStatement stmt, SmallLabelBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String markerId = entity.getMarkerId(); if (markerId != null) { stmt.bindString(2, markerId); } - + String locationNo = entity.getLocationNo(); if (locationNo != null) { stmt.bindString(3, locationNo); } - + String locationName = entity.getLocationName(); if (locationName != null) { stmt.bindString(4, locationName); } - + String smallMarkerId = entity.getSmallMarkerId(); if (smallMarkerId != null) { stmt.bindString(5, smallMarkerId); } - + String cableName = entity.getCableName(); if (cableName != null) { stmt.bindString(6, cableName); } - + String cableNo = entity.getCableNo(); if (cableNo != null) { stmt.bindString(7, cableNo); } - + String line = entity.getLine(); if (line != null) { stmt.bindString(8, line); } - + String pressLevel = entity.getPressLevel(); if (pressLevel != null) { stmt.bindString(9, pressLevel); } - + String cableType = entity.getCableType(); if (cableType != null) { stmt.bindString(10, cableType); } - + String cableSpec = entity.getCableSpec(); if (cableSpec != null) { stmt.bindString(11, cableSpec); } - + String cableBrand = entity.getCableBrand(); if (cableBrand != null) { stmt.bindString(12, cableBrand); } - + String cableStart = entity.getCableStart(); if (cableStart != null) { stmt.bindString(13, cableStart); } - + String cableEnd = entity.getCableEnd(); if (cableEnd != null) { stmt.bindString(14, cableEnd); } - + String hasJoint = entity.getHasJoint(); if (hasJoint != null) { stmt.bindString(15, hasJoint); } - + String jointCreator = entity.getJointCreator(); if (jointCreator != null) { stmt.bindString(16, jointCreator); } - + String createTime = entity.getCreateTime(); if (createTime != null) { stmt.bindString(17, createTime); } - + String path = entity.getPath(); if (path != null) { stmt.bindString(18, path); } - + String memo1 = entity.getMemo1(); if (memo1 != null) { stmt.bindString(19, memo1); } - + String memo2 = entity.getMemo2(); if (memo2 != null) { stmt.bindString(20, memo2); @@ -346,7 +343,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -396,5 +393,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java index eee01ae..bc7b50a 100644 --- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java +++ b/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java @@ -12,7 +12,6 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. - /** * DAO for table "TASK_BEAN". */ @@ -50,7 +49,7 @@ * Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS " : ""; + String constraint = ifNotExists ? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"SCANNER\" TEXT," + // 1: scanner @@ -64,9 +63,7 @@ "\"STATE\" TEXT);"); // 9: state } - /** - * Drops the underlying database table. - */ + /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\""; db.execSQL(sql); @@ -75,52 +72,52 @@ @Override protected final void bindValues(DatabaseStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); } - + String state = entity.getState(); if (state != null) { stmt.bindString(10, state); @@ -130,47 +127,47 @@ @Override protected final void bindValues(SQLiteStatement stmt, TaskBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String scanner = entity.getScanner(); if (scanner != null) { stmt.bindString(2, scanner); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(3, taskId); } - + String desc = entity.getDesc(); if (desc != null) { stmt.bindString(4, desc); } - + String taskdeId = entity.getTaskdeId(); if (taskdeId != null) { stmt.bindString(5, taskdeId); } - + String markId = entity.getMarkId(); if (markId != null) { stmt.bindString(6, markId); } - + String lid = entity.getLid(); if (lid != null) { stmt.bindString(7, lid); } - + String lng = entity.getLng(); if (lng != null) { stmt.bindString(8, lng); } - + String lat = entity.getLat(); if (lat != null) { stmt.bindString(9, lat); @@ -203,7 +200,7 @@ ); return entity; } - + @Override public void readEntity(Cursor cursor, TaskBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -242,5 +239,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java new file mode 100644 index 0000000..557ade2 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerFileModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerFileModel { + + private boolean success; + private String message; + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java b/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java deleted file mode 100644 index f32d10a..0000000 --- a/app/src/main/java/com/casic/detector/model/MarkerFileResultModel.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.casic.detector.model; - -public class MarkerFileResultModel { - - private boolean success; - private String message; - - public boolean isSuccess() { - return success; - } - - public void setSuccess(boolean success) { - this.success = success; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/app/src/main/java/com/casic/detector/model/MarkerImageModel.java b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java new file mode 100644 index 0000000..5c770a8 --- /dev/null +++ b/app/src/main/java/com/casic/detector/model/MarkerImageModel.java @@ -0,0 +1,23 @@ +package com.casic.detector.model; + +public class MarkerImageModel { + + private String success; + private String data; + + public String getSuccess() { + return success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } +} diff --git a/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt index b2a2e80..15afed7 100644 --- a/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/detector/retrofit/RetrofitService.kt @@ -1,6 +1,9 @@ package com.casic.detector.retrofit +import okhttp3.RequestBody +import retrofit2.http.Body import retrofit2.http.GET +import retrofit2.http.POST import retrofit2.http.Query interface RetrofitService { @@ -27,4 +30,10 @@ @Query("userId") userId: String, @Query("companyId") companyId: String ): String + + /** + * 获取标识器图片 + */ + @POST("/ems/marker/get-marker-images.do") + suspend fun getLabelPicture(@Body requestBody: RequestBody): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt b/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt index 2b3e68d..a58c09b 100644 --- a/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt +++ b/app/src/main/java/com/casic/detector/retrofit/RetrofitServiceManager.kt @@ -2,9 +2,12 @@ import com.casic.detector.utils.LocaleConstant import com.google.gson.Gson +import com.google.gson.JsonObject import com.google.gson.reflect.TypeToken import com.pengxh.kt.lite.utils.RetrofitFactory import com.pengxh.kt.lite.utils.SaveKeyValues +import okhttp3.MediaType.Companion.toMediaType +import okhttp3.RequestBody.Companion.toRequestBody object RetrofitServiceManager { private val api by lazy { @@ -36,4 +39,16 @@ suspend fun getMarkerFile(userId: String, companyId: String): String { return api.getMarkerFile(userId, companyId) } + + /** + * 获取标识器图片 + */ + suspend fun getLabelPicture(markerId: String): String { + val param = JsonObject() + param.addProperty("markerId", markerId) + val requestBody = param.toString().toRequestBody( + "application/json;charset=UTF-8".toMediaType() + ) + return api.getLabelPicture(requestBody) + } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/detector/view/ObjectDetailActivity.kt b/app/src/main/java/com/casic/detector/view/ObjectDetailActivity.kt index b30c14e..20df7bc 100644 --- a/app/src/main/java/com/casic/detector/view/ObjectDetailActivity.kt +++ b/app/src/main/java/com/casic/detector/view/ObjectDetailActivity.kt @@ -5,8 +5,10 @@ import android.os.Bundle import android.view.Gravity import androidx.appcompat.app.AppCompatActivity +import androidx.lifecycle.ViewModelProvider import com.casic.detector.R import com.casic.detector.bean.LabelBean +import com.casic.detector.vm.TaskViewModel import com.google.gson.Gson import com.google.gson.reflect.TypeToken import com.pengxh.kt.lite.extensions.getScreenHeight @@ -17,6 +19,7 @@ class ObjectDetailActivity : AppCompatActivity() { private val gson by lazy { Gson() } + private lateinit var taskViewModel: TaskViewModel override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -55,8 +58,13 @@ closeView.setOnClickListener { finish() } - showImageView.setOnClickListener { + //TODO 图片接口异常 + taskViewModel = ViewModelProvider(this)[TaskViewModel::class.java] + taskViewModel.markerImageResult.observe(this) { } + showImageView.setOnClickListener { + taskViewModel.getLabelPicture(labelBean.id.toString()) + } } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/detector/vm/TaskViewModel.kt b/app/src/main/java/com/casic/detector/vm/TaskViewModel.kt index e516748..ae827db 100644 --- a/app/src/main/java/com/casic/detector/vm/TaskViewModel.kt +++ b/app/src/main/java/com/casic/detector/vm/TaskViewModel.kt @@ -5,7 +5,8 @@ import com.casic.detector.extensions.convertChinese import com.casic.detector.extensions.separateResponseState import com.casic.detector.extensions.toErrorMessage -import com.casic.detector.model.MarkerFileResultModel +import com.casic.detector.model.MarkerFileModel +import com.casic.detector.model.MarkerImageModel import com.casic.detector.retrofit.RetrofitServiceManager import com.google.gson.Gson import com.google.gson.reflect.TypeToken @@ -16,13 +17,27 @@ class TaskViewModel : BaseViewModel() { private val gson by lazy { Gson() } - val markerFileResult = MutableLiveData() + val markerFileResult = MutableLiveData() + val markerImageResult = MutableLiveData() fun getMarkerFile(userId: String, companyId: String) = launch({ val response = RetrofitServiceManager.getMarkerFile(userId, companyId) if (response.separateResponseState()) { - markerFileResult.value = gson.fromJson( - response, object : TypeToken() {}.type + markerFileResult.value = gson.fromJson( + response, object : TypeToken() {}.type + ) + } else { + response.toErrorMessage().show(BaseApplication.get()) + } + }, { + it.convertChinese().show(BaseApplication.get()) + }) + + fun getLabelPicture(markerId: String) = launch({ + val response = RetrofitServiceManager.getLabelPicture(markerId) + if (response.separateResponseState()) { + markerImageResult.value = gson.fromJson( + response, object : TypeToken() {}.type ) } else { response.toErrorMessage().show(BaseApplication.get())